Changed models loading (Done)

This commit is contained in:
Aleksey 2021-05-24 15:04:16 +03:00
parent 831faeb306
commit 5da634fc73
63 changed files with 490 additions and 729 deletions

View file

@ -9,6 +9,7 @@ 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.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Registry;
@ -67,12 +68,6 @@ public class UmbrellaTreeMembraneBlock extends SlimeBlock implements IRenderType
}
}
@Override
public Optional<String> getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
return Patterns.createJson(Patterns.BLOCK_BASE, blockId.getPath(), block);
}
@Override
public boolean propagatesSkylightDown(BlockState state, BlockGetter world, BlockPos pos) {
return state.getValue(COLOR) > 0;
@ -87,4 +82,9 @@ public class UmbrellaTreeMembraneBlock extends SlimeBlock implements IRenderType
return false;
}
}
@Override
public BlockModel getItemModel(ResourceLocation resourceLocation) {
return getBlockModel(resourceLocation, defaultBlockState());
}
}