-
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?
IPS spam blocked by CleanTalk.