mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fix compat shim incorrectly subscribing receiving tanks
This commit is contained in:
parent
6db42e6d4b
commit
f00f2c7ca3
@ -11,22 +11,22 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface IFluidStandardReceiver extends IFluidStandardReceiverMK2 {
|
public interface IFluidStandardReceiver extends IFluidStandardReceiverMK2 {
|
||||||
|
|
||||||
public default void subscribeToAllAround(FluidType type, TileEntity tile) {
|
public default void subscribeToAllAround(FluidType type, TileEntity tile) {
|
||||||
subscribeToAllAround(type, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord);
|
subscribeToAllAround(type, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public default void subscribeToAllAround(FluidType type, World world, int x, int y, int z) {
|
public default void subscribeToAllAround(FluidType type, World world, int x, int y, int z) {
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
trySubscribe(type, world, x, y, z, dir);
|
trySubscribe(type, world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public default void tryUnsubscribe(FluidType type, World world, int x, int y, int z) {
|
public default void tryUnsubscribe(FluidType type, World world, int x, int y, int z) {
|
||||||
GenNode node = UniNodespace.getNode(world, x, y, z, type.getNetworkProvider());
|
GenNode node = UniNodespace.getNode(world, x, y, z, type.getNetworkProvider());
|
||||||
if(node != null && node.net != null) node.net.removeReceiver(this);
|
if(node != null && node.net != null) node.net.removeReceiver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public default void unsubscribeToAllAround(FluidType type, TileEntity tile) {
|
public default void unsubscribeToAllAround(FluidType type, TileEntity tile) {
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
tryUnsubscribe(type, tile.getWorldObj(), tile.xCoord + dir.offsetX, tile.yCoord + dir.offsetY, tile.zCoord + dir.offsetZ);
|
tryUnsubscribe(type, tile.getWorldObj(), tile.xCoord + dir.offsetX, tile.yCoord + dir.offsetY, tile.zCoord + dir.offsetZ);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user