mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Big parameter name cleanup, part 1
This commit is contained in:
73 files changed
+216
-215
No files matched your search
@@ -38,7 +38,7 @@ import javax.annotation.Nonnull;
|
||||
public final class BaubleRenderHandler implements LayerRenderer<EntityPlayer> {
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(@Nonnull EntityPlayer player, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) {
|
||||
public void doRenderLayer(@Nonnull EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
||||
if(!ConfigHandler.renderBaubles || player.getActivePotionEffect(MobEffects.INVISIBILITY) != null)
|
||||
return;
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ public class BotaniaPlayerController extends PlayerControllerMP implements IExte
|
||||
|
||||
private float distance = 0F;
|
||||
|
||||
public BotaniaPlayerController(Minecraft p_i45062_1_, NetHandlerPlayClient p_i45062_2_) {
|
||||
super(p_i45062_1_, p_i45062_2_);
|
||||
public BotaniaPlayerController(Minecraft mc, NetHandlerPlayClient netHandler) {
|
||||
super(mc, netHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public final class ColorHandler {
|
||||
blocks.registerBlockColorHandler(
|
||||
new IBlockColor() {
|
||||
@Override
|
||||
public int colorMultiplier(@Nonnull IBlockState state, IBlockAccess p_186720_2_, BlockPos pos, int tintIndex) {
|
||||
public int colorMultiplier(@Nonnull IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) {
|
||||
return state.getValue(BotaniaStateProps.COLOR).getMapColor().colorValue;
|
||||
}
|
||||
},
|
||||
@@ -53,7 +53,7 @@ public final class ColorHandler {
|
||||
blocks.registerBlockColorHandler(
|
||||
new IBlockColor() {
|
||||
@Override
|
||||
public int colorMultiplier(@Nonnull IBlockState state, IBlockAccess p_186720_2_, BlockPos pos, int tintIndex) {
|
||||
public int colorMultiplier(@Nonnull IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) {
|
||||
if (state.getValue(BotaniaStateProps.POOL_VARIANT) == PoolVariant.FABULOUS) {
|
||||
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
|
||||
return MathHelper.hsvToRGB(time * 0.005F, 0.6F, 1F);
|
||||
@@ -69,7 +69,7 @@ public final class ColorHandler {
|
||||
blocks.registerBlockColorHandler(
|
||||
new IBlockColor() {
|
||||
@Override
|
||||
public int colorMultiplier(@Nonnull IBlockState state, IBlockAccess p_186720_2_, BlockPos pos, int tintIndex) {
|
||||
public int colorMultiplier(@Nonnull IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) {
|
||||
if(state.getValue(BotaniaStateProps.SPREADER_VARIANT) != SpreaderVariant.GAIA)
|
||||
return 0xFFFFFF;
|
||||
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
|
||||
private static final boolean phi = false;
|
||||
|
||||
@Override
|
||||
public void doRenderLayer(@Nonnull EntityPlayer player, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) {
|
||||
public void doRenderLayer(@Nonnull EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
|
||||
String name = player.getDisplayName().getUnformattedText();
|
||||
|
||||
float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * partialTicks;
|
||||
|
||||
@@ -56,9 +56,9 @@ public class MultiblockBlockAccess implements IBlockAccess {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCombinedLight(@Nonnull BlockPos pos, int p_72802_4_) {
|
||||
public int getCombinedLight(@Nonnull BlockPos pos, int lightValue) {
|
||||
if(hasBlockAccess)
|
||||
return originalBlockAccess.getCombinedLight(pos, p_72802_4_);
|
||||
return originalBlockAccess.getCombinedLight(pos, lightValue);
|
||||
return 15728640;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public class FXSparkle extends Particle {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(VertexBuffer worldRendererIn, Entity p_180434_2_, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
public void renderParticle(VertexBuffer worldRendererIn, Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.f = f;
|
||||
this.f1 = f1;
|
||||
this.f2 = f2;
|
||||
|
||||
@@ -18,8 +18,8 @@ import vazkii.botania.common.achievement.ModAchievements;
|
||||
|
||||
public class GuiAchievementsHacky extends GuiAchievements {
|
||||
|
||||
public GuiAchievementsHacky(GuiScreen p_i45026_1_, StatisticsManager p_i45026_2_) {
|
||||
super(p_i45026_1_, p_i45026_2_);
|
||||
public GuiAchievementsHacky(GuiScreen screen, StatisticsManager stats) {
|
||||
super(screen, stats);
|
||||
ReflectionHelper.setPrivateValue(GuiAchievements.class, this, ModAchievements.pageIndex, "currentPage");
|
||||
}
|
||||
|
||||
|
||||
@@ -17,17 +17,17 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotLocked extends Slot {
|
||||
|
||||
public SlotLocked(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) {
|
||||
super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_);
|
||||
public SlotLocked(IInventory inv, int index, int xPos, int yPos) {
|
||||
super(inv, index, xPos, yPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack(EntityPlayer p_82869_1_) {
|
||||
public boolean canTakeStack(EntityPlayer player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack p_75214_1_) {
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,15 +57,15 @@ public class ContainerFlowerBag extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) {
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = inventorySlots.get(p_82846_2_);
|
||||
Slot slot = inventorySlots.get(slotIndex);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if(p_82846_2_ < 16) {
|
||||
if(slotIndex < 16) {
|
||||
if(!mergeItemStack(itemstack1, 16, 52, true))
|
||||
return null;
|
||||
} else {
|
||||
@@ -84,7 +84,7 @@ public class ContainerFlowerBag extends Container {
|
||||
if(itemstack1.stackSize == itemstack.stackSize)
|
||||
return null;
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
slot.onPickupFromSlot(player, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
||||
@@ -34,14 +34,14 @@ public class GuiFlowerBag extends GuiContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
String s = I18n.format("item.botania:flowerBag.name");
|
||||
fontRendererObj.drawString(s, xSize / 2 - fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
|
||||
fontRendererObj.drawString(I18n.format("container.inventory"), 8, ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
int k = (width - xSize) / 2;
|
||||
|
||||
@@ -81,21 +81,21 @@ public class ContainerBaubleBox extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStacksInSlots(ItemStack[] p_75131_1_) {
|
||||
public void putStacksInSlots(ItemStack[] arr) {
|
||||
baubles.blockEvents = true;
|
||||
super.putStacksInSlots(p_75131_1_);
|
||||
super.putStacksInSlots(arr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) {
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = inventorySlots.get(p_82846_2_);
|
||||
Slot slot = inventorySlots.get(slotIndex);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if(p_82846_2_ < 28) {
|
||||
if(slotIndex < 28) {
|
||||
if(!mergeItemStack(itemstack1, 28, 64, true))
|
||||
return null;
|
||||
} else {
|
||||
@@ -110,7 +110,7 @@ public class ContainerBaubleBox extends Container {
|
||||
if(itemstack1.stackSize == itemstack.stackSize)
|
||||
return null;
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
slot.onPickupFromSlot(player, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class GuiBaubleBox extends InventoryEffectRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
@@ -38,7 +38,7 @@ public class GuiBaubleBox extends InventoryEffectRenderer {
|
||||
drawTexturedModalRect(guiLeft+slot.xDisplayPosition, guiTop+slot.yDisplayPosition, 200, 0, 16, 16);
|
||||
}
|
||||
|
||||
GuiInventory.drawEntityOnScreen(guiLeft + 43, guiTop + 61, 20, guiLeft + 43 - p_146976_2_, guiTop + 45 - 30 - p_146976_3_, mc.thePlayer);
|
||||
GuiInventory.drawEntityOnScreen(guiLeft + 43, guiTop + 61, 20, guiLeft + 43 - mouseX, guiTop + 45 - 30 - mouseY, mc.thePlayer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,8 +22,8 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class ContainerCraftingHalo extends ContainerWorkbench {
|
||||
|
||||
public ContainerCraftingHalo(InventoryPlayer p_i1808_1_, World p_i1808_2_) {
|
||||
super(p_i1808_1_, p_i1808_2_, BlockPos.ORIGIN);
|
||||
public ContainerCraftingHalo(InventoryPlayer playerInv, World world) {
|
||||
super(playerInv, world, BlockPos.ORIGIN);
|
||||
|
||||
craftMatrix = new InventoryCraftingHalo(this, 3, 3);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ContainerCraftingHalo extends ContainerWorkbench {
|
||||
inventoryItemStacks.clear();
|
||||
|
||||
// Le copypasta
|
||||
addSlotToContainer(new SlotCrafting(p_i1808_1_.player, craftMatrix, craftResult, 0, 124, 35));
|
||||
addSlotToContainer(new SlotCrafting(playerInv.player, craftMatrix, craftResult, 0, 124, 35));
|
||||
int l;
|
||||
int i1;
|
||||
|
||||
@@ -47,20 +47,20 @@ public class ContainerCraftingHalo extends ContainerWorkbench {
|
||||
{
|
||||
for (i1 = 0; i1 < 9; ++i1)
|
||||
{
|
||||
addSlotToContainer(new Slot(p_i1808_1_, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18));
|
||||
addSlotToContainer(new Slot(playerInv, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (l = 0; l < 9; ++l)
|
||||
{
|
||||
addSlotToContainer(new Slot(p_i1808_1_, l, 8 + l * 18, 142));
|
||||
addSlotToContainer(new Slot(playerInv, l, 8 + l * 18, 142));
|
||||
}
|
||||
|
||||
onCraftMatrixChanged(craftMatrix);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(@Nonnull EntityPlayer p_75145_1_) {
|
||||
public boolean canInteractWith(@Nonnull EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -22,18 +22,18 @@ public class GuiCraftingHalo extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation("textures/gui/container/crafting_table.png");
|
||||
|
||||
public GuiCraftingHalo(InventoryPlayer p_i1084_1_, World p_i1084_2_) {
|
||||
super(new ContainerCraftingHalo(p_i1084_1_, p_i1084_2_));
|
||||
public GuiCraftingHalo(InventoryPlayer playerInv, World world) {
|
||||
super(new ContainerCraftingHalo(playerInv, world));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(I18n.format("container.crafting"), 28, 6, 4210752);
|
||||
fontRendererObj.drawString(I18n.format("container.inventory"), 8, ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(craftingTableGuiTextures);
|
||||
int k = (width - xSize) / 2;
|
||||
|
||||
@@ -15,8 +15,8 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
|
||||
public class InventoryCraftingHalo extends InventoryCrafting {
|
||||
|
||||
public InventoryCraftingHalo(Container p_i1807_1_, int p_i1807_2_, int p_i1807_3_) {
|
||||
super(p_i1807_1_, p_i1807_2_, p_i1807_3_);
|
||||
public InventoryCraftingHalo(Container container, int width, int height) {
|
||||
super(container, width, height);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,13 +17,13 @@ import vazkii.botania.api.sound.BotaniaSoundEvents;
|
||||
|
||||
public class GuiButtonLexicon extends GuiButton {
|
||||
|
||||
public GuiButtonLexicon(int p_i1021_1_, int p_i1021_2_, int p_i1021_3_, int p_i1021_4_, int p_i1021_5_, String p_i1021_6_) {
|
||||
super(p_i1021_1_, p_i1021_2_, p_i1021_3_, p_i1021_4_, p_i1021_5_, p_i1021_6_);
|
||||
public GuiButtonLexicon(int id, int x, int y, int width, int height, String text) {
|
||||
super(id, x, y, width, height, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playPressSound(SoundHandler p_146113_1_) {
|
||||
p_146113_1_.playSound(PositionedSoundRecord.getMasterRecord(BotaniaSoundEvents.lexiconPage, 1.0F));
|
||||
public void playPressSound(SoundHandler handler) {
|
||||
handler.playSound(PositionedSoundRecord.getMasterRecord(BotaniaSoundEvents.lexiconPage, 1.0F));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -107,8 +107,8 @@ public class RenderBabylonWeapon extends Render<EntityBabylonWeapon> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(@Nonnull EntityBabylonWeapon p_110775_1_) {
|
||||
return null;
|
||||
protected ResourceLocation getEntityTexture(@Nonnull EntityBabylonWeapon entity) {
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,8 +19,8 @@ import vazkii.botania.common.entity.EntityCorporeaSpark;
|
||||
|
||||
public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
|
||||
|
||||
public RenderCorporeaSpark(RenderManager p_i46185_1_) {
|
||||
super(p_i46185_1_);
|
||||
public RenderCorporeaSpark(RenderManager manager) {
|
||||
super(manager);
|
||||
}
|
||||
|
||||
protected DataParameter<Integer> getInvisibilityParam() {
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.render.entity;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.common.entity.EntityManaStorm;
|
||||
@@ -39,8 +40,8 @@ public class RenderManaStorm extends Render<EntityManaStorm> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(@Nonnull EntityManaStorm p_110775_1_) {
|
||||
return null;
|
||||
protected ResourceLocation getEntityTexture(@Nonnull EntityManaStorm entity) {
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,13 +22,13 @@ public class RenderPinkWither extends RenderWither {
|
||||
|
||||
private static final ResourceLocation resource = new ResourceLocation(LibResources.MODEL_PINK_WITHER);
|
||||
|
||||
public RenderPinkWither(RenderManager p_i46130_1_) {
|
||||
super(p_i46130_1_);
|
||||
public RenderPinkWither(RenderManager manager) {
|
||||
super(manager);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityWither p_110775_1_) {
|
||||
protected ResourceLocation getEntityTexture(EntityWither entity) {
|
||||
return resource;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class RenderPoolMinecart extends RenderMinecart<EntityPoolMinecart> {
|
||||
|
||||
public RenderPoolMinecart(RenderManager p_i46155_1_) {
|
||||
super(p_i46155_1_);
|
||||
public RenderPoolMinecart(RenderManager manager) {
|
||||
super(manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderCartContents(EntityPoolMinecart poolCart, float p_147910_2_, @Nonnull IBlockState state) {
|
||||
protected void renderCartContents(EntityPoolMinecart poolCart, float partialTicks, @Nonnull IBlockState state) {
|
||||
RenderTilePool.forceVariant = PoolVariant.DEFAULT;
|
||||
RenderTilePool.forceManaNumber = poolCart.getMana();
|
||||
TileEntityRendererDispatcher.instance.getSpecialRendererByClass(TilePool.class).renderTileEntityAt(null, poolCart.posX, poolCart.posY, poolCart.posZ, ClientTickHandler.partialTicks, -1);
|
||||
|
||||
@@ -29,8 +29,8 @@ import java.util.Random;
|
||||
|
||||
public abstract class RenderSparkBase<T extends Entity> extends Render<T> {
|
||||
|
||||
public RenderSparkBase(RenderManager p_i46185_1_) {
|
||||
super(p_i46185_1_);
|
||||
public RenderSparkBase(RenderManager manager) {
|
||||
super(manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,7 +98,7 @@ public abstract class RenderSparkBase<T extends Entity> extends Render<T> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(@Nonnull Entity p_110775_1_) {
|
||||
protected ResourceLocation getEntityTexture(@Nonnull Entity entity) {
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ public class RenderThornChakram extends Render<EntityThornChakram> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(@Nonnull EntityThornChakram c, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
|
||||
public void doRender(@Nonnull EntityThornChakram c, double x, double y, double z, float entityYaw, float partialTicks) {
|
||||
boolean fire = c.isFire();
|
||||
TextureAtlasSprite iicon = null;//ModItems.thornChakram.getIconFromDamage(fire ? 1 : 0);
|
||||
|
||||
if(iicon != null) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GlStateManager.translate((float)x, (float)y, (float)z);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
bindEntityTexture(c);
|
||||
|
||||
@@ -101,8 +101,8 @@ public class BlockAltGrass extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random p_149650_2_, int p_149650_3_) {
|
||||
return Blocks.DIRT.getItemDropped(state, p_149650_2_, p_149650_3_);
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return Blocks.DIRT.getItemDropped(state, rand, fortune);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -110,8 +110,8 @@ public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, BlockPos pos, IBlockState state, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, p_149689_5_.getHorizontalFacing().getOpposite()));
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, placer.getHorizontalFacing().getOpposite()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,8 +45,8 @@ public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random p_149650_2_, int p_149650_3_) {
|
||||
return Blocks.DIRT.getItemDropped(state, p_149650_2_, p_149650_3_);
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return Blocks.DIRT.getItemDropped(state, rand, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -72,7 +72,7 @@ public class BlockFakeAir extends BlockMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_) {
|
||||
public int tickRate(World world) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,26 +65,26 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World p_149726_1_, BlockPos pos, IBlockState state) {
|
||||
super.onBlockAdded(p_149726_1_, pos, state);
|
||||
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {
|
||||
super.onBlockAdded(world, pos, state);
|
||||
|
||||
if(!p_149726_1_.isRemote && p_149726_1_.getBlockState(pos.down()).getBlock() == Blocks.IRON_BARS && p_149726_1_.getBlockState(pos.down(2)).getBlock() == Blocks.IRON_BARS) {
|
||||
p_149726_1_.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||
p_149726_1_.setBlockState(pos.down(), Blocks.AIR.getDefaultState(), 2);
|
||||
p_149726_1_.setBlockState(pos.down(2), Blocks.AIR.getDefaultState(), 2);
|
||||
EntityBlaze blaze = new EntityBlaze(p_149726_1_);
|
||||
if(!world.isRemote && world.getBlockState(pos.down()).getBlock() == Blocks.IRON_BARS && world.getBlockState(pos.down(2)).getBlock() == Blocks.IRON_BARS) {
|
||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||
world.setBlockState(pos.down(), Blocks.AIR.getDefaultState(), 2);
|
||||
world.setBlockState(pos.down(2), Blocks.AIR.getDefaultState(), 2);
|
||||
EntityBlaze blaze = new EntityBlaze(world);
|
||||
blaze.setLocationAndAngles(pos.getX() + 0.5D, pos.getY() - 1.95D, pos.getZ() + 0.5D, 0.0F, 0.0F);
|
||||
blaze.getEntityData().setBoolean(TAG_FEL_SPAWNED, true);
|
||||
p_149726_1_.spawnEntityInWorld(blaze);
|
||||
p_149726_1_.notifyNeighborsOfStateChange(pos, Blocks.AIR);
|
||||
p_149726_1_.notifyNeighborsOfStateChange(pos.down(), Blocks.AIR);
|
||||
p_149726_1_.notifyNeighborsOfStateChange(pos.down(2), Blocks.AIR);
|
||||
world.spawnEntityInWorld(blaze);
|
||||
world.notifyNeighborsOfStateChange(pos, Blocks.AIR);
|
||||
world.notifyNeighborsOfStateChange(pos.down(), Blocks.AIR);
|
||||
world.notifyNeighborsOfStateChange(pos.down(2), Blocks.AIR);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, BlockPos pos, IBlockState state, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, p_149689_5_.getHorizontalFacing().getOpposite()));
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, placer.getHorizontalFacing().getOpposite()));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -49,12 +49,12 @@ public class BlockGaiaHead extends BlockSkull {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<ItemStack> getDrops(@Nonnull IBlockAccess p_149749_1_, @Nonnull BlockPos pos, IBlockState state, int fortune) {
|
||||
public List<ItemStack> getDrops(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, IBlockState state, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<>();
|
||||
|
||||
if(!state.getValue(NODROP)) {
|
||||
ItemStack itemstack = new ItemStack(ModItems.gaiaHead, 1);
|
||||
TileEntitySkull tileentityskull = (TileEntitySkull)p_149749_1_.getTileEntity(pos);
|
||||
TileEntitySkull tileentityskull = (TileEntitySkull)world.getTileEntity(pos);
|
||||
|
||||
if(tileentityskull == null)
|
||||
return ret;
|
||||
@@ -65,7 +65,7 @@ public class BlockGaiaHead extends BlockSkull {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return ModItems.gaiaHead;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class BlockGaiaHead extends BlockSkull {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileGaiaHead();
|
||||
}
|
||||
}
|
||||
@@ -102,8 +102,8 @@ public class BlockIncensePlate extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, BlockPos pos, IBlockState state, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, p_149689_5_.getHorizontalFacing().getOpposite()));
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, placer.getHorizontalFacing().getOpposite()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -82,7 +82,7 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess p_149655_1_, BlockPos pos) {
|
||||
public boolean isPassable(IBlockAccess world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public class BlockLightRelay extends BlockMod implements IWandable, ILexiconable
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess p_149655_1_, BlockPos pos) {
|
||||
public boolean isPassable(IBlockAccess world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -108,12 +108,12 @@ public class BlockLightRelay extends BlockMod implements IWandable, ILexiconable
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, @Nonnull World p_149668_1_, @Nonnull BlockPos pos) {
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, @Nonnull World world, @Nonnull BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_) {
|
||||
public int tickRate(World world) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,9 +163,9 @@ public abstract class BlockModDoubleFlower extends BlockDoublePlant implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(@Nonnull Item p_149666_1_, CreativeTabs p_149666_2_, @Nonnull List<ItemStack> p_149666_3_) {
|
||||
public void getSubBlocks(@Nonnull Item item, CreativeTabs tab, @Nonnull List<ItemStack> stacks) {
|
||||
for(int i = 0; i < COUNT; ++i)
|
||||
p_149666_3_.add(new ItemStack(p_149666_1_, 1, i));
|
||||
stacks.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -43,12 +43,12 @@ public class BlockRoot extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return ModItems.manaResource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(IBlockState p_149692_1_) {
|
||||
public int damageDropped(IBlockState state) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class BlockSolidVines extends BlockVine implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World p_149674_1_, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Random p_149674_5_) {
|
||||
public void updateTick(World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Random rand) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess p_149655_1_, BlockPos pos) {
|
||||
public boolean isPassable(IBlockAccess world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public class BlockCorporeaInterceptor extends BlockCorporeaBase implements ILexi
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_) {
|
||||
public int tickRate(World world) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class BlockBuriedPetals extends BlockModFlower {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random p_149650_2_, int p_149650_3_) {
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return ModItems.petal;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class BlockManaFlame extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess p_149655_1_, BlockPos pos) {
|
||||
public boolean isPassable(IBlockAccess world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class BlockModMushroom extends BlockMushroom implements IInfusionStabilis
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(@Nonnull World p_149674_1_, @Nonnull BlockPos pos, IBlockState state, Random p_149674_5_) {
|
||||
public void updateTick(@Nonnull World world, @Nonnull BlockPos pos, IBlockState state, Random rand) {
|
||||
// NO-OP, to prevent spreading
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class BlockSpecialQuartzSlab extends BlockModSlab {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return Item.getItemFromBlock(getSingleBlock());
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return Item.getItemFromBlock(getSingleBlock());
|
||||
}
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@ public class BehaviourPoolMinecart extends BehaviorDefaultDispenseItem {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack dispenseStack(IBlockSource p_82487_1_, ItemStack p_82487_2_) {
|
||||
EnumFacing enumfacing = BlockDispenser.getFacing(p_82487_1_.getBlockMetadata());
|
||||
World world = p_82487_1_.getWorld();
|
||||
double d0 = p_82487_1_.getX() + enumfacing.getFrontOffsetX() * 1.125F;
|
||||
double d1 = p_82487_1_.getY() + enumfacing.getFrontOffsetY() * 1.125F;
|
||||
double d2 = p_82487_1_.getZ() + enumfacing.getFrontOffsetZ() * 1.125F;
|
||||
BlockPos pos = p_82487_1_.getBlockPos().offset(enumfacing);
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack) {
|
||||
EnumFacing enumfacing = BlockDispenser.getFacing(source.getBlockMetadata());
|
||||
World world = source.getWorld();
|
||||
double d0 = source.getX() + enumfacing.getFrontOffsetX() * 1.125F;
|
||||
double d1 = source.getY() + enumfacing.getFrontOffsetY() * 1.125F;
|
||||
double d2 = source.getZ() + enumfacing.getFrontOffsetZ() * 1.125F;
|
||||
BlockPos pos = source.getBlockPos().offset(enumfacing);
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
double d3;
|
||||
|
||||
@@ -43,24 +43,24 @@ public class BehaviourPoolMinecart extends BehaviorDefaultDispenseItem {
|
||||
d3 = 0.0D;
|
||||
else {
|
||||
if(state.getMaterial() != Material.AIR || !BlockRailBase.isRailBlock(world.getBlockState(pos.down())))
|
||||
return super.dispenseStack(p_82487_1_, p_82487_2_);
|
||||
return super.dispenseStack(source, stack);
|
||||
|
||||
d3 = -1.0D;
|
||||
}
|
||||
|
||||
EntityMinecart entityminecart = new EntityPoolMinecart(world, d0, d1 + d3, d2);
|
||||
|
||||
if(p_82487_2_.hasDisplayName())
|
||||
entityminecart.setCustomNameTag(p_82487_2_.getDisplayName());
|
||||
if(stack.hasDisplayName())
|
||||
entityminecart.setCustomNameTag(stack.getDisplayName());
|
||||
|
||||
world.spawnEntityInWorld(entityminecart);
|
||||
p_82487_2_.splitStack(1);
|
||||
return p_82487_2_;
|
||||
stack.splitStack(1);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void playDispenseSound(IBlockSource p_82485_1_) {
|
||||
p_82485_1_.getWorld().playEvent(1000, p_82485_1_.getBlockPos(), 0);
|
||||
protected void playDispenseSound(IBlockSource source) {
|
||||
source.getWorld().playEvent(1000, source.getBlockPos(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,8 +74,8 @@ public class BlockBellows extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, BlockPos pos, IBlockState state, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, p_149689_5_.getHorizontalFacing()), 2);
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, placer.getHorizontalFacing()), 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -94,7 +94,7 @@ public class BlockEnchanter extends BlockMod implements IWandable, ILexiconable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random p_149650_2_, int p_149650_3_) {
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return Item.getItemFromBlock(Blocks.LAPIS_BLOCK);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ public class BlockPool extends BlockMod implements IWandHUD, IWandable, ILexicon
|
||||
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxToList(IBlockState state, @Nonnull World p_149743_1_, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, @Nonnull List<AxisAlignedBB> boxes, Entity entity) {
|
||||
public void addCollisionBoxToList(IBlockState state, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, @Nonnull List<AxisAlignedBB> boxes, Entity entity) {
|
||||
addCollisionBoxToList(pos, entityBox, boxes, BOTTOM_AABB);
|
||||
addCollisionBoxToList(pos, entityBox, boxes, NORTH_AABB);
|
||||
addCollisionBoxToList(pos, entityBox, boxes, SOUTH_AABB);
|
||||
|
||||
@@ -77,8 +77,8 @@ public class BlockPump extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, BlockPos pos, IBlockState state, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, p_149689_5_.getHorizontalFacing().getOpposite()), 2);
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
world.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, placer.getHorizontalFacing().getOpposite()), 2);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -86,7 +86,7 @@ public class BlockTerraPlate extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess p_149655_1_, BlockPos pos) {
|
||||
public boolean isPassable(IBlockAccess world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class BlockRedStringInterceptor extends BlockRedString {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_) {
|
||||
public int tickRate(World world) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public class TileCraftCrate extends TileOpenCrate {
|
||||
|
||||
InventoryCrafting craft = new InventoryCrafting(new Container() {
|
||||
@Override
|
||||
public boolean canInteractWith(@Nonnull EntityPlayer p_75145_1_) {
|
||||
public boolean canInteractWith(@Nonnull EntityPlayer player) {
|
||||
return false;
|
||||
}
|
||||
}, 3, 3);
|
||||
|
||||
@@ -266,7 +266,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(@Nonnull DamageSource p_70097_1_, float p_70097_2_) {
|
||||
public boolean attackEntityFrom(@Nonnull DamageSource source, float damage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,24 +19,24 @@ import java.util.Random;
|
||||
|
||||
public class TileRedStringFertilizer extends TileRedString {
|
||||
|
||||
public boolean canGrow(World p_149851_1_, boolean p_149851_5_) {
|
||||
public boolean canGrow(World world, boolean isClient) {
|
||||
BlockPos binding = getBinding();
|
||||
Block block = getBlockAtBinding();
|
||||
|
||||
return block instanceof IGrowable ? ((IGrowable) block).canGrow(p_149851_1_, binding, p_149851_1_.getBlockState(binding), p_149851_5_) : false;
|
||||
return block instanceof IGrowable ? ((IGrowable) block).canGrow(world, binding, world.getBlockState(binding), isClient) : false;
|
||||
}
|
||||
|
||||
public boolean canUseBonemeal(World p_149852_1_, Random p_149852_2_) {
|
||||
public boolean canUseBonemeal(World world, Random rand) {
|
||||
BlockPos binding = getBinding();
|
||||
Block block = getBlockAtBinding();
|
||||
return block instanceof IGrowable ? ((IGrowable) block).canUseBonemeal(p_149852_1_, p_149852_2_, binding, p_149852_1_.getBlockState(binding)) : false;
|
||||
return block instanceof IGrowable ? ((IGrowable) block).canUseBonemeal(world, rand, binding, world.getBlockState(binding)) : false;
|
||||
}
|
||||
|
||||
public void grow(World p_149853_1_, Random p_149853_2_) {
|
||||
public void grow(World world, Random rand) {
|
||||
BlockPos binding = getBinding();
|
||||
Block block = getBlockAtBinding();
|
||||
if(block instanceof IGrowable)
|
||||
((IGrowable) block).grow(p_149853_1_, p_149853_2_, binding, p_149853_1_.getBlockState(binding));
|
||||
((IGrowable) block).grow(world, rand, binding, world.getBlockState(binding));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CommandOpen extends CommandBase {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getCommandUsage(@Nonnull ICommandSender p_71518_1_) {
|
||||
public String getCommandUsage(@Nonnull ICommandSender sender) {
|
||||
return "<entry>";
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class CommandShare extends CommandBase {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getCommandUsage(@Nonnull ICommandSender p_71518_1_) {
|
||||
public String getCommandUsage(@Nonnull ICommandSender sender) {
|
||||
return "<entry>";
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CommandSkyblockSpread extends CommandBase {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getCommandUsage(@Nonnull ICommandSender p_71518_1_) {
|
||||
public String getCommandUsage(@Nonnull ICommandSender sender) {
|
||||
return "<player> [<range>]";
|
||||
}
|
||||
|
||||
|
||||
@@ -414,8 +414,8 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBoss {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeath(@Nonnull DamageSource p_70645_1_) {
|
||||
super.onDeath(p_70645_1_);
|
||||
public void onDeath(@Nonnull DamageSource source) {
|
||||
super.onDeath(source);
|
||||
EntityLivingBase entitylivingbase = getAttackingEntity();
|
||||
if(entitylivingbase instanceof EntityPlayer) {
|
||||
((EntityPlayer) entitylivingbase).addStat(ModAchievements.gaiaGuardianKill, 1);
|
||||
|
||||
@@ -194,9 +194,9 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotationDirect(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_, boolean p_70056_10) {
|
||||
setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
|
||||
setRotation(p_70056_7_, p_70056_8_);
|
||||
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport) {
|
||||
setPosition(x, y, z);
|
||||
setRotation(yaw, pitch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,8 +33,8 @@ public class EntityManaStorm extends Entity {
|
||||
public int burstsFired;
|
||||
public int deathTime;
|
||||
|
||||
public EntityManaStorm(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
public EntityManaStorm(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,8 +28,8 @@ import java.util.Iterator;
|
||||
|
||||
public class EntityPinkWither extends EntityWither {
|
||||
|
||||
public EntityPinkWither(World p_i1701_1_) {
|
||||
super(p_i1701_1_);
|
||||
public EntityPinkWither(World world) {
|
||||
super(world);
|
||||
|
||||
Iterator<EntityAITasks.EntityAITaskEntry> taskIter = this.tasks.taskEntries.iterator();
|
||||
while (taskIter.hasNext()) {
|
||||
@@ -78,7 +78,7 @@ public class EntityPinkWither extends EntityWither {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) {
|
||||
protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@@ -43,12 +43,12 @@ public class EntityPoolMinecart extends EntityMinecart {
|
||||
private static final String TAG_MANA = "mana";
|
||||
private static final DataParameter<Integer> MANA = EntityDataManager.createKey(EntityPoolMinecart.class, DataSerializers.VARINT);
|
||||
|
||||
public EntityPoolMinecart(World p_i1712_1_) {
|
||||
super(p_i1712_1_);
|
||||
public EntityPoolMinecart(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityPoolMinecart(World p_i1715_1_, double p_i1715_2_, double p_i1715_4_, double p_i1715_6_) {
|
||||
super(p_i1715_1_, p_i1715_2_, p_i1715_4_, p_i1715_6_);
|
||||
public EntityPoolMinecart(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,8 +81,8 @@ public class EntityPoolMinecart extends EntityMinecart {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void killMinecart(DamageSource p_94095_1_) {
|
||||
super.killMinecart(p_94095_1_);
|
||||
public void killMinecart(DamageSource source) {
|
||||
super.killMinecart(source);
|
||||
dropItemWithOffset(Item.getItemFromBlock(ModBlocks.pool), 1, 0.0F);
|
||||
}
|
||||
|
||||
@@ -167,15 +167,15 @@ public class EntityPoolMinecart extends EntityMinecart {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(@Nonnull NBTTagCompound p_70014_1_) {
|
||||
super.writeEntityToNBT(p_70014_1_);
|
||||
p_70014_1_.setInteger(TAG_MANA, getMana());
|
||||
protected void writeEntityToNBT(@Nonnull NBTTagCompound cmp) {
|
||||
super.writeEntityToNBT(cmp);
|
||||
cmp.setInteger(TAG_MANA, getMana());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
super.readEntityFromNBT(p_70037_1_);
|
||||
setMana(p_70037_1_.getInteger(TAG_MANA));
|
||||
protected void readEntityFromNBT(NBTTagCompound cmp) {
|
||||
super.readEntityFromNBT(cmp);
|
||||
setMana(cmp.getInteger(TAG_MANA));
|
||||
}
|
||||
|
||||
public int getMana() {
|
||||
|
||||
@@ -31,9 +31,9 @@ public class EntityThrownItem extends EntityItem {
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
public EntityThrownItem(World p_i1710_1_, double p_i1710_2_,
|
||||
double p_i1710_4_, double p_i1710_6_, EntityItem item) {
|
||||
super(p_i1710_1_, p_i1710_2_, p_i1710_4_, p_i1710_6_, item.getEntityItem());
|
||||
public EntityThrownItem(World world, double x,
|
||||
double y, double z, EntityItem item) {
|
||||
super(world, x, y, z, item.getEntityItem());
|
||||
|
||||
int pickupDelay = 0;
|
||||
try {
|
||||
|
||||
@@ -135,7 +135,7 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack itemstack, World p_77663_2_, Entity entity, int p_77663_4_, boolean p_77663_5_) {
|
||||
public void onUpdate(ItemStack itemstack, World world, Entity entity, int slot, boolean selected) {
|
||||
Block block = getBlock(itemstack);
|
||||
if(!entity.worldObj.isRemote && itemstack.getItemDamage() == 1 && block != Blocks.AIR && entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
|
||||
@@ -37,9 +37,9 @@ public class ItemManaCookie extends ItemFood {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFoodEaten(ItemStack p_77849_1_, World p_77849_2_, @Nonnull EntityPlayer p_77849_3_) {
|
||||
super.onFoodEaten(p_77849_1_, p_77849_2_, p_77849_3_);
|
||||
p_77849_3_.addStat(ModAchievements.manaCookieEat, 1);
|
||||
protected void onFoodEaten(ItemStack stack, World world, @Nonnull EntityPlayer player) {
|
||||
super.onFoodEaten(stack, world, player);
|
||||
player.addStat(ModAchievements.manaCookieEat, 1);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -64,8 +64,8 @@ public class ItemPinkinator extends ItemMod {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List<String> p_77624_3_, boolean p_77624_4_) {
|
||||
p_77624_3_.add(I18n.format("botaniamisc.pinkinatorDesc"));
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||
tooltip.add(I18n.format("botaniamisc.pinkinatorDesc"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -41,18 +41,18 @@ public class ItemPoolMinecart extends ItemMod implements ICraftAchievement, IMin
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, BlockPos pos, EnumHand hand, EnumFacing side, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
|
||||
if(BlockRailBase.isRailBlock(p_77648_3_.getBlockState(pos))) {
|
||||
if(!p_77648_3_.isRemote) {
|
||||
EntityMinecart entityminecart = new EntityPoolMinecart(p_77648_3_, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
if(BlockRailBase.isRailBlock(world.getBlockState(pos))) {
|
||||
if(!world.isRemote) {
|
||||
EntityMinecart entityminecart = new EntityPoolMinecart(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
|
||||
|
||||
if(p_77648_1_.hasDisplayName())
|
||||
entityminecart.setCustomNameTag(p_77648_1_.getDisplayName());
|
||||
if(stack.hasDisplayName())
|
||||
entityminecart.setCustomNameTag(stack.getDisplayName());
|
||||
|
||||
p_77648_3_.spawnEntityInWorld(entityminecart);
|
||||
world.spawnEntityInWorld(entityminecart);
|
||||
}
|
||||
|
||||
--p_77648_1_.stackSize;
|
||||
--stack.stackSize;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,21 +68,21 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem, IPickup
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return drinkSpeed;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.DRINK;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(@Nonnull ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_, EnumHand hand) {
|
||||
p_77659_3_.setActiveHand(hand);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, p_77659_1_);
|
||||
public ActionResult<ItemStack> onItemRightClick(@Nonnull ItemStack stack, World world, EntityPlayer player, EnumHand hand) {
|
||||
player.setActiveHand(hand);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ public class ItemManaweaveArmor extends ItemManasteelArmor implements ICraftAchi
|
||||
@Nonnull
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getUnlocalizedName(ItemStack p_77667_1_) {
|
||||
String name = super.getUnlocalizedName(p_77667_1_);
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
String name = super.getUnlocalizedName(stack);
|
||||
if(ClientProxy.jingleTheBells)
|
||||
name = name.replaceAll("manaweave", "santaweave");
|
||||
return name;
|
||||
|
||||
+10
-10
@@ -79,30 +79,30 @@ public class ItemManasteelShovel extends ItemSpade implements IManaUsingItem, IS
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumActionResult onItemUse(@Nonnull ItemStack p_77648_1_, EntityPlayer p_77648_2_, @Nonnull World p_77648_3_, BlockPos pos, EnumHand hand, @Nonnull EnumFacing side, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
|
||||
if(!p_77648_2_.canPlayerEdit(pos, side, p_77648_1_))
|
||||
public EnumActionResult onItemUse(@Nonnull ItemStack stack, EntityPlayer player, @Nonnull World world, BlockPos pos, EnumHand hand, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.canPlayerEdit(pos, side, stack))
|
||||
return EnumActionResult.PASS;
|
||||
else {
|
||||
UseHoeEvent event = new UseHoeEvent(p_77648_2_, p_77648_1_, p_77648_3_, pos);
|
||||
UseHoeEvent event = new UseHoeEvent(player, stack, world, pos);
|
||||
if(MinecraftForge.EVENT_BUS.post(event))
|
||||
return EnumActionResult.FAIL;
|
||||
|
||||
if(event.getResult() == Result.ALLOW) {
|
||||
ToolCommons.damageItem(p_77648_1_, 1, p_77648_2_, MANA_PER_DAMAGE);
|
||||
ToolCommons.damageItem(stack, 1, player, MANA_PER_DAMAGE);
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
Block block = p_77648_3_.getBlockState(pos).getBlock();
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
|
||||
if(side != EnumFacing.DOWN && p_77648_3_.getBlockState(pos.up()).getBlock().isAir(p_77648_3_.getBlockState(pos.up()), p_77648_3_, pos.up()) && (block == Blocks.GRASS || block == Blocks.DIRT)) {
|
||||
if(side != EnumFacing.DOWN && world.getBlockState(pos.up()).getBlock().isAir(world.getBlockState(pos.up()), world, pos.up()) && (block == Blocks.GRASS || block == Blocks.DIRT)) {
|
||||
Block block1 = Blocks.FARMLAND;
|
||||
p_77648_3_.playSound(null, pos, block1.getSoundType().getStepSound(), SoundCategory.BLOCKS, (block1.getSoundType().getVolume() + 1.0F) / 2.0F, block1.getSoundType().getPitch() * 0.8F);
|
||||
world.playSound(null, pos, block1.getSoundType().getStepSound(), SoundCategory.BLOCKS, (block1.getSoundType().getVolume() + 1.0F) / 2.0F, block1.getSoundType().getPitch() * 0.8F);
|
||||
|
||||
if (p_77648_3_.isRemote)
|
||||
if (world.isRemote)
|
||||
return EnumActionResult.SUCCESS;
|
||||
else {
|
||||
p_77648_3_.setBlockState(pos, block1.getDefaultState());
|
||||
ToolCommons.damageItem(p_77648_1_, 1, p_77648_2_, MANA_PER_DAMAGE);
|
||||
world.setBlockState(pos, block1.getDefaultState());
|
||||
ToolCommons.damageItem(stack, 1, player, MANA_PER_DAMAGE);
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,14 +63,14 @@ public class ItemDye extends Item16Colors {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, EntityLivingBase p_111207_3_, EnumHand hand) {
|
||||
if(p_111207_3_ instanceof EntitySheep) {
|
||||
EntitySheep entitysheep = (EntitySheep)p_111207_3_;
|
||||
EnumDyeColor i = EnumDyeColor.byMetadata(p_111207_1_.getItemDamage());
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase target, EnumHand hand) {
|
||||
if(target instanceof EntitySheep) {
|
||||
EntitySheep entitysheep = (EntitySheep)target;
|
||||
EnumDyeColor i = EnumDyeColor.byMetadata(stack.getItemDamage());
|
||||
|
||||
if(!entitysheep.getSheared() && entitysheep.getFleeceColor() != i) {
|
||||
entitysheep.setFleeceColor(i);
|
||||
--p_111207_1_.stackSize;
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -33,24 +33,24 @@ public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
return isBoot(p_77661_1_) ? EnumAction.DRINK : EnumAction.EAT;
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return isBoot(stack) ? EnumAction.DRINK : EnumAction.EAT;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(@Nonnull ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_, EnumHand hand) {
|
||||
if(p_77659_3_.canEat(false) && isRightPlayer(p_77659_3_, p_77659_1_)) {
|
||||
p_77659_3_.setActiveHand(hand);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, p_77659_1_);
|
||||
public ActionResult<ItemStack> onItemRightClick(@Nonnull ItemStack stack, World world, EntityPlayer player, EnumHand hand) {
|
||||
if(player.canEat(false) && isRightPlayer(player, stack)) {
|
||||
player.setActiveHand(hand);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
return ActionResult.newResult(EnumActionResult.PASS, p_77659_1_);
|
||||
return ActionResult.newResult(EnumActionResult.PASS, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,8 +53,8 @@ public class ItemRelic extends ItemMod implements IRelic {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List<String> p_77624_3_, boolean p_77624_4_) {
|
||||
addBindInfo(p_77624_3_, p_77624_1_, p_77624_2_);
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||
addBindInfo(tooltip, stack, player);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -185,7 +185,7 @@ public class ItemRelic extends ItemMod implements IRelic {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack p_77613_1_) {
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return BotaniaAPI.rarityRelic;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ public abstract class ItemRelicBauble extends ItemBauble implements IRelic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) {
|
||||
if(p_77663_3_ instanceof EntityPlayer)
|
||||
dummy.updateRelic(p_77663_1_, (EntityPlayer) p_77663_3_);
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean held) {
|
||||
if(entity instanceof EntityPlayer)
|
||||
dummy.updateRelic(stack, (EntityPlayer) entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,7 +111,7 @@ public abstract class ItemRelicBauble extends ItemBauble implements IRelic {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack p_77613_1_) {
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return BotaniaAPI.rarityRelic;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ItemGravityRod extends ItemMod implements IManaUsingItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity par3Entity, int p_77663_4_, boolean p_77663_5_) {
|
||||
public void onUpdate(ItemStack stack, World world, Entity par3Entity, int slot, boolean held) {
|
||||
if(!(par3Entity instanceof EntityPlayer))
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user