Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/06/23 in all areas

  1. In general, overridding/changing vanilla stuff is a bad idea, unless you can do it in a way that plays nicely with other mods. Simple test: What would happen if another mod does something similar to what your mod does? Better is to implement your own block, then let the end user/mod pack developer choose to use your block, e.g. by changing crafting recipes to use your item instead of the vanilla one or give the user some mechanism to morph the vanilla block into your block The other issue with changing vanilla blocks/items is you will run into Mojang's hardcoding. e.g. see the WeatheringCopper class for a hardwired use of Blocks.COPPER_BLOCK Mojang don't design their classes to be reused by modders.
    1 point
  2. Not really. AFAIK, the normal blocks can only use the hardcoded RenderTypes known to the Chunk builder code. See RenderType.CHUNK_BUFFER_LAYERS. Obviously there is overhead in BlockEntitys over normal Blocks. They use more memory because they can have custom state. And more cpu if they also tick. In your usecase, using a custom renderer will have worse performance than using a static model, because minecraft won't be able to cache as much information. That is somewhat mitigated in the example code above since it mostly just delegates to static (prebaked) model rendering code.
    1 point
  3. https://forums.minecraftforge.net/topic/117560-solved-blockentity-rendering-too-dark/#comment-517765
    1 point
  4. So? That doesn't mean the rest of the code does anything useful. Your super call just marks the part entity as hurt which means it will flash red. But it doesn't have any health to actually damage. Why not? "It does not work" is not a bug report. That's what I said is your problem. What code? If you looked a the code in a debugger you can step through it and see what is being called and what conditional statement stops it reaching the code you expect. All in all, your "question" is unanswerable. It is full of undefined "it/that/the"s. Finally, when I went back to look at the code you posted to see if I could guess what you are talking about, I noticed this: That will crash at runtime because uppercase characters are not allowed in ResourceLocations. So that class you posted cannot possibly be code that is actually getting used.
    0 points
×
×
  • Create New...

Important Information

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