Skip to content

Commit 69a2c28

Browse files
committed
Merge remote-tracking branch 'origin/mc-1.18.x/1.18.2' into mc-1.18.x/stable
2 parents abdfc92 + dde9871 commit 69a2c28

File tree

2 files changed

+7
-28
lines changed

2 files changed

+7
-28
lines changed

src/main/java/dan200/computercraft/shared/Registry.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public static <T extends Block> T register( String id, T value )
9898
}
9999

100100
public static final BlockMonitor MONITOR_NORMAL =
101-
register( "monitor_normal", new BlockMonitor( properties(), () -> ModBlockEntities.MONITOR_NORMAL ) );
101+
register( "monitor_normal", new BlockMonitor( monitorProperties(), () -> ModBlockEntities.MONITOR_NORMAL ) );
102102

103103
public static final BlockMonitor MONITOR_ADVANCED =
104-
register( "monitor_advanced", new BlockMonitor( properties(), () -> ModBlockEntities.MONITOR_ADVANCED ) );
104+
register( "monitor_advanced", new BlockMonitor( monitorProperties(), () -> ModBlockEntities.MONITOR_ADVANCED ) );
105105

106106
public static final BlockComputer<TileComputer> COMPUTER_NORMAL =
107107
register( "computer_normal", new BlockComputer<>( properties(), ComputerFamily.NORMAL, () -> ModBlockEntities.COMPUTER_NORMAL ) );
@@ -144,6 +144,11 @@ private static BlockBehaviour.Properties properties()
144144
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2F ).noOcclusion();
145145
}
146146

147+
private static BlockBehaviour.Properties monitorProperties()
148+
{
149+
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2F );
150+
}
151+
147152
private static BlockBehaviour.Properties turtleProperties()
148153
{
149154
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2.5f );

src/main/java/dan200/computercraft/shared/common/TileGeneric.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
package dan200.computercraft.shared.common;
77

88
import net.minecraft.core.BlockPos;
9-
import net.minecraft.nbt.CompoundTag;
10-
import net.minecraft.network.protocol.Packet;
11-
import net.minecraft.network.protocol.game.ClientGamePacketListener;
12-
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
139
import net.minecraft.world.InteractionHand;
1410
import net.minecraft.world.InteractionResult;
1511
import net.minecraft.world.entity.player.Player;
@@ -18,7 +14,6 @@
1814
import net.minecraft.world.level.block.entity.BlockEntityType;
1915
import net.minecraft.world.level.block.state.BlockState;
2016
import net.minecraft.world.phys.BlockHitResult;
21-
import org.jetbrains.annotations.Nullable;
2217

2318
import javax.annotation.Nonnull;
2419

@@ -78,25 +73,4 @@ public boolean isUsable( Player player )
7873
return player.getCommandSenderWorld() == getLevel() &&
7974
player.distanceToSqr( pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5 ) <= range * range;
8075
}
81-
82-
@Override
83-
public CompoundTag getUpdateTag()
84-
{
85-
return this.saveWithoutMetadata();
86-
}
87-
88-
@Nullable
89-
@Override
90-
public Packet<ClientGamePacketListener> getUpdatePacket()
91-
{
92-
return ClientboundBlockEntityDataPacket.create( this );
93-
}
94-
95-
protected void readDescription( @Nonnull CompoundTag nbt )
96-
{
97-
}
98-
99-
protected void writeDescription( @Nonnull CompoundTag nbt )
100-
{
101-
}
10276
}

0 commit comments

Comments
 (0)