Advertisement
Guest User

Untitled

a guest
Mar 8th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. @SubscribeEvent
  2.     public void textureStitch(TextureStitchEvent.Pre event) {
  3.        
  4.         TextureMap map = event.map;
  5.        
  6.         for(ResourceLocation tex : BlockRegister.textures) {
  7.            
  8.             map.getTextureExtry(tex.toString());
  9.             TextureAtlasSprite texture = map.getTextureExtry(tex.toString());
  10.            
  11.             if(texture == null) {
  12.                 texture = ModelLoader.defaultTextureGetter().apply(tex);
  13.                 map.setTextureEntry(tex.toString(), texture);
  14.             }
  15.         }
  16.  
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement