Fix a load of null issues, and get it to sort of work.
This commit is contained in:
parent
65e651f402
commit
528fecc2b5
35 changed files with 101 additions and 87 deletions
|
@ -132,6 +132,7 @@ public class ClientProxy extends CommonProxy {
|
|||
|
||||
@Override
|
||||
public void registerFluidBlockRendering(Block block, String name) {
|
||||
name = name.toLowerCase();
|
||||
super.registerFluidBlockRendering(block, name);
|
||||
final ModelResourceLocation fluidLocation = new ModelResourceLocation(ModInfo.MOD_ID.toLowerCase() + ":fluids", name);
|
||||
|
||||
|
@ -146,13 +147,15 @@ public class ClientProxy extends CommonProxy {
|
|||
|
||||
@Override
|
||||
public void registerCustomBlockSateLocation(Block block, String resourceLocation) {
|
||||
resourceLocation = resourceLocation.toLowerCase();
|
||||
super.registerCustomBlockSateLocation(block, resourceLocation);
|
||||
String finalResourceLocation = resourceLocation;
|
||||
ModelLoader.setCustomStateMapper(block, new DefaultStateMapper() {
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(state.getBlock()).getResourceDomain();
|
||||
String propertyString = getPropertyString(state.getProperties());
|
||||
return new ModelResourceLocation(resourceDomain + ':' + resourceLocation, propertyString);
|
||||
return new ModelResourceLocation(resourceDomain + ':' + finalResourceLocation, propertyString);
|
||||
}
|
||||
});
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(block).getResourceDomain();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue