diff --git a/patchwork.md b/patchwork.md index cc9b68710..46f21aa62 100644 --- a/patchwork.md +++ b/patchwork.md @@ -422,3 +422,43 @@ The config still uses a `blacklist` and `whitelist` array. Added improved help viewer (#595) ``` Didn't port the lua tests over. + +``` +737b3cb57696fb5517252e7db38bc88ce960b4d8 + +Don't use capabilities for generic peripherals +``` +Not ported, related to forges capability system which is not used in the port. + +``` +ea3a16036794357c3a44edffc90fdb652e03881e + +Remove a couple of todos +``` + +``` +bb8f4c624bf87169b73fb631d8250cfc38181e15 + +Some sanity checks for get{Direction,Orientation} +``` +Use `getCachedState` instead of forge's `getBlockState` and `contains` instead of `has`. + +``` +05c3c8ad3269c9025757f9261e7f609889fb6bdc + +Generate docs for generic peripherals +``` +Skipped everything except some removed whitespace. + +``` +85cf2d5ff1b63010de4661301801aa504e5b9015 + +Docs for energy and inventory methods +``` +and +``` +5865e9c41a0140b9f1acdd2fb095353c467fbb45 + +Not sure what irritates me more +``` +both skipped because the changes where already ported. \ No newline at end of file diff --git a/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java b/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java index 79d9dad5b..251b0d4c3 100644 --- a/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java +++ b/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java @@ -76,7 +76,6 @@ public final class ComputerCraftProxyClient implements ClientModInitializer { BlockEntityRendererRegistry.INSTANCE.register(ComputerCraftRegistry.ModTiles.MONITOR_ADVANCED, TileEntityMonitorRenderer::new); BlockEntityRendererRegistry.INSTANCE.register(ComputerCraftRegistry.ModTiles.TURTLE_NORMAL, TileEntityTurtleRenderer::new); BlockEntityRendererRegistry.INSTANCE.register(ComputerCraftRegistry.ModTiles.TURTLE_ADVANCED, TileEntityTurtleRenderer::new); - // TODO: ClientRegistry.bindTileEntityRenderer( TileCable.FACTORY, x -> new TileEntityCableRenderer() ); ClientSpriteRegistryCallback.event(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE) .register(ClientRegistry::onTextureStitchEvent); diff --git a/src/main/java/dan200/computercraft/client/render/MonitorTextureBufferShader.java b/src/main/java/dan200/computercraft/client/render/MonitorTextureBufferShader.java index a1e28598a..882d8582f 100644 --- a/src/main/java/dan200/computercraft/client/render/MonitorTextureBufferShader.java +++ b/src/main/java/dan200/computercraft/client/render/MonitorTextureBufferShader.java @@ -49,7 +49,6 @@ class MonitorTextureBufferShader { RenderSystem.glUniform1i(uniformWidth, width); RenderSystem.glUniform1i(uniformHeight, height); - // TODO: Cache this? Maybe?? PALETTE_BUFFER.rewind(); for (int i = 0; i < 16; i++) { double[] colour = palette.getColour(i); diff --git a/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java b/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java index 6642cccf2..76186fc24 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/generic/methods/InventoryMethods.java @@ -36,8 +36,6 @@ import java.util.Optional; import static dan200.computercraft.shared.peripheral.generic.methods.ArgumentHelpers.assertBetween; - - /** * Methods for interacting with inventories. * diff --git a/src/main/java/dan200/computercraft/shared/peripheral/monitor/TileMonitor.java b/src/main/java/dan200/computercraft/shared/peripheral/monitor/TileMonitor.java index aa520479d..d677099f3 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/monitor/TileMonitor.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/monitor/TileMonitor.java @@ -218,7 +218,10 @@ public class TileMonitor extends TileGeneric implements IPeripheralTile { // region Sizing and placement stuff public Direction getDirection() { - return this.getCachedState().get(BlockMonitor.FACING); + // Ensure we're actually a monitor block. This _should_ always be the case, but sometimes there's + // fun problems with the block being missing on the client. + BlockState state = getCachedState(); + return state.contains( BlockMonitor.FACING ) ? state.get( BlockMonitor.FACING ) : Direction.NORTH; } public Direction getOrientation() {