mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 02:33:43 +01:00
Minor Bugs
- Contraption bounds no longer block extractors from dropping items - Extractors above belts now insert items entity-less - Tooltip for sequencer gearshift - blep, im tired
This commit is contained in:
parent
14e053fafd
commit
53a7b6cc25
3 changed files with 25 additions and 14 deletions
|
@ -294,7 +294,8 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
||||||
@Override
|
@Override
|
||||||
public void stopRiding() {
|
public void stopRiding() {
|
||||||
if (!world.isRemote)
|
if (!world.isRemote)
|
||||||
disassemble();
|
if (isAlive())
|
||||||
|
disassemble();
|
||||||
super.stopRiding();
|
super.stopRiding();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.base.KineticTileEntity;
|
||||||
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
|
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
|
||||||
import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock;
|
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.Entity;
|
||||||
import net.minecraft.entity.item.ItemEntity;
|
import net.minecraft.entity.item.ItemEntity;
|
||||||
|
@ -56,23 +55,24 @@ public class ExtractorTileEntity extends SmartTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onExtract(ItemStack stack) {
|
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);
|
Vec3d entityPos = VecHelper.getCenterOf(getPos()).add(0, -0.5f, 0);
|
||||||
Entity entityIn = null;
|
Entity entityIn = null;
|
||||||
Direction facing = AttachedLogisticalBlock.getBlockFacing(getBlockState());
|
Direction facing = AttachedLogisticalBlock.getBlockFacing(getBlockState());
|
||||||
if (facing == Direction.DOWN)
|
if (facing == Direction.DOWN)
|
||||||
entityPos = entityPos.add(0, .5, 0);
|
entityPos = entityPos.add(0, .5, 0);
|
||||||
|
|
||||||
if (stack.getItem() instanceof CardboardBoxItem) {
|
entityIn = new ItemEntity(world, entityPos.x, entityPos.y, entityPos.z, stack);
|
||||||
// entityIn = new CardboardBoxEntity(world, entityPos, stack, facing.getOpposite());
|
entityIn.setMotion(Vec3d.ZERO);
|
||||||
// world.playSound(null, getPos(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, .25f, .05f);
|
((ItemEntity) entityIn).setPickupDelay(5);
|
||||||
|
world.playSound(null, getPos(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, .125f, .1f);
|
||||||
} 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
world.addEntity(entityIn);
|
world.addEntity(entityIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,9 +109,12 @@ public class ExtractorTileEntity extends SmartTileEntity {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return world.getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB(getPos())).isEmpty();
|
List<Entity> entitiesWithinAABBExcludingEntity =
|
||||||
|
world.getEntitiesWithinAABB(ItemEntity.class, new AxisAlignedBB(getPos()));
|
||||||
|
return entitiesWithinAABBExcludingEntity.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -951,6 +951,13 @@
|
||||||
"block.create.clockwork_bearing.tooltip.condition1": "When Rotated",
|
"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.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": "CART ASSEMBLER",
|
||||||
"block.create.cart_assembler.tooltip.summary": "Mounts a connected Structure onto a _passing_ _Minecart._",
|
"block.create.cart_assembler.tooltip.summary": "Mounts a connected Structure onto a _passing_ _Minecart._",
|
||||||
"block.create.cart_assembler.tooltip.condition1": "When Powered by Redstone",
|
"block.create.cart_assembler.tooltip.condition1": "When Powered by Redstone",
|
||||||
|
|
Loading…
Reference in a new issue