From c54c8c3ea6691b863e3eb1a84f6cb4182e6efc02 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 1 Sep 2020 22:37:43 +0800 Subject: [PATCH] computers block themselves render --- gradle.properties | 2 +- .../computercraft/shared/common/BlockGeneric.java | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 94570b6df..2b14ebb17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,4 +10,4 @@ cloth_config_version=4.8.1 fabric_api_version=0.19.0+build.398-1.16 fabric_loader_version=0.9.2+build.206 jankson_version=1.2.0 -modmenu_version=1.12.2+build.17 +modmenu_version=1.14.6+ diff --git a/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java b/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java index 92801d356..bab70c3f3 100644 --- a/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java +++ b/src/main/java/dan200/computercraft/shared/common/BlockGeneric.java @@ -6,7 +6,7 @@ package dan200.computercraft.shared.common; import net.minecraft.block.Block; -import net.minecraft.block.BlockEntityProvider; +import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.block.BlockWithEntity; import net.minecraft.block.entity.BlockEntity; @@ -17,11 +17,8 @@ import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import net.minecraft.world.WorldAccess; -import net.minecraft.world.WorldView; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -37,6 +34,12 @@ public abstract class BlockGeneric extends BlockWithEntity this.type = type; } + @Override + public BlockRenderType getRenderType( BlockState state ) + { + return BlockRenderType.MODEL; + } + @Override @Deprecated public final void onStateReplaced( @Nonnull BlockState block, @Nonnull World world, @Nonnull BlockPos pos, BlockState replace, boolean bool )