Update src/main/java/net/pietru/omni_power/blockevents/Power.java
Some checks failed
/ Auto-Build-App (push) Has been cancelled
Some checks failed
/ Auto-Build-App (push) Has been cancelled
This commit is contained in:
parent
8894815dcf
commit
1ac9c56d76
1 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ public class Power implements IBlockEventAction {
|
||||||
if (block_entities){
|
if (block_entities){
|
||||||
source_entity = BEUtils.getBlockEntity(sourcePos);
|
source_entity = BEUtils.getBlockEntity(sourcePos);
|
||||||
source_be = (source_entity instanceof IPowerProducer);
|
source_be = (source_entity instanceof IPowerProducer);
|
||||||
System.out.println("SourceEntityID: "+ source_entity.getType().getId() +" BE: "+source_be);
|
//System.out.println("SourceEntityID: "+ source_entity.getType().getId() +" BE: "+source_be);
|
||||||
}
|
}
|
||||||
Array<BlockPosition> power_transmitters = new Array<>();
|
Array<BlockPosition> power_transmitters = new Array<>();
|
||||||
Array<BlockPosition> checked_blocks = new Array<>();
|
Array<BlockPosition> checked_blocks = new Array<>();
|
||||||
|
@ -68,9 +68,9 @@ public class Power implements IBlockEventAction {
|
||||||
runTrigger(triggerId,to_check,zone);
|
runTrigger(triggerId,to_check,zone);
|
||||||
}
|
}
|
||||||
if (block_entities && source_be){
|
if (block_entities && source_be){
|
||||||
BlockEntity target_entity = BEUtils.getBlockEntity(sourcePos);
|
BlockEntity target_entity = BEUtils.getBlockEntity(to_check);
|
||||||
if (target_entity!=null)
|
//if (target_entity!=null)
|
||||||
System.out.println("TargetEntityID: "+target_entity.getType().getId()+" IsPowerClient: "+(target_entity instanceof IPowerClient));
|
// System.out.println("TargetEntityID: "+target_entity.getType().getId()+" IsPowerClient: "+(target_entity instanceof IPowerClient));
|
||||||
if (target_entity instanceof IPowerClient)
|
if (target_entity instanceof IPowerClient)
|
||||||
((IPowerProducer)source_entity).send_to_client(target_entity);
|
((IPowerProducer)source_entity).send_to_client(target_entity);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue