mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Dangervator
- Fixed curve track targeting items not working properly - Fixed not being able to stock order a written checklist clipboard - Fixed elevators acting funny
This commit is contained in:
parent
476219b371
commit
e465f2ad81
4 changed files with 18 additions and 6 deletions
|
@ -144,11 +144,10 @@ public class ControlledContraptionEntity extends AbstractContraptionEntity {
|
|||
@Override
|
||||
public void teleportTo(double p_70634_1_, double p_70634_3_, double p_70634_5_) {}
|
||||
|
||||
// Always noop this. Controlled Contraptions are given their position on the client from the BE
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void lerpTo(double pX, double pY, double pZ, float pYRot, float pXRot, int pSteps) {
|
||||
super.lerpTo(pX, pY, pZ, pYRot, pXRot, pSteps);
|
||||
}
|
||||
public void lerpTo(double pX, double pY, double pZ, float pYRot, float pXRot, int pSteps) {}
|
||||
|
||||
protected void tickContraption() {
|
||||
angleDelta = angle - prevAngle;
|
||||
|
|
|
@ -115,7 +115,7 @@ public class ClipboardEntry {
|
|||
if (this == o) return true;
|
||||
if (!(o instanceof ClipboardEntry that)) return false;
|
||||
|
||||
return checked == that.checked && text.equals(that.text) && icon.equals(that.icon);
|
||||
return checked == that.checked && text.equals(that.text) && ItemStack.isSameItemSameComponents(icon, that.icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -302,6 +302,8 @@ public class BeltSlicer {
|
|||
mergedBeltLength - transportedItemStack.prevBeltPosition;
|
||||
}
|
||||
}
|
||||
|
||||
beltChain = BeltBlock.getBeltChain(world, mergedController.getBlockPos());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -132,16 +132,27 @@ public class TrackTargetingBlockItem extends BlockItem {
|
|||
}
|
||||
|
||||
if (bezier) {
|
||||
BezierTrackPointLocation bezierTrackPointLocation = stack.get(AllDataComponents.TRACK_TARGETING_ITEM_BEZIER);
|
||||
blockEntityData.put("Bezier", CatnipCodecUtils.encode(BezierTrackPointLocation.CODEC, bezierTrackPointLocation).orElseThrow());
|
||||
BezierTrackPointLocation bezierTrackPointLocation =
|
||||
stack.get(AllDataComponents.TRACK_TARGETING_ITEM_BEZIER);
|
||||
CompoundTag bezierNbt = new CompoundTag();
|
||||
bezierNbt.putInt("Segment", bezierTrackPointLocation.segment());
|
||||
bezierNbt.put("Key", NbtUtils.writeBlockPos(bezierTrackPointLocation.curveTarget()
|
||||
.subtract(placedPos)));
|
||||
blockEntityData.put("Bezier", bezierNbt);
|
||||
}
|
||||
|
||||
blockEntityData.put("TargetTrack", NbtUtils.writeBlockPos(selectedPos.subtract(placedPos)));
|
||||
blockEntityData.putString("id", BuiltInRegistries.ITEM.getKey(stack.getItem()).toString());
|
||||
BlockEntity.addEntityType(blockEntityData, ((IBE<?>) this.getBlock()).getBlockEntityType());
|
||||
|
||||
stack.set(DataComponents.BLOCK_ENTITY_DATA, CustomData.of(blockEntityData));
|
||||
stack.remove(AllDataComponents.TRACK_TARGETING_ITEM_SELECTED_POS);
|
||||
stack.remove(AllDataComponents.TRACK_TARGETING_ITEM_SELECTED_DIRECTION);
|
||||
stack.remove(AllDataComponents.TRACK_TARGETING_ITEM_BEZIER);
|
||||
|
||||
InteractionResult useOn = super.useOn(pContext);
|
||||
stack.remove(DataComponents.BLOCK_ENTITY_DATA);
|
||||
|
||||
if (level.isClientSide || useOn == InteractionResult.FAIL)
|
||||
return useOn;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue