Jump to content

Eternaldoom

Forge Modder
  • Posts

    592
  • Joined

  • Last visited

Everything posted by Eternaldoom

  1. When you register a block, FML automatically creates something called an ItemBlock. This is what exists in your inventory and as an item entity. You can't put a block in your inventory; they only exist in the world. In 1.8, water, lava, brewing stands, piston extensions, and a few other blocks do not have ItemBlocks and therefore cannot be placed in your inventory.
  2. make JadenCraft in the registerIcons method lowercase
  3. Use a custom ItemBlock. You can call methods in it like any other item.
  4. Put it in a separate class and register in the main class.
  5. This mod sounds fantastic. I will definitely download the beta.
  6. The first one is attackEntityAsMob(). I forget the second and I'm not on my computer. Also, update to 1.7.10, 1.6.4 is obsolete.
  7. Where do you register the renderer?
  8. Yep, you're right, it's the Forge modder rank.
  9. Ill try changing my rank and see if it works
  10. Depends upon where you render the model
  11. Never mind, that was a stupid question, all I had to do was call a method in my class. Heres my code if anyone is interested: if (name.equals(netHandlerPlayClientName.replace("/", "."))){ ClassNode classnode = CoreUtils.getClassNode(clazz); MethodNode teMethodNode = CoreUtils.getMethodNode(classnode, handleUpdateTileEntityName, "(Lnet/minecraft/network/play/server/S35PacketUpdateTileEntity;)V"); InsnList instructions = new InsnList(); instructions.add(new VarInsnNode(Opcodes.ALOAD, 2)); instructions.add(new VarInsnNode(Opcodes.ALOAD, 1)); instructions.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/eternaldoom/realmsofchaos/asm/CoreMethods", "handleTileEntityPackets", "(Lnet/minecraft/tileentity/TileEntity;Lnet/minecraft/network/play/server/S35PacketUpdateTileEntity;)V", false)); teMethodNode.instructions.insertBefore(getTEInsertionPoint(teMethodNode), instructions); return CoreUtils.getBytes(classnode); }
  12. Hi, I'm trying to make a coremod (to update my tile entity's nbt when an S35PacketUpdateTileEntity is received) since Forge isn't out for 1.8 yet and I have run into a problem with Labels. I need to jump to an existing label, and I'm not sure how. Anyone know how to do this? Heres my code: @Override public byte[] transform(String name, String transformedName, byte[] clazz) { if (name.equals(NHPCName.replace("/", "."))){ ClassNode classnode = CoreUtils.getClassNode(clazz); MethodNode teMethodNode = CoreUtils.getMethodNode(classnode, handleUpdateTileEntityName, "(Lnet/minecraft/network/play/server/S35PacketUpdateTileEntity;)V"); InsnList instructions = new InsnList(); instructions.add(new VarInsnNode(Opcodes.ALOAD, 2)); instructions.add(new TypeInsnNode(Opcodes.INSTANCEOF, "com/eternaldoom/realmsofchaos/blocks/TileEntityDisplayCase")); Label l7 = new Label(); instructions.add(new JumpInsnNode(Opcodes.IFNE, new LabelNode(l7))); teMethodNode.instructions.insertBefore(getInsertionPoint(teMethodNode), instructions); } return clazz; } I'm trying to patch this method in NetHandlerPlayClient: public void handleUpdateTileEntity(S35PacketUpdateTileEntity packetIn) { PacketThreadUtil.func_180031_a(packetIn, this, this.gameController); if (this.gameController.theWorld.isBlockLoaded(packetIn.func_179823_a())) { TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.func_179823_a()); int i = packetIn.getTileEntityType(); if (i == 1 && tileentity instanceof TileEntityMobSpawner || i == 2 && tileentity instanceof TileEntityCommandBlock || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 5 && tileentity instanceof TileEntityFlowerPot || i == 6 && tileentity instanceof TileEntityBanner) { tileentity.readFromNBT(packetIn.getNbtCompound()); } } } I just need to add my tile entity to the if statement. The problem is, I need to jump to the label L7 (tileentity.readFromNBT) and I can't figure out how.
  13. Don't backport it. 1.6.4 is already obsolete, and it is becoming even more so with the release of 1.8.
  14. Diesieben has a tutorial on packets in the tutorials section. Just send the bar value as an int
  15. Use a different model instead of ModelBiped.
  16. Use worldserver.getCurrentTime or something like that.
  17. What are you trying to do?
  18. It's a mac, not an iPad.
  19. I might write an FML pull request for this, but I guess it would belong in Forge more so I might wait. Biomes o' Plenty fixes this through a coremod that patches the variant name method.
  20. Oh nvm its part of forge. I'll just wait for it to update.
  21. Also, for a custom packet make a class that implements IMessage
  22. Thanks, but it looks like onDataPacket is now hard coded into NetHandlerPlayClient. Maybe I'll write an FML pull request.
  23. Hi, I have a TileEntity that renders an item (similar to an ItemFrame). However, when I reload the world, the Item no longer renders. It is still held by the TE, and I can remove it and put it back (it renders after I do that), It just doesn't render. I figure that it isn't being sent to the client, and tileentities don't have DataWatchers like entities. Do I need to send a packet?
  24. You can download a legal modified installer, and use SpigotPatcher to patch the jar with the latest BPS patch.
  25. Here's a screenshot There should be a reply button near the top next to the "notify" button
×
×
  • Create New...

Important Information

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