Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Containers are only loaded server-side, so how I could get a disparity within itself is beyond me. But the GUI is client side! (And the tile entity is on both)
  2. getIcon is not a function defined in class Block. You're looking for getBlockTextureFromSideAndMetadata (Also, side 1 is the top. 0 is the bottom. 2 through 5 are the sides)
  3. Because that's not its collision model. It's collision model is still a full cube. public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)par2 + this.minX, (double)par3 + this.minY, (double)par4 + this.minZ, (double)par2 + this.maxX, (double)((float)par3 + 0.125F * var5 - 0.005F), (double)par4 + this.maxZ); }
  4. It teleports back to where it started because you only moved it client side. When it later got a position packet from the server, it moved to those coordinates.
  5. Here's the code I have. It's not more involved, there's just some error handling. ByteArrayOutputStream bt = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(bt); try { out.writeInt(1); out.writeInt(x); out.writeInt(y); out.writeInt(z); Packet250CustomPayload packet = new Packet250CustomPayload("Mosaic", bt.toByteArray()); PacketDispatcher.sendPacketToServer(packet); //the line you're asking about } catch (IOException ex) { System.out.println("couldnt send packet!"); }
  6. You're going to have to look at the onHarvest method and try and figure out what level of tool the player is using yourself.
  7. My guess is client/server disparity.
  8. 3, I think. If we consider that implementing a new block is a 1 and handling GUIs* is a 5, then a 3: difficult, but by no means the most difficult thing. *Most frustrating thing I've encountered thus far.
  9. Look at blocks like the furnace that get the player's facing when placed.
  10. By non-cube, you mean the shape so it takes up less than a full block? Techne might help you, or you can try and write the renderer by hand (for a simple square pipe its likely not too hard). You might also want to take a peek at Buildcraft's code, which is open source and on Github.
  11. It would be more intensive than if you used metadata. But if you can't use metadata (like redstone, because metadata is being used for other things, or for devices that have more than 16 configurations, like pipes) then it's not too bad. You'd actually be surprised, but the 3D render calls (the tessalator) aren't performed that often.
  12. Fences actually don't use metadata The fence renderer checks neighboring blocks in the render function.
  13. BuildCraft is open source I believe. Look for it on Github.
  14. What version of Minecraft are you compiling for? Did you do the correct imports? 1.5.1 and yes, I imported everything that came with that line of code Well. I'm on 1.5.1 as well. So it should have worked.
  15. What version of Minecraft are you compiling for? Did you do the correct imports?
  16. Rather than doing it that way, which doesn't allow for a config file to change the block ID, do it the "correct" way. That and don't name your variable the same as your class name. It confuses things. public static Block amethystBlock; ... @PreInit public void preInit(FMLInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); int amethystID = config.getBlock("Amethyst", 6543).getInt(); amethystBlock = new AmethystBlock(amethystID).setHardness(5.0F).setResistance(10.0F).setUnlocalizedName("amethystblock").setCreativeTab(CreativeTabs.tabBlock); } Which might not solve your problem, as the error might be elsewhere. Also, block IDs cap at 4095. 6543 is an item ID.
  17. Let's see... public void getBlockMetadata(...) {...} Yeah, I'd say that's the wrong function. You should be using onPlaced or onAdded as well as onNeighborChanged.
  18. Your entire if-block results in corner pieces, with exception of the final else. Your code CANNOT generate anything else: if(j == this.blockID && i == this.blockID) { world.setBlock(x, y, z, SteamPower.LeadPipeCorner.blockID); } else if(i == this.blockID && k == this.blockID) { world.setBlock(x, y, z, SteamPower.LeadPipeCorner.blockID); } else if(k == this.blockID && l == this.blockID) { world.setBlock(x, y, z, SteamPower.LeadPipeCorner.blockID); } else if(l == this.blockID && j == this.blockID) { world.setBlock(x, y, z, SteamPower.LeadPipeCorner.blockID); } else { world.setBlock(x, y, z, SteamPower.LeadPipe.blockID); }
  19. if(...) corner pipe else if(...) corner pipe else if(...) corner pipe else if(...) corner pipe else if(...) corner pipe else if(...) corner pipe else if(...) corner pipe ... Gee. I wonder what's wrong with this picture.
  20. That error is unrelated to your mod. This might help (all hail the power of googling your error: http://www.minecraftforum.net/topic/1641920-minecraft-freezes-in-eclipse-forgemodloader/
  21. Your problem is that you only have 1 "bottom" quad, which you're drawing your wine texture on. Right now your barrels inside faces get shorter as you add wine, which is why you can't see the inside walls when you render as transparent. What you need is to draw using render pass 1, but add another quad that is the surface of your wine. That quad will change based on your metadata, but the rest of your barrel won't.
  22. I think you can close your own threads. You can also edit your original post to put "SOLVED" in the title.
  23. Couldn't be bothered to search for other "texture not loading" threads I see. Nor did you check the wiki. Which means I have to post this image AGAIN this week (this makes like nine, I think).
×
×
  • Create New...

Important Information

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