Update src/main/java/net/pietru/omni_power/blockevents/Power.java
Some checks failed
/ Auto-Build-App (push) Failing after 1m45s
Some checks failed
/ Auto-Build-App (push) Failing after 1m45s
This commit is contained in:
parent
9ca0fe55da
commit
aa027d036f
1 changed files with 3 additions and 0 deletions
|
@ -47,6 +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);
|
||||||
}
|
}
|
||||||
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,6 +69,8 @@ public class Power implements IBlockEventAction {
|
||||||
}
|
}
|
||||||
if (block_entities && source_be){
|
if (block_entities && source_be){
|
||||||
BlockEntity target_entity = BEUtils.getBlockEntity(sourcePos);
|
BlockEntity target_entity = BEUtils.getBlockEntity(sourcePos);
|
||||||
|
if (target_entity!=null)
|
||||||
|
System.out.println("TargetEntityID:"+target_entity.getType().getId());
|
||||||
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