update for cr 0.1.31 and flux 0.5.10
All checks were successful
/ Auto-Build-App (push) Successful in 1m14s
All checks were successful
/ Auto-Build-App (push) Successful in 1m14s
This commit is contained in:
parent
2a1b80f8b4
commit
8373ad4246
4 changed files with 9 additions and 13 deletions
|
@ -71,8 +71,6 @@ dependencies {
|
|||
|
||||
//quiltMod "quilt-mod:fluxapi:0.5.8r2"
|
||||
quiltMod "dev.crmodders:fluxapi:${fluxapi_version}"//0.5.5
|
||||
|
||||
quiltMod "com.github.ForwarD-NerN:BlockEntityPrototype:${becraft_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
|
@ -4,13 +4,12 @@ org.gradle.parallel=true
|
|||
org.gradle.caching=false
|
||||
|
||||
# Project Info
|
||||
version=1.3.4
|
||||
version=1.4
|
||||
group=net.pietru
|
||||
id=omni_power
|
||||
|
||||
# Dependency Versions
|
||||
cosmic_reach_version=0.1.24
|
||||
cosmic_reach_version=0.1.31
|
||||
cosmic_quilt_version=2.0.2
|
||||
|
||||
fluxapi_version=0.5.9
|
||||
becraft_version=f9f05f6
|
||||
fluxapi_version=0.5.10
|
|
@ -1,7 +1,7 @@
|
|||
package net.pietru.omni_power.api;
|
||||
|
||||
import ru.nern.becraft.bed.api.BlockEntity;
|
||||
|
||||
import finalforeach.cosmicreach.blockentities.BlockEntity;
|
||||
|
||||
public interface IPowerProducer{
|
||||
void send_to_client(BlockEntity client);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.pietru.omni_power.blockevents;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import finalforeach.cosmicreach.blockentities.BlockEntity;
|
||||
import finalforeach.cosmicreach.blockevents.actions.ActionId;
|
||||
import finalforeach.cosmicreach.blockevents.actions.IBlockAction;
|
||||
import finalforeach.cosmicreach.blocks.BlockPosition;
|
||||
|
@ -10,8 +11,6 @@ import finalforeach.cosmicreach.world.Zone;
|
|||
import net.pietru.omni_power.OmniPower;
|
||||
import net.pietru.omni_power.api.IPowerClient;
|
||||
import net.pietru.omni_power.api.IPowerProducer;
|
||||
import ru.nern.becraft.bed.utils.BEUtils;
|
||||
import ru.nern.becraft.bed.api.BlockEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -30,14 +29,14 @@ public class Power implements IBlockAction {
|
|||
|
||||
@Override
|
||||
public void act(BlockState blockState, BlockEventTrigger blockEventTrigger, Zone zone, Map<String, Object> args) {
|
||||
this.act(blockState, blockEventTrigger, zone, (BlockPosition)args.get("blockPos"));
|
||||
this.act(zone, (BlockPosition)args.get("blockPos"));
|
||||
}
|
||||
|
||||
public void act(BlockState srcBlockState, BlockEventTrigger blockEventTrigger, Zone zone, BlockPosition sourcePos) {
|
||||
public void act(Zone zone, BlockPosition sourcePos) {
|
||||
boolean source_be = false;
|
||||
BlockEntity source_entity = null;
|
||||
if (block_entities){
|
||||
source_entity = BEUtils.getBlockEntity(sourcePos);
|
||||
source_entity = sourcePos.chunk.getBlockEntity(sourcePos.localX,sourcePos.localY,sourcePos.localZ);
|
||||
source_be = (source_entity instanceof IPowerProducer);
|
||||
//System.out.println("SourceEntityID: "+ source_entity.getType().getId() +" BE: "+source_be);
|
||||
}
|
||||
|
@ -60,7 +59,7 @@ public class Power implements IBlockAction {
|
|||
runTrigger(this.triggerId,to_check,zone);
|
||||
}
|
||||
if (block_entities && source_be){
|
||||
BlockEntity target_entity = BEUtils.getBlockEntity(to_check);
|
||||
BlockEntity target_entity = sourcePos.chunk.getBlockEntity(sourcePos.localX,sourcePos.localY,sourcePos.localZ);
|
||||
//if (target_entity!=null)
|
||||
// System.out.println("TargetEntityID: "+target_entity.getType().getId()+" IsPowerClient: "+(target_entity instanceof IPowerClient));
|
||||
if (target_entity instanceof IPowerClient)
|
||||
|
|
Loading…
Reference in a new issue