Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lumien.randomthings.client;
- import java.util.HashMap;
- import java.util.Iterator;
- import java.util.Map;
- import net.minecraft.block.Block;
- import net.minecraft.block.state.IBlockState;
- import net.minecraft.client.renderer.block.statemap.IStateMapper;
- import net.minecraft.client.resources.model.ModelResourceLocation;
- public class FocusStateMapper implements IStateMapper
- {
- HashMap<IBlockState, ModelResourceLocation> models;
- public FocusStateMapper(Block b, ModelResourceLocation model)
- {
- models = new HashMap<IBlockState, ModelResourceLocation>();
- Iterator iterator = b.getBlockState().getValidStates().iterator();
- while (iterator.hasNext())
- {
- IBlockState iblockstate = (IBlockState) iterator.next();
- models.put(iblockstate, model);
- }
- }
- @Override
- public Map putStateModelLocations(Block block)
- {
- return models;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement