Jump to content

LocusAzzurro

Members
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    1

LocusAzzurro last won the day on July 4 2021

LocusAzzurro had the most liked content!

LocusAzzurro's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. At least that means you're making some progress, because without the packet the (logical) client won't even know that the entity is spawned so it should render it. And there was no way to know if your renderer/model is done correctly because it never gets to that stage. (What the packet does is notify the client when an entity is spawned to start the rendering.) Now we know from the crash that you have something wrong in your renderer. Here is my checklist that I go thru when making en entity. Make the actual entity class. Make sure it has the spawning packet and data syncing. Register the EntityType for that entity. (In turn make sure the registry itself is registered too. I see you've done it.) Make the Model class for the entity. (Usually extends EntityModel.) Make the Renderer class for the above model and entity. (Usually extends EntityRenderer.) (You can skip these 2 steps if you're using a built-in renderer like the thrown item one as I can see.) Actually register the renderer itself. (During FMLClientSetupEvent call RenderingRegistry.registerEntityRenderingHandler([your EntityType], [a new instance of your Renderer]); (It is fired on the MOD Bus, client side, make sure to handle that as well.)
  2. You're updating the model itself, which only controls how the base model looks like. The rendering itself is done by the renderer, so changes should be done at this level to actually affect the rendering result.
  3. Some pointers: Item property overrides can handle the NBT change to change the model/texture. (See vanilla compass) Model multipart can handle the change to a part of the model depending on criteria. (See vanilla end portal) Texture colormap can do the recoloring. (See vanilla leaves/grass)
  4. @Override public IPacket<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } You need to add this into your entity class for the spawning to actually work, if your parent class doesn't have a implementation for this that works. It gets me everytime.
  5. Depending on your needs, the Access Transformer might do the job before going into Mixins. https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/
  6. I'm trying to make spear items like the vanilla tridents that are throwable. the throwing part with entity and all I got right. But the rendering part got me, the vanilla trident renders as a sprite in GUI and as a model when held, I'm trying to replicate this behavior. After some digging I found that I need to use an ISTER to do it. So I followed a tutorial (boson modding tutorial) to set the whole thing up. But after tinkering around with the code, looking at vanilla code and trying to wrap my head around how the process work still doesn't do it for me. Any help and pointers will be appreciated! Maybe an example to show how it is done? The repo is here: https://github.com/LocusAzzurro/icaruswings_mod/tree/spear-ister most of the related code for the render are in the render folder with "Spear" in the name and https://github.com/LocusAzzurro/icaruswings_mod/blob/spear-ister/src/main/java/org/mineplugin/locusazzurro/icaruswings/event/ClientRenderHandler.java At current state (commit 6be5b20) it gives a StackOverFlowError on world load [21:18:38] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:realStdoutPrintln:123]: ---- Minecraft Crash Report ---- // Hi. I'm Minecraft, and I'm a crashaholic. Time: 21-12-22 9:18 Description: Unexpected error java.lang.StackOverflowError: Unexpected error at com.mojang.blaze3d.matrix.MatrixStack.pushPose(MatrixStack.java:53) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A,re:mixin,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.render(ItemRenderer.java:92) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at org.mineplugin.locusazzurro.icaruswings.render.SpearItemStackTileEntityRenderer.renderByItem(SpearItemStackTileEntityRenderer.java:26) ~[?:?] {re:classloading} at net.minecraft.client.renderer.ItemRenderer.render(ItemRenderer.java:137) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} (The above line is repeated many times) Update: It was a trainwreck and half, but I somehow got it to work https://github.com/LocusAzzurro/icaruswings_mod/commit/96be28d1dd85e253afa86551cdcb336a25d85d36 Update 2: With the helps of fellow devs It works mostly as intended now, had to do some nbt to make the throwing animation render correctly. Not the prettiest solution but works. https://github.com/LocusAzzurro/icaruswings_mod/commit/425a32b126b0d6fd268df20ede12156435dd7c20
  7. Oh gosh looks like I tunnel visioned onto the model and layer themselves and it never clicked on me that it was the render event all along. Made a set to store all players that I've added the layer to, now it's smooth like butter. Thanks for the help dude, and also for the grain interaction thing. Scrap that, someone pointed out to me that the renderer is shared for all entities, so yeah, only once at startup.
  8. I'm trying to make some custom elytra-like items and have them render when worn. Got the rendering to work somewhat but there are many problems. When starting to fly in midair the wing opening animation is smooth like vanilla one, but when they are closing when landing they just snap to closed position and leaves a kind of "trail" effect i.e. like if there were a dozen of them closing, same thing happens when crotching to make the wings spread a little. The enchantment glow effect is kinda broken, looks like the glow just keeps getting stronger until it gets to full white. There is kinda of a fps drop when the model is getting rendered. Definitely there is something wrong in there or something that I forgot to put in, but I was unable to find a solution after digging thru docs and google search results and source codes of other similar mods so I'm kinda at wit's end now, hope if you know what is going on here. The classes used for the rendering are in the following package: https://github.com/LocusAzzurro/icaruswings_mod/tree/main/src/main/java/org/mineplugin/locusazzurro/icaruswings/render
×
×
  • Create New...

Important Information

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