mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Don't break the API!
This commit is contained in:
parent
0e4967ea70
commit
a4ac7ccb81
4 changed files with 22 additions and 2 deletions
|
@ -78,7 +78,9 @@ public class ConnectionPair{
|
||||||
compound.setInteger("y"+i, relay.getY());
|
compound.setInteger("y"+i, relay.getY());
|
||||||
compound.setInteger("z"+i, relay.getZ());
|
compound.setInteger("z"+i, relay.getZ());
|
||||||
}
|
}
|
||||||
|
if(this.type != null){
|
||||||
compound.setString("Type", this.type.name());
|
compound.setString("Type", this.type.name());
|
||||||
|
}
|
||||||
compound.setBoolean("SuppressRender", this.suppressConnectionRender);
|
compound.setBoolean("SuppressRender", this.suppressConnectionRender);
|
||||||
return compound;
|
return compound;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,12 @@ public interface ILaserRelayConnectionHandler{
|
||||||
|
|
||||||
Network getNetworkFor(BlockPos relay, World world);
|
Network getNetworkFor(BlockPos relay, World world);
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, World world);
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, World world, boolean suppressConnectionRender);
|
||||||
|
|
||||||
boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world);
|
boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world);
|
||||||
|
|
||||||
boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world, boolean suppressConnectionRender);
|
boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world, boolean suppressConnectionRender);
|
||||||
|
|
|
@ -164,8 +164,10 @@ public class CommonEvents{
|
||||||
|
|
||||||
if(!fixed){
|
if(!fixed){
|
||||||
for(int i = 0; i < pair.positions.length; i++){
|
for(int i = 0; i < pair.positions.length; i++){
|
||||||
|
if(ActuallyAdditionsAPI.connectionHandler.getNetworkFor(pair.positions[i], event.getWorld()) != null){
|
||||||
ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pair.positions[i], event.getWorld());
|
ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pair.positions[i], event.getWorld());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ModUtil.LOGGER.error("Had to remove a Laser Relay connection between "+pair.positions[0]+" and "+pair.positions[1]+" because it couldn't be adapted to the new system!");
|
ModUtil.LOGGER.error("Had to remove a Laser Relay connection between "+pair.positions[0]+" and "+pair.positions[1]+" because it couldn't be adapted to the new system!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,16 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, World world){
|
||||||
|
return this.addConnection(firstRelay, secondRelay, null, world);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, World world, boolean suppressConnectionRender){
|
||||||
|
return this.addConnection(firstRelay, secondRelay, null, world, suppressConnectionRender);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world){
|
public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world){
|
||||||
return this.addConnection(firstRelay, secondRelay, type, world, false);
|
return this.addConnection(firstRelay, secondRelay, type, world, false);
|
||||||
|
|
Loading…
Reference in a new issue