Pass the cleanup brush~

This commit is contained in:
Vasco Lavos committed 2014-03-25 21:55:19 +00:00
1 parent 3a8fd56e8a
commit d82f8b7cbc
20 files changed
+47 -47

No files matched your search

+2 -2
View File
@@ -21,11 +21,11 @@ import cpw.mods.fml.relauncher.SideOnly;
* over with a Wand of the Forest.
*/
public interface ITileBound {
/**
* Gets where this block is bound to, can return null.
*/
@SideOnly(Side.CLIENT)
public ChunkCoordinates getBinding();
}
@@ -95,7 +95,7 @@ public class SubTileEntity {
public ChunkCoordinates getBinding() {
return null;
}
/**
* Called on the client when the block being pointed at is the one with this sub tile.
* Used to render a HUD portraying some data from this sub tile.
@@ -78,7 +78,7 @@ public class SubTileFunctional extends SubTileEntity {
boolean needsNew = false;
if(linkedPool == null) {
needsNew = true;
if(cachedPoolCoordinates != null) {
TileEntity tileAt = supertile.worldObj.getBlockTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ);
if(tileAt != null && tileAt instanceof IManaPool) {
@@ -151,7 +151,7 @@ public class SubTileFunctional extends SubTileEntity {
cmp.setInteger(TAG_POOL_Y, y);
cmp.setInteger(TAG_POOL_Z, z);
}
@Override
public ChunkCoordinates getBinding() {
if(linkedPool == null)
@@ -24,7 +24,6 @@ import net.minecraft.util.StatCollector;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.IManaNetwork;
import vazkii.botania.api.mana.IManaCollector;
import vazkii.botania.api.mana.IManaPool;
import cpw.mods.fml.common.network.PacketDispatcher;
/**
@@ -184,7 +183,7 @@ public class SubTileGenerating extends SubTileEntity {
cmp.setInteger(TAG_COLLECTOR_Y, y);
cmp.setInteger(TAG_COLLECTOR_Z, z);
}
@Override
public ChunkCoordinates getBinding() {
if(linkedCollector == null)
@@ -53,11 +53,11 @@ public final class BoundTileRenderer {
if(tile != null && tile instanceof ITileBound) {
ChunkCoordinates coords = ((ITileBound) tile).getBinding();
if(coords != null)
renderBlockOutlineAt(coords, Color.HSBtoRGB((float) (world.getTotalWorldTime() % 200) / 200F, 0.6F, 1F));
renderBlockOutlineAt(coords, Color.HSBtoRGB(world.getTotalWorldTime() % 200 / 200F, 0.6F, 1F));
}
}
}
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
@@ -69,7 +69,7 @@ public final class BoundTileRenderer {
GL11.glTranslated(pos.posX - RenderManager.renderPosX, pos.posY - RenderManager.renderPosY, pos.posZ - RenderManager.renderPosZ + 1);
Color colorRGB = new Color(color);
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 255);
World world = Minecraft.getMinecraft().theWorld;
Block block = Block.blocksList[world.getBlockId(pos.posX, pos.posY, pos.posZ)];
if(block != null) {
@@ -80,13 +80,13 @@ public final class BoundTileRenderer {
axis.maxY -= pos.posY;
axis.minZ -= pos.posZ;
axis.maxZ -= pos.posZ;
GL11.glTranslated(axis.minX, axis.minY, axis.minZ);
GL11.glScaled(axis.maxX - axis.minX, axis.maxY - axis.minY, axis.maxZ - axis.minZ);
GL11.glLineWidth(1F);
renderBlockOutline();
GL11.glLineWidth(4F);
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
renderBlockOutline();
@@ -78,7 +78,7 @@ public class ClientTickHandler implements ITickHandler {
}
}
}
public static void notifyPageChange() {
if(pageFlipTicks == 0)
pageFlipTicks = 5;
@@ -89,7 +89,7 @@ public class ClientProxy extends CommonProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.lens.itemID, new RenderLens());
if(ConfigHandler.lexicon3dModel)
MinecraftForgeClient.registerItemRenderer(ModItems.lexicon.itemID, new RenderLexicon());
ClientRegistry.bindTileEntitySpecialRenderer(TileAltar.class, new RenderTileAltar());
ClientRegistry.bindTileEntitySpecialRenderer(TileSpreader.class, new RenderTileSpreader());
ClientRegistry.bindTileEntitySpecialRenderer(TilePool.class, new RenderTilePool());
@@ -11,16 +11,17 @@
*/
package vazkii.botania.client.render.item;
import org.lwjgl.opengl.GL11;
import vazkii.botania.client.core.handler.ClientTickHandler;
import vazkii.botania.client.lib.LibResources;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBook;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import vazkii.botania.client.core.handler.ClientTickHandler;
import vazkii.botania.client.lib.LibResources;
public class RenderLexicon implements IItemRenderer {
ModelBook model = new ModelBook();
@@ -49,8 +50,8 @@ public class RenderLexicon implements IItemRenderer {
GL11.glRotatef(95F + ticks * 5, 0F, 1F, 0F);
GL11.glRotatef(ticks * 2.5F, 0F, 0F, 1F);
GL11.glScalef(0.9F, 0.9F, 0.9F);
opening = (float) ticks / 12F;
pageFlip = (float) ClientTickHandler.pageFlipTicks / 5F;
opening = ticks / 12F;
pageFlip = ClientTickHandler.pageFlipTicks / 5F;
model.render(null, 0F, 0F, pageFlip, opening, 0F, 1F / 16F);
@@ -144,12 +144,13 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
public boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) {
TileAltar altar = (TileAltar) par1World.getBlockTileEntity(par2, par3, par4);
return altar.hasWater ? 15 : 0;
}
@Override
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
return LexiconData.apothecary;
@@ -83,7 +83,7 @@ public class BlockLivingwood extends BlockMod implements ILexiconable {
int meta = world.getBlockMetadata(x, y, z);
return new ItemStack(blockID, 1, meta);
}
@Override
public int getLightValue(IBlockAccess world, int x, int y, int z) {
return world.getBlockMetadata(x, y, z) == 5 ? 12 : 0;
@@ -60,7 +60,7 @@ public class TilePool extends TileMod implements IManaPool {
@Override
public void recieveMana(int mana) {
boolean full = this.mana >= MAX_MANA;
this.mana = Math.min(this.mana + mana, MAX_MANA);
if(!full)
worldObj.func_96440_m(xCoord, yCoord, zCoord, worldObj.getBlockId(xCoord, yCoord, zCoord));
@@ -375,7 +375,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
public ChunkCoordinates getBinding() {
if(receiver == null)
return null;
TileEntity tile = (TileEntity) receiver;
return new ChunkCoordinates(tile.xCoord, tile.yCoord, tile.zCoord);
}
@@ -18,12 +18,13 @@ import vazkii.botania.client.lib.LibRenderIDs;
public class BlockFlowerOverride extends BlockFlower {
Block original;
public BlockFlowerOverride(Block original) {
super(original.blockID);
this.original = original;
}
@Override
public void registerIcons(net.minecraft.client.renderer.texture.IconRegister par1IconRegister) {
super.registerIcons(par1IconRegister);
original.registerIcons(par1IconRegister);
@@ -28,7 +28,7 @@ public class BlockSnowOverride extends BlockSnow {
super.registerIcons(par1IconRegister);
snow.registerIcons(par1IconRegister);
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
if(forcedMeta != -1) {
@@ -58,16 +58,16 @@ public final class ConfigHandler {
Property boundBlockWireframeProp = config.get(Configuration.CATEGORY_GENERAL, "boundBlock.wireframe.enabled", true);
boundBlockWireframeProp.comment = "Set to false to disable the wireframe when looking a block bound to something (spreaders, flowers, etc).";
boundBlockWireframe = boundBlockWireframeProp.getBoolean(true);
Property lexicon3dModelProp = config.get(Configuration.CATEGORY_GENERAL, "lexicon.render.3D", true);
lexicon3dModelProp.comment = "Set to false to disabled the animated 3D render for the lexica botania";
lexicon3dModel = lexicon3dModelProp.getBoolean(true);
Property propFlowerQuantity = config.get(Configuration.CATEGORY_GENERAL, "worldgen.flower.quantity", 3);
flowerQuantity = propFlowerQuantity.getInt(3);
Property propFlowerDensity = config.get(Configuration.CATEGORY_GENERAL, "worldgen.flower.density", 32);
flowerDensity = propFlowerDensity.getInt(32);
// Block IDs
LibBlockIDs.idFlower = loadBlock(LibBlockNames.FLOWER, LibBlockIDs.idFlower);
LibBlockIDs.idAltar = loadBlock(LibBlockNames.ALTAR, LibBlockIDs.idAltar);
@@ -53,7 +53,7 @@ public class WorldTreeGenerator {
for(int i = 0; i < mul; i++)
for(int j = 0; j < mul; j++) {
int meta = world.rand.nextInt(4) == 0 ? 5 : 0;
int angle = ((y - j) * mul) % 360;
int angle = (y - j) * mul % 360;
generateRingVal(radius - i - 3, angle, id, meta);
generateRingVal(radius - i - 3, angle + 180, id, meta);
@@ -64,7 +64,7 @@ public class WorldTreeGenerator {
for(int i = 0; i < mul; i++)
for(int j = 0; j < mul; j++) {
int meta = world.rand.nextInt(20) == 0 ? 5 : 0;
int angle = ((y - j) * mul) % 360;
int angle = (y - j) * mul % 360;
generateRingVal(radius + i - 1, angle + 90, id, meta);
generateRingVal(radius + i - 1, angle + 270, id, meta);
}
@@ -26,7 +26,6 @@ import vazkii.botania.common.item.ItemLens;
import vazkii.botania.common.item.ItemSignalFlare;
import vazkii.botania.common.item.ItemTwigWand;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lib.LibBlockIDs;
import vazkii.botania.common.lib.LibOreDict;
public final class ModCrafingRecipes {
@@ -249,10 +248,10 @@ public final class ModCrafingRecipes {
" W ", "W W", " W ",
'W', new ItemStack(ModBlocks.livingwood, 1, 1));
livingwoodDecorRecipe4 = BotaniaAPI.getLatestAddedRecipe();
addShapelessOreDictRecipe(new ItemStack(ModBlocks.livingwood, 1, 5),
addShapelessOreDictRecipe(new ItemStack(ModBlocks.livingwood, 1, 5),
LibOreDict.LIVING_WOOD, new ItemStack(Item.glowstone));
livingwoodDecorRecipe5 = BotaniaAPI.getLatestAddedRecipe();
// Mana Beacon Recipe
for(int i = 0; i < 16; i++)
addOreDictRecipe(new ItemStack(ModBlocks.manaBeacon, 1, i),
@@ -63,7 +63,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
List<String> alreadyCollidedAt = new ArrayList();
boolean fullManaLastTick = true;
boolean scanBeam = false;
public List<PositionProperties> propsList = new ArrayList();
@@ -359,7 +359,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
setMotion(motionX, motionY, motionZ);
fullManaLastTick = getMana() == getStartingMana();
if(scanBeam) {
PositionProperties props = new PositionProperties(this);
if(propsList.isEmpty())
@@ -567,7 +567,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
public boolean isFake() {
return fake;
}
public void setScanBeam() {
scanBeam = true;
}
@@ -714,12 +714,12 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
if(tile != null && tile instanceof TileSpreader)
((TileSpreader) tile).lastBurstDeathTick = ticksExisted;
}
public static class PositionProperties {
public final ChunkCoordinates coords;
public final int id; int meta;
public PositionProperties(Entity entity) {
int x = (int) entity.posX;
int y = (int) entity.posY;
@@ -728,11 +728,11 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
id = entity.worldObj.getBlockId(x, y, z);
meta = entity.worldObj.getBlockMetadata(x, y, z);
}
public boolean coordsEqual(PositionProperties props) {
return coords.equals(props.coords);
}
public boolean contentsEqual(World world) {
int id = world.getBlockId(coords.posX, coords.posY, coords.posZ);
int meta = world.getBlockMetadata(coords.posX, coords.posY, coords.posZ);
@@ -17,7 +17,6 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@@ -46,7 +46,7 @@ public final class ModItems {
manaTablet = new ItemManaTablet();
manaGun = new ItemManaGun();
manaCookie = new ItemManaCookie();
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
for(int i = 0; i < 16; i++) {
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal.itemID, 1, i));