Everything posted by Eternaldoom
-
Why does getting the display name of a brewing stand cause an NPE?
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.
-
Problems setting texture to a block
make JadenCraft in the registerIcons method lowercase
-
[1.7.10] Changing the maximum stack size for a block?
Use a custom ItemBlock. You can call methods in it like any other item.
-
[1.7.10] Spawn Particles Around Armor When Hit
Put it in a separate class and register in the main class.
-
[1.7.10][WIP]Deep Seas Mod
This mod sounds fantastic. I will definitely download the beta.
-
[1.6.4] [Forge] [SOLVED]2 Questions About Entitys And Mobs!
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.
-
[1.6.2] [Unsolved] Custom Boat Entity don't load the texture
Where do you register the renderer?
-
Can't Reply to Some Non-Locked Topics
Yep, you're right, it's the Forge modder rank.
-
Can't Reply to Some Non-Locked Topics
Ill try changing my rank and see if it works
-
[1.7.10] Coordinates on models
Depends upon where you render the model
-
Coremod question with Labels.
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); }
-
Coremod question with Labels.
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.
-
How to use the Thaumcraft API for 1.6.4?
Don't backport it. 1.6.4 is already obsolete, and it is becoming even more so with the release of 1.8.
-
Question regarding packets for resource system.
Diesieben has a tutorial on packets in the tutorials section. Just send the bar value as an int
-
How do you make an entity like an enderdragon? [forge 1.7]
Use a different model instead of ModelBiped.
-
[1.7.10] Getting Current World
Use worldserver.getCurrentTime or something like that.
-
[1.7.10] Getting Current World
What are you trying to do?
-
Can't Reply to Some Non-Locked Topics
It's a mac, not an iPad.
-
[1.8] Can't get metadata block inventory models to load.
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.
-
[1.8] TileEntity that holds an Item won't render it after reloading world.
Oh nvm its part of forge. I'll just wait for it to update.
-
Tile entity syncing
Also, for a custom packet make a class that implements IMessage
-
[1.8] TileEntity that holds an Item won't render it after reloading world.
Thanks, but it looks like onDataPacket is now hard coded into NetHandlerPlayClient. Maybe I'll write an FML pull request.
-
[1.8] TileEntity that holds an Item won't render it after reloading world.
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?
-
cauldron is gone, but I was wondering if someone can help me
You can download a legal modified installer, and use SpigotPatcher to patch the jar with the latest BPS patch.
-
Can't Reply to Some Non-Locked Topics
Here's a screenshot There should be a reply button near the top next to the "notify" button
IPS spam blocked by CleanTalk.