11 févr. 2015, 15:11

@‘darkvince37’:

J’ai essayer de le faire en 1.8 sauf que le setblock ne marche pas.

package fr.darkvince.mine;

import java.util.Random;

import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;

public class WorldGenZombie {

    public boolean generate(World worldIn, Random random, int x, int y, int z)
    {

    if (!worldIn.isRemote)
            {
    worldIn.setBlock(x, y, z, Blocks.cobblestone);
    worldIn.setBlock(x, y + 1, z, Blocks.cobblestone);
    worldIn.setBlock(x, y + 2, z, Blocks.sponge);
    EntityCreeper creeper = new EntityCreeper(worldIn);
    creeper.setPosition(x, y + 3, z);
    worldIn.spawnEntityInWorld(creeper);
    return true;
    }
    return false;
    }
}

Utilise le setBlockState et Blocks.cobblestone.getDefaultState