From f3bc2769c634448680d68e971b92bd188c0dae2e Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Mon, 3 Mar 2014 23:33:11 +0000 Subject: [PATCH] Cleanup... --- .../core/handler/ClientTickHandler.java | 2 +- .../client/core/proxy/ClientProxy.java | 6 +- MODSRC/vazkii/botania/client/fx/FXWisp.java | 4 +- .../botania/client/model/ModelPylon.java | 2 +- .../client/render/tile/RenderTilePylon.java | 16 +-- .../render/tile/RenderTileRuneAltar.java | 2 +- .../common/block/BlockDistributor.java | 7 +- .../botania/common/block/BlockLivingrock.java | 6 +- .../botania/common/block/BlockLivingwood.java | 14 +-- .../botania/common/block/BlockManaBeacon.java | 6 +- .../common/block/BlockPistonRelay.java | 100 +++++++++--------- .../botania/common/block/BlockPylon.java | 2 +- .../botania/common/block/ModBlocks.java | 4 +- .../block/subtile/SubTileGenerating.java | 2 +- .../functional/SubTileJadedAmaranthus.java | 19 ++-- .../subtile/generating/SubTileEndoflame.java | 2 +- .../common/block/tile/TileDistributor.java | 8 +- .../common/block/tile/TileManaBeacon.java | 8 +- .../botania/common/block/tile/TilePylon.java | 14 +-- .../common/core/handler/ConfigHandler.java | 2 +- .../common/core/helper/InventoryHelper.java | 28 ++--- .../common/core/proxy/CommonProxy.java | 4 +- .../common/crafting/ModCrafingRecipes.java | 28 ++--- .../common/entity/EntitySignalFlare.java | 6 +- .../vazkii/botania/common/item/ItemLens.java | 3 - .../botania/common/item/ItemSignalFlare.java | 16 +-- .../botania/common/item/ItemTwigWand.java | 4 +- .../botania/common/lexicon/LexiconData.java | 10 +- .../vazkii/botania/common/lib/LibLexicon.java | 2 +- 29 files changed, 161 insertions(+), 166 deletions(-) diff --git a/MODSRC/vazkii/botania/client/core/handler/ClientTickHandler.java b/MODSRC/vazkii/botania/client/core/handler/ClientTickHandler.java index a0d730c24..3ec4ded72 100644 --- a/MODSRC/vazkii/botania/client/core/handler/ClientTickHandler.java +++ b/MODSRC/vazkii/botania/client/core/handler/ClientTickHandler.java @@ -30,7 +30,7 @@ public class ClientTickHandler implements ITickHandler { @Override public void tickEnd(EnumSet type, Object... tickData) { LightningBolt.update(); - + if(Minecraft.getMinecraft().theWorld == null) ManaNetworkHandler.instance.clear(); } diff --git a/MODSRC/vazkii/botania/client/core/proxy/ClientProxy.java b/MODSRC/vazkii/botania/client/core/proxy/ClientProxy.java index 5dcc56fa8..901ef156b 100644 --- a/MODSRC/vazkii/botania/client/core/proxy/ClientProxy.java +++ b/MODSRC/vazkii/botania/client/core/proxy/ClientProxy.java @@ -116,19 +116,19 @@ public class ClientProxy extends CommonProxy { } private static boolean distanceLimit = true; - + @Override public void setWispFXDistanceLimit(boolean limit) { distanceLimit = limit; } - + @Override public void wispFX(World world, double x, double y, double z, float r, float g, float b, float size, float motionx, float motiony, float motionz) { FXWisp wisp = new FXWisp(world, x, y, z, size, r, g, b, distanceLimit); wisp.motionX = motionx; wisp.motionY = motiony; wisp.motionZ = motionz; - + Minecraft.getMinecraft().effectRenderer.addEffect(wisp); } diff --git a/MODSRC/vazkii/botania/client/fx/FXWisp.java b/MODSRC/vazkii/botania/client/fx/FXWisp.java index ac84d5785..f7d79deaf 100644 --- a/MODSRC/vazkii/botania/client/fx/FXWisp.java +++ b/MODSRC/vazkii/botania/client/fx/FXWisp.java @@ -45,13 +45,13 @@ public class FXWisp extends EntityFX noClip = true; setSize(0.01F, 0.01F); EntityLivingBase renderentity = FMLClientHandler.instance().getClient().renderViewEntity; - + if(distanceLimit) { int visibleDistance = 50; if (!FMLClientHandler.instance().getClient().gameSettings.fancyGraphics) visibleDistance=25; if (renderentity == null || renderentity.getDistance(posX, posY, posZ)>visibleDistance) particleMaxAge=0; } - + prevPosX = posX; prevPosY = posY; prevPosZ = posZ; diff --git a/MODSRC/vazkii/botania/client/model/ModelPylon.java b/MODSRC/vazkii/botania/client/model/ModelPylon.java index 871064c9a..401878b0f 100644 --- a/MODSRC/vazkii/botania/client/model/ModelPylon.java +++ b/MODSRC/vazkii/botania/client/model/ModelPylon.java @@ -15,7 +15,7 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; public class ModelPylon extends ModelBase { - + ModelRenderer crystal1; ModelRenderer crystal2; ModelRenderer crystal3; diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTilePylon.java b/MODSRC/vazkii/botania/client/render/tile/RenderTilePylon.java index 491db538b..4855b6413 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTilePylon.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTilePylon.java @@ -39,31 +39,31 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { GL11.glColor4f(1F, 1F, 1F, 1F); Minecraft.getMinecraft().renderEngine.bindTexture(texture); int worldTime = (int) (tileentity.worldObj == null ? 0 : tileentity.worldObj.getTotalWorldTime()); - + if(tileentity != null) worldTime += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(360); - + GL11.glTranslated(d0 + 0.5, d1 + 2.2, d2 + 0.5); GL11.glScalef(1F, -1.5F, -1F); - + int light = 15728880; int lightmapX = light % 65536; int lightmapY = light / 65536; - + GL11.glPushMatrix(); GL11.glRotatef(worldTime * 1.5F, 0F, 1F, 0F); model.renderRing(); GL11.glPopMatrix(); - + GL11.glPushMatrix(); - GL11.glTranslated(0D, Math.sin((double) worldTime / 20D) / 17.5, 0D); + GL11.glTranslated(0D, Math.sin(worldTime / 20D) / 17.5, 0D); GL11.glRotatef(-worldTime, 0F, 1F, 0F); GL11.glDisable(GL11.GL_CULL_FACE); model.renderCrystal(); GL11.glColor4f(1F, 1F, 1F, 1F); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); - double alpha = Math.sin((double) worldTime / 20D) / 2D + 0.5; + double alpha = Math.sin(worldTime / 20D) / 2D + 0.5; GL11.glColor4d(1D, 1D, 1D, alpha + 0.183F); GL11.glScalef(1.1F, 1.1F, 1.1F); GL11.glTranslatef(0F, -0.09F, 0F); @@ -71,7 +71,7 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { GL11.glEnable(GL11.GL_CULL_FACE); GL11.glPopMatrix(); - + GL11.glScalef(1F, -1.5F, -1F); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java index f4a5f4787..c3202afe3 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java @@ -51,7 +51,7 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer { break; else items++; float[] angles = new float[altar.getSizeInventory()]; - + float anglePer = 360F / items; float totalAngle = 0F; for(int i = 0; i < angles.length; i++) diff --git a/MODSRC/vazkii/botania/common/block/BlockDistributor.java b/MODSRC/vazkii/botania/common/block/BlockDistributor.java index 93ea22218..fde26cfda 100644 --- a/MODSRC/vazkii/botania/common/block/BlockDistributor.java +++ b/MODSRC/vazkii/botania/common/block/BlockDistributor.java @@ -18,7 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; import vazkii.botania.api.ILexiconable; import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.client.core.helper.IconHelper; @@ -30,7 +29,7 @@ import vazkii.botania.common.lib.LibBlockNames; public class BlockDistributor extends BlockModContainer implements ILexiconable { Icon iconSide, iconTop; - + protected BlockDistributor() { super(LibBlockIDs.idDistributor, Material.rock); setHardness(2.0F); @@ -38,13 +37,13 @@ public class BlockDistributor extends BlockModContainer implements ILexiconable setStepSound(soundStoneFootstep); setUnlocalizedName(LibBlockNames.DISTRIBUTOR); } - + @Override public void registerIcons(IconRegister par1IconRegister) { iconTop = IconHelper.forBlock(par1IconRegister, this, 0); iconSide = IconHelper.forBlock(par1IconRegister, this, 1); } - + @Override public Icon getIcon(int par1, int par2) { return par1 == 0 ? ModBlocks.livingrock.getIcon(0, 0) : par1 == 1 ? iconTop : iconSide; diff --git a/MODSRC/vazkii/botania/common/block/BlockLivingrock.java b/MODSRC/vazkii/botania/common/block/BlockLivingrock.java index 0bbbad302..f4e96dd37 100644 --- a/MODSRC/vazkii/botania/common/block/BlockLivingrock.java +++ b/MODSRC/vazkii/botania/common/block/BlockLivingrock.java @@ -33,7 +33,7 @@ import cpw.mods.fml.common.registry.GameRegistry; public class BlockLivingrock extends BlockMod implements ILexiconable { - private static final int TYPES = 5; + private static final int TYPES = 5; Icon[] icons; public BlockLivingrock() { @@ -54,7 +54,7 @@ public class BlockLivingrock extends BlockMod implements ILexiconable { GameRegistry.registerBlock(this, ItemBlockWithMetadataAndName.class, par1Str); return super.setUnlocalizedName(par1Str); } - + @Override public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) { for(int i = 0; i < TYPES; i++) @@ -72,7 +72,7 @@ public class BlockLivingrock extends BlockMod implements ILexiconable { public Icon getIcon(int par1, int par2) { return icons[Math.min(TYPES - 1, par2)]; } - + @Override public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); diff --git a/MODSRC/vazkii/botania/common/block/BlockLivingwood.java b/MODSRC/vazkii/botania/common/block/BlockLivingwood.java index ee3958393..f946a1482 100644 --- a/MODSRC/vazkii/botania/common/block/BlockLivingwood.java +++ b/MODSRC/vazkii/botania/common/block/BlockLivingwood.java @@ -13,7 +13,6 @@ package vazkii.botania.common.block; import java.util.List; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; @@ -30,19 +29,20 @@ import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName; import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockIDs; import vazkii.botania.common.lib.LibBlockNames; +import cpw.mods.fml.common.registry.GameRegistry; public class BlockLivingwood extends BlockMod implements ILexiconable { - private static final int TYPES = 5; + private static final int TYPES = 5; Icon[] icons; - + public BlockLivingwood() { super(LibBlockIDs.idLivingwood, Material.wood); setHardness(2.0F); setStepSound(soundWoodFootstep); setUnlocalizedName(LibBlockNames.LIVING_WOOD); } - + @Override protected boolean shouldRegisterInNameSet() { return false; @@ -53,7 +53,7 @@ public class BlockLivingwood extends BlockMod implements ILexiconable { GameRegistry.registerBlock(this, ItemBlockWithMetadataAndName.class, par1Str); return super.setUnlocalizedName(par1Str); } - + @Override public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) { for(int i = 0; i < TYPES; i++) @@ -71,13 +71,13 @@ public class BlockLivingwood extends BlockMod implements ILexiconable { public Icon getIcon(int par1, int par2) { return icons[Math.min(TYPES - 1, par2)]; } - + @Override public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); return new ItemStack(blockID, 1, meta); } - + @Override public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { int meta = world.getBlockMetadata(x, y, z); diff --git a/MODSRC/vazkii/botania/common/block/BlockManaBeacon.java b/MODSRC/vazkii/botania/common/block/BlockManaBeacon.java index 8d200c10e..229b2b858 100644 --- a/MODSRC/vazkii/botania/common/block/BlockManaBeacon.java +++ b/MODSRC/vazkii/botania/common/block/BlockManaBeacon.java @@ -38,7 +38,7 @@ import cpw.mods.fml.common.registry.GameRegistry; public class BlockManaBeacon extends BlockModContainer implements ILexiconable { Icon[] icons = new Icon[2]; - + public BlockManaBeacon() { super(LibBlockIDs.idManaBeacon, Material.iron); setHardness(5.0F); @@ -48,13 +48,13 @@ public class BlockManaBeacon extends BlockModContainer implements ILexiconable { setBlockBounds(size, size, size, 1F - size, 1F - size, 1F - size); setUnlocalizedName(LibBlockNames.MANA_BEACON); } - + @Override public void registerIcons(IconRegister par1IconRegister) { for(int i = 0; i < 2; i++) icons[i] = IconHelper.forBlock(par1IconRegister, this, i); } - + @Override public Icon getIcon(int par1, int par2) { return icons[par1 == 1 ? 1 : 0]; diff --git a/MODSRC/vazkii/botania/common/block/BlockPistonRelay.java b/MODSRC/vazkii/botania/common/block/BlockPistonRelay.java index 1059a7aba..c8139ca92 100644 --- a/MODSRC/vazkii/botania/common/block/BlockPistonRelay.java +++ b/MODSRC/vazkii/botania/common/block/BlockPistonRelay.java @@ -53,67 +53,67 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl setHardness(2F); setResistance(10F); setStepSound(soundMetalFootstep); - + TickRegistry.registerTickHandler(new InternalTickHandler(), Side.SERVER); MinecraftForge.EVENT_BUS.register(this); } - + @Override public int idDropped(int par1, Random par2Random, int par3) { return 0; } - + @Override public int quantityDropped(int meta, int fortune, Random random) { return 0; } - + @Override public boolean isOpaqueCube() { return false; } - + @Override public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) { mapCoords(par1World.provider.dimensionId, par2, par3, par4, 2); } - + public static String getCoordsAsString(int world, int x, int y, int z) { return world + ":" + x + ":" + y + ":" + z; } - + static void mapCoords(int world, int x, int y, int z, int time) { InternalTickHandler.coordsToCheck.put(getCoordsAsString(world, x, y, z), time); } - + static void decrCoords(String key) { int time = getTimeInCoords(key); - - if(time <= 0) + + if(time <= 0) InternalTickHandler.removeThese.add(key); else InternalTickHandler.coordsToCheck.put(key, time - 1); } - + static int getTimeInCoords(String key) { return InternalTickHandler.coordsToCheck.get(key); } - + static int getBlockIDAt(String key) { MinecraftServer server = MinecraftServer.getServer(); if(server == null) return 0; - + String[] tokens = key.split(":"); int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]); World world = server.worldServerForDimension(worldId); return world.getBlockId(x, y, z); } - + static int getBlockMetaAt(String key) { MinecraftServer server = MinecraftServer.getServer(); if(server == null) return 0; - + String[] tokens = key.split(":"); int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]); World world = server.worldServerForDimension(worldId); @@ -130,64 +130,64 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl if(!world.isRemote) world.playAuxSFX(2001, x, y , z, blockID); } - + return true; } - + @ForgeSubscribe public void onWorldLoad(WorldEvent.Load event) { WorldData.get(event.world); } - + public static class WorldData extends WorldSavedData { private static final String ID = "PistonRelayPairs"; - + public WorldData(String id) { super(id); } - + @Override public void readFromNBT(NBTTagCompound nbttagcompound) { InternalTickHandler.mappedPositions.clear(); - + Collection tags = nbttagcompound.getTags(); for(NBTBase tag : tags) { if(tag instanceof NBTTagString) { String key = tag.getName(); String value = ((NBTTagString) tag).data; - + InternalTickHandler.mappedPositions.put(key, value); } } } - + @Override public void writeToNBT(NBTTagCompound nbttagcompound) { for(String s : InternalTickHandler.mappedPositions.keySet()) nbttagcompound.setString(s, InternalTickHandler.mappedPositions.get(s)); } - + public static WorldData get(World world) { WorldData data = (WorldData) world.mapStorage.loadData(WorldData.class, ID); - - if (data == null) { - data = new WorldData(ID); - data.markDirty(); - world.mapStorage.setData(ID, data); - } - return data; - } + + if (data == null) { + data = new WorldData(ID); + data.markDirty(); + world.mapStorage.setData(ID, data); + } + return data; + } } - + public static class InternalTickHandler implements ITickHandler { public static Map playerPositions = new HashMap(); public static Map mappedPositions = new HashMap(); - + static List removeThese = new ArrayList(); static Map coordsToCheck = new HashMap(); - + @Override public void tickStart(EnumSet type, Object... tickData) { // NO-OP @@ -198,35 +198,35 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl for(String s : coordsToCheck.keySet()) { int id = getBlockIDAt(s); decrCoords(s); - + if(id == 36) { int meta = getBlockMetaAt(s); ForgeDirection dir = ForgeDirection.getOrientation(meta & ~8); MinecraftServer server = MinecraftServer.getServer(); - - if(server != null && getTimeInCoords(s) == 0) { + + if(server != null && getTimeInCoords(s) == 0) { String newPos; - + { - String[] tokens = s.split(":"); - int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]); - World world = server.worldServerForDimension(worldId); - world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.pistonRelay.blockID); - newPos = getCoordsAsString(world.provider.dimensionId, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); + String[] tokens = s.split(":"); + int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]); + World world = server.worldServerForDimension(worldId); + world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.pistonRelay.blockID); + newPos = getCoordsAsString(world.provider.dimensionId, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); } - + if(mappedPositions.containsKey(s)) { String pos = mappedPositions.get(s); String[] tokens = pos.split(":"); int worldId = Integer.parseInt(tokens[0]), x = Integer.parseInt(tokens[1]), y = Integer.parseInt(tokens[2]), z = Integer.parseInt(tokens[3]); World world = server.worldServerForDimension(worldId); - + int srcId = world.getBlockId(x, y, z); int srcMeta = world.getBlockMetadata(x, y, z); TileEntity tile = world.getBlockTileEntity(x, y, z); Material mat = world.getBlockMaterial(x, y, z); - + if(tile == null && mat.getMaterialMobility() == 0 && Block.blocksList[srcId] != null && !Block.blocksList[srcId].isAirBlock(world, x, y, z)) { Material destMat = world.getBlockMaterial(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); if(world.isAirBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) || destMat.isReplaceable()) { @@ -235,7 +235,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl mappedPositions.put(s, getCoordsAsString(world.provider.dimensionId, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ)); } } - + pos = mappedPositions.get(s); mappedPositions.remove(s); mappedPositions.put(newPos, pos); @@ -244,7 +244,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl } } } - + for(String s : removeThese) coordsToCheck.remove(s); removeThese.clear(); @@ -259,7 +259,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl public String getLabel() { return LibBlockNames.PISTON_RELAY; } - + } @Override diff --git a/MODSRC/vazkii/botania/common/block/BlockPylon.java b/MODSRC/vazkii/botania/common/block/BlockPylon.java index 2d51ae926..f6d26407c 100644 --- a/MODSRC/vazkii/botania/common/block/BlockPylon.java +++ b/MODSRC/vazkii/botania/common/block/BlockPylon.java @@ -62,7 +62,7 @@ public class BlockPylon extends BlockModContainer implements ILexiconable { public float getEnchantPowerBonus(World world, int x, int y, int z) { return 8; } - + @Override public TileEntity createNewTileEntity(World world) { return new TilePylon(); diff --git a/MODSRC/vazkii/botania/common/block/ModBlocks.java b/MODSRC/vazkii/botania/common/block/ModBlocks.java index b2f17ce17..7e5ff1515 100644 --- a/MODSRC/vazkii/botania/common/block/ModBlocks.java +++ b/MODSRC/vazkii/botania/common/block/ModBlocks.java @@ -65,7 +65,7 @@ public final class ModBlocks { pistonRelay = new BlockPistonRelay(); distributor = new BlockDistributor(); manaBeacon = new BlockManaBeacon(); - + for(int i = 0; i < 16; i++) OreDictionary.registerOre(LibOreDict.FLOWER[i], new ItemStack(flower.blockID, 1, i)); @@ -96,7 +96,7 @@ public final class ModBlocks { BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_TIGERSEYE, SubTileTigerseye.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_JADED_AMARANTHUS, SubTileJadedAmaranthus.class); } - + private static void registerMultiparts() { if(Loader.isModLoaded("ForgeMultipart")) { try { diff --git a/MODSRC/vazkii/botania/common/block/subtile/SubTileGenerating.java b/MODSRC/vazkii/botania/common/block/subtile/SubTileGenerating.java index 124289122..57a9ba64b 100644 --- a/MODSRC/vazkii/botania/common/block/subtile/SubTileGenerating.java +++ b/MODSRC/vazkii/botania/common/block/subtile/SubTileGenerating.java @@ -114,7 +114,7 @@ public class SubTileGenerating extends SubTileEntity { public int getDelayBetweenPassiveGeneration() { return 20; } - + public int getValueForPassiveGeneration() { return 1; } diff --git a/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileJadedAmaranthus.java b/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileJadedAmaranthus.java index e2f6a4fee..9a400ccf3 100644 --- a/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileJadedAmaranthus.java +++ b/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileJadedAmaranthus.java @@ -11,26 +11,25 @@ */ package vazkii.botania.common.block.subtile.functional; -import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.block.Block; -import net.minecraft.world.World; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.subtile.SubTileFunctional; +import cpw.mods.fml.common.network.PacketDispatcher; public class SubTileJadedAmaranthus extends SubTileFunctional { private static final int COST = 100; int cooldown = 0; - + @Override public void onUpdate() { super.onUpdate(); - + if(cooldown > 0) { cooldown--; return; } - + if(mana >= COST && !supertile.worldObj.isRemote) { int range = 4; int x = supertile.xCoord - range + supertile.worldObj.rand.nextInt(range * 2 + 1); @@ -43,27 +42,27 @@ public class SubTileJadedAmaranthus extends SubTileFunctional { int color = supertile.worldObj.rand.nextInt(16); if(ModBlocks.flower.canBlockStay(supertile.worldObj, x, y + 1, z)) supertile.worldObj.setBlock(x, y + 1, z, ModBlocks.flower.blockID, color, 1 | 2); - + mana -= COST; PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId); cooldown = 30; break; } - + y--; } } } - + @Override public int getColor() { return 0x961283; } - + @Override public int getMaxMana() { return COST; } - + } diff --git a/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java b/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java index 3ec5350aa..e12f90859 100644 --- a/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java +++ b/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java @@ -76,7 +76,7 @@ public class SubTileEndoflame extends SubTileGenerating { public int getValueForPassiveGeneration() { return 2; } - + @Override public int getColor() { return 0x785000; diff --git a/MODSRC/vazkii/botania/common/block/tile/TileDistributor.java b/MODSRC/vazkii/botania/common/block/tile/TileDistributor.java index bdbc6487f..59817ac09 100644 --- a/MODSRC/vazkii/botania/common/block/tile/TileDistributor.java +++ b/MODSRC/vazkii/botania/common/block/tile/TileDistributor.java @@ -14,20 +14,20 @@ package vazkii.botania.common.block.tile; import java.util.ArrayList; import java.util.List; -import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; import vazkii.botania.api.mana.IManaPool; import vazkii.botania.api.mana.IManaReceiver; +import cpw.mods.fml.common.network.PacketDispatcher; public class TileDistributor extends TileMod implements IManaReceiver { List validPools = new ArrayList(); - + static final ForgeDirection[] DIRECTIONS = new ForgeDirection[] { ForgeDirection.NORTH, ForgeDirection.SOUTH, ForgeDirection.EAST, ForgeDirection.WEST }; - + @Override public void updateEntity() { validPools.clear(); @@ -40,7 +40,7 @@ public class TileDistributor extends TileMod implements IManaReceiver { } } } - + @Override public int getCurrentMana() { return 0; diff --git a/MODSRC/vazkii/botania/common/block/tile/TileManaBeacon.java b/MODSRC/vazkii/botania/common/block/tile/TileManaBeacon.java index c826163f2..ae9a549c8 100644 --- a/MODSRC/vazkii/botania/common/block/tile/TileManaBeacon.java +++ b/MODSRC/vazkii/botania/common/block/tile/TileManaBeacon.java @@ -25,14 +25,14 @@ public class TileManaBeacon extends TileMod { if(redstoneSide > 0) redstone = true; } - + if(!redstone) { float[] color = EntitySheep.fleeceColorTable[worldObj.getBlockMetadata(xCoord, yCoord, zCoord)]; - + Botania.proxy.setWispFXDistanceLimit(false); for(int i = 0; i < 3; i++) - Botania.proxy.wispFX(worldObj, xCoord + 0.5, yCoord, zCoord + 0.5, color[0], color[1], color[2], (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt((256F / (256F - (float) yCoord))), (float) (Math.random() - 0.5F)); - + Botania.proxy.wispFX(worldObj, xCoord + 0.5, yCoord, zCoord + 0.5, color[0], color[1], color[2], (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - yCoord)), (float) (Math.random() - 0.5F)); + for(int i = 0; i < 4; i++) Botania.proxy.wispFX(worldObj, xCoord + 0.5, 256, zCoord + 0.5, color[0], color[1], color[2], (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F); Botania.proxy.setWispFXDistanceLimit(true); diff --git a/MODSRC/vazkii/botania/common/block/tile/TilePylon.java b/MODSRC/vazkii/botania/common/block/tile/TilePylon.java index afb681031..1c6f88bd4 100644 --- a/MODSRC/vazkii/botania/common/block/tile/TilePylon.java +++ b/MODSRC/vazkii/botania/common/block/tile/TilePylon.java @@ -18,22 +18,22 @@ import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.core.helper.Vector3; public class TilePylon extends TileEntity { - + boolean activated = false; // TODO - + @Override public void updateEntity() { if(activated && worldObj.isRemote) { Vector3 centerBlock = new Vector3(-500.5, 4.75 + (Math.random() - 0.5 * 0.25), -411.5); - + int id = worldObj.getBlockId(xCoord, yCoord - 1, zCoord); if(id == ModBlocks.flower.blockID) { int meta = worldObj.getBlockMetadata(xCoord, yCoord - 1, zCoord); float[] color = EntitySheep.fleeceColorTable[meta]; - + if(worldObj.rand.nextInt(4) == 0) Botania.proxy.sparkleFX(worldObj, centerBlock.x + (Math.random() - 0.5) * 0.5, centerBlock.y, centerBlock.z + (Math.random() - 0.5) * 0.5, color[0], color[1], color[2], (float) Math.random(), 8); - + Botania.proxy.wispFX(worldObj, xCoord + 0.5 + (Math.random() - 0.5) * 0.25, yCoord - 0.5, zCoord + 0.5 + (Math.random() - 0.5) * 0.25, color[0], color[1], color[2], (float) Math.random() / 3F, -0.04F); Botania.proxy.wispFX(worldObj, xCoord + 0.5 + (Math.random() - 0.5) * 0.125, yCoord + 1.5, zCoord + 0.5 + (Math.random() - 0.5) * 0.125, color[0], color[1], color[2], (float) Math.random() / 5F, -0.001F); @@ -42,9 +42,9 @@ public class TilePylon extends TileEntity { Botania.proxy.wispFX(worldObj, xCoord + 0.5 + (Math.random() - 0.5) * 0.25, yCoord + 1.5, zCoord + 0.5 + (Math.random() - 0.5) * 0.25, color[0], color[1], color[2], (float) Math.random() / 8F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z); } } - + if(worldObj.rand.nextBoolean() && worldObj.isRemote) Botania.proxy.sparkleFX(worldObj, xCoord + Math.random(), yCoord + Math.random() * 1.5, zCoord + Math.random(), 0.5F, 0.5F, 1F, (float) Math.random(), 2); } - + } diff --git a/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java b/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java index e94991283..24c8f5bd8 100644 --- a/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java @@ -35,7 +35,7 @@ public final class ConfigHandler { Property lexiconRotatingItemsProp = config.get(Configuration.CATEGORY_GENERAL, "lexicon.enable.rotatingItems", true); lexiconRotatingItemsProp.comment = "Set to false to disable the rotating items in the petal and rune entries in the Lexica Botania."; lexiconRotatingItems = lexiconRotatingItemsProp.getBoolean(true); - + Property subtlePowerSystemProp = config.get(Configuration.CATEGORY_GENERAL, "powerSystem.system", false); subtlePowerSystemProp.comment = "Set to true to set the power system's particles to be a lot more subtle. Good for low-end systems, if the particles are causing lag."; subtlePowerSystem = subtlePowerSystemProp.getBoolean(false); diff --git a/MODSRC/vazkii/botania/common/core/helper/InventoryHelper.java b/MODSRC/vazkii/botania/common/core/helper/InventoryHelper.java index 134856bb3..16f3918cd 100644 --- a/MODSRC/vazkii/botania/common/core/helper/InventoryHelper.java +++ b/MODSRC/vazkii/botania/common/core/helper/InventoryHelper.java @@ -31,7 +31,7 @@ import net.minecraftforge.common.ForgeDirection; //From OpenBlocksLib: https://github.com/OpenMods/OpenModsLib public class InventoryHelper { - + public static void tryInsertStack(IInventory targetInventory, int slot, ItemStack stack, boolean canMerge) { if(targetInventory.isItemValidForSlot(slot, stack)) { ItemStack targetStack = targetInventory.getStackInSlot(slot); @@ -76,7 +76,7 @@ public class InventoryHelper { targetInventory = new GenericInventory("temporary.inventory", false, targetInventory.getSizeInventory()); ((GenericInventory)targetInventory).copyFrom(inventory); } - + int i = 0; int[] attemptSlots = new int[0]; @@ -114,16 +114,16 @@ public class InventoryHelper { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if(tileEntity instanceof TileEntityChest) { int chestId = world.getBlockId(x, y, z); - if(world.getBlockId(x - 1, y, z) == chestId) + if(world.getBlockId(x - 1, y, z) == chestId) return new InventoryLargeChest("Large chest", (IInventory)world.getBlockTileEntity(x - 1, y, z), (IInventory)tileEntity); - if(world.getBlockId(x + 1, y, z) == chestId) + if(world.getBlockId(x + 1, y, z) == chestId) return new InventoryLargeChest("Large chest", (IInventory)tileEntity, (IInventory)world.getBlockTileEntity(x + 1, y, z)); - if(world.getBlockId(x, y, z - 1) == chestId) + if(world.getBlockId(x, y, z - 1) == chestId) return new InventoryLargeChest("Large chest", (IInventory)world.getBlockTileEntity(x, y, z - 1), (IInventory)tileEntity); - if(world.getBlockId(x, y, z + 1) == chestId) + if(world.getBlockId(x, y, z + 1) == chestId) return new InventoryLargeChest("Large chest", (IInventory)tileEntity, (IInventory)world.getBlockTileEntity(x, y, z + 1)); } - return (tileEntity instanceof IInventory)? (IInventory)tileEntity : null; + return tileEntity instanceof IInventory? (IInventory)tileEntity : null; } public static IInventory getInventory(World world, int x, int y, int z, ForgeDirection direction) { @@ -153,8 +153,8 @@ public class InventoryHelper { public GenericInventory(String name, boolean isInvNameLocalized, int size) { this.isInvNameLocalized = isInvNameLocalized; - this.slotsCount = size; - this.inventoryTitle = name; + slotsCount = size; + inventoryTitle = name; inventoryContents = new ItemStack[size]; } @@ -171,7 +171,7 @@ public class InventoryHelper { inventoryContents[par1] = null; return itemstack; } - + itemstack = inventoryContents[par1].splitStack(par2); if(inventoryContents[par1].stackSize == 0) inventoryContents[par1] = null; @@ -207,15 +207,15 @@ public class InventoryHelper { @Override public ItemStack getStackInSlotOnClosing(int i) { - if(i >= inventoryContents.length) + if(i >= inventoryContents.length) return null; - + if(inventoryContents[i] != null) { ItemStack itemstack = inventoryContents[i]; inventoryContents[i] = null; return itemstack; } - + return null; } @@ -249,7 +249,7 @@ public class InventoryHelper { public void readFromNBT(NBTTagCompound tag) { if(tag.hasKey("size")) slotsCount = tag.getInteger("size"); - + NBTTagList nbttaglist = tag.getTagList("Items"); inventoryContents = new ItemStack[slotsCount]; for(int i = 0; i < nbttaglist.tagCount(); i++) { diff --git a/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java b/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java index dca1f5771..c430f0e0d 100644 --- a/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java +++ b/MODSRC/vazkii/botania/common/core/proxy/CommonProxy.java @@ -73,7 +73,7 @@ public class CommonProxy { public void twigWandClientUpdate() { // NO-OP } - + public long getWorldElapsedTicks() { return MinecraftServer.getServer().worldServers[0].getTotalWorldTime(); } @@ -89,7 +89,7 @@ public class CommonProxy { public void setWispFXDistanceLimit(boolean limit) { // NO-OP } - + public void wispFX(World world, double x, double y, double z, float r, float g, float b, float size) { wispFX(world, x, y, z, r, g, b, size, 0F); } diff --git a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java index c52ae3928..76578fc08 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java @@ -187,50 +187,50 @@ public final class ModCrafingRecipes { 'P', LibOreDict.PETAL[i], 'M', new ItemStack(Item.enderPearl)); recipesUnstableBlocks = BotaniaAPI.getLatestAddedRecipes(16); - + // Mana Pylon Recipe - addOreDictRecipe(new ItemStack(ModBlocks.pylon), + addOreDictRecipe(new ItemStack(ModBlocks.pylon), " G ", "MDM", " G ", 'G', "ingotGold", 'M', LibOreDict.MANA_STEEL, 'D', LibOreDict.MANA_DIAMOND); recipePylon = BotaniaAPI.getLatestAddedRecipe(); - + // Mana Distributor - addOreDictRecipe(new ItemStack(ModBlocks.distributor), + addOreDictRecipe(new ItemStack(ModBlocks.distributor), "RRR", "S S", "RRR", 'R', LibOreDict.LIVING_ROCK, 'S', LibOreDict.MANA_STEEL); recipeDistributor = BotaniaAPI.getLatestAddedRecipe(); - + // Livingrock Decorative Blocks - addOreDictRecipe(new ItemStack(ModBlocks.livingrock, 4, 1), - "RR", "RR", + addOreDictRecipe(new ItemStack(ModBlocks.livingrock, 4, 1), + "RR", "RR", 'R', LibOreDict.LIVING_ROCK); livingrockDecorRecipe1 = BotaniaAPI.getLatestAddedRecipe(); addShapelessOreDictRecipe(new ItemStack(ModBlocks.livingrock, 1, 2), new ItemStack(ModBlocks.livingrock, 1, 1), new ItemStack(Item.seeds)); livingrockDecorRecipe2 = BotaniaAPI.getLatestAddedRecipe(); addShapelessOreDictRecipe(new ItemStack(ModBlocks.livingrock, 2, 3), new ItemStack(ModBlocks.livingrock, 1, 1), "cobblestone"); livingrockDecorRecipe3 = BotaniaAPI.getLatestAddedRecipe(); - addOreDictRecipe(new ItemStack(ModBlocks.livingrock, 4, 4), - "RR", "RR", + addOreDictRecipe(new ItemStack(ModBlocks.livingrock, 4, 4), + "RR", "RR", 'R', new ItemStack(ModBlocks.livingrock, 1, 1)); livingrockDecorRecipe4 = BotaniaAPI.getLatestAddedRecipe(); - + // Livingwood Decorative Blocks addShapelessOreDictRecipe(new ItemStack(ModBlocks.livingwood, 4, 1), LibOreDict.LIVING_WOOD); livingwoodDecorRecipe1 = BotaniaAPI.getLatestAddedRecipe(); addShapelessOreDictRecipe(new ItemStack(ModBlocks.livingwood, 1, 2), new ItemStack(ModBlocks.livingwood, 1, 1), new ItemStack(Item.seeds)); livingwoodDecorRecipe2 = BotaniaAPI.getLatestAddedRecipe(); - addOreDictRecipe(new ItemStack(ModBlocks.livingwood, 4, 3), + addOreDictRecipe(new ItemStack(ModBlocks.livingwood, 4, 3), "WW", "WW", 'W', new ItemStack(ModBlocks.livingwood, 1, 1)); livingwoodDecorRecipe3 = BotaniaAPI.getLatestAddedRecipe(); - addOreDictRecipe(new ItemStack(ModBlocks.livingwood, 4, 4), + addOreDictRecipe(new ItemStack(ModBlocks.livingwood, 4, 4), " W ", "W W", " W ", 'W', new ItemStack(ModBlocks.livingwood, 1, 1)); livingwoodDecorRecipe4 = BotaniaAPI.getLatestAddedRecipe(); - + // MANA BEACON RECIPES for(int i = 0; i < 16; i++) addOreDictRecipe(new ItemStack(ModBlocks.manaBeacon, 1, i), @@ -238,7 +238,7 @@ public final class ModCrafingRecipes { 'B', new ItemStack(ModBlocks.unstableBlock, 1, i), 'P', LibOreDict.MANA_PEARL); recipesManaBeacons = BotaniaAPI.getLatestAddedRecipes(16); - + // SIGNAL FLARE RECIPES for(int i = 0; i < 16; i++) addOreDictRecipe(ItemSignalFlare.forColor(i), diff --git a/MODSRC/vazkii/botania/common/entity/EntitySignalFlare.java b/MODSRC/vazkii/botania/common/entity/EntitySignalFlare.java index 5828bcb9b..083d79217 100644 --- a/MODSRC/vazkii/botania/common/entity/EntitySignalFlare.java +++ b/MODSRC/vazkii/botania/common/entity/EntitySignalFlare.java @@ -11,11 +11,11 @@ */ package vazkii.botania.common.entity; -import vazkii.botania.common.Botania; import net.minecraft.entity.Entity; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import vazkii.botania.common.Botania; public class EntitySignalFlare extends Entity { @@ -42,14 +42,14 @@ public class EntitySignalFlare extends Entity { if(!isDead) { if(ticksExisted % 10 == 0) playSound("random.fuse", 1F, 1F); - + int color = getColor(); if(color < 16 && color >= 0) { float[] colorArray = EntitySheep.fleeceColorTable[color]; Botania.proxy.setWispFXDistanceLimit(false); for(int i = 0; i < 3; i++) - Botania.proxy.wispFX(worldObj, posX, posY, posZ + 0.5, colorArray[0], colorArray[1], colorArray[2], (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt((256F / (256F - (float) posY))), (float) (Math.random() - 0.5F)); + Botania.proxy.wispFX(worldObj, posX, posY, posZ + 0.5, colorArray[0], colorArray[1], colorArray[2], (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F)); for(int i = 0; i < 4; i++) Botania.proxy.wispFX(worldObj, posX + 0.5, 256, posZ + 0.5, colorArray[0], colorArray[1], colorArray[2], (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F); diff --git a/MODSRC/vazkii/botania/common/item/ItemLens.java b/MODSRC/vazkii/botania/common/item/ItemLens.java index cb2a4ee8e..91b9ba2d1 100644 --- a/MODSRC/vazkii/botania/common/item/ItemLens.java +++ b/MODSRC/vazkii/botania/common/item/ItemLens.java @@ -16,7 +16,6 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; @@ -41,8 +40,6 @@ import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.core.helper.Vector3; import vazkii.botania.common.lib.LibItemIDs; import vazkii.botania.common.lib.LibItemNames; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemLens extends ItemMod implements ILens { diff --git a/MODSRC/vazkii/botania/common/item/ItemSignalFlare.java b/MODSRC/vazkii/botania/common/item/ItemSignalFlare.java index d0514d6fb..8b7fecb66 100644 --- a/MODSRC/vazkii/botania/common/item/ItemSignalFlare.java +++ b/MODSRC/vazkii/botania/common/item/ItemSignalFlare.java @@ -39,7 +39,7 @@ public class ItemSignalFlare extends ItemMod { Icon[] icons; private static final String TAG_COLOR = "color"; - + public ItemSignalFlare() { super(LibItemIDs.idSignalFlare); setMaxStackSize(1); @@ -47,12 +47,12 @@ public class ItemSignalFlare extends ItemMod { setMaxDamage(200); setUnlocalizedName(LibItemNames.SIGNAL_FLARE); } - + @Override public boolean isFull3D() { return true; } - + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if(par1ItemStack.getItemDamage() == 0) { @@ -65,7 +65,7 @@ public class ItemSignalFlare extends ItemMod { par2World.playSoundAtEntity(par3EntityPlayer, "random.explode", 40F, (1.0F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.2F) * 0.7F); par2World.spawnEntityInWorld(flare); - + int range = 5; List entities = par2World.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - range, par3EntityPlayer.posY - range, par3EntityPlayer.posZ - range, par3EntityPlayer.posX + range, par3EntityPlayer.posY + range, par3EntityPlayer.posZ + range)); for(EntityLivingBase entity : entities) @@ -74,7 +74,7 @@ public class ItemSignalFlare extends ItemMod { } par1ItemStack.damageItem(200, par3EntityPlayer); } - + return par1ItemStack; } @@ -110,18 +110,18 @@ public class ItemSignalFlare extends ItemMod { for(int i = 0; i < 16; i++) par3List.add(forColor(i)); } - + @Override public boolean requiresMultipleRenderPasses() { return true; } - + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { int storedColor = getColor(par1ItemStack); par3List.add(String.format(StatCollector.translateToLocal("botaniamisc.flareColor"), StatCollector.translateToLocal("botania.color" + storedColor))); } - + public static ItemStack forColor(int color) { ItemStack stack = new ItemStack(ModItems.signalFlare); ItemNBTHelper.setInt(stack, TAG_COLOR, color); diff --git a/MODSRC/vazkii/botania/common/item/ItemTwigWand.java b/MODSRC/vazkii/botania/common/item/ItemTwigWand.java index 6dedbd627..01c6a6f30 100644 --- a/MODSRC/vazkii/botania/common/item/ItemTwigWand.java +++ b/MODSRC/vazkii/botania/common/item/ItemTwigWand.java @@ -48,7 +48,7 @@ public class ItemTwigWand extends Item16Colors { public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { int id = par3World.getBlockId(par4, par5, par6); if(Block.blocksList[id] instanceof IWandable) { - boolean wanded = ((IWandable) Block.blocksList[id]).onUsedByWand(par2EntityPlayer, par1ItemStack, par3World, par4, par5, par6, par7); + boolean wanded = ((IWandable) Block.blocksList[id]).onUsedByWand(par2EntityPlayer, par1ItemStack, par3World, par4, par5, par6, par7); if(wanded && par3World.isRemote) par2EntityPlayer.swingItem(); return wanded; @@ -60,7 +60,7 @@ public class ItemTwigWand extends Item16Colors { BlockPistonRelay.InternalTickHandler.playerPositions.remove(par2EntityPlayer.username); BlockPistonRelay.InternalTickHandler.mappedPositions.put(bindPos, currentPos); BlockPistonRelay.WorldData.get(par3World).markDirty(); - + if(par3World.isRemote) par2EntityPlayer.swingItem(); } diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index 1e198e241..5bd799af4 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -66,7 +66,7 @@ public final class LexiconData { public static LexiconEntry generatingIntro; public static LexiconEntry daybloom; public static LexiconEntry endoflame; - + public static LexiconEntry pistonRelay; public static LexiconEntry pylon; @@ -115,7 +115,7 @@ public final class LexiconData { distributor = new BLexiconEntry(LibLexicon.MANA_DISTRIBUTOR, categoryMana); distributor.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeDistributor)); - + lensVelocity = new BLexiconEntry(LibLexicon.MANA_LENS_VELOCITY, categoryMana); lensVelocity.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLensVelocity)); @@ -146,7 +146,7 @@ public final class LexiconData { jadedAmaranthus = new BLexiconEntry(LibLexicon.FFLOWER_JADED_AMARANTHUS, categoryFunctionalFlowers); jadedAmaranthus.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.jadedAmaranthusRecipe)); - + bellethorne = new BLexiconEntry(LibLexicon.FFLOWER_BELLETHORNE, categoryFunctionalFlowers); bellethorne.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.bellethorneRecipe)); @@ -169,10 +169,10 @@ public final class LexiconData { // DEVICES ENTRIES pistonRelay = new BLexiconEntry(LibLexicon.DEVICE_PISTON_RELAY, categoryDevices); pistonRelay.setLexiconPages(new PageText("0"), new PageText("1"), new PageManaInfusionRecipe("2", ModManaInfusionRecipes.pistonRelayRecipe)); - + pylon = new BLexiconEntry(LibLexicon.DEVICE_PYLON, categoryDevices); pylon.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipePylon)); - + // MISCLENAEOUS ENTRIES unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc); unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks), new PageText("3"), new PageImage("4", LibResources.ENTRY_UNSTABLE_BEACON), new PageCraftingRecipe("5", ModCrafingRecipes.recipesManaBeacons), new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipesSignalFlares)); diff --git a/MODSRC/vazkii/botania/common/lib/LibLexicon.java b/MODSRC/vazkii/botania/common/lib/LibLexicon.java index cc4fa46f0..01d02d7d6 100644 --- a/MODSRC/vazkii/botania/common/lib/LibLexicon.java +++ b/MODSRC/vazkii/botania/common/lib/LibLexicon.java @@ -52,7 +52,7 @@ public final class LibLexicon { public static final String GFLOWER_INTRO = "gIntro"; public static final String GFLOWER_DAYBLOOM = "daybloom"; public static final String GFLOWER_ENDOFLAME = "endoflame"; - + public static final String DEVICE_PISTON_RELAY = "pistonRelay"; public static final String DEVICE_PYLON = "pylon";