Jump to content

Recommended Posts

Posted

Hi,

  I'm rather inexperienced in Minecraft Forge, so please excuse this "noob" question. I created a new type of TNT in my mod and the problem is I'm not sure how to convert it to SMP. I read the FML guides and I made it work. The only problem is that the TNT primed entity won't render and is invisible. It also doesn't show any explosion animation or sound. Can anyone please help me with this?

 

- Calclavia

Posted
  On 4/30/2012 at 10:34 AM, Methuselah96 said:

Make sure you are using the absolute latest Forge (3.1.3.102). That is most likely the problem.

 

I am using the latest Forge. This is the first time for me to create a SMP mod so I really need help on porting my mod to multiplayer. Most likely it is my mod's problem. I added the Minecraft Forge entity tracker and stuff said on most tutorials but I am still not clear on how to make my entities render in the client side. (I noticed the client side had this statement: if(!world.isRemote)) and I am not sure on how to make non-mob entities to render in the game...

Posted
  On 4/30/2012 at 11:17 AM, calclavia said:

I am using the latest Forge. This is the first time for me to create a SMP mod so I really need help on porting my mod to multiplayer. Most likely it is my mod's problem. I added the Minecraft Forge entity tracker and stuff said on most tutorials but I am still not clear on how to make my entities render in the client side. (I noticed the client side had this statement: if(!world.isRemote)) and I am not sure on how to make non-mob entities to render in the game...

They work fine in Single Player?  The code for Single Player is identical for the Multi Player client in terms of rendering.

You are sure that everything is registered properly?  A reduced test case of code would help.

Posted
  On 4/30/2012 at 8:07 PM, OvermindDL1 said:

  Quote

I am using the latest Forge. This is the first time for me to create a SMP mod so I really need help on porting my mod to multiplayer. Most likely it is my mod's problem. I added the Minecraft Forge entity tracker and stuff said on most tutorials but I am still not clear on how to make my entities render in the client side. (I noticed the client side had this statement: if(!world.isRemote)) and I am not sure on how to make non-mob entities to render in the game...

They work fine in Single Player?  The code for Single Player is identical for the Multi Player client in terms of rendering.

You are sure that everything is registered properly?  A reduced test case of code would help.

 

Yes they do work in single player perfectly. It works in multiplayer too also perfectly except for the entities not rendering and the animations and sound fxs not playing.

 

I wrote this code on both the single player and the server. This block is basically a TNT to sum it up in a few words.

MinecraftForge.registerEntity(net.minecraft.src.EntityAdvanceTNTPrimed.class, this, 252, 20, 2, true);

 

Did I miss something? The TNT becomes invisible/disappears once it becomes primed.

Posted

To clarify my problem, this is what I get when I play my mod on multiplayer:

 

Before I power the TNT with redstone (before the TNT is primed):

Before.png

 

After I power the TNT with redstone (when the TNT is primed):

After.png

 

The ONLY code I used from Minecraft Forge to register this entity is MinecraftForge.registerEntity(). I don't have any other code about registering this entity except for this line:

MinecraftForge.registerEntity(net.minecraft.src.EntityAdvanceTNTPrimed.class, this, 252, 20, 2, true);

 

The code for the TNT is basically the same as the vanilla code for the TNT, but modified to fit my needs.

 

Is there something I did wrong?

 

P.S You may test out the mod here: http://calclavia.com/ICBM/

Posted
  On 5/2/2012 at 6:47 PM, LexManos said:

change your entity id to <128

Is this a hard requirement?  If so I should remember that, it seems like it would not allow for much variety though.  What causes the limit?

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello , when I try to launch the forge installer it just crash with a message for 0,5 secondes. I'm using java 17 to launch it. Here's the link of the error :https://cdn.corenexis.com/view/?img=d/ma24/qs7u4U.jpg  
    • You will find the crash-report or log in your minecraft directory (crash-report or logs folder)
    • Use a modpack which is using these 2 mods as working base:   https://www.curseforge.com/minecraft/modpacks/life-in-the-village-3
    • inicie un mundo donde instale Croptopia y Farmer's Delight, entonces instale el addon Croptopia Delight pero no funciona. es la version 1.18.2
    • Hello all. I'm currently grappling with the updateShape method in a custom class extending Block.  My code currently looks like this: The conditionals in CheckState are there to switch blockstate properties, which is working fine, as it functions correctly every time in getStateForPlacement.  The problem I'm running into is that when I update a state, the blocks seem to call CheckState with the position of the block which was changed updated last.  If I build a wall I can see the same change propagate across. My question thus is this: is updateShape sending its return to the neighbouring block?  Is each block not independently executing the updateShape method, thus inserting its own current position?  The first statement appears to be true, and the second false (each block is not independently executing the method). I have tried to fix this by saving the block's own position to a variable myPos at inception, and then feeding this in as CheckState(myPos) but this causes a worse outcome, where all blocks take the update of the first modified block, rather than just their neighbour.  This raises more questions than it answers, obviously: how is a different instance's variable propagating here?  I also tried changing it so that CheckState did not take a BlockPos, but had myPos built into the body - same problem. I have previously looked at neighbourUpdate and onNeighbourUpdate, but could not find a way to get this to work at all.  One post on here about updatePostPlacement and other methods has proven itself long superceded.  All other sources on the net seem to be out of date. Many thanks in advance for any help you might offer me, it's been several days now of trying to get this work and several weeks of generally trying to get round this roadblock.  - Sandermall
  • Topics

×
×
  • Create New...

Important Information

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