Java Code Examples for net.minecraft.util.MathHelper.getRandomUuid()

The following are Jave code examples for showing how to use getRandomUuid() of the net.minecraft.util.MathHelper class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: Entity.java   Source Code and License Vote up 5 votes
public Entity(World worldIn)
{
    this.entityId = nextEntityID++;
    this.renderDistanceWeight = 1.0D;
    this.boundingBox = ZERO_AABB;
    this.width = 0.6F;
    this.height = 1.8F;
    this.nextStepDistance = 1;
    this.rand = new Random();
    this.fireResistance = 1;
    this.firstUpdate = true;
    this.entityUniqueID = MathHelper.getRandomUuid(this.rand);
    this.cmdResultStats = new CommandResultStats();
    this.worldObj = worldIn;
    this.setPosition(0.0D, 0.0D, 0.0D);

    if (worldIn != null)
    {
        this.dimension = worldIn.provider.getDimensionId();
    }

    this.dataWatcher = new DataWatcher(this);
    this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
    this.dataWatcher.addObject(1, Short.valueOf((short)300));
    this.dataWatcher.addObject(3, Byte.valueOf((byte)0));
    this.dataWatcher.addObject(2, "");
    this.dataWatcher.addObject(4, Byte.valueOf((byte)0));
    this.entityInit();
}
 
Example 2
Project: BaseClient   File: Entity.java   Source Code and License Vote up 5 votes
public Entity(World worldIn)
{
    this.entityId = nextEntityID++;
    this.renderDistanceWeight = 1.0D;
    this.boundingBox = ZERO_AABB;
    this.width = 0.6F;
    this.height = 1.8F;
    this.nextStepDistance = 1;
    this.rand = new Random();
    this.fireResistance = 1;
    this.firstUpdate = true;
    this.entityUniqueID = MathHelper.getRandomUuid(this.rand);
    this.cmdResultStats = new CommandResultStats();
    this.worldObj = worldIn;
    this.setPosition(0.0D, 0.0D, 0.0D);

    if (worldIn != null)
    {
        this.dimension = worldIn.provider.getDimensionId();
    }

    this.dataWatcher = new DataWatcher(this);
    this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
    this.dataWatcher.addObject(1, Short.valueOf((short)300));
    this.dataWatcher.addObject(3, Byte.valueOf((byte)0));
    this.dataWatcher.addObject(2, "");
    this.dataWatcher.addObject(4, Byte.valueOf((byte)0));
    this.entityInit();
}
 
Example 3
Project: BaseClient   File: AttributeModifier.java   Source Code and License Vote up 4 votes
public AttributeModifier(String nameIn, double amountIn, int operationIn)
{
    this(MathHelper.getRandomUuid(ThreadLocalRandom.current()), nameIn, amountIn, operationIn);
}
 
Example 4
Project: BaseClient   File: AttributeModifier.java   Source Code and License Vote up 4 votes
public AttributeModifier(String nameIn, double amountIn, int operationIn)
{
    this(MathHelper.getRandomUuid(ThreadLocalRandom.current()), nameIn, amountIn, operationIn);
}