You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
966 B
Java
44 lines
966 B
Java
package net.brokenmoon.redcontrol.api;
|
|
|
|
import com.simon816.j65el02.device.RedBus;
|
|
import net.brokenmoon.redcontrol.blocks.NetworkCarrier;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.World;
|
|
|
|
public class RCWorldBus {
|
|
|
|
private boolean isValid = false;
|
|
|
|
private RedBus redBus;
|
|
|
|
private World backupWorld;
|
|
private BlockPos backupPos;
|
|
|
|
public RCWorldBus(RedBus redBus, World world, BlockPos pos) {
|
|
this.redBus = redBus;
|
|
backupWorld = world;
|
|
backupPos = pos;
|
|
}
|
|
|
|
|
|
public void generateBus(World world, BlockPos pos){
|
|
((NetworkCarrier)(world.getBlockState(pos).getBlock())).generateBus(world, pos);
|
|
}
|
|
|
|
public RedBus getRedBus() {
|
|
return redBus;
|
|
}
|
|
|
|
public void setRedBus(RedBus redBus) {
|
|
this.redBus = redBus;
|
|
}
|
|
|
|
public void setValid(boolean val){
|
|
this.isValid = val;
|
|
}
|
|
|
|
public boolean getValid(){
|
|
return this.isValid;
|
|
}
|
|
}
|