1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-06 08:22:59 +00:00

fix: computer, monitor, disk drive and some turtle are works

This commit is contained in:
Nikita Savyolov
2021-09-30 14:46:33 +03:00
parent e4271ff6f7
commit 121ef6e976
48 changed files with 1030 additions and 661 deletions

View File

@@ -35,6 +35,10 @@ public abstract class BlockGeneric extends BlockWithEntity
this.type = type;
}
public BlockEntityType<? extends TileGeneric> getType() {
return type;
}
@Override
public BlockRenderType getRenderType( BlockState state )
{
@@ -96,6 +100,9 @@ public abstract class BlockGeneric extends BlockWithEntity
@Override
public BlockEntity createBlockEntity(BlockPos pos, BlockState state)
{
return type.instantiate(pos, state);
if (this.type != null) {
return type.instantiate(pos, state);
}
return null;
}
}