Everything posted by MaiTheLord
-
Storing constant data in a json file
vanilla gamerules use GameRules.IntegerValue.create(int value) which is package-private, I'll need to use reflection / AT
-
Storing constant data in a json file
gamerules sound better actually. I have no idea how to register one though, and I don't really find anything on google regarding that
-
Storing constant data in a json file
As it affects entity spawning, I am not sure the user would want the same value in all of their worlds. should I use a server config then?
-
Storing constant data in a json file
I'll try using a config for now. I am not sure if it should be a common or a server config. the value affects entity spawning.
-
Storing constant data in a json file
I meant that a datapack whould be able to override it, similarly to how it can override a recipe
-
Storing constant data in a json file
I want to store a constant integer in a json file under "resources/data/modid", so that it could be manipulated by datapacks. how do I achieve that?
-
Can IEntityAdditionalSpawnData be used to add spawn data to vanilla entities?
and if so, how do I register it?
-
Storing a boolean in an entity
Thanks. that works. I need to sync it to the client though, as rendering depends on its value, and I have no idea how to implement that. I should note that I am familiar with TCP packets, but never used packets with java or minecraft.
-
Storing a boolean in an entity
I think I am doing something wrong. https://gist.github.com/MaiTheLord/a19cf50de9735ce3a75fd3999fe82739
-
Storing a boolean in an entity
I did read it, and a capability seems like an overkill for what I want to do. I might be wrong, but I think the person wanted me to look at this particular piece of code @Override public IntTag serializeNBT() { return backend.serializeNBT(); } @Override public void deserializeNBT(IntTag tag) { backend.deserializeNBT(tag); }
-
Storing a boolean in an entity
I must be doing something wrong then. CompoundTag tag = entity.serializeNBT(); tag.putBoolean("IsUpgraded", true); entity.deserializeNBT(tag); System.out.println(entity.serializeNBT().getBoolean("IsUpgraded")); // prints false
-
Storing a boolean in an entity
this exists: CompoundTag tag = new CompoundTag(); tag.putBoolean("upgraded", true); but how do I save it in an entity?
-
Storing a boolean in an entity
what about a raw NBT tag? I only need to store a boolean, after all
-
Storing a boolean in an entity
I want to store a true boolean in an entity (something like "isUpgraded:1b" in NBT), but I am not sure whats the correct way to do that in forge. I wanted to use NBT, but I don't know how to read and write it in forge. I saw that there's something called "Capabilities". it seems like it could be a better alternative, but I am not sure how to use it either. What would be the better approach?
-
Rendering a box to an entity using a RenderLayer
I did look at vanilla code, but I don't understand how it works. For example, what does the PoseStack do? How should I use the buffers? And how does it "attach" to the model?
-
Rendering a box to an entity using a RenderLayer
Specifically the render() method of the RenderLayer. I am not at home right now, I'll send the code I currently have later today if that could help
-
Rendering a box to an entity using a RenderLayer
I want to render a box that will be part of the entity's head bone using a RenderLayer. it should have some logic (to check the entities data, and render / not render accordingly), and use a different texture than the rest of the model. (note that the texture size is different as well.) how should I implement that?
-
I can't manage to find out how should I set icon for a custom effect.
So I am making a mod with a custom effect. I designed a logo for the effect, I placed it in "mob_effects" inside the assets, but its not working and the effect has the no texture default texture. beside of that the effect is working perfectly.
-
Custom dimension not loading.
Thank you.
-
Custom dimension not loading.
Thank you very much for all the help.
-
Custom dimension not loading.
Thanks for your reply. I will try to change the registry method. How can I see the vanilla code? I am working on IntelliJ Idea. The textures are temporary, I am pretty sure I am gonna change it.
-
Custom dimension not loading.
Hello, I am trying to create a custom dimension but when I am using the forge command to get into it the dimension not loading and I am stuck on the "generating surface" screen. Here is the GitHub: https://github.com/MaiTheLord/heavenmod Thanks.
-
Nether like dimension
Hello, I want to make my dimension generate like the nether but I can't find the nether generateSurface method. Thanks for help.
-
Custom dimension is blank
Thank You, I will try it.
-
Custom dimension is blank
Thanks, but I don't understand what I need to put there, do you have a tutorial / example?
IPS spam blocked by CleanTalk.