Merge PR #7 from MoreThanHidden/1.10-rv3-rendering - Particle Texture Atlas Added
Merge PR #7 from MoreThanHidden/1.10-rv3-rendering - Particle Texture Atlas Added. Closes #6.
This commit is contained in:
@@ -48,12 +48,14 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.MouseEvent;
|
||||
import net.minecraftforge.client.event.RenderLivingEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import appeng.api.parts.CableRenderMode;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.textures.ParticleTextures;
|
||||
import appeng.client.render.effects.AssemblerFX;
|
||||
import appeng.client.render.effects.CraftingFx;
|
||||
import appeng.client.render.effects.EnergyFx;
|
||||
@@ -115,7 +117,7 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
if( feature instanceof AEBaseBlock )
|
||||
{
|
||||
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler( new AEBaseBlockColor(), ( Block ) feature );
|
||||
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler( new AEBaseBlockColor(), (Block) feature );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +140,7 @@ public class ClientHelper extends ServerHelper
|
||||
@Override
|
||||
public void bindTileEntitySpecialRenderer( final Class<? extends TileEntity> tile, final AEBaseBlock blk )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -404,6 +406,12 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTextureStitch( final TextureStitchEvent.Pre event )
|
||||
{
|
||||
ParticleTextures.registerSprite( event );
|
||||
}
|
||||
|
||||
private static class IconReg
|
||||
{
|
||||
public final String name;
|
||||
@@ -428,6 +436,7 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class AEBaseBlockColor implements IBlockColor
|
||||
{
|
||||
|
||||
@@ -436,16 +445,16 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
return tintIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ItemPaintBallColor implements IItemColor
|
||||
{
|
||||
|
||||
@Override
|
||||
public int getColorFromItemstack( ItemStack stack, int tintIndex )
|
||||
{
|
||||
final AEColor col = ( ( ItemPaintBall ) stack.getItem() ).getColor( stack );
|
||||
final AEColor col = ( (ItemPaintBall) stack.getItem() ).getColor( stack );
|
||||
|
||||
final int colorValue = stack.getItemDamage() >= 20 ? col.mediumVariant : col.mediumVariant;
|
||||
final int r = ( colorValue >> 16 ) & 0xff;
|
||||
@@ -463,6 +472,5 @@ public class ClientHelper extends ServerHelper
|
||||
return r << 16 | g << 8 | b | 0xff << 24;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user