Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Flenix

Members
  • Joined

  • Last visited

Everything posted by Flenix

  1. I've been getting some help on #MinecraftForgeTuts, and mine does import now but always with some sort of render bug. It's usually upside down, but I've got it tweaked so it's been inside the player, moving around depending on the players position, or even inside-out. I can't get it to go the right way up, and stay there. What did you do to fix it? Here's my current code: package co.uk.silvania.roads.tileentities; import org.lwjgl.opengl.GL11; import co.uk.silvania.roads.Roads; import co.uk.silvania.roads.client.TrafficLightModel; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import net.minecraft.block.Block; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class TileEntityTrafficLightRenderer extends TileEntitySpecialRenderer { private final TrafficLightModel model; public TileEntityTrafficLightRenderer() { this.model = new TrafficLightModel(); } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) { GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); bindTextureByName("/mods/roads/textures/blocks/TrafficLightPoleRed.png"); this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } private void adjustRotatePivotViaMeta(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); GL11.glRotatef(meta * (90), 0.0F, 1.0F, 0.0F); } private void adjustLightFixture(World world, int i, int j, int k, Block block) { Tessellator tess = Tessellator.instance; float brightness = block.getBlockBrightness(world, i, j, k); int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier); } }
  2. Here's how it's appearing right now:
  3. Hey guys, I'm trying to make a tile entity with a custom model. However, in-game I just get a standard block with "Missing Texture", and this spammed in the console: 2013-06-12 21:45:50 [sEVERE] [Minecraft-Client] ########## GL ERROR ########## 2013-06-12 21:45:50 [sEVERE] [Minecraft-Client] @ Post render 2013-06-12 21:45:50 [sEVERE] [Minecraft-Client] 1283: Stack overflow Anyone got any ideas? My TileEntitySpecialRenderer class: http://pastebin.com/T48pVFus Let me know if you need to see other classes. I've fixed the above, but a new issue now. The block simply isn't rendering... just an empty bounding box! My code (updated) package co.uk.silvania.roads.tileentities; import org.lwjgl.opengl.GL11; import co.uk.silvania.roads.Roads; import co.uk.silvania.roads.client.TrafficLightModel; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import net.minecraft.block.Block; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class TileEntityTrafficLightRenderer extends TileEntitySpecialRenderer { TrafficLightModel model; public TileEntityTrafficLightRenderer() { model = new TrafficLightModel(); } @Override public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)d, (float)d1, (float)d2); TileEntity te = (TileEntityTrafficLightEntity)tileentity; renderBlock(te, tileentity.worldObj, tileentity.xCoord, tileentity.yCoord, tileentity.zCoord, Roads.trafficLight); GL11.glPopMatrix(); } public void renderBlock(TileEntity te, World world, int i, int j, int k, Block block) { Tessellator tessellator = Tessellator.instance; float f = block.getBlockBrightness(world, i, j, k); int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0); int l1 = l % 65536; int l2 = l / 65536; tessellator.setColorOpaque_F(f, f, f); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)l1, (float)l2); int dir = world.getBlockMetadata(i, j, k); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0F, 0.5F); GL11.glRotatef(dir * (-90F), 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0F, -0.5F); bindTextureByName("/mods/roads/textures/blocks/TrafficLightPoleRed.png"); GL11.glPopMatrix(); } }
  4. Anyone interested, I fixed it now. package co.uk.silvania.roads.block; import co.uk.silvania.roads.CommonProxy; import co.uk.silvania.roads.Roads; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class RBOP extends Block { public RBOP (int id) { super(id, Material.rock); this.setHardness(1.0F); this.setStepSound(Block.soundStoneFootstep); this.setCreativeTab(Roads.tabRoads); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.825F, 1.0F); } @SideOnly(Side.CLIENT) private Icon sides; @SideOnly(Side.CLIENT) private Icon top; public void registerIcons(IconRegister iconRegister) { this.top = iconRegister.registerIcon("Roads:TarmacStop1"); this.sides = iconRegister.registerIcon("Roads:TarmacPlain"); } public int getRenderType() { return 16; } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta) { int k = meta; if (k == 0 && (side == 1)) { return top; } else if (k == 1 && (side == 1)) { return top; } else if (k == 2 && (side == 1)) { return top; } else if (k == 3 && (side == 1)) { return top; } else if (k == 4 && (side == 1)) { return top; } else if (k == 5 && (side == 1)) { return top; } return sides; } public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving entity, ItemStack item) { int l = determineOrientation(par1World, par2, par3, par4, entity); par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); } public static int determineOrientation(World world, int par1, int par2, int par3, EntityLiving entity) { int l = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; return l == 0 ? 3 : (l == 1 ? 4 : (l == 2 ? 2 : (l == 3 ? 5 : 0))); } } It still renders upside-down in your hand, but it places the right way up, so it's merely a graphical glitch now.
  5. I can tell you how to do that if you share your code for getting multiple biomes in your dimension. Seems fair to me
  6. Honetly I never saw the last reply on the other thread, I thought it was dead, but that thread was referring to getting rotation working in the first place. Anyways. I'm not sure why you think I want a flat block... It's the exact height I want it to be, 7/8ths the height of a standard block (so there's a slight step up from this to a full block) Onto the onBlockPlacedBy method; This does not work. It's the very first thing I tried actually. It rotates the entire block, like a pumpkin. Go place a pumpkin 4 directions, and notice the top texture is always facing the same way. That's the issue here; it's the top texture that needs to rotate, hence my hacky piston approach. As for the texture thing, why is using four textures better than one? I just don't understand that, it's 4x the file size of my mod, and if someone wants to add texture pack support it's 4x the work for them to. Surely if there's any way of doing it with a single texture file (which I've almost managed to do), then that's the best thing to do? At this point I'm not going to make 3 more textures for every single block (There's about 45 that all use this code) - If it comes to no solution, I'll just flip the textures so they're upside down. As said above, that only rotates the block itself; the top texture will stay facing the same way.
  7. Hey guys, I'm very close to finishing my first mod, just rounding off the last few bugs. This is the main real bug left. Most of my blocks are rotatable, and a key factor is the top-facing texture has to rotate. To get that, I did some hacking around with the log and piston code, and managed to do it. HOWEVER, the texture is always facing the wrong way from the player when placed. For example, I have two blocks which make up big letters saying "STOP", but they are placed to appear upside down, like so: (What's interesting; in my inventory it's correct, in my hand it's not) How would I fix this so it's readable on place? Here's my code for the same block shown above: package co.uk.silvania.roads.block; import co.uk.silvania.roads.CommonProxy; import co.uk.silvania.roads.Roads; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class RBOP extends Block { public RBOP (int id) { super(id, Material.rock); this.setHardness(1.0F); this.setStepSound(Block.soundStoneFootstep); this.setCreativeTab(Roads.tabRoads); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.825F, 1.0F); } @SideOnly(Side.CLIENT) private Icon sides; @SideOnly(Side.CLIENT) private Icon top; public void registerIcons(IconRegister iconRegister) { this.top = iconRegister.registerIcon("Roads:TarmacStop1"); this.sides = iconRegister.registerIcon("Roads:TarmacPlain"); } public int getRenderType() { return 16; } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta) { int k = meta; if (k == 0 && (side == 1)) { return top; } else if (k == 1 && (side == 1)) { return top; } else if (k == 2 && (side == 1)) { return top; } else if (k == 3 && (side == 1)) { return top; } else if (k == 4 && (side == 1)) { return top; } else if (k == 5 && (side == 1)) { return top; } return sides; } public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving entity, ItemStack item) { int l = determineOrientation(par1World, par2, par3, par4, entity); par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); } public static int determineOrientation(World world, int par1, int par2, int par3, EntityLiving entity) { if (MathHelper.abs((float)entity.posX - (float)par1) < 2.0F && MathHelper.abs((float)entity.posZ - (float)par3) < 2.0F) { double d0 = entity.posY + 1.82D - (double)entity.yOffset; if (d0 - (double)par2 > 2.0D) { return 1; } if ((double)par2 - d0 > 0.0D) { return 0; } } int l = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; return l == 0 ? 2 : (l == 1 ? 5 : (l == 2 ? 3 : (l == 3 ? 4 : 0))); } } Let me know if you need more info, Cheers
  8. Wherever you do your languageregistry you want something like this: GameRegistry.registerBlock(rpDecorBlocks, ItemRPDecorBlocks.class, "Silvania" + (rpDecorBlocks.getUnlocalizedName().substring(5))); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 0), "Calcite"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 1), "Graphite"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 2), "Calcite Bricks"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 3), "Graphite Cobblestone"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 4), "Graphite Bricks"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 5), "Chiseled Graphite Brick"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 6), "Graphite Paver"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 7), "Calcite Cobblestone"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, , "Chiseled Calcite Brick"); LanguageRegistry.addName(new ItemStack(rpDecorBlocks, 1, 9), "Calcite Paver"); The two numbers are quantity and meta, obviously quantity should always be 1. Add or remove more lines as required for the amount you have
  9. Yeah, I'm totally stumped. Anyone got any ideas how I can modify the above code for 4-directional rotation?
  10. To an extent, I've figured it out now. I can rotate it two ways (forward or sideways), but to get the "sideways" it has to be placed against a block. I'm still tinkering though because I want four directions, but here's the code if you want it: public int getRenderType() { return 31; } public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta) { int j1 = meta & 3; byte b0 = 0; switch (side) { case 0: case 1: b0 = 0; break; case 2: case 3: b0 = 8; break; case 4: case 5: b0 = 4; } return j1 | b0; } //This is the actual rotation part. I've tried all 16 metadatas, only these three seem to work. @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta) { int k = meta & 12; if (k == 0 && (side == 1)) { return top; } else if (k == 4 && (side == 1)) { return top; } else if (k == 8 && (side == 1)) { return top; } return sides; }
  11. Here's an example of a block I want to do this on: package co.uk.silvania.roads.block; import removed.to.keep.clean; public class RBDoubleYellowStripe extends Block { public RBDoubleYellowStripe(int id) { super(id, Material.rock); this.setHardness(1.0F); this.setStepSound(Block.soundStoneFootstep); this.setCreativeTab(Roads.tabRoads); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.825F, 1.0F); } @SideOnly(Side.CLIENT) private Icon sides; @SideOnly(Side.CLIENT) private Icon top; public void registerIcons(IconRegister iconRegister) { this.top = iconRegister.registerIcon("Roads:TarmacSideDoubleYellowStripe"); this.sides = iconRegister.registerIcon("Roads:TarmacPlain"); } public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } @SideOnly(Side.CLIENT) @Override public Icon getIcon(int side, int meta) { if (side == 1) return top; return sides; } } I only really need to rate the "top" texture, but if the "sides" get changed that doesn't matter at all.
  12. Hey guys, Is there any way to rotate the ENTIRE block (ie, not just the sides but the top as well?) Whenever I've tried rotation before, the sides change but not the top. It seems kind of silly to me that it works like that... So, is it possible? I've looked through various classes (eg log, piston) but they are a bit more complex than what I want because the block itself is on it's side before it rotates the "top". I only actually need to rotate the top-facing texture, but rotating the entire block is fine if that's easier.
  13. Hey guys. I want to make two new GUI bars; Thirst and Fatigue, which will add a new element of gameplay to my mod to add immersion. (I know mod's already exist for both, but I don't want to suggest people install other mods; instead these will just be disable-able) Anyways, I followed the GUI Overlay tutorial on the wiki, but it really didn't help me very much. I only really need to know two things; 1. How can I render the bar? (The tutorial doesn't cover that, just gives code to copy and I can't figure out which numbers read specific textures from the spritesheet) 2. Where is the vanilla hunger class? (Not the EntityPlayer) I want to see how it works, how it decreases and how food increases it again so I can learn from it. If that is covered in EntityPlayer can you give me line numbers, because I really can't find it in there. 3. How can I designate when things will render? I want other overlays which only render at certain times (Such as when in certain dimensions, or when wearing a helmet) 4. Is it possible to disable vanilla bars? I'm also adding Oxygen, so it'd be nice if I can disable the vanilla bubbles and replace them with mine, seeing as when players have an oxygen tank that bar would be useless anyway. Also, totally off topic but the forums barely load for me anymore, so squeezing as much into this post as I can. Does anyone know an up-to-date 1.5.2 plant tutorial?
  14. Firstly 2 things: 1. Sorry if this is in the wrong place, but I couldn't see any "site issues" sections. I did read the rules but it didn't say either way about site issues. 2. I don't mean to offend anyone by this; I'm simply asking. Anyway; Over the past few weeks, whenever I try and use the Forge forums or wiki, every now and then I'd be redirected to the cloudfare system telling me the site was offline. It'd maybe happen once every 6 hours, for around 20 minutes - not an issue as I could do something else. However, since Monday, I've barely been able to get on the site at all. I've actually been trying to post this thread since Wednesday, but I kept giving up. It's also worth noting that instead of cloudfare, I'm getting just a 503 error. What I'm asking, is is this something on my end, or is this a known issue? If it's something on my end I obviously want to fix it, which is my main reason for asking, but if it's a known issue is there any planned solution for it? Please don't think I'm slating the site or anything because I'm not; it's an incredibly useful resource for me as someone new to modding, the only reason I'm asking is because I want to be able to use it Thanks EDIT It happened again so here's the exact message: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. And in my tab at the top, it has a prefix of 503 before the Service
  15. Hey guys, My server was having crashing issues, so I removed some mods to see if it fixed it. Now, I can't load my existing world (Although I can create a new one... but we have a LOT in that existing world) Anyone got any ideas? Here's the (pretty useless) stacktrace: 2013-05-23 08:49:44 [iNFO] [sTDERR] java.lang.NullPointerException 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraftforge.common.ForgeChunkManager.loadWorld(ForgeChunkManager.java:527) 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraftforge.common.ForgeInternalHandler.onDimensionLoad(ForgeInternalHandler.java:71) 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraftforge.event.ASMEventHandler_1_ForgeInternalHandler_onDimensionLoad_Load.invoke(.dynamic) 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:35) 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraftforge.event.EventBus.post(EventBus.java:103) 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:279) 2013-05-23 08:49:44 [iNFO] [sTDERR] at ho.c(DedicatedServer.java:180) 2013-05-23 08:49:44 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458) 2013-05-23 08:49:44 [iNFO] [sTDERR] at fy.run(SourceFile:849) 2013-05-23 08:49:44 [sEVERE] [Minecraft] Encountered an unexpected exception NullPointerException java.lang.NullPointerException at net.minecraftforge.common.ForgeChunkManager.loadWorld(ForgeChunkManager.java:527) at net.minecraftforge.common.ForgeInternalHandler.onDimensionLoad(ForgeInternalHandler.java:71) at net.minecraftforge.event.ASMEventHandler_1_ForgeInternalHandler_onDimensionLoad_Load.invoke(.dynamic) at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:35) at net.minecraftforge.event.EventBus.post(EventBus.java:103) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:279) at ho.c(DedicatedServer.java:180) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458) at fy.run(SourceFile:849)
  16. Completely the wrong place... Have a look around and you'll find it anyway. This forum is for "Modder Support", ie people who need help making mods.
  17. Bit late here, but aren't his tutorials for modloader...?
  18. ..There is a huge tutorial section on the wiki for a reason you know...
  19. Sweet. You might even think about making an Energy API. Not like Universal Energy, but rather a core that other mod developers can take and use in order to create their own mods like IC2, etc. without having to make their own power network. They just have to create blocks and implement IPowered or IGenerator (or whatever) and have it done for them. That's exactly what I have planned. It'll literally just be a barebones energy system; no blocks included, and then distributed as source. Modders throw it into their project and can extend it and edit it, so they have their own energy name/values etc. But first I need to understand how to make one...
  20. I feel I should point out that the EU via cables is Industrialcraft, not Buildcraft. Annoyingly, IC2 is closed-source, so you wont be able to look at the source from that. I also want to make an energy network. I don't want to use an existing one, because once mine is made I'm releasing the core files under a totally open license- so once it's made, anyone can use it in their own mods, totally free of restriction other than a credit to me. API's are great but this would give total freedom. So if you do work anything out let me know
  21. Hey guys, I've got a private server with a pretty hefty modpack, 97 mods currently (ranging from tiny addons to huge mods). However, it's putting a bit of strain on the server, so I want to remove some to clean it up a little. I was wandering if there is a way to see how much resources each mod uses, to help me decide which to remove? Either a simple mod you can install, or maybe even something in the command line outside of Minecraft- I'm running Ubuntu 12.04 Server stats, it's an 8GB server with an AMD quadcore, so not exactly simple. Part of me thinks there's just one mod with a memory leak somewhere, which is the main reason I want this test...
  22. Hmm, I was expecting rotation code, but tehre wasn't any. However, there is one bug in Techne, it misses a few Entity references that you need to add. 4 in total, I added them in the code above with a - infront of them. That may fix it- give it a try.
  23. For the second: Does it have a TileEntitySpecialRenderer? Sorry, been away for a couple of days. It has got one, here's one of them: package co.uk.silvania.Remula.tileentity; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.Calendar; import net.minecraft.block.Block; import net.minecraft.block.BlockChest; import net.minecraft.client.model.ModelChest; import net.minecraft.client.model.ModelLargeChest; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @SideOnly(Side.CLIENT) public class TileEntityMerciliteChestRenderer extends TileEntitySpecialRenderer { /** The normal small chest model. */ private ModelChest chestModel = new ModelChest(); /** The large double chest model. */ private ModelChest largeChestModel = new ModelLargeChest(); private boolean field_92061_d; public TileEntityMerciliteChestRenderer() { Calendar var1 = Calendar.getInstance(); if (var1.get(2) + 1 == 12 && var1.get(5) >= 24 && var1.get(5) <= 26) { this.field_92061_d = true; } } /** * Renders the TileEntity for the chest at a position. */ public void renderTileEntityChestAt(TileEntityChest par1TileEntityChest, double par2, double par4, double par6, float par8) { int var9; if (!par1TileEntityChest.func_70309_m()) { var9 = 0; } else { Block var10 = par1TileEntityChest.getBlockType(); var9 = par1TileEntityChest.getBlockMetadata(); if (var10 != null && var9 == 0) { try { ((BlockChest)var10).unifyAdjacentChests(par1TileEntityChest.getWorldObj(), par1TileEntityChest.xCoord, par1TileEntityChest.yCoord, par1TileEntityChest.zCoord); } catch (ClassCastException e) { FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", par1TileEntityChest.xCoord, par1TileEntityChest.yCoord, par1TileEntityChest.zCoord); } var9 = par1TileEntityChest.getBlockMetadata(); } par1TileEntityChest.checkForAdjacentChests(); } if (par1TileEntityChest.adjacentChestZNeg == null && par1TileEntityChest.adjacentChestXNeg == null) { ModelChest var14; if (par1TileEntityChest.adjacentChestXPos == null && par1TileEntityChest.adjacentChestZPosition == null) { var14 = this.chestModel; if (this.field_92061_d) { this.bindTextureByName("/item/xmaschest.png"); } else { this.bindTextureByName("/item/chest.png"); } } else { var14 = this.largeChestModel; if (this.field_92061_d) { this.bindTextureByName("/item/largexmaschest.png"); } else { this.bindTextureByName("/item/largechest.png"); } } GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef((float)par2, (float)par4 + 1.0F, (float)par6 + 1.0F); GL11.glScalef(1.0F, -1.0F, -1.0F); GL11.glTranslatef(0.5F, 0.5F, 0.5F); short var11 = 0; if (var9 == 2) { var11 = 180; } if (var9 == 3) { var11 = 0; } if (var9 == 4) { var11 = 90; } if (var9 == 5) { var11 = -90; } if (var9 == 2 && par1TileEntityChest.adjacentChestXPos != null) { GL11.glTranslatef(1.0F, 0.0F, 0.0F); } if (var9 == 5 && par1TileEntityChest.adjacentChestZPosition != null) { GL11.glTranslatef(0.0F, 0.0F, -1.0F); } GL11.glRotatef((float)var11, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); float var12 = par1TileEntityChest.prevLidAngle + (par1TileEntityChest.lidAngle - par1TileEntityChest.prevLidAngle) * par8; float var13; if (par1TileEntityChest.adjacentChestZNeg != null) { var13 = par1TileEntityChest.adjacentChestZNeg.prevLidAngle + (par1TileEntityChest.adjacentChestZNeg.lidAngle - par1TileEntityChest.adjacentChestZNeg.prevLidAngle) * par8; if (var13 > var12) { var12 = var13; } } if (par1TileEntityChest.adjacentChestXNeg != null) { var13 = par1TileEntityChest.adjacentChestXNeg.prevLidAngle + (par1TileEntityChest.adjacentChestXNeg.lidAngle - par1TileEntityChest.adjacentChestXNeg.prevLidAngle) * par8; if (var13 > var12) { var12 = var13; } } var12 = 1.0F - var12; var12 = 1.0F - var12 * var12 * var12; var14.chestLid.rotateAngleX = -(var12 * (float)Math.PI / 2.0F); var14.renderAll(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } } public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8) { this.renderTileEntityChestAt((TileEntityChest)par1TileEntity, par2, par4, par6, par8); } } Again, right now it's just the same as the vanilla chest. I want to get that working before I try and edit it to be my custom model/texture.
  24. I've had errors on func's and fields before. I think it's usually because the tutorial you followed isn't quite up-to-date with MCP. I may be wrong, but I think those funcs and fields are just the unnamed parts of MCP, and once they get named they no longer work with the un-named ones. The only time I had the issue, I just googled "field_85192_a mcp" and found a thread saying what it changed to. Can't promise that will work for all of them though.
  25. Ok, but the animation code is done in the model file. So, if its head is moving, it's the model file that does that

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.