improve overlay, fix spawner
This commit is contained in:
parent
330ee75a27
commit
81355293e3
5 changed files with 50 additions and 39 deletions
|
@ -1368,12 +1368,12 @@ public abstract class Entity
|
|||
}
|
||||
}
|
||||
|
||||
public HitPosition rayTrace(double blockReachDistance, float partialTicks)
|
||||
public HitPosition rayTrace(double blockReachDistance, float partialTicks, boolean liquid)
|
||||
{
|
||||
Vec3 vec3 = this.getPositionEyes(partialTicks);
|
||||
Vec3 vec31 = this.getLook(partialTicks);
|
||||
Vec3 vec32 = vec3.addVector(vec31.xCoord * blockReachDistance, vec31.yCoord * blockReachDistance, vec31.zCoord * blockReachDistance);
|
||||
return this.worldObj.rayTraceBlocks(vec3, vec32, false, false, true);
|
||||
return this.worldObj.rayTraceBlocks(vec3, vec32, liquid, false, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3391,6 +3391,8 @@ public abstract class EntityNPC extends EntityLiving implements IInventory
|
|||
public void onDataWatcherUpdate(int data) {
|
||||
if(this.isPlayer() && data == 11) // (data == 29 || data == 11)) // && this.worldObj.client)
|
||||
this.updateSize();
|
||||
else if(data == 8 && this.worldObj.client)
|
||||
this.alignment = this.getAlignment();
|
||||
}
|
||||
|
||||
private void updateSize() {
|
||||
|
|
|
@ -3008,7 +3008,7 @@ public abstract class EntityLiving extends Entity
|
|||
|
||||
if (itemstack != null && itemstack.getItem() instanceof ItemMobTemplate)
|
||||
{
|
||||
if (!this.worldObj.client)
|
||||
if (!this.worldObj.client && player.connection.isAdmin())
|
||||
{
|
||||
// Class <? extends Entity > oclass = EntityRegistry.getClassFromName(((ItemMonsterPlacer)itemstack.getItem())
|
||||
// .getSpawnedId());
|
||||
|
@ -3028,15 +3028,6 @@ public abstract class EntityLiving extends Entity
|
|||
{
|
||||
child.setCustomNameTag(itemstack.getDisplayName());
|
||||
}
|
||||
|
||||
// if (!player.creative)
|
||||
// {
|
||||
|
||||
if (itemstack.decrSize())
|
||||
{
|
||||
player.setHeldItem(null);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue