Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when pipes are disabled (#70)
- Loading branch information
1 parent
2a53cb5
commit cde1b81
Showing
2 changed files
with
4 additions
and
7 deletions.
There are no files selected for viewing
9 changes: 3 additions & 6 deletions
9
src/main/java/knightminer/inspirations/library/client/IgnoreAllStateMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
package knightminer.inspirations.library.client; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.client.renderer.block.model.ModelResourceLocation; | ||
import net.minecraft.client.renderer.block.statemap.StateMapperBase; | ||
|
||
public class IgnoreAllStateMapper extends StateMapperBase { | ||
|
||
private final ModelResourceLocation location; | ||
public IgnoreAllStateMapper(Block block) { | ||
this.location = new ModelResourceLocation(block.getRegistryName(), "normal"); | ||
} | ||
public static final IgnoreAllStateMapper INSTANCE = new IgnoreAllStateMapper(); | ||
private IgnoreAllStateMapper() {} | ||
|
||
@Override | ||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) { | ||
return location; | ||
return new ModelResourceLocation(state.getBlock().getRegistryName(), "normal"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters