mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 20:52:42 +00:00
Merge pull request #1571 from MatthiasMann/master
fixed connected textures between conduit facade and fuzed quartz
This commit is contained in:
commit
eec706b465
6 files changed
+45
-13
No files matched your search
@@ -465,10 +465,9 @@ public class EnderIO {
|
||||
FMLInterModComms.sendMessage("Railcraft", "boiler-fuel-liquid", Fluids.FIRE_WATER_NAME + "@"
|
||||
+ (Config.fireWaterPowerPerCycleRF / 10 * Config.fireWaterPowerTotalBurnTime));
|
||||
|
||||
fluidXpJuice = FluidRegistry.getFluid("xpjuice");
|
||||
if(!Loader.isModLoaded("OpenBlocks")) {
|
||||
Log.info("XP Juice registered by Ender IO.");
|
||||
fluidXpJuice = new Fluid("xpjuice").setLuminosity(10).setDensity(800).setViscosity(1500).setUnlocalizedName("eio.xpjuice");
|
||||
fluidXpJuice = new Fluid(Config.xpJuiceName).setLuminosity(10).setDensity(800).setViscosity(1500).setUnlocalizedName("eio.xpjuice");
|
||||
FluidRegistry.registerFluid(fluidXpJuice);
|
||||
itemBucketXpJuice = ItemBucketEio.create(fluidXpJuice);
|
||||
} else {
|
||||
@@ -600,9 +599,9 @@ public class EnderIO {
|
||||
PaintSourceValidator.instance.loadConfig();
|
||||
|
||||
if(fluidXpJuice == null) { //should have been registered by open blocks
|
||||
fluidXpJuice = FluidRegistry.getFluid("xpjuice");
|
||||
fluidXpJuice = FluidRegistry.getFluid(getXPJuiceName());
|
||||
if(fluidXpJuice == null) {
|
||||
Log.error("Liquid XP registration left to open blocks but could not be found.");
|
||||
Log.error("Liquid XP Juice registration left to open blocks but could not be found.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,6 +626,23 @@ public class EnderIO {
|
||||
addModIntegration();
|
||||
}
|
||||
|
||||
private static String getXPJuiceName() {
|
||||
String openBlocksXPJuiceName = null;
|
||||
|
||||
try {
|
||||
Field getField = Class.forName("openblocks.Config").getField("xpFluidId");
|
||||
openBlocksXPJuiceName = (String) getField.get(null);
|
||||
}catch(Exception e) {
|
||||
}
|
||||
|
||||
if(openBlocksXPJuiceName != null && !Config.xpJuiceName.equals(openBlocksXPJuiceName)) {
|
||||
Log.info("Overwriting XP Juice name with '" + openBlocksXPJuiceName + "' taken from OpenBlocks' config");
|
||||
return openBlocksXPJuiceName;
|
||||
}
|
||||
|
||||
return Config.xpJuiceName;
|
||||
}
|
||||
|
||||
private void addModIntegration() {
|
||||
|
||||
if(Loader.isModLoaded("TConstruct")) {
|
||||
|
||||
@@ -271,7 +271,7 @@ public class ConduitBundleRenderer extends TileEntitySpecialRenderer implements
|
||||
return BlockConduitBundle.rendererId;
|
||||
}
|
||||
|
||||
private class FacadeAccessWrapper extends IBlockAccessWrapper {
|
||||
public static class FacadeAccessWrapper extends IBlockAccessWrapper {
|
||||
|
||||
public FacadeAccessWrapper(IBlockAccess ba) {
|
||||
super(ba);
|
||||
|
||||
@@ -411,6 +411,7 @@ public final class Config {
|
||||
public static boolean enderRailTeleportPlayers = false;
|
||||
|
||||
public static int xpObeliskMaxXpLevel = Integer.MAX_VALUE;
|
||||
public static String xpJuiceName = "xpjuice";
|
||||
|
||||
public static boolean clearGlassSameTexture = false;
|
||||
public static boolean clearGlassConnectToFusedQuartz = false;
|
||||
@@ -1117,6 +1118,7 @@ public final class Config {
|
||||
"When set to true a list of all registered mobs will be dumped to config/enderio/mobTypes.txt The names are in the format required by EIOs mob blacklists.");
|
||||
|
||||
xpObeliskMaxXpLevel = config.get(sectionMisc.name, "xpObeliskMaxXpLevel", xpObeliskMaxXpLevel, "Maximum level of XP the xp obelisk can contain.").getInt();
|
||||
xpJuiceName = config.getString("xpJuiceName", sectionMisc.name, xpJuiceName, "Id of liquid XP fluid (WARNING: only for users who know what they are doing - changing this id can break worlds) - this should match the with OpenBlocks when installed");
|
||||
|
||||
clearGlassSameTexture = config.getBoolean("clearGlassSameTexture", sectionMisc.name, clearGlassSameTexture, "If true, quite clear glass will use the fused quartz border texture for the block instead of the white border.");
|
||||
clearGlassConnectToFusedQuartz = config.getBoolean("clearGlassConnectToFusedQuartz", sectionMisc.name, clearGlassConnectToFusedQuartz, "If true, quite clear glass will connect textures with fused quartz.");
|
||||
|
||||
@@ -260,13 +260,20 @@ public class TileCapBank extends TileEntityEio implements IInternalPowerHandler,
|
||||
}
|
||||
|
||||
public void setIoMode(ForgeDirection faceHit, IoMode mode, boolean updateReceptors) {
|
||||
if(mode == IoMode.NONE && faceModes == null) {
|
||||
return;
|
||||
if(mode == IoMode.NONE) {
|
||||
if(faceModes == null) {
|
||||
return;
|
||||
}
|
||||
faceModes.remove(faceHit);
|
||||
if(faceModes.isEmpty()) {
|
||||
faceModes = null;
|
||||
}
|
||||
} else {
|
||||
if(faceModes == null) {
|
||||
faceModes = new EnumMap<ForgeDirection, IoMode>(ForgeDirection.class);
|
||||
}
|
||||
faceModes.put(faceHit, mode);
|
||||
}
|
||||
if(faceModes == null) {
|
||||
faceModes = new EnumMap<ForgeDirection, IoMode>(ForgeDirection.class);
|
||||
}
|
||||
faceModes.put(faceHit, mode);
|
||||
if(updateReceptors) {
|
||||
validateModeForReceptor(faceHit);
|
||||
receptorsDirty = true;
|
||||
|
||||
@@ -14,6 +14,7 @@ import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.machine.painter.PainterUtil;
|
||||
import crazypants.enderio.machine.painter.TileEntityPaintedBlock;
|
||||
import crazypants.enderio.conduit.render.ConduitBundleRenderer.FacadeAccessWrapper;
|
||||
import crazypants.render.ConnectedTextureRenderer;
|
||||
import crazypants.render.ConnectedTextureRenderer.DefaultTextureCallback;
|
||||
import crazypants.render.CustomCubeRenderer;
|
||||
@@ -66,7 +67,13 @@ public class FusedQuartzRenderer implements ISimpleBlockRenderingHandler {
|
||||
if(te instanceof TileEntityPaintedBlock) {
|
||||
tecb = (TileEntityPaintedBlock) te;
|
||||
}
|
||||
renderFrame(blockAccess, x, y, z, tecb, false, meta);
|
||||
IBlockAccess origBa = renderer.blockAccess;
|
||||
renderer.blockAccess = new FacadeAccessWrapper(origBa);
|
||||
try {
|
||||
renderFrame(renderer.blockAccess, x, y, z, tecb, false, meta);
|
||||
} finally {
|
||||
renderer.blockAccess = origBa;
|
||||
}
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ExperienceContainer {
|
||||
}
|
||||
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
return fluid != null && fluid.getID() == EnderIO.fluidXpJuice.getID();
|
||||
return fluid != null && EnderIO.fluidXpJuice != null && fluid.getID() == EnderIO.fluidXpJuice.getID();
|
||||
}
|
||||
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
|
||||
Reference in new issue
Block a user