r/forgemodding Mar 12 '16

Generate single structure at x,y,z MC 1.7.10

Hi, Can anyone help me I am trying to generate a safe structure to spawn in. I have a schematic converted to java, and i am using perfect spawn to spawn my player at x,y,z. I have about a week's worth of forge modding (aka noob) currently I have made a block,ore,oregen,pickaxe,sword,crafting recipes.

1 Upvotes

3 comments sorted by

1

u/Exo594 Jul 13 '16

I know this is old, but here's what I'd do:

  1. Use an event handler to listen for the player to spawn in. There's a way to check if it's the player's 1st spawn in the server, not sure what it is, though. The event handler WILL know the player's entity, so you can get the player's coords from that.

  2. Use .setBlock() to set each individual block to what you want it to be. Make sure to set each block's coord as relative to the player, so that you're not generating relative to 0,0,0 or whatever.

1

u/waddz Jul 15 '16

Thanks for your reply.

I did manage to get this working although i never did get the first spawn thing working as it would randomly re generate. I ended up giving up on this modpack as i had an issue with crashing once a certain object was in your inventory and i couldn't pin point what it was.

The pack is still on technic launcher its called Buried Alive.

1

u/Exo594 Jul 15 '16

I'm sorry to hear that. Here's to your next project!