Change models loading (yes, still WIP)
This commit is contained in:
parent
52fc329a0a
commit
2ece809541
21 changed files with 122 additions and 51 deletions
|
@ -23,6 +23,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.block.state.properties.DoorHingeSide;
|
||||
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.client.models.BlockModelProvider;
|
||||
|
@ -65,7 +66,7 @@ public class EndDoorBlock extends DoorBlock implements IRenderTypeable, BlockMod
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
public @Nullable UnbakedModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
String blockName = resourceLocation.getPath();
|
||||
DoorType doorType = getDoorType(blockState);
|
||||
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_DOOR_BOTTOM, blockName, blockName);
|
||||
|
@ -87,7 +88,7 @@ public class EndDoorBlock extends DoorBlock implements IRenderTypeable, BlockMod
|
|||
}
|
||||
|
||||
@Override
|
||||
public MultiVariant getModelVariant(ResourceLocation resourceLocation, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
public UnbakedModel getModelVariant(ResourceLocation resourceLocation, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
Direction facing = blockState.getValue(FACING);
|
||||
DoorType doorType = getDoorType(blockState);
|
||||
boolean open = blockState.getValue(OPEN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue