mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Fixed the Slime in a Bottle not detecting slime chunks properly as it was ticking in the client where it doesn't know the world seed.
This commit is contained in:
1 parent
0f7af85551
commit
548397c767
1 file changed
+9
-7
@@ -43,13 +43,15 @@ public class ItemSlimeBottle extends ItemMod {
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int something, boolean somethingelse) {
|
||||
int x = MathHelper.floor_double(entity.posX);
|
||||
int z = MathHelper.floor_double(entity.posZ);
|
||||
boolean slime = SubTileNarslimmus.SpawnIntercepter.isSlimeChunk(world, x, z);
|
||||
int meta = stack.getItemDamage();
|
||||
int newMeta = slime ? 1 : 0;
|
||||
if(meta != newMeta)
|
||||
stack.setItemDamage(newMeta);
|
||||
if(!world.isRemote) {
|
||||
int x = MathHelper.floor_double(entity.posX);
|
||||
int z = MathHelper.floor_double(entity.posZ);
|
||||
boolean slime = SubTileNarslimmus.SpawnIntercepter.isSlimeChunk(world, x, z);
|
||||
int meta = stack.getItemDamage();
|
||||
int newMeta = slime ? 1 : 0;
|
||||
if(meta != newMeta)
|
||||
stack.setItemDamage(newMeta);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user