mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 06:24:29 +01:00
Contraption launcher
- Fixed Contraptions being affected by Weighted Ejectors
This commit is contained in:
parent
88e487cdf5
commit
67afe74250
@ -31,6 +31,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
|
|||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.ObserverBlock;
|
import net.minecraft.block.ObserverBlock;
|
||||||
|
import net.minecraft.block.material.PushReaction;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.item.ItemEntity;
|
import net.minecraft.entity.item.ItemEntity;
|
||||||
@ -149,6 +150,8 @@ public class EjectorTileEntity extends KineticTileEntity {
|
|||||||
continue;
|
continue;
|
||||||
if (entity instanceof ItemEntity)
|
if (entity instanceof ItemEntity)
|
||||||
continue;
|
continue;
|
||||||
|
if (entity.getPistonPushReaction() == PushReaction.IGNORE)
|
||||||
|
continue;
|
||||||
|
|
||||||
entity.onGround = false;
|
entity.onGround = false;
|
||||||
|
|
||||||
@ -379,9 +382,14 @@ public class EjectorTileEntity extends KineticTileEntity {
|
|||||||
|
|
||||||
protected void nudgeEntities() {
|
protected void nudgeEntities() {
|
||||||
for (Entity entity : level.getEntitiesOfClass(Entity.class,
|
for (Entity entity : level.getEntitiesOfClass(Entity.class,
|
||||||
new AxisAlignedBB(worldPosition).inflate(-1 / 16f, 0, -1 / 16f)))
|
new AxisAlignedBB(worldPosition).inflate(-1 / 16f, 0, -1 / 16f))) {
|
||||||
|
if (!entity.isAlive())
|
||||||
|
continue;
|
||||||
|
if (entity.getPistonPushReaction() == PushReaction.IGNORE)
|
||||||
|
continue;
|
||||||
if (!(entity instanceof PlayerEntity))
|
if (!(entity instanceof PlayerEntity))
|
||||||
entity.setPos(entity.getX(), entity.getY() + .125f, entity.getZ());
|
entity.setPos(entity.getX(), entity.getY() + .125f, entity.getZ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ejectIfTriggered() {
|
protected void ejectIfTriggered() {
|
||||||
|
Loading…
Reference in New Issue
Block a user