Blocks (update 1 of 20)

This commit is contained in:
SD 2021-02-11 21:39:07 +05:30
parent b74fce581c
commit 81dd12c48c
No known key found for this signature in database
GPG key ID: E36B57EE08544BC5
13 changed files with 86 additions and 84 deletions

View file

@ -82,17 +82,13 @@ public class DimensionalDoorsInitializer implements ModInitializer {
Targets.registerDefaultTargets(); Targets.registerDefaultTargets();
VirtualTarget.VirtualTargetType.register(); VirtualTarget.VirtualTargetType.register();
VirtualSingularPocket.VirtualSingularPocketType.register(); VirtualSingularPocket.VirtualSingularPocketType.register();
Modifier.ModifierType.register(); Modifier.ModifierType.register();
PocketGenerator.PocketGeneratorType.register(); PocketGenerator.PocketGeneratorType.register();
SchematicV2Handler.getInstance().load(); SchematicV2Handler.getInstance().load();
SchematicHandler.INSTANCE.loadSchematics(); SchematicHandler.INSTANCE.loadSchematics();
AttackBlockCallback.EVENT.register(RiftConfigurationToolItem::onAttackBlockCallback); AttackBlockCallback.EVENT.register(RiftConfigurationToolItem::onAttackBlockCallback);
ServerPlayNetworking.registerGlobalReceiver(HitBlockS2CPacket.ID, RiftConfigurationToolItem::receiveHitBlock); ServerPlayNetworking.registerGlobalReceiver(HitBlockS2CPacket.ID, RiftConfigurationToolItem::receiveHitBlock);

View file

@ -3,18 +3,20 @@ package org.dimdev.dimdoors.block;
import java.util.Random; import java.util.Random;
import org.dimdev.dimdoors.block.entity.DetachedRiftBlockEntity; import org.dimdev.dimdoors.block.entity.DetachedRiftBlockEntity;
import org.dimdev.dimdoors.particle.client.RiftParticle; import org.dimdev.dimdoors.block.entity.ModBlockEntityTypes;
import org.dimdev.dimdoors.particle.client.RiftParticleEffect; import org.dimdev.dimdoors.particle.client.RiftParticleEffect;
import org.dimdev.dimdoors.world.ModDimensions; import org.dimdev.dimdoors.world.ModDimensions;
import org.jetbrains.annotations.Nullable;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.MaterialColor; import net.minecraft.block.BlockWithEntity;
import net.minecraft.block.MapColor;
import net.minecraft.block.ShapeContext; import net.minecraft.block.ShapeContext;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.MinecraftClient; import net.minecraft.block.entity.BlockEntityTicker;
import net.minecraft.client.world.ClientWorld; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape; import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes; import net.minecraft.util.shape.VoxelShapes;
@ -24,7 +26,7 @@ import net.minecraft.world.World;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
public class DetachedRiftBlock extends Block implements RiftProvider<DetachedRiftBlockEntity> { public class DetachedRiftBlock extends BlockWithEntity implements RiftProvider<DetachedRiftBlockEntity> {
public static final String ID = "rift"; public static final String ID = "rift";
public DetachedRiftBlock(Block.Settings settings) { public DetachedRiftBlock(Block.Settings settings) {
@ -32,13 +34,8 @@ public class DetachedRiftBlock extends Block implements RiftProvider<DetachedRif
} }
@Override @Override
public BlockEntity createBlockEntity(BlockView blockView) { public MapColor getDefaultMapColor() {
return new DetachedRiftBlockEntity(); return MapColor.BLACK;
}
@Override
public MaterialColor getDefaultMaterialColor() {
return MaterialColor.BLACK;
} }
@Override @Override
@ -91,4 +88,16 @@ public class DetachedRiftBlock extends Block implements RiftProvider<DetachedRif
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return VoxelShapes.fullCube(); return VoxelShapes.fullCube();
} }
@Nullable
@Override
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
return new DetachedRiftBlockEntity(pos, state);
}
@Nullable
@Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
return checkType(type, ModBlockEntityTypes.DETACHED_RIFT, DetachedRiftBlockEntity::tick);
}
} }

View file

