mirror of
https://github.com/TeamMidnightDust/Decorative.git
synced 2025-12-15 20:45:10 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
370a802886 |
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
local_maven/midnightlib-0.2.3.jar
Executable file
BIN
local_maven/midnightlib-0.2.3.jar
Executable file
Binary file not shown.
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.util.Identifier;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class BathTireRenderer extends MobEntityRenderer<BathTireEntity, BathTireModel> {
|
||||
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");
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
],
|
||||
"client": [
|
||||
"eu.midnightdust.motschen.decorative.DecorativeClient"
|
||||
],
|
||||
"modmenu": [
|
||||
"eu.midnightdust.motschen.decorative.config.ModMenuIntegration"
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user