Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Content Count

  • Joined

  • Last visited

Community Reputation

9 Neutral

About TheXFactor117

  • Rank
    Stone Miner


  • Gender
  • URL
  • Location

Recent Profile Visitors

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

  1. I'm looking to dynamically alter the number of monsters that are spawning in the world dependent on a few different factors, however, I can't seem to find a working solution. It seems that this might be hardcoded into the game, perhaps in WorldEntitySpawner. Essentially, my goal is to have certain custom monsters be able to spawn during the day, though ideally, monsters wouldn't be as common during the day. There are also some other factors that would go into this, though they don't pertain to the issue. I've tried adding different restrictions which would either stop the entity from spawning
  2. Use Minecraft's Structure Blocks to save a structure to NBT, which you can then use in code to load the structure. Create a new Template instance with the resource location of your structure.nbt file, and call Template#addBlocksToWorld to spawn the structure. You can do this in your WorldGenerator class.
  3. Without looking at your code, I'd imagine it's an issue with naming. In your IDE, uppercase/lowercase doesn't necessarily matter, so you'll have textures fine in your IDE. But once you build it, names of items or textures need to be lowercase. If you have upper case names, it won't load properly. If you do have lowercase names and such, than you know the issue is elsewhere. Post your code to GitHub too - not everyone is going to download a random zip file.
  4. I think it would be easier to do what what I mentioned above, considering these structures should be fairly common. I'm going to try and implement it and see what kind of results I get. I need to finish re-writing portions of it first, however.
  5. Well it is pretty easy actually. You do everything the algorithm normally would but you don't place any blocks and you store the position and individual structure into a map or whatever. Whenever new chunks are generated, you check to see if your positions of the structures are in it and you generate if so. Seems to make since to me, so I'll try and implement this soon. I think Minecraft does this by checking if a given structure is inside of the bounding box of the chunk, and if so, it generates. So that's the kinda check you would need.
  6. Potential solution: When I go to generate the dungeon, instead of building each individual room during generation, I'm thinking I can just generate the positions of each individual structure and store the position and template into a map. If the bounding box of the structure intersects with the current chunk (which has an offset), generate the corresponding room. If it's outside of the currently generated chunks, it won't generate. As new chunks are generated through the WorldGenerator, I'm thinking about looping through all the pending structures, checking to see if the bounding box of the st
  7. I don't think that's the best solution, at least in terms of what I'm trying to do. I've been digging around in vanilla world generation (Stronghold/Village generation) to figure out how they generate structures without causing runaway chunk generation. It looks like vanilla generation (say a Stronghold) will generate the positions of the Stronghold and store them somehow (MapGenStronghold#generatePositions looks like it does this, but I don't see how this works fully). Somehow the Stronghold's StructureStart gets a list of components to be generated and builds them out. Anyways, I
  8. In one of my projects, I have a simple procedurally generating dungeon algorithm which generates the mod's dungeons. I've recently decided to rewrite to be more complex and accommodate more features than before. Before I do this though, I wanted to generate it in a way that it won't cause cascading world generation, which the current algorithm doesn't prevent. Right now it works kind of like this: I'll generate a structure on the surface somewhere, which will spawn staircases underneath it. From there, rooms can branch off of these staircases, and each room can generate new rooms off of it and
  9. Check to see if the modifier is applied - if not, apply it, else, don't. Remove it in the onUnequipped method.
  10. Use AttributeModifiers to modify the damage. This won't work for bows so you'll have to find a workaround (unless bow damage is influenced by the players attack damage which I don't think it is).
  11. Your ResourceLocation doesn't need structures in the path name (unless you made a second structures package). You also don't need to include .nbt at the end of the name. Try that and see what happens.
  12. What are your outputs? Does it fail to generate? Is the position spit out in the console?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.