Skip to content

Commit

Permalink
Fix startup crash and sloped dash panel issue
Browse files Browse the repository at this point in the history
  • Loading branch information
FoundationGames committed Nov 24, 2022
1 parent f9a27b9 commit dfd2c15
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public InteractionResult useOn(UseOnContext ctx) {
var pos = ctx.getClickedPos();
var state = lvl.getBlockState(pos);

if (state.getBlock() instanceof SlopeBlock) {
if (state.is(AutomobilityBlocks.SLOPE.require())) {
if (!lvl.isClientSide()) {
ctx.getLevel().setBlockAndUpdate(pos, AutomobilityBlocks.SLOPE_WITH_DASH_PANEL.require()
.withPropertiesOf(state));
Expand All @@ -39,7 +39,7 @@ public InteractionResult useOn(UseOnContext ctx) {

return InteractionResult.SUCCESS;
}
if (state.getBlock() instanceof SteepSlopeBlock) {
if (state.is(AutomobilityBlocks.STEEP_SLOPE.require())) {
if (!lvl.isClientSide()) {
ctx.getLevel().setBlockAndUpdate(pos, AutomobilityBlocks.STEEP_SLOPE_WITH_DASH_PANEL.require()
.withPropertiesOf(state));
Expand Down
1 change: 1 addition & 0 deletions common/src/main/resources/automobility.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"minVersion": "0.8",
"package": "io.github.foundationgames.automobility.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "automobility-refmap.json",
"mixins": [
"AABBMixin",
"PlayerEnderChestContainerMixin",
Expand Down
1 change: 1 addition & 0 deletions fabric/src/main/resources/automobility_fabric.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"minVersion": "0.8",
"package": "io.github.foundationgames.automobility.fabric.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "automobility-refmap.json",
"mixins": [
],
"client": [
Expand Down
2 changes: 2 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ dependencies {
}

mixin {
add sourceSets.main, "automobility-refmap.json"

config 'automobility.mixins.json'
config 'automobility_forge.mixins.json'
}
Expand Down
1 change: 1 addition & 0 deletions forge/src/main/resources/automobility_forge.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"minVersion": "0.8",
"package": "io.github.foundationgames.automobility.forge.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "automobility-refmap.json",
"mixins": [
],
"client": [
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ myron_version=1.6.5+22w14a
arrp_version=0.6.2
jsonem_version=0.1.2+1.19

mod_version = 0.4
mod_version = 0.4.1
maven_group = io.github.foundationgames
archives_base_name = automobility

0 comments on commit dfd2c15

Please sign in to comment.