Skip to content

Commit

Permalink
fix Game crashed after placing soundproofing facade on energy cable #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothrazar committed Nov 2, 2024
1 parent 09e7745 commit c5e4524
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ org.gradle.daemon=false

mod_id=cyclic
curse_id=239286
mod_version=1.12.16
mod_version=1.12.17


# NEO FORGED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface IBlockFacade {

default VoxelShape getFacadeShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext ctx) {
BlockState tfs = getFacadeState(state, level, pos);
if (tfs != null) {
if (tfs != null && tfs.getBlock() != state.getBlock()) {
return ctx == null ? tfs.getShape(level, pos) : tfs.getShape(level, pos, ctx);
}
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/lothrazar/cyclic/event/ItemEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ private void onHitFacadeHandler(PlayerInteractEvent.LeftClickBlock event, Player
}
else {
Block block = Block.byItem(held.getItem());
if (block == null || block == Blocks.AIR) {
if (block == null || block == Blocks.AIR || block == target.getBlock()) {
return;
}
if (target.getBlock() instanceof CableBase) {
Expand Down
3 changes: 2 additions & 1 deletion update.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"1.18.2-latest": "1.7.18",
"1.19.2-latest":"1.8.3",
"1.19.4-latest":"1.10.4",
"1.20.1-latest":"1.12.16"
"1.20.1-latest":"1.12.17"

},
"1.16.5": {
Expand Down Expand Up @@ -189,5 +189,6 @@
,"1.12.14":"New feature with cables: hide them using solid blocks with a feature called 'facades', just sneak-left-click a block onto the cable (empty hand to remove it); this does not use any items and can be managed/disabled in the config file. Renamed 'Concentrated Glowstone' to 'Glowstone Facade' and 'Concentrated Soundproofing' to 'Soundproofing Facade'. Fixed issues with both blocks to correctly render facades (use sneak-left-click while not in creative), and they no longer have an inventory"
,"1.12.15":"Fixed bug in the item cyclic:offset_scepter #2427. Slightly Boost the strength of the Reach enchantments. Tweaked block model visuals of the Transfer Nodes. Add recipes in the solidifier machine for Waxed copper blocks "
,"1.12.16":"Merge pull request #2438 from gavinwie: Fixed Filter Data Card Issues #2423, #2370, #2355, and #2330."
,"1.12.17":"Fix Game crashed after placing soundproofing facade on energy cable #2440 "
}
}

0 comments on commit c5e4524

Please sign in to comment.