1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-27 07:52:18 +00:00

Merge Commits from Jummit/cc-restitched PR19

This commit is contained in:
Merith 2021-05-15 06:53:14 -07:00 committed by GitHub
commit 386e01364e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 5 deletions

View File

@ -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.

View File

@ -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);

View File

@ -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);

View File

@ -36,8 +36,6 @@ import java.util.Optional;
import static dan200.computercraft.shared.peripheral.generic.methods.ArgumentHelpers.assertBetween;
/**
* Methods for interacting with inventories.
*

View File

@ -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() {