Remove hopefully unnecesary code.
This commit is contained in:
parent
3c8a0fdeab
commit
a978cd8e06
2 changed files with 3 additions and 21 deletions
|
@ -1,15 +0,0 @@
|
|||
package net.pietru.omni_power.api;
|
||||
|
||||
import finalforeach.cosmicreach.world.BlockPosition;
|
||||
import finalforeach.cosmicreach.world.World;
|
||||
import ru.nern.becraft.bed.api.BlockEntity;
|
||||
import ru.nern.becraft.bed.api.BlockEntityType;
|
||||
|
||||
|
||||
public abstract class EPowerProducer extends BlockEntity implements IPowerProducer{
|
||||
public EPowerProducer(BlockEntityType<?> type, World world, BlockPosition blockPos) {
|
||||
super(type, world, blockPos);
|
||||
}
|
||||
|
||||
public abstract void send_to_client(BlockEntity client);
|
||||
}
|
|
@ -8,7 +8,6 @@ import finalforeach.cosmicreach.world.blockevents.BlockEventTrigger;
|
|||
import finalforeach.cosmicreach.world.blockevents.IBlockEventAction;
|
||||
import finalforeach.cosmicreach.world.blocks.BlockState;
|
||||
import net.pietru.omni_power.OmniPower;
|
||||
import net.pietru.omni_power.api.EPowerProducer;
|
||||
import net.pietru.omni_power.api.IPowerClient;
|
||||
import net.pietru.omni_power.api.IPowerProducer;
|
||||
import ru.nern.becraft.bed.BEUtils;
|
||||
|
@ -46,7 +45,6 @@ public class Power implements IBlockEventAction {
|
|||
BlockEntity source_entity = null;
|
||||
if (block_entities){
|
||||
source_entity = BEUtils.getBlockEntity(sourcePos);
|
||||
if (source_entity!=null)
|
||||
source_be = (source_entity instanceof IPowerProducer);
|
||||
}
|
||||
Array<BlockPosition> power_transmitters = new Array<>();
|
||||
|
@ -69,9 +67,8 @@ public class Power implements IBlockEventAction {
|
|||
}
|
||||
if (block_entities && source_be){
|
||||
BlockEntity target_entity = BEUtils.getBlockEntity(sourcePos);
|
||||
if (target_entity!=null)
|
||||
if (target_entity instanceof IPowerClient)
|
||||
((EPowerProducer)source_entity).send_to_client(target_entity);
|
||||
((IPowerProducer)source_entity).send_to_client(target_entity);
|
||||
}
|
||||
if (targetBlockState.stringId.contains(cable_group)){
|
||||
power_transmitters.add(to_check);
|
||||
|
|
Loading…
Reference in a new issue