diff --git a/build.gradle b/build.gradle index 505119f..3863d12 100755 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,9 @@ repositories { maven { url "https://jitpack.io" } maven { url "https://maven.blamejared.com" } maven { url "https://maven.terraformersmc.com/releases" } + flatDir { + dirs 'local_maven' + } } dependencies { @@ -36,8 +39,8 @@ dependencies { exclude module: "fabric-api" } - modImplementation "com.github.TeamMidnightDust:MidnightLib:${midnightlib_version}" - include "com.github.TeamMidnightDust:MidnightLib:${midnightlib_version}" + modImplementation "com.github.TeamMidnightDust:midnightlib:${midnightlib_version}" + include "com.github.TeamMidnightDust:midnightlib:${midnightlib_version}" } processResources { diff --git a/gradle.properties b/gradle.properties index 44c5839..95db526 100755 --- a/gradle.properties +++ b/gradle.properties @@ -3,18 +3,18 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.17-pre1 - yarn_mappings=1.17-pre1+build.9 - loader_version=0.11.3 + minecraft_version=1.17 + yarn_mappings=1.17+build.5 + loader_version=0.11.3 # Mod Properties - mod_version = 4.1.0 + mod_version = 4.1.1 maven_group = eu.midnightdust.motschen archives_base_name = decorative # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.34.8+1.17 - mod_menu_version = 2.0.0-beta.5 - midnightlib_version=v0.2.2 + fabric_version=0.34.9+1.17 + mod_menu_version = 2.0.0-beta.7 + midnightlib_version=0.2.3 patchouli_version=1.16.4-50-FABRIC diff --git a/local_maven/midnightlib-0.2.3.jar b/local_maven/midnightlib-0.2.3.jar new file mode 100755 index 0000000..0ce2f49 Binary files /dev/null and b/local_maven/midnightlib-0.2.3.jar differ diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java b/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java index 9e8468c..5cf2494 100755 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java @@ -72,24 +72,28 @@ public class Springboard extends HorizontalFacingBlock { } else { arg.setBlockState(pos.north(), state.with(PART, Part.FRONT).with(FACING, Direction.NORTH)); } + break; case EAST: if (!arg.getBlockState(pos.east()).isAir()) { arg.breakBlock(pos, true); } else { arg.setBlockState(pos.east(), state.with(PART, Part.FRONT).with(FACING, Direction.EAST)); } + break; case SOUTH: if (!arg.getBlockState(pos.south()).isAir()) { arg.breakBlock(pos, true); } else { arg.setBlockState(pos.south(), state.with(PART, Part.FRONT).with(FACING, Direction.SOUTH)); } + break; case WEST: if (!arg.getBlockState(pos.west()).isAir()) { arg.breakBlock(pos, true); } else { arg.setBlockState(pos.west(), state.with(PART, Part.FRONT).with(FACING, Direction.WEST)); } + break; } } } @@ -98,23 +102,47 @@ public class Springboard extends HorizontalFacingBlock { switch (state.get(PART)) { case BACK: switch (state.get(FACING)) { case NORTH: - if (world.getBlockState(pos.north()).contains(PART)) { world.breakBlock(pos.north(), true);} + if (world.getBlockState(pos.north()).contains(PART)) { + world.breakBlock(pos.north(), true); + break; + } case EAST: - if (world.getBlockState(pos.east()).contains(PART)) { world.breakBlock(pos.east(), true);} + if (world.getBlockState(pos.east()).contains(PART)) { + world.breakBlock(pos.east(), true); + break; + } case SOUTH: - if (world.getBlockState(pos.south()).contains(PART)) { world.breakBlock(pos.south(), true);} + if (world.getBlockState(pos.south()).contains(PART)) { + world.breakBlock(pos.south(), true); + break; + } case WEST: - if (world.getBlockState(pos.west()).contains(PART)) { world.breakBlock(pos.west(), true);} + if (world.getBlockState(pos.west()).contains(PART)) { + world.breakBlock(pos.west(), true); + break; + } } case FRONT: switch (state.get(FACING)) { case NORTH: - if (world.getBlockState(pos.south()).contains(PART)) { world.breakBlock(pos.south(), true); } + if (world.getBlockState(pos.south()).contains(PART)) { + world.breakBlock(pos.south(), true); + break; + } case EAST: - if (world.getBlockState(pos.west()).contains(PART)) { world.breakBlock(pos.south(), true); } + if (world.getBlockState(pos.west()).contains(PART)) { + world.breakBlock(pos.west(), true); + break; + } case SOUTH: - if (world.getBlockState(pos.north()).contains(PART)) { world.breakBlock(pos.south(), true); } + if (world.getBlockState(pos.north()).contains(PART)) { + world.breakBlock(pos.north(), true); + break; + } case WEST: - if (world.getBlockState(pos.east()).contains(PART)) { world.breakBlock(pos.south(), true); } + if (world.getBlockState(pos.east()).contains(PART)) { + world.breakBlock(pos.east(), true); + break; + } } } } @@ -213,7 +241,7 @@ public class Springboard extends HorizontalFacingBlock { } public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) { - return !worldView.isAir(pos.down()); + return !worldView.isAir(pos.down()) && worldView.getBlockState(pos.offset(state.get(FACING))) == Blocks.AIR.getDefaultState(); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/entity/client/renderer/BathTireRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/entity/client/renderer/BathTireRenderer.java index 69fee08..02884fe 100755 --- a/src/main/java/eu/midnightdust/motschen/decorative/entity/client/renderer/BathTireRenderer.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/entity/client/renderer/BathTireRenderer.java @@ -11,7 +11,7 @@ import net.minecraft.util.Identifier; @Environment(EnvType.CLIENT) public class BathTireRenderer extends MobEntityRenderer { - private static Identifier TEXTURE; + private final Identifier TEXTURE; public BathTireRenderer(EntityRendererFactory.Context context, DyeColor color) { super(context, new BathTireModel(context.getPart(BathTireModel.BATH_TIRE_MODEL_LAYER)), 0.5F); TEXTURE = Identifier.tryParse("textures/block/"+color.getName()+"_concrete.png"); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 8c44f61..966ea45 100755 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -25,9 +25,6 @@ ], "client": [ "eu.midnightdust.motschen.decorative.DecorativeClient" - ], - "modmenu": [ - "eu.midnightdust.motschen.decorative.config.ModMenuIntegration" ] },