Server side crash fix
This commit is contained in:
parent
a15a01b135
commit
b0922d967f
15 changed files with 42 additions and 4 deletions
|
@ -2,6 +2,8 @@ package ru.betterend.blocks.basis;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -125,6 +127,7 @@ public class EndLanternBlock extends BaseBlockNotFull implements SimpleWaterlogg
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
String floor = blockState.getValue(IS_FLOOR) ? "_floor" : "";
|
||||
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
||||
|
|
|
@ -10,6 +10,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
|
@ -370,11 +372,13 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||
return getBlockModel(blockId, defaultBlockState());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
Map<String, String> textures = createTexturesMap();
|
||||
PedestalState state = blockState.getValue(STATE);
|
||||
|
@ -401,6 +405,7 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
PedestalState state = blockState.getValue(STATE);
|
||||
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Optional;
|
|||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
|
@ -44,6 +46,7 @@ public class StoneLanternBlock extends EndLanternBlock implements IColorProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
String blockName = resourceLocation.getPath();
|
||||
Optional<String> pattern = blockState.getValue(IS_FLOOR) ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue