mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Items dropped by clouds will now float in place
This commit is contained in:
parent
292b09d6e5
commit
d433c8a30c
2 changed files with 12 additions and 1 deletions
|
@ -17,7 +17,7 @@ public final class Predicates {
|
|||
};
|
||||
|
||||
public static final Predicate<Entity> ITEMS = entity -> {
|
||||
return entity instanceof EntityItem && entity.isEntityAlive();
|
||||
return entity instanceof EntityItem && entity.isEntityAlive() && entity.ticksExisted > 1;
|
||||
};
|
||||
|
||||
public static final Predicate<EntityItem> ITEM_INTERACT_WITH_CLOUDS = item -> {
|
||||
|
|
|
@ -570,6 +570,17 @@ public class EntityCloud extends EntityFlying implements IAnimals {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityItem entityDropItem(ItemStack stack, float offsetY) {
|
||||
EntityItem item = super.entityDropItem(stack, offsetY);
|
||||
|
||||
PlayerSpeciesList.instance().getEntity(item).setPlayerSpecies(Race.PEGASUS);
|
||||
item.setNoGravity(true);
|
||||
item.motionY = 0;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound tag) {
|
||||
super.readEntityFromNBT(tag);
|
||||
|
|
Loading…
Reference in a new issue