diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java index b1b4ebcdd..2274cdce0 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java @@ -294,7 +294,8 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD @Override public void stopRiding() { if (!world.isRemote) - disassemble(); + if (isAlive()) + disassemble(); super.stopRiding(); } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java index 6adcc3a4d..eaaa72d62 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorTileEntity.java @@ -15,7 +15,6 @@ import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock; -import com.simibubi.create.modules.logistics.item.CardboardBoxItem; import net.minecraft.entity.Entity; import net.minecraft.entity.item.ItemEntity; @@ -56,23 +55,24 @@ public class ExtractorTileEntity extends SmartTileEntity { } protected void onExtract(ItemStack stack) { + if (AllBlocks.BELT.typeOf(world.getBlockState(pos.down()))) { + TileEntity te = world.getTileEntity(pos.down()); + if (te instanceof BeltTileEntity) { + if (((BeltTileEntity) te).tryInsertingFromSide(Direction.UP, stack, false)) + return; + } + } + Vec3d entityPos = VecHelper.getCenterOf(getPos()).add(0, -0.5f, 0); Entity entityIn = null; Direction facing = AttachedLogisticalBlock.getBlockFacing(getBlockState()); if (facing == Direction.DOWN) entityPos = entityPos.add(0, .5, 0); - if (stack.getItem() instanceof CardboardBoxItem) { -// entityIn = new CardboardBoxEntity(world, entityPos, stack, facing.getOpposite()); -// world.playSound(null, getPos(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, .25f, .05f); - - } else { - entityIn = new ItemEntity(world, entityPos.x, entityPos.y, entityPos.z, stack); - entityIn.setMotion(Vec3d.ZERO); - ((ItemEntity) entityIn).setPickupDelay(5); - world.playSound(null, getPos(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, .125f, .1f); - } - + entityIn = new ItemEntity(world, entityPos.x, entityPos.y, entityPos.z, stack); + entityIn.setMotion(Vec3d.ZERO); + ((ItemEntity) entityIn).setPickupDelay(5); + world.playSound(null, getPos(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, .125f, .1f); world.addEntity(entityIn); } @@ -109,9 +109,12 @@ public class ExtractorTileEntity extends SmartTileEntity { return false; } } + return true; } - return world.getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB(getPos())).isEmpty(); + List entitiesWithinAABBExcludingEntity = + world.getEntitiesWithinAABB(ItemEntity.class, new AxisAlignedBB(getPos())); + return entitiesWithinAABBExcludingEntity.isEmpty(); } @Override diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index f93eff1e6..2fb7c8d6d 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -951,6 +951,13 @@ "block.create.clockwork_bearing.tooltip.condition1": "When Rotated", "block.create.clockwork_bearing.tooltip.behaviour1": "Starts rotating the attached Structure towards the _current_ _hour._ If a second structure is present, it will serve as the _minute_ _hand._", + "block.create.sequenced_gearshift.tooltip": "SEQUENCED GEARSHIFT", + "block.create.sequenced_gearshift.tooltip.summary": "A _programmable_ _utility_ _component,_ which can change its _rotational_ _through-put_ according to up to _5_ _consecutive_ _instructions._ Use this to power Mechanical Bearings, Pistons or Pulleys with more control over timing and speed. May become less precise at higher speeds.", + "block.create.sequenced_gearshift.tooltip.condition1": "When Powered by Redstone", + "block.create.sequenced_gearshift.tooltip.behaviour1": "_Starts_ _executing_ programmed instructions based on the input speed.", + "block.create.sequenced_gearshift.tooltip.condition2": "When R-Clicked", + "block.create.sequenced_gearshift.tooltip.behaviour2": "Opens the _configuration_ _interface._", + "block.create.cart_assembler.tooltip": "CART ASSEMBLER", "block.create.cart_assembler.tooltip.summary": "Mounts a connected Structure onto a _passing_ _Minecart._", "block.create.cart_assembler.tooltip.condition1": "When Powered by Redstone",