From 29ea9253068185aad048df81e6bb35863c091a2d Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 17 Jul 2020 12:14:27 -0400 Subject: [PATCH] Tweak Defensive Laser Add PoeticRainbow Texture Set --- README.md | 5 +- TODO | 24 --------- assets/battery_casing.png | Bin 530 -> 0 bytes assets/battery_controller.png | Bin 658 -> 0 bytes assets/battery_core.png | Bin 591 -> 0 bytes assets/network_chip.png | Bin 584 -> 0 bytes assets/switch_off.png | Bin 628 -> 0 bytes assets/switch_on.png | Bin 634 -> 0 bytes assets/switch_side.png | Bin 527 -> 0 bytes build.gradle | 12 ++++- gradle.properties | 3 ++ .../energonrelics/EnergonRelics.java | 3 ++ .../block/DefensiveLaserBlock.java | 2 +- .../entity/DefensiveLaserBlockEntity.java | 24 ++++----- .../block/entity/EnergonLightBlockEntity.java | 4 +- .../block/entity/SolarPanelBlockEntity.java | 4 +- .../PassiveBatteryControllerBlockEntity.java | 4 +- .../reactor/ReactorControllerBlockEntity.java | 12 +++-- .../reactor/ReactorCoreBlockEntity.java | 4 +- .../client/EnergonRelicsClient.java | 24 +++++++++ .../energonrelics/client/ModMenu.java | 16 ++++++ .../client/config/UserConfig.java | 24 +++++++++ .../HardcodedConfig.java} | 6 +-- .../core/EnergyProviderBlockEntity.java | 4 +- .../mixin/MixinAbstractFileResourcePack.java | 46 ++++++++++++++++++ .../block/active_battery_controller.json | 8 +++ .../block/passive_battery_controller.json | 8 +++ .../models/block/reactor_controller_off.json | 8 +++ .../models/block/reactor_controller_on.json | 8 +++ .../block/active_battery_controller.png | Bin 0 -> 514 bytes .../textures/block/battery_core.png | Bin 0 -> 549 bytes .../block/passive_battery_controller.png | Bin 0 -> 525 bytes .../textures/block/reactor_controller.png | Bin 0 -> 525 bytes .../textures/block/reactor_core.png | Bin 0 -> 595 bytes .../textures/block/reactor_input.png | Bin 0 -> 578 bytes .../textures/block/thermal_casing.png | Bin 0 -> 261 bytes .../textures/block/thermal_glass.png | Bin 0 -> 426 bytes .../blockstates/defensive_laser.json | 7 ++- .../assets/energonrelics/lang/en_us.json | 4 +- .../models/block/defensive_laser_off.json | 6 +++ ...ive_laser.json => defensive_laser_on.json} | 2 +- .../models/item/defensive_laser.json | 2 +- ...sive_laser.png => defensive_laser_off.png} | Bin .../textures/block/defensive_laser_on.png | Bin 0 -> 752 bytes src/main/resources/energonrelics.mixins.json | 1 + src/main/resources/fabric.mod.json | 3 ++ 46 files changed, 216 insertions(+), 62 deletions(-) delete mode 100644 TODO delete mode 100644 assets/battery_casing.png delete mode 100644 assets/battery_controller.png delete mode 100644 assets/battery_core.png delete mode 100644 assets/network_chip.png delete mode 100644 assets/switch_off.png delete mode 100644 assets/switch_on.png delete mode 100644 assets/switch_side.png create mode 100644 src/main/java/com/thebrokenrail/energonrelics/client/ModMenu.java create mode 100644 src/main/java/com/thebrokenrail/energonrelics/client/config/UserConfig.java rename src/main/java/com/thebrokenrail/energonrelics/{Config.java => config/HardcodedConfig.java} (78%) create mode 100644 src/main/java/com/thebrokenrail/energonrelics/mixin/MixinAbstractFileResourcePack.java create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/models/block/active_battery_controller.json create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/models/block/passive_battery_controller.json create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_off.json create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_on.json create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/active_battery_controller.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/battery_core.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/passive_battery_controller.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_controller.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_core.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_input.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/thermal_casing.png create mode 100644 src/main/resources/assets/energonrelics-poeticrainbow/textures/block/thermal_glass.png create mode 100644 src/main/resources/assets/energonrelics/models/block/defensive_laser_off.json rename src/main/resources/assets/energonrelics/models/block/{defensive_laser.json => defensive_laser_on.json} (55%) rename src/main/resources/assets/energonrelics/textures/block/{defensive_laser.png => defensive_laser_off.png} (100%) create mode 100644 src/main/resources/assets/energonrelics/textures/block/defensive_laser_on.png diff --git a/README.md b/README.md index 3aad04a..06b0ddf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Poster](images/poster.png) + # EnergonRelics TBD @@ -5,4 +7,5 @@ TBD [View Changelog](CHANGELOG.md) ## Credits -- ``@PoeticRainbow#5928`` on Discord For The Logo \ No newline at end of file +- ``@PoeticRainbow#5928`` on Discord For The Logo And Poster +- ``@PoeticRainbow#5928`` on Discord For Their Texture Set \ No newline at end of file diff --git a/TODO b/TODO deleted file mode 100644 index ac889e6..0000000 --- a/TODO +++ /dev/null @@ -1,24 +0,0 @@ -Network Chips: -- Contain a Network ID In NBT -- When Held, Highlights Supported Blocks -- When Right-Cliking On A Supported-Block Add it To The Network -Energy Recievers: -- Conatin network ID(s) -- Requests a certain amount of power every tick -- Spreads out power ewuest over all networks -- Chunk loads unloaded networks -- No energy transfer speed restrictions -Energy Providers: -- Contaisn Network Chip -- Can only provide power to recievers within 60 blocks -- Can be an energy reciever -Battery: -- Surrounded on all but one sides by Battery casing, last side covered by battery controller -- Energy reiever for charging -- Energy prvodier for usage -- Highlight covers entire multi-block -Reactor: -- Temporary battery -- Refreshes battery every 10 ticks, no fuel set battery to 0, if fuel fill battery - -On each tick an energy receiver can add an "action", an action has a success function, a fail function, and a cost, the action is propagated up to the energy provider, which will either execute the success function and deduct the energy amount, or execute the fail function. \ No newline at end of file diff --git a/assets/battery_casing.png b/assets/battery_casing.png deleted file mode 100644 index 908a50b11135ac209679962aea56aa8af2355378..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 530 zcmV+t0`2{YP)q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;L76lMjVvQF zGH)?3k);z!6N&*K6A1xyH7EuU;}vu@)b#=(=VOx}bpgX@LINfXaBd_f58z5<04^pH U<=OKaJOBUy07*qoM6N<$f)U-}dH?_b diff --git a/assets/battery_controller.png b/assets/battery_controller.png deleted file mode 100644 index 51998598c27ff6a05c4007cfdecf9107bb55459f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 658 zcmV;D0&V??P)q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;L76lMjVvQF zGH)?3k);z!6W9gF0AwmYfbLop17Mnq3ly=M(L3Qj14s?BAsAl3r5R)*HaQG0fD{^B zX=Gq{e2IZURu6@~;JFsVWmpZkpi|GlpaW71)PO=``V4C@lbSE6lNSi3e|&iZ07ITQX5JDbga7~l07*qoM6N<$f(hRk2mk;8 diff --git a/assets/battery_core.png b/assets/battery_core.png deleted file mode 100644 index 87b904b4d69897c9edd8b78efeb50334e535a16c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 591 zcmV-V0q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;L76lMjVvQF zGH)?3k);z!6W9gF0AwmYfbLop17Mnc7cXYu1Df&)h>_`~v9SywHOPiwcmbDYkYUk4 zgV6zo0oZItb_qcP(4CFWCuqPhZ~-W)aCu`hP!1iSqytd=g5nuu2rhs(A(4|WsFN26 drGI>R0{~WSI-yiv7L))0002ovPDHLkV1g^({h|N> diff --git a/assets/network_chip.png b/assets/network_chip.png deleted file mode 100644 index facb1a85d7b2e5844762d12156a3debd23f924a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmV-O0=NB%P)q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;L6FC+a>4>7umcAUpcu$RNj?DSrPu(9GZQ1F*%<)p W{x8!-q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;La%~R-24tDpYMxbkjZ$ix?v@MJA-v5ZG5$FtDpIVG& z1gz1K&WJqZop1YTb*I2&$WFDaS4YKxRz2`b;C~nC$a7LB<8 O0000q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;L}8#Ku!bM2(lSu zh{1+fuouu{3vVodV+Is{*MSCLaXQRJU>D#5_%xyzFnALZG077g2G|k_F`7YY0419^ U951I@tpET307*qoM6N<$f-E5qo&W#< diff --git a/assets/switch_side.png b/assets/switch_side.png deleted file mode 100644 index f25515fbcbb6af57769e75b68261dcf592f65fd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 527 zcmV+q0`UEbP)q5gL~I2c3&BFP z@m2T_v=wX>1VIr*Ec^w&8VTziS4a>u%k2F)Gv_jM27J-1k#p*YA(t=O@km&kn_tiZ zF9c|$onE?i!?7k~u_!gi=N)yb-iB1K+WY<;Ez723KwXpYm|@vP;R)gBYSB`>CEQ_T z^kv~g;UQZND14>#q{q*S(;mMowiEFw@Ts0!x{8xkY-H@5@St#CE?Y8w&!cYAYUXEW zq;|>d!68nBFd9iptdONhNNQd(``%G<8{b>zC`WAH!1MZV%MNKWG)qHkBUz5@tuz}aO* zOYXw?CUibnx~>06ewn^h3SLj4Z64Zhpn1{D>UW)!dq}Ly6J5jJJ`BkI;L false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> false).lightLevel(state -> state.get(POWERED) ? 7 : 0)); setDefaultState(getDefaultState().with(POWERED, false)); } diff --git a/src/main/java/com/thebrokenrail/energonrelics/block/entity/DefensiveLaserBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/block/entity/DefensiveLaserBlockEntity.java index 9ae3d8a..b8661fb 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/block/entity/DefensiveLaserBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/block/entity/DefensiveLaserBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.block.entity; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.block.DefensiveLaserBlock; import com.thebrokenrail.energonrelics.energy.core.EnergyReceiverBlockEntity; @@ -157,7 +157,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity { private Predicate getTargetPredicate(boolean useCurrentRotation) { return entity -> { - if (entity.isAlive() && (!(entity instanceof PlayerEntity) || !((PlayerEntity) entity).isCreative()) && !entity.isInvisible() && entity.getPos().distanceTo(getPosVec()) <= Config.DEFENSIVE_LASER_RANGE) { + if (entity.isAlive() && (!(entity instanceof PlayerEntity) || !((PlayerEntity) entity).isCreative()) && !entity.isInvisible() && entity.getPos().distanceTo(getPosVec()) <= HardcodedConfig.DEFENSIVE_LASER_RANGE) { Vec3d entityPos = entity.getPos(); Vec3d start; if (useCurrentRotation) { @@ -174,7 +174,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity { } private List getEntities(Predicate predicate) { - return Objects.requireNonNull(getWorld()).getEntitiesByClass(LivingEntity.class, new Box(getPos()).expand(Config.DEFENSIVE_LASER_RANGE), predicate); + return Objects.requireNonNull(getWorld()).getEntitiesByClass(LivingEntity.class, new Box(getPos()).expand(HardcodedConfig.DEFENSIVE_LASER_RANGE), predicate); } private Entity getDummyEntity() { @@ -187,7 +187,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity { Vec3d posVec = getPosVec(pos); Vec3d collision = null; for (LivingEntity entity : entities) { - Optional optional = entity.getBoundingBox().rayTrace(posVec, posVec.add(rotation.getRayVector().multiply(Config.DEFENSIVE_LASER_RANGE))); + Optional optional = entity.getBoundingBox().rayTrace(posVec, posVec.add(rotation.getRayVector().multiply(HardcodedConfig.DEFENSIVE_LASER_RANGE))); if (optional.isPresent()) { Vec3d vec = optional.get(); if (collision == null || vec.distanceTo(posVec) < collision.distanceTo(posVec)) { @@ -198,7 +198,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity { Vec3d rotationVec = rotation.getRayVector(); Vec3d start = rotationVec.add(posVec); - Vec3d end = rotationVec.multiply(Config.DEFENSIVE_LASER_RANGE).add(posVec); + Vec3d end = rotationVec.multiply(HardcodedConfig.DEFENSIVE_LASER_RANGE).add(posVec); HitResult result = world.rayTrace(new RayTraceContext(start, end, RayTraceContext.ShapeType.COLLIDER, RayTraceContext.FluidHandling.ANY, getDummyEntity())); if (result.getType() != HitResult.Type.MISS && (collision == null || result.getPos().distanceTo(posVec) < collision.distanceTo(posVec))) { collision = result.getPos(); @@ -206,31 +206,31 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity { double distance; if (collision != null) { - world.createExplosion(null, collision.getX(), collision.getY(), collision.getZ(), 1, Explosion.DestructionType.NONE); + world.createExplosion(null, collision.getX(), collision.getY(), collision.getZ(), 2f, Explosion.DestructionType.NONE); distance = posVec.distanceTo(collision); } else { - distance = Config.DEFENSIVE_LASER_RANGE; + distance = HardcodedConfig.DEFENSIVE_LASER_RANGE; } - double multiplier = 6d; + double multiplier = 4d; distance = distance * multiplier; for (int i = 0; i < distance; i++) { Vec3d vec = rotationVec.multiply(i / multiplier).add(posVec); - ((ServerWorld) world).spawnParticles(ParticleTypes.END_ROD, vec.getX(), vec.getY(), vec.getZ(), 1, 0, 0, 0, 0.1f); + ((ServerWorld) world).spawnParticles(ParticleTypes.END_ROD, vec.getX(), vec.getY(), vec.getZ(), 1, 0, 0, 0, 0.4f); } } @Override protected void tickEnergy() { assert getWorld() != null; - addAction(Action.createBlockStatePropertyAction(Config.DEFENSIVE_LASER_IDLE_ENERGY_REQUIRED, DefensiveLaserBlock.POWERED, true, false)); + addAction(Action.createBlockStatePropertyAction(HardcodedConfig.DEFENSIVE_LASER_IDLE_ENERGY_REQUIRED, DefensiveLaserBlock.POWERED, true, false)); if (getCachedState().get(DefensiveLaserBlock.POWERED)) { if (countdown > 0) { countdown--; } if (countdown == 1) { - addAction(new Action(Config.DEFENSIVE_LASER_FIRE_ENERGY_REQUIRED, (world, pos, state) -> { + addAction(new Action(HardcodedConfig.DEFENSIVE_LASER_FIRE_ENERGY_REQUIRED, (world, pos, state) -> { firing = false; fire(world, pos); }, (world, pos, state) -> firing = false)); @@ -246,7 +246,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity { } } else { if (getTargetPredicate(false).test(target)) { - Optional optional = target.getBoundingBox().rayTrace(getPosVec(), getPosVec().add(rotation.getRayVector().multiply(Config.DEFENSIVE_LASER_RANGE))); + Optional optional = target.getBoundingBox().rayTrace(getPosVec(), getPosVec().add(rotation.getRayVector().multiply(HardcodedConfig.DEFENSIVE_LASER_RANGE))); if (optional.isPresent() && getTargetPredicate(true).test(target)) { countdown = COUNTDOWN; } else { diff --git a/src/main/java/com/thebrokenrail/energonrelics/block/entity/EnergonLightBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/block/entity/EnergonLightBlockEntity.java index 7a475ff..0ee5ebe 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/block/entity/EnergonLightBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/block/entity/EnergonLightBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.block.entity; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.block.EnergonLightBlock; import com.thebrokenrail.energonrelics.energy.core.EnergyReceiverBlockEntity; import com.thebrokenrail.energonrelics.energy.core.util.Action; @@ -13,6 +13,6 @@ public class EnergonLightBlockEntity extends EnergyReceiverBlockEntity { @Override protected void tickEnergy() { - addAction(Action.createBlockStatePropertyAction(Config.ENERGON_LIGHT_ENERGY_REQUIRED, EnergonLightBlock.POWERED, true, false)); + addAction(Action.createBlockStatePropertyAction(HardcodedConfig.ENERGON_LIGHT_ENERGY_REQUIRED, EnergonLightBlock.POWERED, true, false)); } } diff --git a/src/main/java/com/thebrokenrail/energonrelics/block/entity/SolarPanelBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/block/entity/SolarPanelBlockEntity.java index bbbc005..c534802 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/block/entity/SolarPanelBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/block/entity/SolarPanelBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.block.entity; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.energy.helper.EnergyGeneratorBlockEntity; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.util.math.Direction; @@ -30,7 +30,7 @@ public class SolarPanelBlockEntity extends EnergyGeneratorBlockEntity { public long getDisplayEnergy() { if (hasWorld() && Objects.requireNonNull(getWorld()).getDimension().hasSkyLight()) { int light = getLight(); - return (long) ((float) Config.SOLAR_PANEL_MAX_ENERGY_OUTPUT * ((float) light / 15f)); + return (long) ((float) HardcodedConfig.SOLAR_PANEL_MAX_ENERGY_OUTPUT * ((float) light / 15f)); } else { return 0; } diff --git a/src/main/java/com/thebrokenrail/energonrelics/block/entity/battery/PassiveBatteryControllerBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/block/entity/battery/PassiveBatteryControllerBlockEntity.java index b5d801d..35901ef 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/block/entity/battery/PassiveBatteryControllerBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/block/entity/battery/PassiveBatteryControllerBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.block.entity.battery; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.block.battery.PassiveBatteryControllerBlock; import com.thebrokenrail.energonrelics.energy.core.EnergyReceiverBlockEntity; @@ -48,7 +48,7 @@ public class PassiveBatteryControllerBlockEntity extends EnergyReceiverBlockEnti @Override protected void tickEnergy() { - long charge = Config.BATTERY_CHARGE_RATE; + long charge = HardcodedConfig.BATTERY_CHARGE_RATE; if (!isActiveController()) { addAction(new Action(charge, (world, pos, state) -> { BlockEntity entity = world.getBlockEntity(pos); diff --git a/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorControllerBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorControllerBlockEntity.java index d65f5ac..13be87f 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorControllerBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorControllerBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.block.entity.reactor; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.block.battery.PassiveBatteryControllerBlock; import com.thebrokenrail.energonrelics.block.entity.battery.PassiveBatteryControllerBlockEntity; @@ -55,9 +55,13 @@ public class ReactorControllerBlockEntity extends EnergyGeneratorBlockEntity { @Override public long getDisplayEnergy() { - Reactor reactor = getReactor(); - if (reactor != null && reactor.core.isReacting()) { - return Config.REACTOR_ENERGY_OUTPUT; + if (getCachedState().get(ReactorControllerBlock.POWERED)) { + Reactor reactor = getReactor(); + if (reactor != null && reactor.core.isReacting()) { + return HardcodedConfig.REACTOR_ENERGY_OUTPUT; + } else { + return 0; + } } else { return 0; } diff --git a/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorCoreBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorCoreBlockEntity.java index 8df44bf..c61bdb2 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorCoreBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/block/entity/reactor/ReactorCoreBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.block.entity.reactor; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; @@ -32,7 +32,7 @@ public class ReactorCoreBlockEntity extends BlockEntity implements Tickable { } void startReaction() { - reactionTime = Config.REACTOR_TIME; + reactionTime = HardcodedConfig.REACTOR_TIME; } @Override diff --git a/src/main/java/com/thebrokenrail/energonrelics/client/EnergonRelicsClient.java b/src/main/java/com/thebrokenrail/energonrelics/client/EnergonRelicsClient.java index 52c5c11..46f6879 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/client/EnergonRelicsClient.java +++ b/src/main/java/com/thebrokenrail/energonrelics/client/EnergonRelicsClient.java @@ -2,18 +2,42 @@ package com.thebrokenrail.energonrelics.client; import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.block.util.EnergyProviderBlock; +import com.thebrokenrail.energonrelics.client.config.UserConfig; +import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; +import me.sargunvohra.mcmods.autoconfig1u.ConfigData; +import me.sargunvohra.mcmods.autoconfig1u.annotation.Config; +import me.sargunvohra.mcmods.autoconfig1u.serializer.GsonConfigSerializer; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.RenderLayer; @Environment(EnvType.CLIENT) public class EnergonRelicsClient implements ClientModInitializer { + @Environment(EnvType.CLIENT) + private static class ReloadSerializer extends GsonConfigSerializer { + public ReloadSerializer(Config definition, Class configClass) { + super(definition, configClass); + } + + @Override + public void serialize(T config) throws SerializationException { + super.serialize(config); + MinecraftClient client = MinecraftClient.getInstance(); + if (client.getResourceManager() != null) { + client.reloadResources(); + } + } + } + @Override public void onInitializeClient() { EnergyProviderBlock.initRenderer(); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.THERMAL_GLASS_BLOCK, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.DEFENSIVE_LASER_BLOCK, RenderLayer.getCutout()); + + AutoConfig.register(UserConfig.class, ReloadSerializer::new); } } diff --git a/src/main/java/com/thebrokenrail/energonrelics/client/ModMenu.java b/src/main/java/com/thebrokenrail/energonrelics/client/ModMenu.java new file mode 100644 index 0000000..1da3335 --- /dev/null +++ b/src/main/java/com/thebrokenrail/energonrelics/client/ModMenu.java @@ -0,0 +1,16 @@ +package com.thebrokenrail.energonrelics.client; + +import com.thebrokenrail.energonrelics.client.config.UserConfig; +import io.github.prospector.modmenu.api.ConfigScreenFactory; +import io.github.prospector.modmenu.api.ModMenuApi; +import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public class ModMenu implements ModMenuApi { + @Override + public ConfigScreenFactory getModConfigScreenFactory() { + return screen -> AutoConfig.getConfigScreen(UserConfig.class, screen).get(); + } +} diff --git a/src/main/java/com/thebrokenrail/energonrelics/client/config/UserConfig.java b/src/main/java/com/thebrokenrail/energonrelics/client/config/UserConfig.java new file mode 100644 index 0000000..17ec604 --- /dev/null +++ b/src/main/java/com/thebrokenrail/energonrelics/client/config/UserConfig.java @@ -0,0 +1,24 @@ +package com.thebrokenrail.energonrelics.client.config; + +import com.thebrokenrail.energonrelics.EnergonRelics; +import me.sargunvohra.mcmods.autoconfig1u.ConfigData; +import me.sargunvohra.mcmods.autoconfig1u.annotation.Config; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +import java.util.Locale; + +@Environment(EnvType.CLIENT) +@Config(name = EnergonRelics.NAMESPACE) +public class UserConfig implements ConfigData { + public enum TextureSet { + TheBrokenRail, + PoeticRainbow; + + public String namespace() { + return EnergonRelics.NAMESPACE + '-' + name().toLowerCase(Locale.ROOT); + } + } + + public TextureSet textureSet = TextureSet.TheBrokenRail; +} diff --git a/src/main/java/com/thebrokenrail/energonrelics/Config.java b/src/main/java/com/thebrokenrail/energonrelics/config/HardcodedConfig.java similarity index 78% rename from src/main/java/com/thebrokenrail/energonrelics/Config.java rename to src/main/java/com/thebrokenrail/energonrelics/config/HardcodedConfig.java index e7b3fc1..fa16076 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/Config.java +++ b/src/main/java/com/thebrokenrail/energonrelics/config/HardcodedConfig.java @@ -1,6 +1,6 @@ -package com.thebrokenrail.energonrelics; +package com.thebrokenrail.energonrelics.config; -public class Config { +public class HardcodedConfig { public static final int POWER_RANGE = 64; public static final int ENERGON_LIGHT_ENERGY_REQUIRED = 5; @@ -12,7 +12,7 @@ public class Config { public static final int REACTOR_TIME = 2400; public static final int REACTOR_ENERGY_OUTPUT = 250; - public static final int DEFENSIVE_LASER_RANGE = 18; + public static final int DEFENSIVE_LASER_RANGE = 28; public static final int DEFENSIVE_LASER_IDLE_ENERGY_REQUIRED = 32; public static final int DEFENSIVE_LASER_FIRE_ENERGY_REQUIRED = 64; } diff --git a/src/main/java/com/thebrokenrail/energonrelics/energy/core/EnergyProviderBlockEntity.java b/src/main/java/com/thebrokenrail/energonrelics/energy/core/EnergyProviderBlockEntity.java index 588d135..08f04fc 100644 --- a/src/main/java/com/thebrokenrail/energonrelics/energy/core/EnergyProviderBlockEntity.java +++ b/src/main/java/com/thebrokenrail/energonrelics/energy/core/EnergyProviderBlockEntity.java @@ -1,6 +1,6 @@ package com.thebrokenrail.energonrelics.energy.core; -import com.thebrokenrail.energonrelics.Config; +import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.component.NetworkComponent; import com.thebrokenrail.energonrelics.energy.core.util.Action; @@ -55,7 +55,7 @@ public class EnergyProviderBlockEntity extends BlockEntity implements EnergyProv @Override public final boolean isWithinDistance(Vec3d pos) { - return getPos().isWithinDistance(pos, Config.POWER_RANGE); + return getPos().isWithinDistance(pos, HardcodedConfig.POWER_RANGE); } private ItemStack stack = ItemStack.EMPTY; diff --git a/src/main/java/com/thebrokenrail/energonrelics/mixin/MixinAbstractFileResourcePack.java b/src/main/java/com/thebrokenrail/energonrelics/mixin/MixinAbstractFileResourcePack.java new file mode 100644 index 0000000..789e028 --- /dev/null +++ b/src/main/java/com/thebrokenrail/energonrelics/mixin/MixinAbstractFileResourcePack.java @@ -0,0 +1,46 @@ +package com.thebrokenrail.energonrelics.mixin; + +import com.thebrokenrail.energonrelics.EnergonRelics; +import com.thebrokenrail.energonrelics.client.config.UserConfig; +import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resource.AbstractFileResourcePack; +import net.minecraft.resource.ResourceType; +import net.minecraft.util.Identifier; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.io.IOException; +import java.io.InputStream; + +@Environment(EnvType.CLIENT) +@Mixin(AbstractFileResourcePack.class) +public class MixinAbstractFileResourcePack { + @Inject(at = @At("HEAD"), method = "open", cancellable = true) + public void injectOpen(ResourceType type, Identifier id, CallbackInfoReturnable info) { + if (id.getNamespace().equals(EnergonRelics.NAMESPACE)) { + try { + Identifier newID = new Identifier(AutoConfig.getConfigHolder(UserConfig.class).getConfig().textureSet.namespace(), id.getPath()); + InputStream in = ((AbstractFileResourcePack) (Object) this).open(type, newID); + if (in != null) { + info.setReturnValue(in); + } + } catch (IOException ignored) { + } + } + } + + @Inject(at = @At("HEAD"), method = "contains", cancellable = true) + public void injectContains(ResourceType type, Identifier id, CallbackInfoReturnable info) { + if (id.getNamespace().equals(EnergonRelics.NAMESPACE)) { + Identifier newID = new Identifier(AutoConfig.getConfigHolder(UserConfig.class).getConfig().textureSet.namespace(), id.getPath()); + boolean out = ((AbstractFileResourcePack) (Object) this).contains(type, newID); + if (out) { + info.setReturnValue(true); + } + } + } +} diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/models/block/active_battery_controller.json b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/active_battery_controller.json new file mode 100644 index 0000000..ff2142f --- /dev/null +++ b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/active_battery_controller.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "top": "energonrelics:block/thermal_casing", + "front": "energonrelics:block/active_battery_controller", + "side": "energonrelics:block/thermal_casing" + } +} diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/models/block/passive_battery_controller.json b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/passive_battery_controller.json new file mode 100644 index 0000000..25ce873 --- /dev/null +++ b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/passive_battery_controller.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "top": "energonrelics:block/thermal_casing", + "front": "energonrelics:block/passive_battery_controller", + "side": "energonrelics:block/thermal_casing" + } +} diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_off.json b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_off.json new file mode 100644 index 0000000..6b90170 --- /dev/null +++ b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_off.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "top": "energonrelics:block/thermal_casing", + "front": "energonrelics:block/reactor_controller", + "side": "energonrelics:block/thermal_casing" + } +} diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_on.json b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_on.json new file mode 100644 index 0000000..6b90170 --- /dev/null +++ b/src/main/resources/assets/energonrelics-poeticrainbow/models/block/reactor_controller_on.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "top": "energonrelics:block/thermal_casing", + "front": "energonrelics:block/reactor_controller", + "side": "energonrelics:block/thermal_casing" + } +} diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/active_battery_controller.png b/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/active_battery_controller.png new file mode 100644 index 0000000000000000000000000000000000000000..14906b245982e2b4e94584a5d4b9ac2911e03f83 GIT binary patch literal 514 zcmV+d0{#7oP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TNS}XzXNZmUmIf7 zl8beC>)<6Img5lzdF$E4L3GnWDUn)=y3*V2PClm$XJq1OSt{fd;voNQDRv3_#=T6o z?kzZ^zzHJR3fca$oVavw<()R0NEFu>wM+GEYdn%#t!$Usmf`y4{t#nfOCk~&9Ih!A z3iiqzd2hQu76>y#b>E9;55z7ZVl(~lgowKECtRFE-R5pL`dP@OxTTX#wWO7B>bdUu z_9O_QY@m}EiA%fl;UND4xFl#_^ZyR~WQc+w5J|w;C-JQTsA6)qPXGV_07*qoM6N<$ Ef}tqpE&u=k literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/battery_core.png b/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/battery_core.png new file mode 100644 index 0000000000000000000000000000000000000000..62d48a99a147098decaac454f8189b274ccbaa7a GIT binary patch literal 549 zcmV+=0^0qFP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0lG;e_s-qf*?4Ra?}S7|Jc7vTBwNXbhF&3B1%E*y8kI&#wDh9YNEAXuL?cQO>yfp@ z%6M5GbF`Bt}aoSHg2NlWQTsgg1l`9uNH+Tr-( zcwjTesI=#`HF&IUP^vlQng{wv)B@5*J#yue(C2% zLK01mLI$fb0>o}ipb|?_>E#7Z;)A2&*f6p!$soX$vQAl(F!S^pep$-a*F&PGCs2m< za!eVBgh2Qj6LPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TZOlY*@FcwOps0pD|OpF#Lc9td<7B)7bodum=g|<}0%8$ZW+V}&g zOe`SLs30JF-_G5;0Evk)PB!mm-_Gv7op(Yeo#v{_7?b>d#Gjy50yIJ@mC7#$-Gl>0 zGl`g%r5hG;;HAd*ZyG+ZdP_gJ7eH_r-P1l5)As!vQ3tY8Mv(F;~_WoeN ztIi&FLa3gA<^UY+Hc5ZL|XVA zcth^G?r}=eF?Me?yaYti4B{Z~4V5@ZwW;AM50&IpRV|k*k+8ovC=w5d-e}lQ9OR!R zxh`Rze-O#mttpKZ$RLufkZsS39hY{ljN?K93$dl7d?}r*4LVZgqF4k0vUBr{*(JG+ zmMoSYh_V~o&vZ}kyj@>0&iiyEkm@=+Qh?tB)?YItq?7?~c%dEG|*P6YbTyje~ zT9p!V0$D@X&(?=Q2-Al>F6(aG=A_-ozW^=?a@_5IH}I1o3W7kS1IE4q0ekm}Bdbx* P00000NkvXXu0mjfMGW6q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_controller.png b/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_controller.png new file mode 100644 index 0000000000000000000000000000000000000000..0483f11141b7d6d7c7980a705d504b311939a9ba GIT binary patch literal 525 zcmV+o0`mQdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!Tj0|a9ADfn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_core.png b/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_core.png new file mode 100644 index 0000000000000000000000000000000000000000..02d72c8471d94f4cb362117e2f52a87fbaeeccf9 GIT binary patch literal 595 zcmV-Z0<8UsP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0q99YK~y+Tg;GCE z6Hyrd-d#DbN4=)kf-Q(f%j6&`1h%>~9dS?>LyW5iog7RIaez87;ov5Tt4`pe0|TR@ zgoFeJMlrNd3-<1MT<`gN_ccJ!gx~PJ-}k;h@Atmd&yjRfRANpv81qhZ~*7WV*UEV zEQoncqyinpN*HNNjRa!${{*nw1=GxD%(QJo_uZ)>(MOiAiCsE!B1QU0?sc!^qzp~h zPb2{%9WMov{iN4L7)n_qp^hY^#<5e9YUFaPwH3)3XdlHU1za z-G+KTFCFZBI8;SvB;f?iyT0=Cx9=gz4FXiUp~`mqcM(EwE)x^u<8LZz4zHFQFW2Aw z_u=MmOwUd_;4@$L6D$dbe0)-Pyf}?rzTa_6;QgaK6NJ>~o2~S)e=eSXs)>=CBVF$l h@X26>5KK-$^cS&x;Avr!gf0L8002ovPDHLkV1n+@3b+6O literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_input.png b/src/main/resources/assets/energonrelics-poeticrainbow/textures/block/reactor_input.png new file mode 100644 index 0000000000000000000000000000000000000000..2ee1bafea9c6ac2c402425c453c442da694b5c5a GIT binary patch literal 578 zcmV-I0=@l-P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0oO@HK~y+TZBjc- z8$lG@`}ll-3D_7zoWcU!MUJT>WTilqAR*Br3MkSbDx#32h-fSlMXAytrB4bZTu=mw z0x78@XaM2be2g)+kJ~%n-DZ5xx?o^5dON%O_UY~HN>h`Q+_o8Gx~3sM1nm-#Bjs|r zuQOfk1s_(^BjE|*xPmlc`DasA_Vqo8GK30x~wdm=rkUHo?Sd?DV9dEH#*7aVPTC{$t*4TNsH1OhmmOvf|t21SA? zW$EzyMrof5G6?>@gI!+0~n4GVU5MaIipg?(2s qB`x6fNHdx=WzwWcizX~spumtZ#eU1z$<-haGkCiCxvXPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0Y6DZK~y+Tos&;W z!$1_qze!_^AcBJ85nP#`Ah;;q+O0=W&*#`k08405zG z@g(_fL3kKm|LPtp7XC}w1-Zl^2=v$lORrd1yu@WlXEXP!WuffCPYS&4 z9VPa-vRJUi!t2YU{=;;Jfqzv-DOJXTSkRBD-(4}wf8+FK1m*2})n{gCQcwVV0@a$R UMkwJGp8x;=07*qoM6N<$g3NilbpQYW literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/energonrelics/blockstates/defensive_laser.json b/src/main/resources/assets/energonrelics/blockstates/defensive_laser.json index a0bf225..b2130f7 100644 --- a/src/main/resources/assets/energonrelics/blockstates/defensive_laser.json +++ b/src/main/resources/assets/energonrelics/blockstates/defensive_laser.json @@ -1,7 +1,10 @@ { "variants": { - "": { - "model": "energonrelics:block/defensive_laser" + "powered=false": { + "model": "energonrelics:block/defensive_laser_off" + }, + "powered=true": { + "model": "energonrelics:block/defensive_laser_on" } } } diff --git a/src/main/resources/assets/energonrelics/lang/en_us.json b/src/main/resources/assets/energonrelics/lang/en_us.json index 51eeef5..85e56cc 100644 --- a/src/main/resources/assets/energonrelics/lang/en_us.json +++ b/src/main/resources/assets/energonrelics/lang/en_us.json @@ -21,5 +21,7 @@ "block.energonrelics.veridium_ore": "Veridium Ore", "block.energonrelics.veridium_block": "Veridium Block", "item.energonrelics.defensive_laser_core": "Defensive laser Core", - "block.energonrelics.defensive_laser": "Defensive Laser" + "block.energonrelics.defensive_laser": "Defensive Laser", + "text.autoconfig.energonrelics.title": "EnergonRelics", + "text.autoconfig.energonrelics.option.textureSet": "Texture Set" } \ No newline at end of file diff --git a/src/main/resources/assets/energonrelics/models/block/defensive_laser_off.json b/src/main/resources/assets/energonrelics/models/block/defensive_laser_off.json new file mode 100644 index 0000000..f5c44a3 --- /dev/null +++ b/src/main/resources/assets/energonrelics/models/block/defensive_laser_off.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "energonrelics:block/defensive_laser_off" + } +} diff --git a/src/main/resources/assets/energonrelics/models/block/defensive_laser.json b/src/main/resources/assets/energonrelics/models/block/defensive_laser_on.json similarity index 55% rename from src/main/resources/assets/energonrelics/models/block/defensive_laser.json rename to src/main/resources/assets/energonrelics/models/block/defensive_laser_on.json index 2fc3d31..c5b3f17 100644 --- a/src/main/resources/assets/energonrelics/models/block/defensive_laser.json +++ b/src/main/resources/assets/energonrelics/models/block/defensive_laser_on.json @@ -1,6 +1,6 @@ { "parent": "minecraft:block/cube_all", "textures": { - "all": "energonrelics:block/defensive_laser" + "all": "energonrelics:block/defensive_laser_on" } } diff --git a/src/main/resources/assets/energonrelics/models/item/defensive_laser.json b/src/main/resources/assets/energonrelics/models/item/defensive_laser.json index 3fb009d..cb866b7 100644 --- a/src/main/resources/assets/energonrelics/models/item/defensive_laser.json +++ b/src/main/resources/assets/energonrelics/models/item/defensive_laser.json @@ -1,3 +1,3 @@ { - "parent": "energonrelics:block/defensive_laser" + "parent": "energonrelics:block/defensive_laser_on" } \ No newline at end of file diff --git a/src/main/resources/assets/energonrelics/textures/block/defensive_laser.png b/src/main/resources/assets/energonrelics/textures/block/defensive_laser_off.png similarity index 100% rename from src/main/resources/assets/energonrelics/textures/block/defensive_laser.png rename to src/main/resources/assets/energonrelics/textures/block/defensive_laser_off.png diff --git a/src/main/resources/assets/energonrelics/textures/block/defensive_laser_on.png b/src/main/resources/assets/energonrelics/textures/block/defensive_laser_on.png new file mode 100644 index 0000000000000000000000000000000000000000..6811fe2151d909579c9cd738711f042e2aae95d4 GIT binary patch literal 752 zcmVukT$KZa1i$cR+l$=5zqE{Q*@B#QX;q0=Z zC3oR`3kDuc&C+U;Tc#_WhSyW*NkHEXcvtFK{jPIz4+|UeMAxvl52Lc*xB3Ip3}^K; z^@ykd000SaNLh0L01sgR01sgSs6VG^0003eNkl z@$bQQ(3wyo5;Y+rU8P3ub$oLsb-dsBTT%g_SnQWn^(quZF@J@4n^ z83CyW*c`D}t2