mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Easy stuff in common.core
This commit is contained in:
1 parent
bbbe93a8de
commit
3b8926c24b
13 files changed
+98
-71
No files matched your search
@@ -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<ItemStack> filter = getFilterForInventory(inv, x_, y_, z_, true);
|
||||
boolean canAccept = canAcceptItem(stack, filter, filterType);
|
||||
|
||||
@@ -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<ItemStack> stacks = CorporeaHelper.requestItem(request, count, spark, true, true);
|
||||
spark.onItemsRequested(stacks);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) { }
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user