This commit is contained in:
raoulvdberge
2019-10-09 18:31:51 +02:00
parent f79a162d69
commit 2308c50702
3 changed files with 12 additions and 6 deletions

View File

@@ -33,6 +33,11 @@ public class ClientSetup {
new ResourceLocation(RS.ID, "block/controller/cutouts/on")
));
bakedModelOverrideRegistry.add(new ResourceLocation(RS.ID, "grid"), (base, registry) -> new FullbrightBakedModel(
base,
new ResourceLocation(RS.ID, "block/grid/cutouts/front_connected")
));
bakedModelOverrideRegistry.add(new ResourceLocation(RS.ID, "disk_drive"), (base, registry) -> new FullbrightBakedModel(
new DiskDriveBakedModel(
base,

View File

@@ -92,11 +92,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor {
}
protected void onConnectedStateChange(INetwork network, boolean state) {
BlockState blockState = world.getBlockState(pos);
if (blockState.getBlock() instanceof NodeBlock && ((NodeBlock) blockState.getBlock()).hasConnectedState()) {
world.setBlockState(pos, world.getBlockState(pos).with(NodeBlock.CONNECTED, state));
}
// NO OP
}
@Override
@@ -148,6 +144,12 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor {
couldUpdate = canUpdate;
throttlingDisabled = false;
BlockState blockState = world.getBlockState(pos);
if (blockState.getBlock() instanceof NodeBlock && ((NodeBlock) blockState.getBlock()).hasConnectedState()) {
world.setBlockState(pos, world.getBlockState(pos).with(NodeBlock.CONNECTED, canUpdate));
}
if (network != null) {
onConnectedStateChange(network, canUpdate);

View File

@@ -78,7 +78,6 @@ public class GridBlock extends NodeBlock {
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(
base,
RS.ID + ":blocks/grid/cutouts/front_connected",
RS.ID + ":blocks/grid/cutouts/crafting_front_connected",
RS.ID + ":blocks/grid/cutouts/pattern_front_connected",
RS.ID + ":blocks/grid/cutouts/fluid_front_connected"