diff --git a/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileHopperhock.java b/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileHopperhock.java index 4706be782..04db15863 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileHopperhock.java +++ b/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileHopperhock.java @@ -79,7 +79,7 @@ public class SubTileHopperhock extends SubTileFunctional { int y_ = y + dir.offsetY; int z_ = z + dir.offsetZ; - IInventory inv = InventoryHelper.getInventory(supertile.getWorld(), x_, y_, z_); + IInventory inv = InventoryHelper.getInventory(supertile.getWorld(), , x_); if(inv != null) { List filter = getFilterForInventory(inv, x_, y_, z_, true); boolean canAccept = canAcceptItem(stack, filter, filterType); diff --git a/src/main/java/vazkii/botania/common/block/tile/corporea/TileCorporeaFunnel.java b/src/main/java/vazkii/botania/common/block/tile/corporea/TileCorporeaFunnel.java index cc6fd219f..f3ef72231 100644 --- a/src/main/java/vazkii/botania/common/block/tile/corporea/TileCorporeaFunnel.java +++ b/src/main/java/vazkii/botania/common/block/tile/corporea/TileCorporeaFunnel.java @@ -89,9 +89,9 @@ public class TileCorporeaFunnel extends TileCorporeaBase implements ICorporeaReq if(!(request instanceof ItemStack)) return; - IInventory inv = InventoryHelper.getInventory(worldObj, xCoord, yCoord - 1, zCoord); + IInventory inv = InventoryHelper.getInventory(worldObj, , xCoord); if(inv == null) - inv = InventoryHelper.getInventory(worldObj, xCoord, yCoord - 2, zCoord); + inv = InventoryHelper.getInventory(worldObj, , xCoord); List stacks = CorporeaHelper.requestItem(request, count, spark, true, true); spark.onItemsRequested(stacks); diff --git a/src/main/java/vazkii/botania/common/core/command/CommandShare.java b/src/main/java/vazkii/botania/common/core/command/CommandShare.java index f77a03858..399f035c5 100644 --- a/src/main/java/vazkii/botania/common/core/command/CommandShare.java +++ b/src/main/java/vazkii/botania/common/core/command/CommandShare.java @@ -36,7 +36,7 @@ public class CommandShare extends CommandBase { json = json.replaceAll("%entry%", args[0]); json = json.replaceAll("%entryname%", StatCollector.translateToLocal("botania.entry." + args[0])); - IChatComponent component = IChatComponent.Serializer.func_150699_a(json); + IChatComponent component = IChatComponent.Serializer.jsonToComponent(json); MinecraftServer.getServer().getConfigurationManager().sendChatMsg(component); } diff --git a/src/main/java/vazkii/botania/common/core/command/CommandSkyblockSpread.java b/src/main/java/vazkii/botania/common/core/command/CommandSkyblockSpread.java index c00cffde2..66b9870d9 100644 --- a/src/main/java/vazkii/botania/common/core/command/CommandSkyblockSpread.java +++ b/src/main/java/vazkii/botania/common/core/command/CommandSkyblockSpread.java @@ -37,14 +37,14 @@ public class CommandSkyblockSpread extends CommandBase { } @Override - public void processCommand(ICommandSender sender, String[] args) { + public void processCommand(ICommandSender sender, String[] args) throws CommandException { int maxAllowed = 1000000; int minAllowed = 250; int minDist = 100; int maxrange = 200000; if(args.length == 2) - maxrange = parseInt(sender, args[1]); + maxrange = parseInt(sender, args[1]); // <- todo 1.8 wat if(maxrange > maxAllowed) throw new CommandException("botaniamisc.skyblockRangeTooHigh"); @@ -57,11 +57,11 @@ public class CommandSkyblockSpread extends CommandBase { int x, z; do { - x = player.worldObj.rand.nextInt(maxrange) - maxrange / 2 + spawn.posX; - z = player.worldObj.rand.nextInt(maxrange) - maxrange / 2 + spawn.posZ; - } while(MathHelper.pointDistancePlane(x, z, spawn.posX, spawn.posZ) < minDist); + x = player.worldObj.rand.nextInt(maxrange) - maxrange / 2 + spawn.getX(); + z = player.worldObj.rand.nextInt(maxrange) - maxrange / 2 + spawn.getZ(); + } while(MathHelper.pointDistancePlane(x, z, spawn.getX(), spawn.getZ()) < minDist); - SkyblockWorldEvents.spawnPlayer(player, x, spawn.posY, z, true); + SkyblockWorldEvents.spawnPlayer(player, new BlockPos(x, spawn.getY(), z), true); } } diff --git a/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java b/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java index 9d5b33f03..ac8529344 100644 --- a/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/BiomeDecorationHandler.java @@ -10,6 +10,7 @@ */ package vazkii.botania.common.core.handler; +import net.minecraft.util.BlockPos; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType; import vazkii.botania.api.item.IFlowerlessBiome; @@ -31,8 +32,8 @@ public class BiomeDecorationHandler { boolean flowers = true; if(event.world.provider instanceof IFlowerlessWorld) flowers = ((IFlowerlessWorld) event.world.provider).generateFlowers(event.world); - else if(event.world.getBiomeGenForCoords(event.chunkX, event.chunkZ) instanceof IFlowerlessBiome) - flowers = ((IFlowerlessBiome) event.world.getBiomeGenForCoords(event.chunkX, event.chunkZ)).canGenerateFlowers(event.world, event.chunkX, event.chunkZ); + else if(event.world.getBiomeGenForCoords(event.pos) instanceof IFlowerlessBiome) + flowers = ((IFlowerlessBiome) event.world.getBiomeGenForCoords(event.pos)).canGenerateFlowers(event.world, event.pos.getX(), event.pos.getZ()); if(!flowers) return; @@ -40,9 +41,9 @@ public class BiomeDecorationHandler { int dist = Math.min(8, Math.max(1, ConfigHandler.flowerPatchSize)); for(int i = 0; i < ConfigHandler.flowerQuantity; i++) { if(event.rand.nextInt(ConfigHandler.flowerPatchChance) == 0) { - int x = event.chunkX + event.rand.nextInt(16) + 8; - int z = event.chunkZ + event.rand.nextInt(16) + 8; - int y = event.world.getTopSolidOrLiquidBlock(x, z); + int x = event.pos.getX() + event.rand.nextInt(16) + 8; + int z = event.pos.getZ() + event.rand.nextInt(16) + 8; + int y = event.world.getTopSolidOrLiquidBlock(event.pos).getY(); int color = event.rand.nextInt(16); boolean primus = event.rand.nextInt(380) == 0; @@ -51,16 +52,16 @@ public class BiomeDecorationHandler { int x1 = x + event.rand.nextInt(dist * 2) - dist; int y1 = y + event.rand.nextInt(4) - event.rand.nextInt(4); int z1 = z + event.rand.nextInt(dist * 2) - dist; - - if(event.world.isAirBlock(x1, y1, z1) && (!event.world.provider.hasNoSky || y1 < 127) && ModBlocks.flower.canBlockStay(event.world, x1, y1, z1)) { + BlockPos pos2 = new BlockPos(x1, y1, z1); + if(event.world.isAirBlock(pos2) && (!event.world.provider.getHasNoSky() || y1 < 127) && ModBlocks.flower.canBlockStay(event.world, x1, y1, z1)) { if(primus) { - event.world.setBlock(x1, y1, z1, ModBlocks.specialFlower, 0, 2); - TileSpecialFlower flower = (TileSpecialFlower) event.world.getTileEntity(x1, y1, z1); + event.world.setBlockState(pos2, ModBlocks.specialFlower.getDefaultState(), 2); + TileSpecialFlower flower = (TileSpecialFlower) event.world.getTileEntity(pos2); flower.setSubTile(event.rand.nextBoolean() ? LibBlockNames.SUBTILE_NIGHTSHADE_PRIME : LibBlockNames.SUBTILE_DAYBLOOM_PRIME); SubTileDaybloom subtile = (SubTileDaybloom) flower.getSubTile(); subtile.setPrimusPosition(); } else { - event.world.setBlock(x1, y1, z1, ModBlocks.flower, color, 2); + event.world.setBlockState(pos2, ModBlocks.flower, color, 2); if(event.rand.nextDouble() < ConfigHandler.flowerTallChance && ((BlockModFlower) ModBlocks.flower).func_149851_a(event.world, x1, y1, z1, false)) BlockModFlower.placeDoubleFlower(event.world, x1, y1, z1, color, 0); } @@ -70,13 +71,13 @@ public class BiomeDecorationHandler { } for(int i = 0; i < ConfigHandler.mushroomQuantity; i++) { - int x = event.chunkX + event.rand.nextInt(16) + 8; - int z = event.chunkZ + event.rand.nextInt(16) + 8; + int x = event.pos.getX() + event.rand.nextInt(16) + 8; + int z = event.pos.getZ() + event.rand.nextInt(16) + 8; int y = event.rand.nextInt(26) + 4; - + BlockPos pos3 = new BlockPos(x, y, z); int color = event.rand.nextInt(16); - if(event.world.isAirBlock(x, y, z) && ModBlocks.mushroom.canBlockStay(event.world, x, y, z)) - event.world.setBlock(x, y, z, ModBlocks.mushroom, color, 2); + if(event.world.isAirBlock(pos3) && ModBlocks.mushroom.canBlockStay(event.world, x, y, z)) + event.world.setBlockState(pos3, ModBlocks.mushroom, color, 2); } } } diff --git a/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java b/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java index 54de30638..d57e8ddc2 100644 --- a/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java @@ -236,7 +236,7 @@ public class InternalMethodHandler extends DummyMethodHandler { @Override public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side) { - ItemLokiRing.breakOnAllCursors(player, item, stack, x, y, z, side); + ItemLokiRing.breakOnAllCursors(player, item, stack, pos, side); } @Override @@ -246,7 +246,7 @@ public class InternalMethodHandler extends DummyMethodHandler { @Override public boolean isBotaniaFlower(World world, BlockPos pos) { - Block block = world.getBlock(x, y, z); + Block block = world.getBlockState(pos).getBlock(); return block == ModBlocks.flower || block == ModBlocks.shinyFlower || block == ModBlocks.specialFlower; } diff --git a/src/main/java/vazkii/botania/common/core/handler/SheddingHandler.java b/src/main/java/vazkii/botania/common/core/handler/SheddingHandler.java index 7ae085f17..1700e3d56 100644 --- a/src/main/java/vazkii/botania/common/core/handler/SheddingHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/SheddingHandler.java @@ -110,7 +110,7 @@ public final class SheddingHandler { int lexiconSize = 40; if(defaultPattern != null) { - itemName = Item.itemRegistry.getNameForObject(defaultPattern.getItemStack().getItem()); + itemName = Item.itemRegistry.getNameForObject(defaultPattern.getItemStack().getItem()).toString(); metadata = defaultPattern.getItemStack().getItemDamage(); rate = defaultPattern.rate; lexiconSize = defaultPattern.lexiconSize; diff --git a/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java b/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java index 663f20e5e..beb00941f 100644 --- a/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java +++ b/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java @@ -26,8 +26,12 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IChatComponent; +import net.minecraft.world.ILockableContainer; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; //From OpenBlocksLib: https://github.com/OpenMods/OpenModsLib public class InventoryHelper { @@ -62,18 +66,18 @@ public class InventoryHelper { } public static void insertItemIntoInventory(IInventory inventory, ItemStack stack) { - insertItemIntoInventory(inventory, stack, ForgeDirection.UNKNOWN, -1); + insertItemIntoInventory(inventory, stack, null, -1); } - public static void insertItemIntoInventory(IInventory inventory, ItemStack stack, ForgeDirection side, int intoSlot) { + public static void insertItemIntoInventory(IInventory inventory, ItemStack stack, EnumFacing side, int intoSlot) { insertItemIntoInventory(inventory, stack, side, intoSlot, true); } - public static void insertItemIntoInventory(IInventory inventory, ItemStack stack, ForgeDirection side, int intoSlot, boolean doMove) { + public static void insertItemIntoInventory(IInventory inventory, ItemStack stack, EnumFacing side, int intoSlot, boolean doMove) { insertItemIntoInventory(inventory, stack, side, intoSlot, doMove, true); } - public static void insertItemIntoInventory(IInventory inventory, ItemStack stack, ForgeDirection side, int intoSlot, boolean doMove, boolean canStack) { + public static void insertItemIntoInventory(IInventory inventory, ItemStack stack, EnumFacing side, int intoSlot, boolean doMove, boolean canStack) { if(stack == null) return; IInventory targetInventory = inventory; @@ -86,8 +90,8 @@ public class InventoryHelper { int i = 0; int[] attemptSlots; - if(inventory instanceof ISidedInventory && side != ForgeDirection.UNKNOWN) { - attemptSlots = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(side.ordinal()); + if(inventory instanceof ISidedInventory && side != null) { + attemptSlots = ((ISidedInventory)inventory).getSlotsForFace(side); if(attemptSlots == null) attemptSlots = new int[0]; } else { @@ -105,8 +109,8 @@ public class InventoryHelper { else attemptSlots = new int[0]; } while(stack.stackSize > 0 && i < attemptSlots.length) { - if(side != ForgeDirection.UNKNOWN && inventory instanceof ISidedInventory) - if(!((ISidedInventory)inventory).canInsertItem(attemptSlots[i], stack, side.ordinal())) { + if(side != null && inventory instanceof ISidedInventory) + if(!((ISidedInventory)inventory).canInsertItem(attemptSlots[i], stack, side)) { i++; continue; } @@ -116,7 +120,7 @@ public class InventoryHelper { } } - public static int testInventoryInsertion(IInventory inventory, ItemStack item, ForgeDirection side) { + public static int testInventoryInsertion(IInventory inventory, ItemStack item, EnumFacing side) { if(item == null || item.stackSize == 0) return 0; item = item.copy(); @@ -130,7 +134,7 @@ public class InventoryHelper { int[] availableSlots; if(inventory instanceof ISidedInventory) - availableSlots = ((ISidedInventory) inventory).getAccessibleSlotsFromSide(side.ordinal()); + availableSlots = ((ISidedInventory) inventory).getSlotsForFace(side); else { availableSlots = buildSlotsForLinearInventory(inventory); } @@ -142,8 +146,8 @@ public class InventoryHelper { if (!inventory.isItemValidForSlot(i, item)) continue; - if(side != ForgeDirection.UNKNOWN && inventory instanceof ISidedInventory) - if(!((ISidedInventory)inventory).canInsertItem(i, item, side.ordinal())) + if(side != null && inventory instanceof ISidedInventory) + if(!((ISidedInventory)inventory).canInsertItem(i, item, side)) continue; ItemStack inventorySlot = inventory.getStackInSlot(i); @@ -163,36 +167,34 @@ public class InventoryHelper { return 0; } - public static IInventory getInventory(World world, int x, int y, int z) { - TileEntity tileEntity = world.getTileEntity(x, y, z); + public static IInventory getInventory(World world, BlockPos pos) { + TileEntity tileEntity = world.getTileEntity(pos); if(tileEntity instanceof TileEntityChest) { - Block chestBlock = world.getBlock(x, y, z); - if(world.getBlock(x - 1, y, z) == chestBlock) - return new InventoryLargeChest("Large chest", (IInventory)world.getTileEntity(x - 1, y, z), (IInventory)tileEntity); - if(world.getBlock(x + 1, y, z) == chestBlock) - return new InventoryLargeChest("Large chest", (IInventory)tileEntity, (IInventory)world.getTileEntity(x + 1, y, z)); - if(world.getBlock(x, y, z - 1) == chestBlock) - return new InventoryLargeChest("Large chest", (IInventory)world.getTileEntity(x, y, z - 1), (IInventory)tileEntity); - if(world.getBlock(x, y, z + 1) == chestBlock) - return new InventoryLargeChest("Large chest", (IInventory)tileEntity, (IInventory)world.getTileEntity(x, y, z + 1)); + Block chestBlock = world.getBlockState(pos).getBlock(); + if(world.getBlockState(pos.west()).getBlock() == chestBlock) + return new InventoryLargeChest("Large chest", (ILockableContainer) world.getTileEntity(pos.west()), (ILockableContainer) tileEntity); + if(world.getBlockState(pos.east()).getBlock() == chestBlock) + return new InventoryLargeChest("Large chest", (ILockableContainer) tileEntity, (ILockableContainer) world.getTileEntity(pos.east())); + if(world.getBlockState(pos.north()).getBlock() == chestBlock) + return new InventoryLargeChest("Large chest", (ILockableContainer) world.getTileEntity(pos.north()), (ILockableContainer) tileEntity); + if(world.getBlockState(pos.south()).getBlock() == chestBlock) + return new InventoryLargeChest("Large chest", (ILockableContainer) tileEntity, (ILockableContainer) world.getTileEntity(pos.south())); } return tileEntity instanceof IInventory ? (IInventory)tileEntity : null; } - public static IInventory getInventory(World world, int x, int y, int z, ForgeDirection direction) { - if(direction != null && direction != ForgeDirection.UNKNOWN) { - x += direction.offsetX; - y += direction.offsetY; - z += direction.offsetZ; + public static IInventory getInventory(World world, BlockPos pos, EnumFacing direction) { + if(direction != null) { + pos = pos.offset(direction); } - return getInventory(world, x, y, z); + return getInventory(world, pos); } public static IInventory getInventory(IInventory inventory) { if(inventory instanceof TileEntityChest) { TileEntity te = (TileEntity)inventory; - return getInventory(te.getWorld(), te.xCoord, te.yCoord, te.zCoord); + return getInventory(te.getWorld(), te.getPos()); } return inventory; } @@ -281,6 +283,20 @@ public class InventoryHelper { return true; } + @Override + public int getField(int id) { return 0; } + + @Override + public void setField(int id, int value) { } + + @Override + public int getFieldCount() { return 0; } + + @Override + public void clear() { + Arrays.fill(inventoryContents, null); + } + @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { return true; @@ -342,22 +358,27 @@ public class InventoryHelper { } @Override - public String getInventoryName() { + public String getCommandSenderName() { return null; } @Override - public boolean hasCustomInventoryName() { + public boolean hasCustomName() { return false; } + @Override + public IChatComponent getDisplayName() { + return new ChatComponentText(getCommandSenderName()); + } + @Override public void markDirty() { } @Override - public void openInventory() { } + public void openInventory(EntityPlayer player) { } @Override - public void closeInventory() { } + public void closeInventory(EntityPlayer player) { } } } diff --git a/src/main/java/vazkii/botania/common/core/helper/MathHelper.java b/src/main/java/vazkii/botania/common/core/helper/MathHelper.java index e31af7042..28426316e 100644 --- a/src/main/java/vazkii/botania/common/core/helper/MathHelper.java +++ b/src/main/java/vazkii/botania/common/core/helper/MathHelper.java @@ -11,10 +11,15 @@ package vazkii.botania.common.core.helper; import net.minecraft.entity.Entity; +import net.minecraft.util.BlockPos; import vazkii.botania.api.internal.VanillaPacketDispatcher; public final class MathHelper { + public static float pointDistanceSpace(BlockPos p1, BlockPos p2) { + return pointDistanceSpace(p1.getX(), p1.getY(), p1.getZ(), p2.getX(), p2.getY(), p2.getZ()); + } + public static float pointDistanceSpace(double x1, double y1, double z1, double x2, double y2, double z2) { return (float) Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) + Math.pow(z1 - z2, 2)); } diff --git a/src/main/java/vazkii/botania/common/core/proxy/CommonProxy.java b/src/main/java/vazkii/botania/common/core/proxy/CommonProxy.java index 6fcc566a6..6d9d5fc7f 100644 --- a/src/main/java/vazkii/botania/common/core/proxy/CommonProxy.java +++ b/src/main/java/vazkii/botania/common/core/proxy/CommonProxy.java @@ -61,8 +61,8 @@ import vazkii.botania.common.crafting.ModPureDaisyRecipes; import vazkii.botania.common.crafting.ModRuneRecipes; import vazkii.botania.common.entity.EntityManaBurst; import vazkii.botania.common.entity.ModEntities; -import vazkii.botania.common.integration.buildcraft.StatementAPIPlugin; -import vazkii.botania.common.integration.etfuturum.ModBanners; +//import vazkii.botania.common.integration.buildcraft.StatementAPIPlugin; todo 1.8 +//import vazkii.botania.common.integration.etfuturum.ModBanners; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.network.GuiHandler; @@ -103,7 +103,7 @@ public class CommonProxy { ModMultiblocks.init(); if(Botania.etFuturumLoaded) - ModBanners.init(); + // todo 1.8 ModBanners.init(); ChestGenHandler.init(); @@ -128,8 +128,8 @@ public class CommonProxy { FMLInterModComms.sendMessage("ProjectE", "interdictionblacklist", EntityManaBurst.class.getCanonicalName()); - if(Botania.bcTriggersLoaded) - new StatementAPIPlugin(); +// if(Botania.bcTriggersLoaded) todo 1.8 +// new StatementAPIPlugin(); } public void postInit(FMLPostInitializationEvent event) { diff --git a/src/main/java/vazkii/botania/common/core/version/ThreadDownloadMod.java b/src/main/java/vazkii/botania/common/core/version/ThreadDownloadMod.java index 4bdb6fce7..9387e8142 100644 --- a/src/main/java/vazkii/botania/common/core/version/ThreadDownloadMod.java +++ b/src/main/java/vazkii/botania/common/core/version/ThreadDownloadMod.java @@ -46,7 +46,7 @@ public class ThreadDownloadMod extends Thread { @Override public void run() { try { - IChatComponent component = IChatComponent.Serializer.func_150699_a(String.format(StatCollector.translateToLocal("botania.versioning.startingDownload"), fileName)); + IChatComponent component = IChatComponent.Serializer.jsonToComponent(String.format(StatCollector.translateToLocal("botania.versioning.startingDownload"), fileName)); if(Minecraft.getMinecraft().thePlayer != null) Minecraft.getMinecraft().thePlayer.addChatMessage(component); diff --git a/src/main/java/vazkii/botania/common/core/version/VersionChecker.java b/src/main/java/vazkii/botania/common/core/version/VersionChecker.java index b79e04e82..c337aa373 100644 --- a/src/main/java/vazkii/botania/common/core/version/VersionChecker.java +++ b/src/main/java/vazkii/botania/common/core/version/VersionChecker.java @@ -50,7 +50,7 @@ public final class VersionChecker { player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.flavour" + player.worldObj.rand.nextInt(FLAVOUR_MESSAGES)).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE))); player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.outdated", clientBuild, onlineBuild)); - IChatComponent component = IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("botania.versioning.updateMessage").replaceAll("%version%", onlineVersion)); + IChatComponent component = IChatComponent.Serializer.jsonToComponent(StatCollector.translateToLocal("botania.versioning.updateMessage").replaceAll("%version%", onlineVersion)); player.addChatComponentMessage(component); } } diff --git a/src/main/java/vazkii/botania/common/entity/EntityCorporeaSpark.java b/src/main/java/vazkii/botania/common/entity/EntityCorporeaSpark.java index 65b6c3e7b..8877abedf 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityCorporeaSpark.java +++ b/src/main/java/vazkii/botania/common/entity/EntityCorporeaSpark.java @@ -181,7 +181,7 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark { int x = MathHelper.floor_double(posX); int y = MathHelper.floor_double(posY - 1); int z = MathHelper.floor_double(posZ); - return InventoryHelper.getInventory(worldObj, x, y, z); + return InventoryHelper.getInventory(worldObj, , x); } @Override