mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Merge remote-tracking branch 'origin/mc1.17/dev' into mc1.18/dev
# Conflicts: # src/main/java/com/simibubi/create/foundation/tileEntity/SmartTileEntity.java
This commit is contained in:
commit
75d4295118
11 changed files with 247 additions and 27 deletions
|
@ -2125,7 +2125,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
|
|||
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
|
||||
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
|
||||
5049f72c327a88f175f6f9425909e098fc711100 assets/create/sounds.json
|
||||
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
|
||||
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
|
||||
613e64b44bed959da899fdd54c1cacb227fb33f2 data/create/advancements/andesite_alloy.json
|
||||
81885c6bfb85792c88aaa7c9b70f58832945d31f data/create/advancements/andesite_casing.json
|
||||
83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json
|
||||
|
@ -5210,7 +5210,7 @@ ff1900963bc4cd8ceffa78d58ef1952ceacb2fb7 data/forge/tags/items/storage_blocks/br
|
|||
9f7a428085b1aac66da32a43e9d51c7efc1f0d81 data/minecraft/tags/blocks/beacon_base_blocks.json
|
||||
69f596fcb065e26b02ce246760432b5174191b76 data/minecraft/tags/blocks/impermeable.json
|
||||
59681910c06f8b7385c6641a409d352056235506 data/minecraft/tags/blocks/mineable/axe.json
|
||||
7d948c24605906ac26e44258f8eac04aa1ddfac4 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
f8c66b3808efb61d2d928748783bb7eb8a1357f9 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json
|
||||
a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json
|
||||
6bcabbc1c0479caa80a0ebc676bb34ce0052efb0 data/minecraft/tags/blocks/rails.json
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
"trigger": "create:bracket_apply",
|
||||
"conditions": {
|
||||
"accepted_entries": [
|
||||
"create:large_cogwheel",
|
||||
"create:cogwheel"
|
||||
"create:cogwheel",
|
||||
"create:large_cogwheel"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -189,94 +189,262 @@
|
|||
"create:waxed_weathered_copper_tile_stairs",
|
||||
"create:waxed_oxidized_copper_tile_stairs",
|
||||
"create:cut_granite",
|
||||
"create:cut_granite_stairs",
|
||||
"create:cut_granite_slab",
|
||||
"create:cut_granite_wall",
|
||||
"create:polished_cut_granite",
|
||||
"create:polished_cut_granite_stairs",
|
||||
"create:polished_cut_granite_slab",
|
||||
"create:polished_cut_granite_wall",
|
||||
"create:cut_granite_bricks",
|
||||
"create:cut_granite_brick_stairs",
|
||||
"create:cut_granite_brick_slab",
|
||||
"create:cut_granite_brick_wall",
|
||||
"create:small_granite_bricks",
|
||||
"create:small_granite_brick_stairs",
|
||||
"create:small_granite_brick_slab",
|
||||
"create:small_granite_brick_wall",
|
||||
"create:layered_granite",
|
||||
"create:granite_pillar",
|
||||
"create:cut_diorite",
|
||||
"create:cut_diorite_stairs",
|
||||
"create:cut_diorite_slab",
|
||||
"create:cut_diorite_wall",
|
||||
"create:polished_cut_diorite",
|
||||
"create:polished_cut_diorite_stairs",
|
||||
"create:polished_cut_diorite_slab",
|
||||
"create:polished_cut_diorite_wall",
|
||||
"create:cut_diorite_bricks",
|
||||
"create:cut_diorite_brick_stairs",
|
||||
"create:cut_diorite_brick_slab",
|
||||
"create:cut_diorite_brick_wall",
|
||||
"create:small_diorite_bricks",
|
||||
"create:small_diorite_brick_stairs",
|
||||
"create:small_diorite_brick_slab",
|
||||
"create:small_diorite_brick_wall",
|
||||
"create:layered_diorite",
|
||||
"create:diorite_pillar",
|
||||
"create:cut_andesite",
|
||||
"create:cut_andesite_stairs",
|
||||
"create:cut_andesite_slab",
|
||||
"create:cut_andesite_wall",
|
||||
"create:polished_cut_andesite",
|
||||
"create:polished_cut_andesite_stairs",
|
||||
"create:polished_cut_andesite_slab",
|
||||
"create:polished_cut_andesite_wall",
|
||||
"create:cut_andesite_bricks",
|
||||
"create:cut_andesite_brick_stairs",
|
||||
"create:cut_andesite_brick_slab",
|
||||
"create:cut_andesite_brick_wall",
|
||||
"create:small_andesite_bricks",
|
||||
"create:small_andesite_brick_stairs",
|
||||
"create:small_andesite_brick_slab",
|
||||
"create:small_andesite_brick_wall",
|
||||
"create:layered_andesite",
|
||||
"create:andesite_pillar",
|
||||
"create:cut_calcite",
|
||||
"create:cut_calcite_stairs",
|
||||
"create:cut_calcite_slab",
|
||||
"create:cut_calcite_wall",
|
||||
"create:polished_cut_calcite",
|
||||
"create:polished_cut_calcite_stairs",
|
||||
"create:polished_cut_calcite_slab",
|
||||
"create:polished_cut_calcite_wall",
|
||||
"create:cut_calcite_bricks",
|
||||
"create:cut_calcite_brick_stairs",
|
||||
"create:cut_calcite_brick_slab",
|
||||
"create:cut_calcite_brick_wall",
|
||||
"create:small_calcite_bricks",
|
||||
"create:small_calcite_brick_stairs",
|
||||
"create:small_calcite_brick_slab",
|
||||
"create:small_calcite_brick_wall",
|
||||
"create:layered_calcite",
|
||||
"create:calcite_pillar",
|
||||
"create:cut_dripstone",
|
||||
"create:cut_dripstone_stairs",
|
||||
"create:cut_dripstone_slab",
|
||||
"create:cut_dripstone_wall",
|
||||
"create:polished_cut_dripstone",
|
||||
"create:polished_cut_dripstone_stairs",
|
||||
"create:polished_cut_dripstone_slab",
|
||||
"create:polished_cut_dripstone_wall",
|
||||
"create:cut_dripstone_bricks",
|
||||
"create:cut_dripstone_brick_stairs",
|
||||
"create:cut_dripstone_brick_slab",
|
||||
"create:cut_dripstone_brick_wall",
|
||||
"create:small_dripstone_bricks",
|
||||
"create:small_dripstone_brick_stairs",
|
||||
"create:small_dripstone_brick_slab",
|
||||
"create:small_dripstone_brick_wall",
|
||||
"create:layered_dripstone",
|
||||
"create:dripstone_pillar",
|
||||
"create:cut_deepslate",
|
||||
"create:cut_deepslate_stairs",
|
||||
"create:cut_deepslate_slab",
|
||||
"create:cut_deepslate_wall",
|
||||
"create:polished_cut_deepslate",
|
||||
"create:polished_cut_deepslate_stairs",
|
||||
"create:polished_cut_deepslate_slab",
|
||||
"create:polished_cut_deepslate_wall",
|
||||
"create:cut_deepslate_bricks",
|
||||
"create:cut_deepslate_brick_stairs",
|
||||
"create:cut_deepslate_brick_slab",
|
||||
"create:cut_deepslate_brick_wall",
|
||||
"create:small_deepslate_bricks",
|
||||
"create:small_deepslate_brick_stairs",
|
||||
"create:small_deepslate_brick_slab",
|
||||
"create:small_deepslate_brick_wall",
|
||||
"create:layered_deepslate",
|
||||
"create:deepslate_pillar",
|
||||
"create:cut_tuff",
|
||||
"create:cut_tuff_stairs",
|
||||
"create:cut_tuff_slab",
|
||||
"create:cut_tuff_wall",
|
||||
"create:polished_cut_tuff",
|
||||
"create:polished_cut_tuff_stairs",
|
||||
"create:polished_cut_tuff_slab",
|
||||
"create:polished_cut_tuff_wall",
|
||||
"create:cut_tuff_bricks",
|
||||
"create:cut_tuff_brick_stairs",
|
||||
"create:cut_tuff_brick_slab",
|
||||
"create:cut_tuff_brick_wall",
|
||||
"create:small_tuff_bricks",
|
||||
"create:small_tuff_brick_stairs",
|
||||
"create:small_tuff_brick_slab",
|
||||
"create:small_tuff_brick_wall",
|
||||
"create:layered_tuff",
|
||||
"create:tuff_pillar",
|
||||
"create:asurine",
|
||||
"create:cut_asurine",
|
||||
"create:cut_asurine_stairs",
|
||||
"create:cut_asurine_slab",
|
||||
"create:cut_asurine_wall",
|
||||
"create:polished_cut_asurine",
|
||||
"create:polished_cut_asurine_stairs",
|
||||
"create:polished_cut_asurine_slab",
|
||||
"create:polished_cut_asurine_wall",
|
||||
"create:cut_asurine_bricks",
|
||||
"create:cut_asurine_brick_stairs",
|
||||
"create:cut_asurine_brick_slab",
|
||||
"create:cut_asurine_brick_wall",
|
||||
"create:small_asurine_bricks",
|
||||
"create:small_asurine_brick_stairs",
|
||||
"create:small_asurine_brick_slab",
|
||||
"create:small_asurine_brick_wall",
|
||||
"create:layered_asurine",
|
||||
"create:asurine_pillar",
|
||||
"create:crimsite",
|
||||
"create:cut_crimsite",
|
||||
"create:cut_crimsite_stairs",
|
||||
"create:cut_crimsite_slab",
|
||||
"create:cut_crimsite_wall",
|
||||
"create:polished_cut_crimsite",
|
||||
"create:polished_cut_crimsite_stairs",
|
||||
"create:polished_cut_crimsite_slab",
|
||||
"create:polished_cut_crimsite_wall",
|
||||
"create:cut_crimsite_bricks",
|
||||
"create:cut_crimsite_brick_stairs",
|
||||
"create:cut_crimsite_brick_slab",
|
||||
"create:cut_crimsite_brick_wall",
|
||||
"create:small_crimsite_bricks",
|
||||
"create:small_crimsite_brick_stairs",
|
||||
"create:small_crimsite_brick_slab",
|
||||
"create:small_crimsite_brick_wall",
|
||||
"create:layered_crimsite",
|
||||
"create:crimsite_pillar",
|
||||
"create:limestone",
|
||||
"create:cut_limestone",
|
||||
"create:cut_limestone_stairs",
|
||||
"create:cut_limestone_slab",
|
||||
"create:cut_limestone_wall",
|
||||
"create:polished_cut_limestone",
|
||||
"create:polished_cut_limestone_stairs",
|
||||
"create:polished_cut_limestone_slab",
|
||||
"create:polished_cut_limestone_wall",
|
||||
"create:cut_limestone_bricks",
|
||||
"create:cut_limestone_brick_stairs",
|
||||
"create:cut_limestone_brick_slab",
|
||||
"create:cut_limestone_brick_wall",
|
||||
"create:small_limestone_bricks",
|
||||
"create:small_limestone_brick_stairs",
|
||||
"create:small_limestone_brick_slab",
|
||||
"create:small_limestone_brick_wall",
|
||||
"create:layered_limestone",
|
||||
"create:limestone_pillar",
|
||||
"create:ochrum",
|
||||
"create:cut_ochrum",
|
||||
"create:cut_ochrum_stairs",
|
||||
"create:cut_ochrum_slab",
|
||||
"create:cut_ochrum_wall",
|
||||
"create:polished_cut_ochrum",
|
||||
"create:polished_cut_ochrum_stairs",
|
||||
"create:polished_cut_ochrum_slab",
|
||||
"create:polished_cut_ochrum_wall",
|
||||
"create:cut_ochrum_bricks",
|
||||
"create:cut_ochrum_brick_stairs",
|
||||
"create:cut_ochrum_brick_slab",
|
||||
"create:cut_ochrum_brick_wall",
|
||||
"create:small_ochrum_bricks",
|
||||
"create:small_ochrum_brick_stairs",
|
||||
"create:small_ochrum_brick_slab",
|
||||
"create:small_ochrum_brick_wall",
|
||||
"create:layered_ochrum",
|
||||
"create:ochrum_pillar",
|
||||
"create:scoria",
|
||||
"create:cut_scoria",
|
||||
"create:cut_scoria_stairs",
|
||||
"create:cut_scoria_slab",
|
||||
"create:cut_scoria_wall",
|
||||
"create:polished_cut_scoria",
|
||||
"create:polished_cut_scoria_stairs",
|
||||
"create:polished_cut_scoria_slab",
|
||||
"create:polished_cut_scoria_wall",
|
||||
"create:cut_scoria_bricks",
|
||||
"create:cut_scoria_brick_stairs",
|
||||
"create:cut_scoria_brick_slab",
|
||||
"create:cut_scoria_brick_wall",
|
||||
"create:small_scoria_bricks",
|
||||
"create:small_scoria_brick_stairs",
|
||||
"create:small_scoria_brick_slab",
|
||||
"create:small_scoria_brick_wall",
|
||||
"create:layered_scoria",
|
||||
"create:scoria_pillar",
|
||||
"create:scorchia",
|
||||
"create:cut_scorchia",
|
||||
"create:cut_scorchia_stairs",
|
||||
"create:cut_scorchia_slab",
|
||||
"create:cut_scorchia_wall",
|
||||
"create:polished_cut_scorchia",
|
||||
"create:polished_cut_scorchia_stairs",
|
||||
"create:polished_cut_scorchia_slab",
|
||||
"create:polished_cut_scorchia_wall",
|
||||
"create:cut_scorchia_bricks",
|
||||
"create:cut_scorchia_brick_stairs",
|
||||
"create:cut_scorchia_brick_slab",
|
||||
"create:cut_scorchia_brick_wall",
|
||||
"create:small_scorchia_bricks",
|
||||
"create:small_scorchia_brick_stairs",
|
||||
"create:small_scorchia_brick_slab",
|
||||
"create:small_scorchia_brick_wall",
|
||||
"create:layered_scorchia",
|
||||
"create:scorchia_pillar",
|
||||
"create:veridium",
|
||||
"create:cut_veridium",
|
||||
"create:cut_veridium_stairs",
|
||||
"create:cut_veridium_slab",
|
||||
"create:cut_veridium_wall",
|
||||
"create:polished_cut_veridium",
|
||||
"create:polished_cut_veridium_stairs",
|
||||
"create:polished_cut_veridium_slab",
|
||||
"create:polished_cut_veridium_wall",
|
||||
"create:cut_veridium_bricks",
|
||||
"create:cut_veridium_brick_stairs",
|
||||
"create:cut_veridium_brick_slab",
|
||||
"create:cut_veridium_brick_wall",
|
||||
"create:small_veridium_bricks",
|
||||
"create:small_veridium_brick_stairs",
|
||||
"create:small_veridium_brick_slab",
|
||||
"create:small_veridium_brick_wall",
|
||||
"create:layered_veridium",
|
||||
"create:veridium_pillar"
|
||||
]
|
||||
|
|
|
@ -185,12 +185,17 @@ public class KineticTileEntity extends SmartTileEntity
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
if (!level.isClientSide) {
|
||||
if (hasNetwork())
|
||||
getOrCreateNetwork().remove(this);
|
||||
detachKinetics();
|
||||
}
|
||||
super.setRemoved();
|
||||
super.setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -86,10 +86,15 @@ public class EngineTileEntity extends SmartTileEntity implements FlywheelRendere
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
detachWheel();
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
detachWheel();
|
||||
super.setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
|
||||
protected void refreshWheelSpeed() {
|
||||
if (poweredWheel == null)
|
||||
return;
|
||||
|
|
|
@ -362,9 +362,14 @@ public class ClockworkBearingTileEntity extends KineticTileEntity
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
if (!level.isClientSide)
|
||||
disassemble();
|
||||
super.setRemoved();
|
||||
super.setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,9 +59,14 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
if (!level.isClientSide)
|
||||
disassemble();
|
||||
super.setRemoved();
|
||||
super.setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -107,7 +107,7 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity
|
|||
boolean contraptionPresent = movedContraption != null;
|
||||
if (needsContraption && !contraptionPresent)
|
||||
return;
|
||||
|
||||
|
||||
float movementSpeed = getMovementSpeed();
|
||||
float newOffset = offset + movementSpeed;
|
||||
if ((int) newOffset != (int) offset)
|
||||
|
@ -122,7 +122,7 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!contraptionPresent || !movedContraption.isStalled())
|
||||
offset = newOffset;
|
||||
|
||||
|
@ -173,10 +173,15 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
this.remove = true;
|
||||
if (!level.isClientSide)
|
||||
disassemble();
|
||||
super.setRemoved();
|
||||
super.setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -261,13 +266,13 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity
|
|||
movedContraption.setContraptionMotion(Vec3.ZERO);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Vec3 motion = getMotionVector();
|
||||
movedContraption.setContraptionMotion(getMotionVector());
|
||||
movedContraption.move(motion.x, motion.y, motion.z);
|
||||
return ContraptionCollider.collideBlocks(movedContraption);
|
||||
}
|
||||
|
||||
|
||||
protected void collided() {
|
||||
if (level.isClientSide) {
|
||||
waitingForSpeedChange = true;
|
||||
|
|
|
@ -197,12 +197,17 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
onEmptied();
|
||||
itemCapability.invalidate();
|
||||
fluidCapability.invalidate();
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
onEmptied();
|
||||
super.setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
|
||||
|
@ -288,7 +293,7 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
tryClearingSpoutputOverflow();
|
||||
if (!contentsChanged)
|
||||
return;
|
||||
|
||||
|
||||
contentsChanged = false;
|
||||
getOperator().ifPresent(te -> te.basinChecker.scheduleUpdate());
|
||||
|
||||
|
@ -312,7 +317,7 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
Direction direction = blockState.getValue(BasinBlock.FACING);
|
||||
BlockEntity te = level.getBlockEntity(worldPosition.below()
|
||||
.relative(direction));
|
||||
|
||||
|
||||
FilteringBehaviour filter = null;
|
||||
InvManipulationBehaviour inserter = null;
|
||||
if (te != null) {
|
||||
|
@ -362,7 +367,7 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
update = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (targetTank == null)
|
||||
break;
|
||||
|
||||
|
@ -459,7 +464,7 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
|
||||
Direction direction = blockState.getValue(BasinBlock.FACING);
|
||||
if (direction != Direction.DOWN) {
|
||||
|
||||
|
||||
BlockEntity te = level.getBlockEntity(worldPosition.below()
|
||||
.relative(direction));
|
||||
|
||||
|
@ -472,7 +477,7 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
: te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, direction.getOpposite())
|
||||
.orElse(null);
|
||||
boolean externalTankNotPresent = targetTank == null;
|
||||
|
||||
|
||||
if (!outputItems.isEmpty() && targetInv == null)
|
||||
return false;
|
||||
if (!outputFluids.isEmpty() && externalTankNotPresent) {
|
||||
|
@ -484,7 +489,7 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
if (!acceptFluidOutputsIntoBasin(outputFluids, simulate, targetTank))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (simulate)
|
||||
return true;
|
||||
for (ItemStack itemStack : outputItems) {
|
||||
|
|
|
@ -31,6 +31,8 @@ import net.minecraft.world.level.block.WallBlock;
|
|||
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
|
||||
import static com.simibubi.create.AllTags.pickaxeOnly;
|
||||
|
||||
public abstract class PaletteBlockPartial<B extends Block> {
|
||||
|
||||
public static final PaletteBlockPartial<StairBlock> STAIR = new Stairs();
|
||||
|
@ -74,7 +76,7 @@ public abstract class PaletteBlockPartial<B extends Block> {
|
|||
protected BlockBuilder<B, CreateRegistrate> transformBlock(BlockBuilder<B, CreateRegistrate> builder,
|
||||
String variantName, PaletteBlockPattern pattern) {
|
||||
getBlockTags().forEach(builder::tag);
|
||||
return builder;
|
||||
return builder.transform(pickaxeOnly());
|
||||
}
|
||||
|
||||
protected ItemBuilder<BlockItem, BlockBuilder<B, CreateRegistrate>> transformItem(
|
||||
|
|
|
@ -116,6 +116,32 @@ public abstract class SmartTileEntity extends SyncedTileEntity implements IParti
|
|||
read(tag, false);
|
||||
}
|
||||
|
||||
/* TODO: Remove this hack once this issue is resolved: https://github.com/MinecraftForge/MinecraftForge/issues/8302
|
||||
Once the PR linked in the issue is accepted, we should use the new method for determining whether setRemoved was
|
||||
called due to a chunk unload or not, and remove this volatile workaround
|
||||
*/
|
||||
private boolean unloaded;
|
||||
|
||||
@Override
|
||||
public void onChunkUnloaded() {
|
||||
super.onChunkUnloaded();
|
||||
unloaded = true;
|
||||
}
|
||||
|
||||
protected void setRemovedNotDueToChunkUnload() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
forEachBehaviour(TileEntityBehaviour::remove);
|
||||
super.setRemoved();
|
||||
|
||||
if (!unloaded) {
|
||||
setRemovedNotDueToChunkUnload();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void saveAdditional(CompoundTag tag) {
|
||||
write(tag, false);
|
||||
|
@ -158,12 +184,6 @@ public abstract class SmartTileEntity extends SyncedTileEntity implements IParti
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
forEachBehaviour(TileEntityBehaviour::remove);
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
public void setLazyTickRate(int slowTickRate) {
|
||||
this.lazyTickRate = slowTickRate;
|
||||
this.lazyTickCounter = slowTickRate;
|
||||
|
|
Loading…
Reference in a new issue