Jump to content

Nicholas Hammond

Members
  • Posts

    47
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Nicholas Hammond's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am aware capabilities will help me write and store data in my world, but I'm honestly very confused how it works. I am trying to store the spawn point of a entity so whenever I reload the game the entity still knows its spawn point which will be used to find its way back home.
  2. How do I add an NBT to an entity and have it stay even when quitting the game. Additionally, how do I store data into a separate class and have it still be there when quitting and reloading the game. For example, I have a class called WandererData.class which stores entity data but every time I quit the game it clears the memory from it (the only reason I'm using this method is because I'm having trouble storing data as an NBT on the entity).
  3. I fixed the issue. The dependencies I was using carried over the World variable and I believe the issue with that is that it didn't render the particles server side, so I casted the world variable into ServerWorld and its corresponding spawnParticles method and it worked!
  4. Nvm, I got it. world.addParticle(new BlockParticleData(ParticleTypes.BLOCK, Blocks.GLASS.getDefaultState()), x, y, z, 3, 3, 3); How do I change the particle range though? Because what I have right now is that the particles spawn when you hit an enemy but the cloud size is too small to see.
  5. Ah ok, could you send an example of the arguments and methods I have to use for that?
  6. world.addParticle(ParticleTypes.EXPLOSION, x, y, z, 3, 3, 3); Obviously the game doesn't know which block I am referring to when I call ParticleTypes.EXPLOSION so how do I specify that I want the explosion particle for glass?
  7. I made a mod which generates an infinite office building in minecraft and this is how it generates when i use my IDE: https://imgur.com/a/RN0VfuD and here's how it generates in my actual minecraft: https://imgur.com/a/aG1RYFG lowkey kinda freaked out on wtf happened. i searched around forge forums and i believe it may have to do with my gradlew file i have no idea tbh. Here is my mod jar: modid-1.0.jar
  8. Okay so today I had the idea of copying the FlatChunkGenerator code and making a new modified generator based on the original code. What can I change from the FlatChunkGenerator code which can generate my structures? Can I copy any of the code from OverworldChunkGenerator since it allows me to generate structures? I also created a new copy of FlatGenerationSettings if that does anything.
  9. I ended up honestly replacing my FlatChunkGenerator with OverworldChunkGenerator because I couldn't find the solution
  10. Thank you, this was the type of answer I was looking for I believe. How would I do this? I'm not trying to spawn my structure in the actual flat world by the way, I have a custom dimension which uses FlatChunkGenerator so that's why I asked.
  11. I have watched several videos on the subject and read the code used for flat chunk generation and have narrowed down my issue to this bit of code which adds my world feature into the game. (The variable "feature" is the feature which I'd like to add) for (Biome biome : ForgeRegistries.BIOMES.getValues()) { biome.addFeature(GenerationStage.Decoration.SURFACE_STRUCTURES, Biome.createDecoratedFeature(feature, IFeatureConfig.NO_FEATURE_CONFIG, Placement.NOPE, IPlacementConfig.NO_PLACEMENT_CONFIG)); } Yes, registration is working and this code is being recognized in game, but it will only spawn in non-flat worlds such as the overworld and nether. How do I solve this? Sorry for duplicate posts but it seems that my question is not being assessed in the needed manner
  12. I have learned java, it's just very convenient to use MCreator for sample code.
  13. I will not be rewriting code as it is very helpful when using templates from MCreator.
  14. One other thing, when you refer to the "example in FlatGenerationSettings" you mean the example I sent? I tried replacing "village" with "backrooms:empty_room" but of course it didn't work. Also, are you suggesting I rewrite my code?
×
×
  • Create New...

Important Information

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