mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
let's see if this does anything
This commit is contained in:
parent
a6ccd25119
commit
6ca2fc463a
@ -47,6 +47,7 @@
|
||||
* Fallout rain now uses the same variable length code that the MK5 uses for optimal tick utilization, making it a lot faster
|
||||
* Lighter sellafite variants should no longer replace darker ones in overlapping craters, making bombed-out landscapes look more natural
|
||||
* Fallout's range-based effects now have a more natural gradient instead of creating smooth rings
|
||||
* Fallout has been made significantly darker and less saturated to blend in with the crater more
|
||||
|
||||
## Fixed
|
||||
* Fixed dupe caused by shift-clicking ashes out of the bricked furnace
|
||||
|
||||
@ -4,13 +4,14 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import api.hbm.energy.ILoadedTile;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IFluidConnector {
|
||||
public interface IFluidConnector extends ILoadedTile {
|
||||
|
||||
/**
|
||||
* Returns the amount of fluid that remains
|
||||
|
||||
@ -90,9 +90,9 @@ public class PipeNet implements IPipeNet {
|
||||
|
||||
@Override
|
||||
public long transferFluid(long fill, int pressure) {
|
||||
|
||||
this.subscribers.removeIf(x ->
|
||||
x == null || !(x instanceof TileEntity) || ((TileEntity)x).isInvalid()
|
||||
|
||||
subscribers.removeIf(x ->
|
||||
x == null || !(x instanceof TileEntity) || ((TileEntity)x).isInvalid() || !x.isLoaded()
|
||||
);
|
||||
|
||||
if(this.subscribers.isEmpty())
|
||||
|
||||
@ -316,5 +316,18 @@ public class BlockPWR extends BlockContainer implements IBlockCT {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isLoaded = true;
|
||||
|
||||
@Override
|
||||
public boolean isLoaded() {
|
||||
return isLoaded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
this.isLoaded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,8 @@ public class Spotlight extends Block implements ISpotlight {
|
||||
this.beamLength = beamLength;
|
||||
this.type = type;
|
||||
this.isOn = isOn;
|
||||
|
||||
this.setHardness(1F);
|
||||
|
||||
if(isOn) setLightLevel(1.0F);
|
||||
}
|
||||
@ -291,23 +293,17 @@ public class Spotlight extends Block implements ISpotlight {
|
||||
}
|
||||
|
||||
protected Block getOff() {
|
||||
if(this == ModBlocks.spotlight_incandescent)
|
||||
return ModBlocks.spotlight_incandescent_off;
|
||||
if(this == ModBlocks.spotlight_fluoro)
|
||||
return ModBlocks.spotlight_fluoro_off;
|
||||
if(this == ModBlocks.spotlight_halogen)
|
||||
return ModBlocks.spotlight_halogen_off;
|
||||
if(this == ModBlocks.spotlight_incandescent) return ModBlocks.spotlight_incandescent_off;
|
||||
if(this == ModBlocks.spotlight_fluoro) return ModBlocks.spotlight_fluoro_off;
|
||||
if(this == ModBlocks.spotlight_halogen) return ModBlocks.spotlight_halogen_off;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
protected Block getOn() {
|
||||
if(this == ModBlocks.spotlight_incandescent_off)
|
||||
return ModBlocks.spotlight_incandescent;
|
||||
if(this == ModBlocks.spotlight_fluoro_off)
|
||||
return ModBlocks.spotlight_fluoro;
|
||||
if(this == ModBlocks.spotlight_halogen_off)
|
||||
return ModBlocks.spotlight_halogen;
|
||||
if(this == ModBlocks.spotlight_incandescent_off) return ModBlocks.spotlight_incandescent;
|
||||
if(this == ModBlocks.spotlight_fluoro_off) return ModBlocks.spotlight_fluoro;
|
||||
if(this == ModBlocks.spotlight_halogen_off) return ModBlocks.spotlight_halogen;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -72,8 +72,10 @@ public class AudioWrapperClient extends AudioWrapper {
|
||||
|
||||
@Override
|
||||
public void stopSound() {
|
||||
if(sound != null)
|
||||
if(sound != null) {
|
||||
sound.stop();
|
||||
sound.setKeepAlive(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -271,7 +271,6 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
|
||||
if(this.state == 1 && state == 2){ // Door transitioning to closed
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
}
|
||||
|
||||
if(doorType.getCloseSoundLoop() != null){
|
||||
@ -294,12 +293,10 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
|
||||
if(state == 1 || state == 0){ // Door finished any transition
|
||||
if(audio != null){
|
||||
audio.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
audio = null;
|
||||
}
|
||||
if(audio2 != null){
|
||||
audio2.stopSound();
|
||||
audio.setKeepAlive(0);
|
||||
audio2 = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -325,4 +325,16 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
||||
return bb;
|
||||
}
|
||||
|
||||
public boolean isLoaded = true;
|
||||
|
||||
@Override
|
||||
public boolean isLoaded() {
|
||||
return isLoaded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
this.isLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,4 +153,17 @@ public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("type", this.type.getID());
|
||||
}
|
||||
|
||||
public boolean isLoaded = true;
|
||||
|
||||
@Override
|
||||
public boolean isLoaded() {
|
||||
return isLoaded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
this.isLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,4 +112,17 @@ public class TileEntityPipeExhaust extends TileEntity implements IFluidConductor
|
||||
if(type == Fluids.SMOKE_LEADED) nets[1] = network;
|
||||
if(type == Fluids.SMOKE_POISON) nets[2] = network;
|
||||
}
|
||||
|
||||
public boolean isLoaded = true;
|
||||
|
||||
@Override
|
||||
public boolean isLoaded() {
|
||||
return isLoaded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
this.isLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 745 B |
Loading…
x
Reference in New Issue
Block a user