-
Posts
390 -
Joined
-
Last visited
-
Days Won
15
Everything posted by vemerion
-
If you want to change the hitbox size of the entity, you can change the arguments to the sized() method when creating the entity type. If you want to scale the model of the entity, you could use the scale() method on the matrix stack in the entity renderer (although I have never used GeckoLib so I don't know if that changes anything in regards to the rendering).
-
[1.16.5] Custom entity is invisible (render not being called)
vemerion replied to theishiopian's topic in Modder Support
For those that might stumble upon this post with the same problem in the future: The solution in this case was to add this to the entity class: @Override public IPacket<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } A rule of thumb: If you custom entity is not a LivingEntity, then you need to override getAddEntityPacket(). This is due to the fact that vanilla handles non-living entity spawn packets in a hard coded way.- 1 reply
-
- 1
-
-
[1.17.1]Problem with rendering semi-transparent items
vemerion replied to Piinut's topic in Modder Support
I just tested and good news! You don't need to do anything special to have a semi-transparent item. Just make the texture transparent and you should be good to go! -
The best tutorial is the vanilla source code! Advancements are data-driven, so you can add them via json files. To avoid having to manually create these json files, I would recommend using data generators! You can check out the AdvancementProvider class and for example the TheEndAdvancements class to see how to generate advancements json files. If you just want to know more about the advancement json format the Minecraft wiki has a good article on that.
-
[1.17.1]Problem with rendering semi-transparent items
vemerion replied to Piinut's topic in Modder Support
I think the class was just renamed to ItemBlockRenderTypes when the switch to official mappings for class names was made. -
The forge documentation about sounds explains which methods to use in different situations.
-
[1.16.5] Attribute Modifiers With Duplicate Items [Solved]
vemerion replied to urbanxx001's topic in Modder Support
Yeah, either NBT or a capability should work. -
[1.16.5] Attribute Modifiers With Duplicate Items [Solved]
vemerion replied to urbanxx001's topic in Modder Support
You can't really have an instance field like extraArmor in item classes, since items are singleton and every stack will share the same item. This means that for example if one player uses the item and changes the extraArmor field, it will also change for all other players that also have that item. -
No problem, I am glad I could be of assistance!
-
The problem is that you are adding a new layer every time RenderPlayerEvent is called. You should add the layer to the player renderer only once at startup.
-
[Question] what is the UUID for with attributes on items?
vemerion replied to theishiopian's topic in Modder Support
The UUID is used to identify the attribute. This means that if two items have the same UUID for an attribute, the most recently equipped one will override the other if both are equipped at the same time. The Minecraft wiki has some info about it on the attribute page here. What I usually do is generate a random UUID once with UUID.randomUUID(), and then use that in UUID.fromString(). -
Note that I am no expert on mappings, and I think generally it is best to use the same mappings as most other people use to make life easier for everybody. However, with that said, this should work: 1. Add this to your build.gradle to create a local maven repo on your computer: repositories { maven { url "file:///${project.projectDir}/mappings" } } 2. Change back the mappings channel (the mappings channel is hardcoded to use 'official', 'snapshot' and 'stable' so you have to use one of those): mappings channel: 'snapshot', version: 'vemerion-mappings' You can of course change 'vemerion-mappings' to something else but then you have to change it in the mappings repo as well in the next few steps 3. Create the file structure 'mappings/de/oceanlabs/mcp/mcp_snapshot/vemerion-mappings/' in your mod project folder 4. Inside the file structure you just created, create a zip file named 'mcp_snapshot-vemerion-mappings.zip', that should contain the fields.csv and methods.csv files etc 5. Run ./gradlew clean and ./gradlew cleanEclipse 6. Run ./gradlew genEclipseRuns and ./gradlew eclipse 7. If gradle complains about duplicate mappings then everything will probably fail and you have to update your mappings files and redo the process 8. Import the project into Eclipse 9. Your custom mappings should now work Hope this helps! As a last word of caution, I just want to reiterate that IMO it is probably best to stick with the normal MCP or Mojang mappings.
-
You can useFOVUpdateEvent.setNewfov() to set it to the old value to avoid the FOV change.
-
[1.16.2] Draw text infront of item stack
vemerion replied to BeardlessBrady's topic in Modder Support
Strange, because this works for me: matrixStack.push(); matrixStack.translate(0, 0, 500); if (count != 1) this.font.drawStringWithShadow(matrixStack, num, startX + (i * 26), startY + (j * 26), 1); matrixStack.pop(); -
How do I make a Custom Armor Model for 1.16?
vemerion replied to Skullblade's topic in Modder Support
Export the model as a java class, and then return an instance of it in the getArmorModel() method in your item. You can also override getArmorTexture() to change the texture of the armor. -
Things related to input and graphics are done on the client. Most other things related to the actual logic of the game should be done on the server. A bit of common sense goes a long way. For example, if you want to damage the player, you only want to do that on the server, since it is the server that keeps track of all the players and their state. If you want to place a block, you have to do it on the server, otherwise you end up with 'ghost-blocks' etc. When you use runServer for the first time a text file called eula.txt should be generated, which you have to edit to set 'eula=true' and then run the server again. But using runServer is not guaranteed to catch all errors related to sides, since it will only crash if you are using a method on the physical server that only exists on the physical client (for instance rendering methods). This page explains it in pretty good detail.
-
[1.16.5] Entity loot modifier triggering for blocks
vemerion replied to Daedalus4096's topic in Modder Support
When you are breaking a block, the "this" entity in the condition is the player, and since the primalmagic:drops_bloody_flesh tag contains the player, the condition is met. You would have to add another condition that checks that an entity was actually killed. -
setDeltaMovement doesn't affect player entities in block use event
vemerion replied to jaidenwombat's topic in Modder Support
Player movement is controlled by the client, that is you need to set the movement on the client. -
[1.16.2] Draw text infront of item stack
vemerion replied to BeardlessBrady's topic in Modder Support
From what I can see you don't do a translation on the matrix stack. Have you tested that? -
The IBlockReader.rayTraceBlocks() is called clip() in the official mappings if you are using that.
-
Use of other mods causing crash [Eclipse Forge 1.16.5]
vemerion replied to Jarkon's topic in Modder Support
This page explains it better than would be able to. -
Use of other mods causing crash [Eclipse Forge 1.16.5]
vemerion replied to Jarkon's topic in Modder Support
You should not use the run/mods folder, you should instead add your dependencies in the build.gradle file. -
The official mappings have no parameter names, due to the fact that Mojang only released field names and method names. This will hopefully be alleviated in the future. The alternative is to use the MCP mappings, which has mapped quite a few parameter names. Unfortunately then you have the problem that not all field and methods have been mapped.
-
[1.16.4] How do you register a custom minecart entity?
vemerion replied to than00ber1's topic in Modder Support
You need to override createSpawnPacket() (called getAddEntityPacket() in the official mappings) and return this: NetworkHooks.getEntitySpawningPacket(this)