Started by
saajsterxpro
on
Topic category: Help with Minecraft modding (Java Edition)
Does anyone know how to code a generated structure so that the schematic spawns chest contents??
Example:
I make a new generated structure mod
Import my schematics file
(the file has chests with armour in them)
I export the mod
When the structure spawns in, there's no chest contents?!
Can anyone out there fix this??
Ah, I might just update my mod to 1.8 but could you still send me the code for 1.7.10 just in case?
Thank you for all your help, I will give credit to you on my thread! :)
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods…
Hey @#3 I just saw your profile, you know how to shoot custom models from a gun?? Could you share it with me please
@#2.1.1.1.1.1.1.1.1 Hey I just saw your profile, you know how to shoot custom models from a gun?? Could you share it with me please *
@#3.1 Oh, thanks. :) If you want the custom projectile model, I can write how to make it tomorrow. PS: You will need made custom model in techne and made is as a mob in mcreator (without move speed and AI).
Ok thank you, could you explain it on this thread:
https://mcreator.pylo.co/forum/17877/how-shoot-custom-items-gun
Also, one last thing; do you know how to spawn custom items in the generated chests in schematics?
This is like real-time chat , now. :D For custom items in chest simply go to the your item code and there found this:
Ind the code where you spawn chest change : Items.SOMETHING (for exmaple: Items.bone ) to mcreator_SOMETHING.block. (So in my code above is mcreator_scrapIron , i will write here mcreator_scrapIron.block)
@#5 XD ikr
It comes with error:
http://pastebin.com/it3Kjfwj
My code: (I am trying to add an item called mcreator_testweapon)
http://pastebin.com/fFDbH1m2
@#5.1 On the line 99 delete this: public mcreator_testweapon(){}
xd Thanks so much :D @#5.1.1
@#5.1.1 Err I just tested it, when I try to create a new world, it crashes and goes back to minecraft launcher with this error:
http://pastebin.com/kvT1uwFJ
My code:
http://pastebin.com/QstJuFsD
I see one mistake.
Look on lines 738 , 739.
world.setBlockState(new BlockPos(i, j, k), Blocks.chest.getDefaultState());
TileEntityChest chest = (TileEntityChest) world.getTileEntity(new BlockPos(i+1, j+1, k+4));
These underlined things must be same.
Thank you so much, works like a charm :) @#6
@#6 Hey, you know since I am making big schematics, it recommends that it split methods up in the code when i import the schematic? How do I do this?
Use this program: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tool…
It automatically splits the method to smaller one. Put in it your schematic and it ill generate file. From this fille copy something like "public void spawn1{world.setBlock..........} (it can be also spawn2 , spawn3, .......)