@ -1,8 +1,8 @@
package org.dimdev.dimdoors.block; package org.dimdev.dimdoors.block;
import io.github.boogiemonster1o1.libcbe.api.ConditionalBlockEntityProvider;
import org.dimdev.dimdoors.block.entity.DetachedRiftBlockEntity; import org.dimdev.dimdoors.block.entity.DetachedRiftBlockEntity;
import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity; import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity;
import org.jetbrains.annotations.Nullable;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.DoorBlock; import net.minecraft.block.DoorBlock;
@ -22,7 +22,7 @@ import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import net.minecraft.world.World; import net.minecraft.world.World;
public class DimensionalDoorBlock extends DoorBlock implements RiftProvider<EntranceRiftBlockEntity>, ConditionalBlockEntityProvider { public class DimensionalDoorBlock extends DoorBlock implements RiftProvider<EntranceRiftBlockEntity> {
public DimensionalDoorBlock(Settings settings) { public DimensionalDoorBlock(Settings settings) {
super(settings); super(settings);
} }
@ -55,14 +55,13 @@ public class DimensionalDoorBlock extends DoorBlock implements RiftProvider<Entr
return super.canReplace(state, context) || state.getBlock() == ModBlocks.DETACHED_RIFT; return super.canReplace(state, context) || state.getBlock() == ModBlocks.DETACHED_RIFT;
} }
@Nullable
@Override @Override
public BlockEntity createBlockEntity(BlockView world) { public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
return new EntranceRiftBlockEntity(); if (state.get(DoorBlock.HALF) == DoubleBlockHalf.LOWER) {
} return null;
}
@Override return new EntranceRiftBlockEntity(pos, state);
public boolean hasBlockEntity(BlockState blockState) {
return blockState.get(DoorBlock.HALF) == DoubleBlockHalf.LOWER;
} }
@Override @Override

View file

@ -1,18 +1,14 @@
package org.dimdev.dimdoors.block; package org.dimdev.dimdoors.block;
import org.dimdev.dimdoors.DimensionalDoorsInitializer;
import org.dimdev.dimdoors.block.entity.DetachedRiftBlockEntity; import org.dimdev.dimdoors.block.entity.DetachedRiftBlockEntity;
import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity; import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity;
import org.dimdev.dimdoors.util.TeleportUtil; import org.jetbrains.annotations.Nullable;
import org.dimdev.dimdoors.world.ModDimensions;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.DoorBlock;
import net.minecraft.block.HorizontalFacingBlock; import net.minecraft.block.HorizontalFacingBlock;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.enums.DoubleBlockHalf;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.state.StateManager; import net.minecraft.state.StateManager;
import net.minecraft.state.property.DirectionProperty; import net.minecraft.state.property.DirectionProperty;
@ -37,9 +33,10 @@ public class DimensionalPortalBlock extends Block implements RiftProvider<Entran
return (EntranceRiftBlockEntity) world.getBlockEntity(pos); return (EntranceRiftBlockEntity) world.getBlockEntity(pos);
} }
@Nullable
@Override @Override
public BlockEntity createBlockEntity(BlockView world) { public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
return new EntranceRiftBlockEntity(); return new EntranceRiftBlockEntity(pos, state);
} }
@Override @Override

View file

@ -1,6 +1,7 @@
package org.dimdev.dimdoors.block; package org.dimdev.dimdoors.block;
import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity; import org.dimdev.dimdoors.block.entity.EntranceRiftBlockEntity;
import org.jetbrains.annotations.Nullable;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -18,7 +19,6 @@ import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import net.minecraft.world.World; import net.minecraft.world.World;
// TODO: Make this placeable on rifts // TODO: Make this placeable on rifts
public class DimensionalTrapdoorBlock extends TrapdoorBlock implements RiftProvider<EntranceRiftBlockEntity> { public class DimensionalTrapdoorBlock extends TrapdoorBlock implements RiftProvider<EntranceRiftBlockEntity> {
public DimensionalTrapdoorBlock(Block.Settings settings) { public DimensionalTrapdoorBlock(Block.Settings settings) {
@ -33,9 +33,10 @@ public class DimensionalTrapdoorBlock extends TrapdoorBlock implements RiftProvi
} }
} }
@Nullable
@Override @Override
public BlockEntity createBlockEntity(BlockView blockView) { public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
return new EntranceRiftBlockEntity(); return new EntranceRiftBlockEntity(pos, state);
} }
@Override @Override

