|
10 | 10 | import com.simibubi.create.AllPackets;
|
11 | 11 | import com.simibubi.create.AllSoundEvents;
|
12 | 12 | import com.simibubi.create.AllTags.AllBlockTags;
|
| 13 | +import com.simibubi.create.api.contraption.transformable.TransformableBlockEntity; |
13 | 14 | import com.simibubi.create.compat.computercraft.AbstractComputerBehaviour;
|
14 | 15 | import com.simibubi.create.compat.computercraft.ComputerCraftProxy;
|
| 16 | +import com.simibubi.create.content.contraptions.StructureTransform; |
15 | 17 | import com.simibubi.create.content.logistics.BigItemStack;
|
16 | 18 | import com.simibubi.create.content.logistics.packager.InventorySummary;
|
17 | 19 | import com.simibubi.create.content.logistics.redstoneRequester.AutoRequestData;
|
|
39 | 41 | import net.minecraft.world.entity.player.Player;
|
40 | 42 | import net.minecraft.world.item.ItemStack;
|
41 | 43 | import net.minecraft.world.level.block.Block;
|
| 44 | +import net.minecraft.world.level.block.entity.BlockEntity; |
42 | 45 | import net.minecraft.world.level.block.entity.BlockEntityType;
|
43 | 46 | import net.minecraft.world.level.block.state.BlockState;
|
44 | 47 | import net.minecraft.world.phys.AABB;
|
|
50 | 53 |
|
51 | 54 | import org.jetbrains.annotations.NotNull;
|
52 | 55 |
|
53 |
| -public class TableClothBlockEntity extends SmartBlockEntity { |
| 56 | +public class TableClothBlockEntity extends SmartBlockEntity implements TransformableBlockEntity { |
54 | 57 |
|
55 | 58 | public AbstractComputerBehaviour computerBehaviour;
|
56 | 59 |
|
@@ -347,4 +350,11 @@ public int getPaymentAmount() {
|
347 | 350 | .isEmpty() ? 1 : priceTag.count;
|
348 | 351 | }
|
349 | 352 |
|
| 353 | + public void transform(BlockEntity blockEntity, StructureTransform transform){ |
| 354 | + facing = transform.mirrorFacing(facing); |
| 355 | + if (transform.rotationAxis == Direction.Axis.Y) |
| 356 | + facing = transform.rotateFacing(facing); |
| 357 | + notifyUpdate(); |
| 358 | + } |
| 359 | + |
350 | 360 | }
|
0 commit comments