Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/mc-1.18.x/1.18.2' into mc-1.18.x…
Browse files Browse the repository at this point in the history
…/stable
  • Loading branch information
Patbox committed Jun 19, 2022
2 parents abdfc92 + dde9871 commit 69a2c28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
9 changes: 7 additions & 2 deletions src/main/java/dan200/computercraft/shared/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public static <T extends Block> T register( String id, T value )
}

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

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

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

private static BlockBehaviour.Properties monitorProperties()
{
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2F );
}

private static BlockBehaviour.Properties turtleProperties()
{
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2.5f );
Expand Down
26 changes: 0 additions & 26 deletions src/main/java/dan200/computercraft/shared/common/TileGeneric.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
package dan200.computercraft.shared.common;

import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.ClientGamePacketListener;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
Expand All @@ -18,7 +14,6 @@
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nonnull;

Expand Down Expand Up @@ -78,25 +73,4 @@ public boolean isUsable( Player player )
return player.getCommandSenderWorld() == getLevel() &&
player.distanceToSqr( pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5 ) <= range * range;
}

@Override
public CompoundTag getUpdateTag()
{
return this.saveWithoutMetadata();
}

@Nullable
@Override
public Packet<ClientGamePacketListener> getUpdatePacket()
{
return ClientboundBlockEntityDataPacket.create( this );
}

protected void readDescription( @Nonnull CompoundTag nbt )
{
}

protected void writeDescription( @Nonnull CompoundTag nbt )
{
}
}

0 comments on commit 69a2c28

Please sign in to comment.