mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 03:15:09 +01:00
@@ -27,8 +27,8 @@ dependencies {
|
|||||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||||
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
modImplementation "eu.midnightdust:midnight-hats:${midnighthats_version}"
|
// modImplementation "eu.midnightdust:midnight-hats:${midnighthats_version}"
|
||||||
include "eu.midnightdust:midnight-hats:${midnighthats_version}"
|
// include "eu.midnightdust:midnight-hats:${midnighthats_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx2G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.16.2
|
minecraft_version=1.16.4
|
||||||
yarn_mappings=1.16.2+build.6
|
yarn_mappings=1.16.4+build.7
|
||||||
loader_version=0.9.1+build.205
|
loader_version=0.10.8
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.2.1
|
mod_version = 1.2.1
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ public class RocksMain implements ModInitializer {
|
|||||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"netherrack_splitter"), NetherrackSplitter);
|
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"netherrack_splitter"), NetherrackSplitter);
|
||||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter);
|
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter);
|
||||||
|
|
||||||
new FeatureRegistry();
|
|
||||||
RockFeatures.init();
|
RockFeatures.init();
|
||||||
StickFeatures.init();
|
StickFeatures.init();
|
||||||
MiscFeatures.init();
|
MiscFeatures.init();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package eu.midnightdust.motschen.rocks.block.blockentity;
|
package eu.midnightdust.motschen.rocks.block.blockentity;
|
||||||
|
|
||||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
|
||||||
import eu.midnightdust.motschen.rocks.block.NetherGeyser;
|
import eu.midnightdust.motschen.rocks.block.NetherGeyser;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
@@ -41,7 +40,7 @@ public class NetherGeyserBlockEntity extends BlockEntity implements Tickable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world != null && state.get(NetherGeyser.ACTIVE) == true) {
|
if (Boolean.TRUE.equals(state.get(NetherGeyser.ACTIVE))) {
|
||||||
world.addParticle(ParticleTypes.LAVA,pos.getX()+0.5,pos.getY()+0.1,pos.getZ()+0.5,1,1.5,1);
|
world.addParticle(ParticleTypes.LAVA,pos.getX()+0.5,pos.getY()+0.1,pos.getZ()+0.5,1,1.5,1);
|
||||||
world.addParticle(ParticleTypes.LAVA,pos.getX()+0.5,pos.getY()+1.0,pos.getZ()+0.5,1,1.5,1);
|
world.addParticle(ParticleTypes.LAVA,pos.getX()+0.5,pos.getY()+1.0,pos.getZ()+0.5,1,1.5,1);
|
||||||
world.addParticle(ParticleTypes.SMOKE,pos.getX()+0.5,pos.getY()+0.1,pos.getZ()+0.5,0,0.3,0);
|
world.addParticle(ParticleTypes.SMOKE,pos.getX()+0.5,pos.getY()+0.1,pos.getZ()+0.5,0,0.3,0);
|
||||||
|
|||||||
@@ -2,38 +2,16 @@ package eu.midnightdust.motschen.rocks.block.blockentity;
|
|||||||
|
|
||||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
import eu.midnightdust.motschen.rocks.RocksMain;
|
||||||
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.util.Tickable;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
|
|
||||||
public class StarfishBlockEntity extends BlockEntity implements Tickable {
|
public class StarfishBlockEntity extends BlockEntity {
|
||||||
private String variation;
|
|
||||||
|
|
||||||
public StarfishBlockEntity() {
|
public StarfishBlockEntity() {
|
||||||
super(BlockEntityInit.STARFISH_BE);
|
super(BlockEntityInit.STARFISH_BE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public StarfishVariation getVariation() {
|
||||||
public void tick() {
|
return this.world.getBlockState(pos).get(RocksMain.STARFISH_VARIATION);
|
||||||
BlockPos pos = this.pos;
|
|
||||||
BlockState state = this.world.getBlockState(pos);
|
|
||||||
|
|
||||||
if (world != null && state.get(RocksMain.STARFISH_VARIATION) == StarfishVariation.RED) {
|
|
||||||
variation = String.valueOf(StarfishVariation.RED);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (world != null && state.get(RocksMain.STARFISH_VARIATION) == StarfishVariation.PINK) {
|
|
||||||
variation = String.valueOf(StarfishVariation.PINK);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
variation = String.valueOf(StarfishVariation.ORANGE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public String getVariation() {
|
|
||||||
return variation;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,14 @@ import net.minecraft.util.Identifier;
|
|||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
public class StarfishBlockEntityRenderer extends BlockEntityRenderer<StarfishBlockEntity> {
|
public class StarfishBlockEntityRenderer extends BlockEntityRenderer<StarfishBlockEntity> {
|
||||||
private final ModelPart side1;
|
private static final ModelPart side1;
|
||||||
private final ModelPart side2;
|
private static final ModelPart side2;
|
||||||
private final ModelPart side3;
|
private static final ModelPart side3;
|
||||||
private final ModelPart side4;
|
private static final ModelPart side4;
|
||||||
private final ModelPart side5;
|
private static final ModelPart side5;
|
||||||
private final ModelPart bb_main;
|
private static final ModelPart bb_main;
|
||||||
|
|
||||||
public StarfishBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
static {
|
||||||
super(blockEntityRenderDispatcher);
|
|
||||||
side1 = new ModelPart(16, 16, 0, 0);
|
side1 = new ModelPart(16, 16, 0, 0);
|
||||||
side1.setPivot(0.0F, 24.0F, 0.0F);
|
side1.setPivot(0.0F, 24.0F, 0.0F);
|
||||||
side1.setTextureOffset(0, 0).addCuboid(-0.5F, -1.0F, 1.0F, 1.0F, 1.0F, 4.0F, 0.0F, false);
|
side1.setTextureOffset(0, 0).addCuboid(-0.5F, -1.0F, 1.0F, 1.0F, 1.0F, 4.0F, 0.0F, false);
|
||||||
@@ -70,9 +69,13 @@ public class StarfishBlockEntityRenderer extends BlockEntityRenderer<StarfishBlo
|
|||||||
bb_main.setTextureOffset(1, 2).addCuboid(-0.8F, -1.0F, -1.25F, 2.0F, 1.0F, 2.0F, 0.0F, false);
|
bb_main.setTextureOffset(1, 2).addCuboid(-0.8F, -1.0F, -1.25F, 2.0F, 1.0F, 2.0F, 0.0F, false);
|
||||||
bb_main.setTextureOffset(2, 2).addCuboid(-1.2F, -1.0F, -1.25F, 1.0F, 1.0F, 2.0F, 0.0F, false);
|
bb_main.setTextureOffset(2, 2).addCuboid(-1.2F, -1.0F, -1.25F, 1.0F, 1.0F, 2.0F, 0.0F, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StarfishBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||||
|
super(blockEntityRenderDispatcher);
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public void render(StarfishBlockEntity blockEntity, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
public void render(StarfishBlockEntity blockEntity, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||||
if (blockEntity.getVariation() == String.valueOf(StarfishVariation.RED)) {
|
if (blockEntity.getVariation().equals(StarfishVariation.RED)) {
|
||||||
matrixStack.push();
|
matrixStack.push();
|
||||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("rocks:textures/block/starfish_red.png")));
|
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("rocks:textures/block/starfish_red.png")));
|
||||||
|
|
||||||
@@ -85,7 +88,7 @@ public class StarfishBlockEntityRenderer extends BlockEntityRenderer<StarfishBlo
|
|||||||
bb_main.render(matrixStack, vertexConsumer, light, overlay);
|
bb_main.render(matrixStack, vertexConsumer, light, overlay);
|
||||||
matrixStack.pop();
|
matrixStack.pop();
|
||||||
}
|
}
|
||||||
else if (blockEntity.getVariation() == String.valueOf(StarfishVariation.PINK)) {
|
else if (blockEntity.getVariation().equals(StarfishVariation.PINK)) {
|
||||||
matrixStack.push();
|
matrixStack.push();
|
||||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("rocks:textures/block/starfish_pink.png")));
|
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("rocks:textures/block/starfish_pink.png")));
|
||||||
|
|
||||||
@@ -114,7 +117,7 @@ public class StarfishBlockEntityRenderer extends BlockEntityRenderer<StarfishBlo
|
|||||||
matrixStack.pop();
|
matrixStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void setRotationAngle(ModelPart bone, float x, float y, float z) {
|
public static void setRotationAngle(ModelPart bone, float x, float y, float z) {
|
||||||
bone.pitch = x;
|
bone.pitch = x;
|
||||||
bone.yaw = y;
|
bone.yaw = y;
|
||||||
bone.roll = z;
|
bone.roll = z;
|
||||||
|
|||||||
Reference in New Issue
Block a user