More client side annotations
This commit is contained in:
parent
2686089835
commit
425458f0bd
37 changed files with 151 additions and 4 deletions
|
@ -7,6 +7,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.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
|
@ -36,11 +38,13 @@ public class BaseWeightedPlateBlock extends WeightedPressurePlateBlock implement
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||
return getBlockModel(resourceLocation, defaultBlockState());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
|
||||
Optional<String> pattern;
|
||||
|
@ -53,6 +57,7 @@ public class BaseWeightedPlateBlock extends WeightedPressurePlateBlock implement
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
String state = blockState.getValue(POWER) > 0 ? "_down" : "_up";
|
||||
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue