Guest User

Untitled

a guest
Dec 31st, 2018
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. package com.ancient.spc.util;
  2.  
  3. import net.minecraft.block.state.IBlockState;
  4. import net.minecraft.client.renderer.ItemMeshDefinition;
  5. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  6. import net.minecraft.client.renderer.block.statemap.StateMapperBase;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraftforge.fluids.Fluid;
  9.  
  10. public class SPCFluidStateMapper extends StateMapperBase implements ItemMeshDefinition
  11. {
  12.     private final ModelResourceLocation loc;
  13.    
  14.     public SPCFluidStateMapper(String modId, Fluid fluid)
  15.     {
  16.         this.loc = new ModelResourceLocation(modId + ":" + fluid.getName(), "fluid");
  17.     }
  18.  
  19.     @Override
  20.     protected ModelResourceLocation getModelResourceLocation(IBlockState state)
  21.     {
  22.         return this.loc;
  23.     }
  24.  
  25.     @Override
  26.     public ModelResourceLocation getModelLocation(ItemStack stack)
  27.     {
  28.         return this.loc;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment