mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-23 21:49:45 +00:00
Separate BlueSlime and King Slime into separate entities + baseclass
This commit is contained in:
1 parent
345704f8dd
commit
d089455063
10 files changed
+582
-609
No files matched your search
@@ -10,6 +10,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import tconstruct.world.entity.BlueSlime;
|
||||
import tconstruct.world.entity.KingBlueSlime;
|
||||
import tconstruct.world.entity.SlimeBase;
|
||||
|
||||
public class SlimeFluid extends BlockFluidClassic
|
||||
{
|
||||
@@ -46,9 +48,13 @@ public class SlimeFluid extends BlockFluidClassic
|
||||
super.updateTick(world, x, y, z, rand);
|
||||
if (rand.nextInt(100) == 0 && world.getBlockMetadata(x, y, z) == 0 && world.checkNoEntityCollision(AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 2, y + 2, z + 2)))
|
||||
{
|
||||
BlueSlime entityslime = new BlueSlime(world);
|
||||
entityslime.setPosition((double) x + 0.5D, (double) y + 1.5D, (double) z + 0.5D);
|
||||
world.spawnEntityInWorld(entityslime);
|
||||
SlimeBase slime;
|
||||
if(rand.nextInt(300) == 0)
|
||||
slime = new KingBlueSlime(world);
|
||||
else
|
||||
slime = new BlueSlime(world);
|
||||
slime.setPosition((double) x + 0.5D, (double) y + 1.5D, (double) z + 0.5D);
|
||||
world.spawnEntityInWorld(slime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user