View file

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockEntityProvider;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@ -34,7 +35,7 @@ public class FabricBlock extends Block {
if (world.canPlayerModifyAt(player, pos) && if (world.canPlayerModifyAt(player, pos) &&
player.canPlaceOn(pos, hit.getSide(), heldStack) && player.canPlaceOn(pos, hit.getSide(), heldStack) &&
heldBlock.getDefaultState().isFullCube(world, pos) && heldBlock.getDefaultState().isFullCube(world, pos) &&
!heldBlock.hasBlockEntity() && !(heldBlock instanceof BlockEntityProvider) &&
heldBlock != this && heldBlock != this &&
!player.isSneaking() && !player.isSneaking() &&
!(heldBlock instanceof FabricBlock) !(heldBlock instanceof FabricBlock)

View file

@ -2,6 +2,7 @@ package org.dimdev.dimdoors.block;
import net.minecraft.block.Block; import net.minecraft.block.Block;
// TODO
public class MarkingPlateBlock extends Block { public class MarkingPlateBlock extends Block {
public MarkingPlateBlock(Settings settings) { public MarkingPlateBlock(Settings settings) {
super(settings); super(settings);

View file

@ -6,18 +6,20 @@ import org.dimdev.dimdoors.DimensionalDoorsInitializer;
import org.dimdev.dimdoors.block.ModBlocks; import org.dimdev.dimdoors.block.ModBlocks;
import org.dimdev.dimdoors.util.TeleportUtil; import org.dimdev.dimdoors.util.TeleportUtil;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnReason; import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.mob.EndermanEntity; import net.minecraft.entity.mob.EndermanEntity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.Tickable; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
public class DetachedRiftBlockEntity extends RiftBlockEntity implements Tickable { public class DetachedRiftBlockEntity extends RiftBlockEntity {
private static final Random random = new Random(); private static final Random random = new Random();
public boolean closing = false; public boolean closing = false;
@ -30,40 +32,47 @@ public class DetachedRiftBlockEntity extends RiftBlockEntity implements Tickable
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public double renderAngle; public double renderAngle;
public DetachedRiftBlockEntity() { public DetachedRiftBlockEntity(BlockPos pos, BlockState state) {
super(ModBlockEntityTypes.DETACHED_RIFT); super(ModBlockEntityTypes.DETACHED_RIFT, pos, state);
} }
@Override public static void tick(World world, BlockPos pos, BlockState state, DetachedRiftBlockEntity blockEntity) {
public void tick() { if (world == null) {
if (this.world == null) {
// DynamicRegistryManager
return; return;
} }
if (this.world.getBlockState(this.pos).getBlock() != ModBlocks.DETACHED_RIFT) { if (state.getBlock() != ModBlocks.DETACHED_RIFT) {
this.markInvalid(); blockEntity.markRemoved();
return; return;
} }
if (!this.world.isClient() && random.nextDouble() < DimensionalDoorsInitializer.CONFIG.getGeneralConfig().endermanSpawnChance) { if (!world.isClient() && random.nextDouble() < DimensionalDoorsInitializer.CONFIG.getGeneralConfig().endermanSpawnChance) {
EndermanEntity enderman = EntityType.ENDERMAN.spawn((ServerWorld) this.world, null, null, null, this.pos, SpawnReason.STRUCTURE, false, false); EndermanEntity enderman = EntityType.ENDERMAN.spawn(
(ServerWorld) world,
null,
null,
null,
pos,
SpawnReason.STRUCTURE,
false,
false
);
if (random.nextDouble() < DimensionalDoorsInitializer.CONFIG.getGeneralConfig().endermanAggressiveChance) { if (random.nextDouble() < DimensionalDoorsInitializer.CONFIG.getGeneralConfig().endermanAggressiveChance) {
if (enderman != null) { if (enderman != null) {
enderman.setTarget(this.world.getClosestPlayer(enderman, 50)); enderman.setTarget(world.getClosestPlayer(enderman, 50));
} }
} }
} }
if (this.closing) { if (blockEntity.closing) {
if (this.size > 0) { if (blockEntity.size > 0) {
this.size -= DimensionalDoorsInitializer.CONFIG.getGeneralConfig().riftCloseSpeed; blockEntity.size -= DimensionalDoorsInitializer.CONFIG.getGeneralConfig().riftCloseSpeed;
} else { } else {
this.world.removeBlock(this.pos, false); world.removeBlock(pos, false);
} }
} else if (!this.stabilized) { } else if (!blockEntity.stabilized) {
this.size += DimensionalDoorsInitializer.CONFIG.getGeneralConfig().riftGrowthSpeed / (this.size + 1); blockEntity.size += DimensionalDoorsInitializer.CONFIG.getGeneralConfig().riftGrowthSpeed / (blockEntity.size + 1);
} }
} }

View file

@ -10,17 +10,18 @@ import net.minecraft.block.DoorBlock;
import net.minecraft.block.HorizontalFacingBlock; import net.minecraft.block.HorizontalFacingBlock;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
public class EntranceRiftBlockEntity extends RiftBlockEntity { public class EntranceRiftBlockEntity extends RiftBlockEntity {
public EntranceRiftBlockEntity() { public EntranceRiftBlockEntity(BlockPos pos, BlockState state) {
super(ModBlockEntityTypes.ENTRANCE_RIFT); super(ModBlockEntityTypes.ENTRANCE_RIFT, pos, state);
} }
@Override @Override
public void fromTag(BlockState state, CompoundTag nbt) { public void fromTag(CompoundTag nbt) {
super.fromTag(state, nbt); super.fromTag(nbt);
} }
@Override @Override

View file

@ -1,8 +1,5 @@
package org.dimdev.dimdoors.block.entity; package org.dimdev.dimdoors.block.entity;
import java.util.function.Supplier;
import com.google.common.collect.Sets;
import org.dimdev.dimdoors.block.ModBlocks; import org.dimdev.dimdoors.block.ModBlocks;
import org.dimdev.dimdoors.client.DetachedRiftBlockEntityRenderer; import org.dimdev.dimdoors.client.DetachedRiftBlockEntityRenderer;
import org.dimdev.dimdoors.client.EntranceRiftBlockEntityRenderer; import org.dimdev.dimdoors.client.EntranceRiftBlockEntityRenderer;
@ -15,6 +12,7 @@ import net.minecraft.util.registry.Registry;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry; import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
public class ModBlockEntityTypes { public class ModBlockEntityTypes {
public static final BlockEntityType<DetachedRiftBlockEntity> DETACHED_RIFT = register( public static final BlockEntityType<DetachedRiftBlockEntity> DETACHED_RIFT = register(
@ -27,8 +25,8 @@ public class ModBlockEntityTypes {
EntranceRiftBlockEntity::new, EntranceRiftBlockEntity::new,
ModBlocks.OAK_DIMENSIONAL_DOOR, ModBlocks.IRON_DIMENSIONAL_DOOR, ModBlocks.GOLD_DIMENSIONAL_DOOR, ModBlocks.QUARTZ_DIMENSIONAL_DOOR, ModBlocks.DIMENSIONAL_PORTAL); ModBlocks.OAK_DIMENSIONAL_DOOR, ModBlocks.IRON_DIMENSIONAL_DOOR, ModBlocks.GOLD_DIMENSIONAL_DOOR, ModBlocks.QUARTZ_DIMENSIONAL_DOOR, ModBlocks.DIMENSIONAL_PORTAL);
private static <E extends BlockEntity> BlockEntityType<E> register(String id, Supplier<E> supplier, Block... blocks) { private static <E extends BlockEntity> BlockEntityType<E> register(String id, FabricBlockEntityTypeBuilder.Factory<E> factory, Block... blocks) {
return Registry.register(Registry.BLOCK_ENTITY_TYPE, id, BlockEntityType.Builder.create(supplier, blocks).build(null)); return Registry.register(Registry.BLOCK_ENTITY_TYPE, id, FabricBlockEntityTypeBuilder.create(factory, blocks).build());
} }
public static void init() { public static void init() {
@ -37,7 +35,7 @@ public class ModBlockEntityTypes {
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public static void initClient() { public static void initClient() {
BlockEntityRendererRegistry.INSTANCE.register(ModBlockEntityTypes.ENTRANCE_RIFT, EntranceRiftBlockEntityRenderer::new); BlockEntityRendererRegistry.INSTANCE.register(ModBlockEntityTypes.ENTRANCE_RIFT, ctx -> new EntranceRiftBlockEntityRenderer());
BlockEntityRendererRegistry.INSTANCE.register(ModBlockEntityTypes.DETACHED_RIFT, DetachedRiftBlockEntityRenderer::new); BlockEntityRendererRegistry.INSTANCE.register(ModBlockEntityTypes.DETACHED_RIFT, ctx -> new DetachedRiftBlockEntityRenderer());
} }
} }

View file

@ -26,6 +26,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.text.LiteralText; import net.minecraft.text.LiteralText;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.fabricmc.fabric.api.block.entity.BlockEntityClientSerializable; import net.fabricmc.fabric.api.block.entity.BlockEntityClientSerializable;
@ -37,16 +38,15 @@ public abstract class RiftBlockEntity extends BlockEntity implements BlockEntity
@NotNull @NotNull
protected RiftData data = new RiftData(); protected RiftData data = new RiftData();
protected boolean riftStateChanged; // not saved protected boolean riftStateChanged;
public RiftBlockEntity(BlockEntityType<? extends RiftBlockEntity> type) { public RiftBlockEntity(BlockEntityType<? extends RiftBlockEntity> type, BlockPos pos, BlockState state) {
super(type); super(type, pos, state);
} }
// NBT
@Override @Override
public void fromTag(BlockState state, CompoundTag nbt) { public void fromTag(CompoundTag nbt) {
super.fromTag(state, nbt); super.fromTag(nbt);
this.deserialize(nbt); this.deserialize(nbt);
} }

View file

@ -21,17 +21,13 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class DetachedRiftBlockEntityRenderer extends BlockEntityRenderer<DetachedRiftBlockEntity> { public class DetachedRiftBlockEntityRenderer implements BlockEntityRenderer<DetachedRiftBlockEntity> {
public static final Identifier TESSERACT_PATH = new Identifier("dimdoors:textures/other/tesseract.png"); public static final Identifier TESSERACT_PATH = new Identifier("dimdoors:textures/other/tesseract.png");
private final RGBA color = new RGBA(1, 0.5f, 1, 1); private final RGBA color = new RGBA(1, 0.5f, 1, 1);
private static final Tesseract TESSERACT = new Tesseract(); private static final Tesseract TESSERACT = new Tesseract();
private static final RiftCurves.PolygonInfo CURVE = RiftCurves.CURVES.get(0); private static final RiftCurves.PolygonInfo CURVE = RiftCurves.CURVES.get(0);
public DetachedRiftBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
super(dispatcher);
}
@Override @Override
public void render(DetachedRiftBlockEntity rift, float tickDelta, MatrixStack matrices, VertexConsumerProvider vcs, int breakProgress, int alpha) { public void render(DetachedRiftBlockEntity rift, float tickDelta, MatrixStack matrices, VertexConsumerProvider vcs, int breakProgress, int alpha) {
if (DimensionalDoorsInitializer.CONFIG.getGraphicsConfig().showRiftCore) { if (DimensionalDoorsInitializer.CONFIG.getGraphicsConfig().showRiftCore) {

View file

@ -13,13 +13,7 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class EntranceRiftBlockEntityRenderer extends BlockEntityRenderer<EntranceRiftBlockEntity> { public class EntranceRiftBlockEntityRenderer implements BlockEntityRenderer<EntranceRiftBlockEntity> {
private static final Random RANDOM = new Random(31100L);
public EntranceRiftBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
super(blockEntityRenderDispatcher);
}
@Override @Override
public void render(EntranceRiftBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { public void render(EntranceRiftBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
DimensionalPortalRenderer.renderWithTransforms( DimensionalPortalRenderer.renderWithTransforms(