Update src/main/java/net/pietru/omni_power/blockevents/Power.java
Some checks failed
/ Auto-Build-App (push) Failing after 1m45s

This commit is contained in:
pietru 2024-03-31 16:18:24 +02:00
parent 9ca0fe55da
commit aa027d036f

View file

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