mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fixes
This commit is contained in:
parent
5f28c8b289
commit
2bc76661b0
@ -9,4 +9,8 @@
|
||||
## Fixed
|
||||
* Fixed pumpjack gauges not syncing properly
|
||||
* Fixed some concrete variants not being revertable into uncolored concrete
|
||||
* Fixed the ore density scanner not using proper translations for the HUD
|
||||
* Fixed the ore density scanner not using proper translations for the HUD
|
||||
* Fixed the solar boiler's rays rendering on fast graphics instead of on fancy graphics
|
||||
* Fixed hydroreactive items not exploding when submerged in water
|
||||
* Fixed fluid valves visually disconnecting when switching state
|
||||
* Fixed fluid valves no visually connecting when type is set
|
||||
@ -54,6 +54,7 @@ public class FluidValve extends FluidDuctBase implements ILookOverlay {
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
TileEntityFluidValve te = (TileEntityFluidValve) world.getTileEntity(x, y, z);
|
||||
if(meta == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.reactorStart", 1.0F, 1.0F);
|
||||
@ -62,7 +63,6 @@ public class FluidValve extends FluidDuctBase implements ILookOverlay {
|
||||
world.playSoundEffect(x, y, z, "hbm:block.reactorStart", 1.0F, 0.85F);
|
||||
}
|
||||
|
||||
TileEntityFluidValve te = (TileEntityFluidValve) world.getTileEntity(x, y, z);
|
||||
te.updateState();
|
||||
|
||||
return true;
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -32,7 +33,7 @@ public class HazardTypeHydroactive extends HazardTypeBase {
|
||||
if(RadiationConfig.disableHydro)
|
||||
return;
|
||||
|
||||
if(item.isWet()) {
|
||||
if(item.isWet() || item.worldObj.getBlock((int) Math.floor(item.posX), (int) Math.floor(item.posY), (int) Math.floor(item.posZ)).getMaterial() == Material.water) {
|
||||
item.setDead();
|
||||
item.worldObj.newExplosion(null, item.posX, item.posY + item.height * 0.5, item.posZ, level, false, true);
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ public class RenderSolarBoiler extends TileEntitySpecialRenderer {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(te instanceof TileEntitySolarBoiler && !Minecraft.getMinecraft().gameSettings.fancyGraphics) {
|
||||
if(te instanceof TileEntitySolarBoiler && Minecraft.getMinecraft().gameSettings.fancyGraphics) {
|
||||
TileEntitySolarBoiler boiler = (TileEntitySolarBoiler) te;
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
@ -1,16 +1,20 @@
|
||||
package com.hbm.tileentity.network;
|
||||
|
||||
import api.hbm.fluid.PipeNet;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityFluidValve extends TileEntityPipeBaseNT {
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
public boolean shouldConnect() {
|
||||
return this.worldObj != null && this.getBlockMetadata() == 1 && super.canUpdate();
|
||||
}
|
||||
|
||||
public void updateState() {
|
||||
|
||||
this.blockMetadata = -1; // delete cache
|
||||
|
||||
if(this.getBlockMetadata() == 0 && this.network != null) {
|
||||
this.network.destroy();
|
||||
this.network = null;
|
||||
@ -24,4 +28,9 @@ public class TileEntityFluidValve extends TileEntityPipeBaseNT {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) {
|
||||
return oldBlock != newBlock;
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor
|
||||
lastType = type;
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && canUpdate()) {
|
||||
if(!worldObj.isRemote && shouldConnect()) {
|
||||
|
||||
//we got here either because the net doesn't exist or because it's not valid, so that's safe to assume
|
||||
this.setPipeNet(type, null);
|
||||
@ -101,8 +101,7 @@ public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor
|
||||
/**
|
||||
* Only update until a power net is formed, in >99% of the cases it should be the first tick. Everything else is handled by neighbors and the net itself.
|
||||
*/
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
public boolean shouldConnect() {
|
||||
return (this.network == null || !this.network.isValid()) && !this.isInvalid();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user