mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 18:55:06 +00:00
Change package name for realsies now :P
This commit is contained in:
1 parent
ae90e8e7ff
commit
8a046b19df
138 files changed
+491
-438
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class TextureSubmap
|
||||
{
|
||||
public int width, height;
|
||||
public IIcon icon;
|
||||
public IIcon icons[];
|
||||
|
||||
public TextureSubmap(IIcon i, int w, int h)
|
||||
{
|
||||
icon = i;
|
||||
width = w;
|
||||
height = h;
|
||||
icons = new IIcon[width * height];
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void TexturesStitched(TextureStitchEvent.Post event)
|
||||
{
|
||||
|
||||
for(int x = 0; x < width; x++)
|
||||
{
|
||||
for(int y = 0; y < height; y++)
|
||||
{
|
||||
icons[y * width + x] = new TextureVirtual(icon, width, height, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user