Merge branch 'master' into gui-reaper

This commit is contained in:
Kogepan229 committed 2025-11-10 22:10:06 +09:00
commit 81c637c37a
7 files changed
+27 -47

No files matched your search

-1
View File
@@ -57,7 +57,6 @@ dependencies {
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.4-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.14-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.11:dev") { transitive = false }
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.4.0:dev")
}
@@ -17,10 +17,9 @@ import org.lwjgl.opengl.GL11;
import com.glodblock.github.FluidCraft;
import com.glodblock.github.client.render.tank.ModelCertusTank;
import com.glodblock.github.common.item.ItemCertusQuartzTank;
import com.glodblock.github.common.tile.TileCertusQuartzTank;
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.glodblock.github.util.ModAndClassUtil;
import com.mitchej123.hodgepodge.textures.IPatchedTextureAtlasSprite;
import cpw.mods.fml.client.registry.ClientRegistry;
@@ -35,7 +34,7 @@ public class ItemCertusQuartzTankRender implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
return type != ItemRenderType.EQUIPPED_FIRST_PERSON;
return true;
}
@Override
@@ -49,31 +48,32 @@ public class ItemCertusQuartzTankRender implements IItemRenderer {
.bindTexture(FluidCraft.resource("textures/blocks/certus_quartz_tank/map.png"));
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
GL11.glScalef(1, -1, -1);
this.model.render(0.0625f);
GL11.glScalef(1, -1, 1);
this.model.render(0.0625f);
if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
}
if (item != null && item.hasTagCompound()) {
FluidStack storedFluid = FluidStack
.loadFluidStackFromNBT(item.getTagCompound().getCompoundTag("tileEntity"));
int tankCapacity = 32000;
GL11.glRotatef(180F, 1F, 0F, 0F);
this.model.render(0.0625f);
GL11.glRotatef(180F, 1F, 0F, 0F);
if (item.getItem() instanceof ItemCertusQuartzTank itemCertusQuartzTank) {
FluidStack storedFluid = itemCertusQuartzTank.getFluid(item);
int tankCapacity = itemCertusQuartzTank.getCapacity(item);
if (storedFluid != null && storedFluid.getFluid() != null) {
IIcon fluidIcon = storedFluid.getFluid().getIcon();
if (fluidIcon == null) fluidIcon = FluidRegistry.LAVA.getIcon();
if (ModAndClassUtil.HODGEPODGE && fluidIcon instanceof IPatchedTextureAtlasSprite) {
((IPatchedTextureAtlasSprite) fluidIcon).markNeedsAnimationUpdate();
}
Tessellator tessellator = Tessellator.instance;
RenderBlocks renderer = new RenderBlocks();
GL11.glScalef(1, 1, -1);
Block waterBlock = FluidRegistry.WATER.getBlock();
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
renderer.setRenderBounds(
0.08F,
0.001F,
@@ -81,9 +81,12 @@ public class ItemCertusQuartzTankRender implements IItemRenderer {
0.92F,
(float) storedFluid.amount / (float) tankCapacity * 0.999F,
0.92F);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
Block waterBlock = FluidRegistry.WATER.getBlock();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(
(storedFluid.getFluid().getColor() >> 16 & 0xFF) / 255.0F,
@@ -13,9 +13,7 @@ import org.lwjgl.opengl.GL11;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.glodblock.github.util.ModAndClassUtil;
import com.glodblock.github.util.RenderUtil;
import com.mitchej123.hodgepodge.textures.IPatchedTextureAtlasSprite;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -46,16 +44,9 @@ public class ItemPacketRender implements IItemRenderer {
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
FluidStack fluid = ItemFluidPacket.getFluidStack(item);
int RGB = 0xFFFFFF;
if (fluid != null) {
RGB = fluid.getFluid().getColor(fluid);
}
int RGB = fluid == null ? 0xFFFFFF : fluid.getFluid().getColor(fluid);
IIcon icon = fluid == null ? FluidRegistry.WATER.getStillIcon() : fluid.getFluid().getStillIcon();
if (ModAndClassUtil.HODGEPODGE && icon instanceof IPatchedTextureAtlasSprite) {
((IPatchedTextureAtlasSprite) icon).markNeedsAnimationUpdate();
}
if (RGB != 0xFFFFFF) {
GL11.glColor3f((RGB >> 16 & 0xFF) / 255.0F, (RGB >> 8 & 0xFF) / 255.0F, (RGB & 0xFF) / 255.0F);
}
@@ -25,8 +25,7 @@ public class ModelCertusTank extends ModelBase {
this.textureHeight = 64;
this.Shape1 = new ModelRenderer(this, 0, 0);
this.Shape1.addBox(0F, 0F, 0F, 14, 16, 14);
this.Shape1.setRotationPoint(-7F, -8F, -7F);
this.Shape1.addBox(-7F, -8F, -7F, 14, 16, 14);
this.Shape1.setTextureSize(this.textureWidth, this.textureHeight);
this.Shape1.mirror = true;
setRotation(this.Shape1, 0F, 0F, 0F);
@@ -22,8 +22,7 @@ import net.minecraftforge.fluids.FluidStack;
import org.lwjgl.opengl.GL11;
import com.glodblock.github.common.item.ItemFluidDrop;
import com.glodblock.github.util.ModAndClassUtil;
import com.mitchej123.hodgepodge.textures.IPatchedTextureAtlasSprite;
import com.glodblock.github.common.storage.FluidCellInventoryHandler;
import appeng.api.AEApi;
import appeng.api.config.TerminalFontSize;
@@ -164,10 +163,6 @@ public class NEICellViewHandler implements IUsageHandler {
final int line = i % ROW_ITEM_NUM;
final int row = i / ROW_ITEM_NUM;
if (ModAndClassUtil.HODGEPODGE && icon instanceof IPatchedTextureAtlasSprite sprite) {
sprite.markNeedsAnimationUpdate();
}
tessellator.setColorRGBA(color >> 16 & 0xFF, color >> 8 & 0xFF, color & 0xFF, 0xFF);
tessellator.addVertexWithUV(
OFFSET_X + 18 * (line + 1) - 1,
@@ -33,7 +33,6 @@ public final class ModAndClassUtil {
public static boolean GTPP = false;
public static boolean WAILA = false;
public static boolean AVARITIA = false;
public static boolean HODGEPODGE = false;
public static boolean NEW_HORIZONS_CORE_MOD = false;
public static boolean isV2;
@@ -141,7 +140,6 @@ public final class ModAndClassUtil {
if (Loader.isModLoaded("miscutils")) GTPP = true;
if (Loader.isModLoaded("Waila")) WAILA = true;
if (Loader.isModLoaded("Avaritia")) AVARITIA = true;
if (Loader.isModLoaded("hodgepodge")) HODGEPODGE = true;
if (Loader.isModLoaded("dreamcraft")) NEW_HORIZONS_CORE_MOD = true;
}
}
@@ -12,8 +12,6 @@ import net.minecraft.util.IIcon;
import org.lwjgl.opengl.GL11;
import com.mitchej123.hodgepodge.textures.IPatchedTextureAtlasSprite;
import appeng.api.storage.data.IAEFluidStack;
public final class RenderUtil {
@@ -53,9 +51,6 @@ public final class RenderUtil {
if (aeFluidStack.getStackSize() > 0 && hi > 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
IIcon fluidIcon = aeFluidStack.getFluid().getStillIcon();
if (ModAndClassUtil.HODGEPODGE && fluidIcon instanceof IPatchedTextureAtlasSprite) {
((IPatchedTextureAtlasSprite) fluidIcon).markNeedsAnimationUpdate();
}
GL11.glColor3f(
(float) (aeFluidStack.getFluid().getColor() >> 16 & 255) / 255.0F,
(float) (aeFluidStack.getFluid().getColor() >> 8 & 255) / 255.0F,