mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 23:13:09 +00:00
Fix pump rendering, pool cart rendering. Made pool cart spawn particles
This commit is contained in:
6 files changed
+28
-106
No files matched your search
@@ -38,7 +38,6 @@ public class RenderTilePool extends TileEntitySpecialRenderer<TilePool> {
|
||||
|
||||
// Overrides for when we call this TESR without an actual pool
|
||||
public static PoolVariant forceVariant = PoolVariant.DEFAULT;
|
||||
public static boolean forceMana = false;
|
||||
public static int forceManaNumber = -1;
|
||||
|
||||
@Override
|
||||
@@ -63,16 +62,20 @@ public class RenderTilePool extends TileEntitySpecialRenderer<TilePool> {
|
||||
boolean fab = pool == null ? forceVariant == PoolVariant.FABULOUS : pool.getWorld().getBlockState(pool.getPos()).getValue(BotaniaStateProps.POOL_VARIANT) == PoolVariant.FABULOUS;
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
int color = 0xFFFFFF;
|
||||
|
||||
if (fab) {
|
||||
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
|
||||
if(pool != null)
|
||||
time += new Random(pool.getPos().getX() ^ pool.getPos().getY() ^ pool.getPos().getZ()).nextInt(100000);
|
||||
int color = Color.getHSBColor(time * 0.005F, 0.6F, 1F).hashCode();
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(pool == null ? ModBlocks.pool.getDefaultState().withProperty(BotaniaStateProps.POOL_VARIANT, forceVariant) : pool.getWorld().getBlockState(pool.getPos()));
|
||||
color = Color.getHSBColor(time * 0.005F, 0.6F, 1F).hashCode();
|
||||
}
|
||||
|
||||
if (fab || forceManaNumber > -1) {
|
||||
int red = (color & 0xFF0000) >> 16;
|
||||
int green = (color & 0xFF00) >> 8;
|
||||
int blue = (color & 0xFF);
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(pool == null ? ModBlocks.pool.getDefaultState().withProperty(BotaniaStateProps.POOL_VARIANT, forceVariant) : pool.getWorld().getBlockState(pool.getPos()));
|
||||
Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(model, 1.0F, red / 255F, green / 255F, blue / 255F);
|
||||
}
|
||||
|
||||
@@ -86,8 +89,6 @@ public class RenderTilePool extends TileEntitySpecialRenderer<TilePool> {
|
||||
cap = TilePool.MAX_MANA;
|
||||
|
||||
float waterLevel = (float) mana / (float) cap * 0.4F;
|
||||
if(forceMana)
|
||||
waterLevel = 0.4F;
|
||||
|
||||
float s = 1F / 16F;
|
||||
float v = 1F / 8F;
|
||||
@@ -138,7 +139,6 @@ public class RenderTilePool extends TileEntitySpecialRenderer<TilePool> {
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
forceVariant = PoolVariant.DEFAULT;
|
||||
forceMana = false;
|
||||
forceManaNumber = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user