Bonjour,
Je cherche comment utiliser ce logiciel Schematic to Structure Converter car je n'ai pas trouver de tutos sur celui-ci pur pouvoir ajouter une structure sur mon mod au lieu de faire :
Code (cpp):
package com.arthur.mod.Structure;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import com.arthur.mod.init.BlockMod;
public class Structure1
{
public boolean genrate(World world, Random random, BlockPos pos)
{
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();
if(world.getBlockState(new BlockPos(x, y-1, z)) == Blocks.grass.getDefaultState() && world.isAirBlock(new BlockPos(x, y+7, z)))
{
world.setBlockState(new BlockPos(x, y, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x, y+1, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x, y+2, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x, y+3, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x, y+4, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x, y+5, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x, y+6, z), Blocks.diamond_block.getDefaultState());
world.setBlockState(new BlockPos(x+1, y+6, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x+2, y+6, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x-1, y+6, z), BlockMod.amazonite.getDefaultState());
world.setBlockState(new BlockPos(x-2, y+6, z), Blocks.piston.getDefaultState());
return true;
}
return false;
}
}
Merci d'avoir lu