[Change] Removed custom sign rendering in favour of vanilla Wood-Types

This commit is contained in:
Frank 2023-05-18 01:19:57 +02:00
parent 47d7673ca6
commit 62f09ff7c0
15 changed files with 185 additions and 500 deletions

View file

@ -1,7 +1,10 @@
package org.betterx.bclib.registry;
import org.betterx.bclib.BCLib;
import org.betterx.bclib.blockentities.*;
import org.betterx.bclib.blockentities.BaseBarrelBlockEntity;
import org.betterx.bclib.blockentities.BaseChestBlockEntity;
import org.betterx.bclib.blockentities.BaseFurnaceBlockEntity;
import org.betterx.bclib.blockentities.DynamicBlockEntityType;
import org.betterx.bclib.blockentities.DynamicBlockEntityType.BlockEntitySupplier;
import org.betterx.bclib.blocks.BaseBarrelBlock;
import org.betterx.bclib.blocks.BaseChestBlock;
@ -13,15 +16,16 @@ import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.SignBlockEntity;
public class BaseBlockEntities {
public static final DynamicBlockEntityType<BaseChestBlockEntity> CHEST = registerBlockEntityType(BCLib.makeID(
"chest"), BaseChestBlockEntity::new);
public static final DynamicBlockEntityType<BaseBarrelBlockEntity> BARREL = registerBlockEntityType(BCLib.makeID(
"barrel"), BaseBarrelBlockEntity::new);
public static final DynamicBlockEntityType<BaseSignBlockEntity> SIGN = registerBlockEntityType(
public static final DynamicBlockEntityType<SignBlockEntity> SIGN = registerBlockEntityType(
BCLib.makeID("sign"),
BaseSignBlockEntity::new
SignBlockEntity::new
);
public static final DynamicBlockEntityType<BaseFurnaceBlockEntity> FURNACE = registerBlockEntityType(BCLib.makeID(
"furnace"), BaseFurnaceBlockEntity::new);

View file

@ -1,7 +1,8 @@
package org.betterx.bclib.registry;
import org.betterx.bclib.client.render.BaseChestBlockEntityRenderer;
import org.betterx.bclib.client.render.BaseSignBlockEntityRenderer;
import net.minecraft.client.renderer.blockentity.SignRenderer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
@ -11,6 +12,8 @@ import net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry;
public class BaseBlockEntityRenders {
public static void register() {
BlockEntityRendererRegistry.register(BaseBlockEntities.CHEST, BaseChestBlockEntityRenderer::new);
BlockEntityRendererRegistry.register(BaseBlockEntities.SIGN, BaseSignBlockEntityRenderer::new);
//make sure we can lod signs from older worlds. Can be removed in the future
BlockEntityRendererRegistry.register(BaseBlockEntities.SIGN, SignRenderer::new);
}
}