Update src/main/java/net/pietru/omni_power/blockevents/Power.java
Some checks failed
/ Auto-Build-App (push) Has been cancelled

This commit is contained in:
pietru 2024-03-31 16:32:52 +02:00
parent 8894815dcf
commit 1ac9c56d76

View file

@ -47,7 +47,7 @@ public class Power implements IBlockEventAction {
if (block_entities){
source_entity = BEUtils.getBlockEntity(sourcePos);
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> checked_blocks = new Array<>();
@ -68,9 +68,9 @@ public class Power implements IBlockEventAction {
runTrigger(triggerId,to_check,zone);
}
if (block_entities && source_be){
BlockEntity target_entity = BEUtils.getBlockEntity(sourcePos);
if (target_entity!=null)
System.out.println("TargetEntityID: "+target_entity.getType().getId()+" IsPowerClient: "+(target_entity instanceof IPowerClient));
BlockEntity target_entity = BEUtils.getBlockEntity(to_check);
//if (target_entity!=null)
// System.out.println("TargetEntityID: "+target_entity.getType().getId()+" IsPowerClient: "+(target_entity instanceof IPowerClient));
if (target_entity instanceof IPowerClient)
((IPowerProducer)source_entity).send_to_client(target_entity);
}