From 5378b471c57a20eeb986e9f0a7642fcf3394aff0 Mon Sep 17 00:00:00 2001 From: Niklas Widmann Date: Thu, 31 Oct 2024 11:43:01 +0100 Subject: [PATCH] burial dirt, holler AI & correct stone tablet lang keys --- .../5bb646c3cee204f41a1b59a2c0d9083b5f7155b0 | 6 +- .../blockstates/burial_dirt.json | 7 ++ .../assets/doom_and_gloom/lang/en_us.json | 5 +- .../models/block/burial_dirt.json | 7 ++ .../models/item/burial_dirt.json | 3 + .../loot_tables/blocks/burial_dirt.json | 21 ++++++ .../tags/blocks/gravetender_lightables.json | 9 +++ .../data/minecraft/tags/blocks/dirt.json | 5 ++ .../tags/blocks/mineable/pickaxe.json | 3 +- .../galena/doom_and_gloom/DoomAndGloom.java | 7 ++ .../content/block/BurialDirtBlock.java | 65 ++++++++++++++++++ .../content/block/VigilCandleBlock.java | 2 +- .../content/entity/holler/Holler.java | 34 +++++---- .../entity/holler/HollerAvoidGoal.java | 26 +++++-- .../entity/holler/HollerFollowGoal.java | 6 ++ .../doom_and_gloom/data/OBlockStates.java | 2 + .../doom_and_gloom/data/OBlockTags.java | 2 + .../doom_and_gloom/data/OItemModels.java | 1 + .../galena/doom_and_gloom/data/OLang.java | 4 +- .../doom_and_gloom/data/OLootTables.java | 2 + .../galena/doom_and_gloom/index/OBlocks.java | 3 + .../textures/block/burial_dirt.png | Bin 0 -> 240 bytes 22 files changed, 192 insertions(+), 28 deletions(-) create mode 100644 src/generated/resources/assets/doom_and_gloom/blockstates/burial_dirt.json create mode 100644 src/generated/resources/assets/doom_and_gloom/models/block/burial_dirt.json create mode 100644 src/generated/resources/assets/doom_and_gloom/models/item/burial_dirt.json create mode 100644 src/generated/resources/data/doom_and_gloom/loot_tables/blocks/burial_dirt.json create mode 100644 src/generated/resources/data/doom_and_gloom/tags/blocks/gravetender_lightables.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/dirt.json create mode 100644 src/main/java/galena/doom_and_gloom/content/block/BurialDirtBlock.java create mode 100644 src/main/resources/assets/doom_and_gloom/textures/block/burial_dirt.png diff --git a/src/generated/resources/.cache/5bb646c3cee204f41a1b59a2c0d9083b5f7155b0 b/src/generated/resources/.cache/5bb646c3cee204f41a1b59a2c0d9083b5f7155b0 index 3dd79d90..f53113fa 100644 --- a/src/generated/resources/.cache/5bb646c3cee204f41a1b59a2c0d9083b5f7155b0 +++ b/src/generated/resources/.cache/5bb646c3cee204f41a1b59a2c0d9083b5f7155b0 @@ -1,6 +1,8 @@ -// 1.20.1 2024-10-29T21:45:26.5470397 Oreganized Block Tags +// 1.20.1 2024-10-31T10:50:07.0060003 Oreganized Block Tags 25423f94c07158f094e4e9733efc1d1814551369 data/doom_and_gloom/tags/blocks/burial_dirt_convertible.json +589cbf5d60b97fd78f711d832bfddf03263777f2 data/doom_and_gloom/tags/blocks/gravetender_lightables.json 09f2b6ffb4a23fce3358928616260d7ffaa73074 data/doom_and_gloom/tags/blocks/vigil_candles.json 01bff27953e934409d6d1175c4932c12a6f535c7 data/minecraft/tags/blocks/candles.json -422eaf060e2279ae1bb4992ab5b94a47f193a3d8 data/minecraft/tags/blocks/mineable/pickaxe.json +6e91c0be5e5b3d50cf0d1a8dec3e23c0ee042c05 data/minecraft/tags/blocks/dirt.json +734c9c36a0d0f32caf72e941b2f0d14e9f0b5b6d data/minecraft/tags/blocks/mineable/pickaxe.json 6b73bb0ce38222c428d54ee64e82ffa1d96c64d7 data/oreganized/tags/blocks/fire_source.json diff --git a/src/generated/resources/assets/doom_and_gloom/blockstates/burial_dirt.json b/src/generated/resources/assets/doom_and_gloom/blockstates/burial_dirt.json new file mode 100644 index 00000000..e7d3a001 --- /dev/null +++ b/src/generated/resources/assets/doom_and_gloom/blockstates/burial_dirt.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "doom_and_gloom:block/burial_dirt" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/doom_and_gloom/lang/en_us.json b/src/generated/resources/assets/doom_and_gloom/lang/en_us.json index a10822fb..d65dc721 100644 --- a/src/generated/resources/assets/doom_and_gloom/lang/en_us.json +++ b/src/generated/resources/assets/doom_and_gloom/lang/en_us.json @@ -6,6 +6,7 @@ "block.doom_and_gloom.blue_vigil_candle": "Blue Vigil Candle", "block.doom_and_gloom.bone_pile": "Pile of Bones", "block.doom_and_gloom.brown_vigil_candle": "Brown Vigil Candle", + "block.doom_and_gloom.burial_dirt": "Burial Dirt", "block.doom_and_gloom.coral_vigil_candle": "Coral Vigil Candle", "block.doom_and_gloom.cyan_vigil_candle": "Cyan Vigil Candle", "block.doom_and_gloom.forest_vigil_candle": "Forest Vigil Candle", @@ -42,6 +43,8 @@ "effect.doom_and_gloom.warding.description": "Wards against evil spirits", "entity.doom_and_gloom.dirt_mound": "Dirt Mound", "entity.doom_and_gloom.holler": "Holler", + "gui.doom_and_gloom.stone_tablet.cancel": "Cancel", + "gui.doom_and_gloom.stone_tablet.engrave": "Engrave", "item.doom_and_gloom.bush_hammer": "Bush Hammer", "item.doom_and_gloom.holler_spawn_egg": "Holler Spawn Egg", "item.doom_and_gloom.music_disc_afterlife": "Music Disc", @@ -53,7 +56,7 @@ "subtitles.block.sepulcher.sealing": "Sepulcher sealed", "subtitles.block.sepulcher.unsealing": "Sepulcher opened", "subtitles.entity.holler_death": "Holler dies", - "subtitles.entity.holler_hollers": "Holler hollers", + "subtitles.entity.holler_hollers": "Holler wails", "subtitles.entity.holler_hurt": "Holler hurts", "subtitles.entity.holler_shrieks": "Holler shrieks" } \ No newline at end of file diff --git a/src/generated/resources/assets/doom_and_gloom/models/block/burial_dirt.json b/src/generated/resources/assets/doom_and_gloom/models/block/burial_dirt.json new file mode 100644 index 00000000..67a32493 --- /dev/null +++ b/src/generated/resources/assets/doom_and_gloom/models/block/burial_dirt.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_top", + "textures": { + "side": "minecraft:block/dirt", + "top": "doom_and_gloom:block/burial_dirt" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/doom_and_gloom/models/item/burial_dirt.json b/src/generated/resources/assets/doom_and_gloom/models/item/burial_dirt.json new file mode 100644 index 00000000..30341ca2 --- /dev/null +++ b/src/generated/resources/assets/doom_and_gloom/models/item/burial_dirt.json @@ -0,0 +1,3 @@ +{ + "parent": "doom_and_gloom:block/burial_dirt" +} \ No newline at end of file diff --git a/src/generated/resources/data/doom_and_gloom/loot_tables/blocks/burial_dirt.json b/src/generated/resources/data/doom_and_gloom/loot_tables/blocks/burial_dirt.json new file mode 100644 index 00000000..249d11da --- /dev/null +++ b/src/generated/resources/data/doom_and_gloom/loot_tables/blocks/burial_dirt.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:dirt" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "doom_and_gloom:blocks/burial_dirt" +} \ No newline at end of file diff --git a/src/generated/resources/data/doom_and_gloom/tags/blocks/gravetender_lightables.json b/src/generated/resources/data/doom_and_gloom/tags/blocks/gravetender_lightables.json new file mode 100644 index 00000000..ad40028c --- /dev/null +++ b/src/generated/resources/data/doom_and_gloom/tags/blocks/gravetender_lightables.json @@ -0,0 +1,9 @@ +{ + "values": [ + "#minecraft:candles", + { + "id": "#amendments:skull_candles", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/dirt.json b/src/generated/resources/data/minecraft/tags/blocks/dirt.json new file mode 100644 index 00000000..3c192ebc --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/dirt.json @@ -0,0 +1,5 @@ +{ + "values": [ + "doom_and_gloom:burial_dirt" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 0a1663ac..5c7786a8 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -2,6 +2,7 @@ "values": [ "doom_and_gloom:sepulcher", "doom_and_gloom:bone_pile", - "#doom_and_gloom:vigil_candles" + "#doom_and_gloom:vigil_candles", + "doom_and_gloom:sepulcher" ] } \ No newline at end of file diff --git a/src/main/java/galena/doom_and_gloom/DoomAndGloom.java b/src/main/java/galena/doom_and_gloom/DoomAndGloom.java index 3e753dbd..cdd9584a 100644 --- a/src/main/java/galena/doom_and_gloom/DoomAndGloom.java +++ b/src/main/java/galena/doom_and_gloom/DoomAndGloom.java @@ -175,9 +175,16 @@ public void buildCreativeModeTabContents(BuildCreativeModeTabContentsEvent event putAfter(entries, Blocks.BONE_BLOCK, OBlocks.BONE_PILE); + putAfter(entries, Blocks.INFESTED_DEEPSLATE, OBlocks.BURIAL_DIRT); + if (tab == CreativeModeTabs.SPAWN_EGGS) { event.accept(new ItemStack(OItems.HOLLER_SPAWN_EGG.get())); } + + if (tab == CreativeModeTabs.TOOLS_AND_UTILITIES) { + event.accept(new ItemStack(OBlocks.STONE_TABLET.get())); + } + } private static void putAfter(MutableHashedLinkedMap entries, ItemLike after, Supplier supplier) { diff --git a/src/main/java/galena/doom_and_gloom/content/block/BurialDirtBlock.java b/src/main/java/galena/doom_and_gloom/content/block/BurialDirtBlock.java new file mode 100644 index 00000000..aac41f3f --- /dev/null +++ b/src/main/java/galena/doom_and_gloom/content/block/BurialDirtBlock.java @@ -0,0 +1,65 @@ +package galena.doom_and_gloom.content.block; + +import galena.doom_and_gloom.index.OTags; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.MobSpawnType; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; + +public class BurialDirtBlock extends Block { + + public BurialDirtBlock(Properties properties) { + super(properties.randomTicks()); + } + + @Override + public void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean pDropExperience) { + spawnMonster(level, pos); + } + + private EntityType randomMonster(RandomSource random) { + if (random.nextDouble() < 0.3) return EntityType.SKELETON; + return EntityType.ZOMBIE; + } + + public void spawnMonster(Level level, BlockPos pos) { + if (!(level instanceof ServerLevel serverLevel)) return; + + var monster = randomMonster(level.random).create(level); + if (monster != null) { + monster.moveTo(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0, 0); + monster.addEffect(new MobEffectInstance(MobEffects.LEVITATION, 14, 2, false, false)); + serverLevel.addFreshEntity(monster); + monster.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, null, null); + monster.spawnAnim(); + } + } + + private void discard(ServerLevel level, BlockPos pos) { + level.setBlockAndUpdate(pos, Blocks.DIRT.defaultBlockState()); + } + + @Override + public void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if(random.nextInt(64) == 0) return; + + if (level.isNight() && random.nextInt(32) == 0) { + spawnMonster(level, pos); + discard(level, pos); + return; + } + + if (!level.getBlockState(pos.above()).canBeReplaced()) { + discard(level, pos); + } + } +} diff --git a/src/main/java/galena/doom_and_gloom/content/block/VigilCandleBlock.java b/src/main/java/galena/doom_and_gloom/content/block/VigilCandleBlock.java index 3c1dc512..21391e1e 100644 --- a/src/main/java/galena/doom_and_gloom/content/block/VigilCandleBlock.java +++ b/src/main/java/galena/doom_and_gloom/content/block/VigilCandleBlock.java @@ -52,7 +52,7 @@ private static VoxelShape[] createShapes(boolean hanging) { private static final VoxelShape[] SHAPES = createShapes(false); private static final VoxelShape[] HANGING_SHAPES = createShapes(true); - public static final ToIntFunction LIGHT_EMISSION = state -> state.getValue(LIT) ? 4 * state.getValue(CANDLES) : 0; + public static final ToIntFunction LIGHT_EMISSION = state -> state.getValue(LIT) ? (4 * state.getValue(CANDLES) - 1) : 0; public VigilCandleBlock(Properties properties) { super(properties); diff --git a/src/main/java/galena/doom_and_gloom/content/entity/holler/Holler.java b/src/main/java/galena/doom_and_gloom/content/entity/holler/Holler.java index 350b429b..87b79081 100644 --- a/src/main/java/galena/doom_and_gloom/content/entity/holler/Holler.java +++ b/src/main/java/galena/doom_and_gloom/content/entity/holler/Holler.java @@ -1,5 +1,6 @@ package galena.doom_and_gloom.content.entity.holler; +import galena.doom_and_gloom.index.OBlocks; import galena.doom_and_gloom.index.OEffects; import galena.doom_and_gloom.index.OEntityTypes; import galena.doom_and_gloom.index.OItems; @@ -37,17 +38,18 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LightLayer; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.JukeboxBlock; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.pathfinder.BlockPathTypes; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; import java.time.LocalDate; import java.time.temporal.ChronoField; import java.util.List; +import java.util.function.Supplier; public class Holler extends PathfinderMob { @@ -94,7 +96,7 @@ protected Brain.Provider brainProvider() { protected void customServerAiStep() { super.customServerAiStep(); if (tickCount % 20 == 0) { - applyFogAround((ServerLevel) level(), position(), this, 20); + applyFogAround((ServerLevel) level(), position(), this, 20); } } @@ -208,7 +210,7 @@ protected float getSoundVolume() { return 0.4F; } - private void disappear(ServerLevel level) { + void disappear() { playSound(OSoundEvents.HOLLER_SHRIEKS.get(), 1F, 1F); discard(); } @@ -220,7 +222,7 @@ public void panicFinish(Vec3 target) { var state = level.getBlockState(blockPosition()); if (state.is(Blocks.JUKEBOX)) { - disappear(level); + disappear(); if (state.getValue(JukeboxBlock.HAS_RECORD)) return; @@ -235,29 +237,31 @@ public void panicFinish(Vec3 target) { }); } else { curseGround(level, blockPosition()); - disappear(level); + disappear(); } } private void curseBlock(ServerLevel level, BlockPos pos) { - var dirtMound = OEntityTypes.DIRT_MOUND.get().create(level); - if (dirtMound == null) return; + if (level.random.nextDouble() > 0.3) return; - dirtMound.setPos(Vec3.upFromBottomCenterOf(pos, 1)); - level.addFreshEntity(dirtMound); + if (level.random.nextBoolean()) { + level.setBlockAndUpdate(pos, OBlocks.BURIAL_DIRT.get().defaultBlockState()); + } else if (level.random.nextBoolean()) { + level.setBlockAndUpdate(pos, Blocks.DIRT.defaultBlockState()); + } else { + level.setBlockAndUpdate(pos, Blocks.COARSE_DIRT.defaultBlockState()); + } - var vec = Vec3.atCenterOf(blockPosition()).add(Math.random() * 0.5 - 0.25, 1 + Math.random() * 0.2, Math.random() * 0.5 - 0.25); - level.sendParticles(OParticleTypes.HOLLERING_SOUL.get(), vec.x, vec.y, vec.z, 1, 0, 0, 0, 0); + var vec = Vec3.atCenterOf(pos.above()); + level.sendParticles(OParticleTypes.HOLLERING_SOUL.get(), vec.x, vec.y, vec.z, 4, 0.5, 0.5, 0.5, 0.01); } private void curseGround(ServerLevel level, BlockPos center) { var aabb = new AABB(center).inflate(2, 1, 2); BlockPos.betweenClosedStream(aabb).forEach(pos -> { - if (level.random.nextDouble() > 0.2) return; - if (!level.getBlockState(pos.above()).canBeReplaced()) return; - var state = level.getBlockState(pos); - if (state.is(OTags.Blocks.CAN_TURN_INTO_BURIAL_DIRT)) { + var above = level.getBlockState(pos.above()); + if (state.is(OTags.Blocks.CAN_TURN_INTO_BURIAL_DIRT) && above.canBeReplaced()) { curseBlock(level, pos); } }); diff --git a/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerAvoidGoal.java b/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerAvoidGoal.java index 00425e01..a65e7fcb 100644 --- a/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerAvoidGoal.java +++ b/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerAvoidGoal.java @@ -1,5 +1,8 @@ package galena.doom_and_gloom.content.entity.holler; +import galena.doom_and_gloom.index.OEffects; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.ai.util.AirRandomPos; @@ -13,26 +16,37 @@ public class HollerAvoidGoal extends Goal { private final float speedModifier; private final TargetingConditions targetingCondition; private Path path = null; - + private boolean disapearAfterwards = false; public HollerAvoidGoal(Holler mob, double atDistance, float speedModifier) { this.mob = mob; this.atDistance = atDistance; this.speedModifier = speedModifier; - this.targetingCondition = TargetingConditions.forNonCombat().range(atDistance); + this.targetingCondition = TargetingConditions.forNonCombat().range(atDistance).ignoreLineOfSight() + .selector(it -> it instanceof ServerPlayer player && player.gameMode.isSurvival()); } @Override public void stop() { mob.getNavigation().stop(); + if (disapearAfterwards) { + mob.disappear(); + } } @Override public boolean canUse() { - var avoid = mob.level().getNearestEntity(mob.level().getEntitiesOfClass(Player.class, mob.getBoundingBox().inflate(atDistance)), targetingCondition, mob, mob.getX(), mob.getY(), mob.getZ()); + var avoid = mob.getTarget(); + + if (avoid == null) { + avoid = mob.level().getNearestEntity(mob.level().getEntitiesOfClass(Player.class, mob.getBoundingBox().inflate(atDistance)), targetingCondition, mob, mob.getX(), mob.getY(), mob.getZ()); + } + if (avoid != null) { + disapearAfterwards = avoid.hasEffect(OEffects.WARDING.get()); var target = mob.position().subtract(avoid.position()); - var away = AirRandomPos.getPosTowards(mob, 4, 1, 0, target, 1F); + var radius = disapearAfterwards ? 24 : 4; + var away = AirRandomPos.getPosTowards(mob, radius, 1, 0, target, 1F); if (away != null) path = mob.getNavigation().createPath(away.x, away.y, away.z, 0); } else { path = null; @@ -42,12 +56,12 @@ public boolean canUse() { @Override public boolean canContinueToUse() { - return !mob.getNavigation().isDone() || canUse(); + return !mob.getNavigation().isDone(); } @Override public void start() { - mob.getNavigation().moveTo(path, speedModifier); + mob.getNavigation().moveTo(path, disapearAfterwards ? speedModifier : 1F); } } diff --git a/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerFollowGoal.java b/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerFollowGoal.java index 897c7598..7573f028 100644 --- a/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerFollowGoal.java +++ b/src/main/java/galena/doom_and_gloom/content/entity/holler/HollerFollowGoal.java @@ -1,5 +1,6 @@ package galena.doom_and_gloom.content.entity.holler; +import galena.doom_and_gloom.index.OEffects; import net.minecraft.world.entity.PathfinderMob; import net.minecraft.world.entity.ai.behavior.EntityTracker; import net.minecraft.world.entity.ai.goal.Goal; @@ -36,6 +37,11 @@ private boolean tooClose() { var target = mob.getTarget(); if(target == null) return false; var distanceSquared = mob.distanceToSqr(target); + + if(target.hasEffect(OEffects.FOG.get())) { + return false; + } + return distanceSquared < panicDistanceSquared; } diff --git a/src/main/java/galena/doom_and_gloom/data/OBlockStates.java b/src/main/java/galena/doom_and_gloom/data/OBlockStates.java index 7676d672..c792690b 100644 --- a/src/main/java/galena/doom_and_gloom/data/OBlockStates.java +++ b/src/main/java/galena/doom_and_gloom/data/OBlockStates.java @@ -4,6 +4,7 @@ import galena.doom_and_gloom.data.provider.OBlockStateProvider; import galena.doom_and_gloom.index.OBlocks; import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.data.ExistingFileHelper; public class OBlockStates extends OBlockStateProvider { @@ -23,6 +24,7 @@ protected void registerStatesAndModels() { simpleBlock(OBlocks.BONE_PILE.get(), models().cubeColumn(blockTexture(OBlocks.BONE_PILE.get()).getPath(), DoomAndGloom.modLoc("block/bone_pile_side"), DoomAndGloom.modLoc("block/sepulcher_rot_5"))); simpleBlock(OBlocks.ROTTING_FLESH.get(), models().cubeAll(blockTexture(OBlocks.ROTTING_FLESH.get()).getPath(), DoomAndGloom.modLoc("block/sepulcher_rot_1"))); vigilCandle(OBlocks.VIGIL_CANDLE, null); + simpleBlock(OBlocks.BURIAL_DIRT.get(), models().cubeTop("burial_dirt", new ResourceLocation("block/dirt"), DoomAndGloom.modLoc("block/burial_dirt"))); OBlocks.COLORED_VIGIL_CANDLES.forEach((color, block) -> vigilCandle(block, color.getSerializedName())); } diff --git a/src/main/java/galena/doom_and_gloom/data/OBlockTags.java b/src/main/java/galena/doom_and_gloom/data/OBlockTags.java index 62b46c90..c33d3a29 100644 --- a/src/main/java/galena/doom_and_gloom/data/OBlockTags.java +++ b/src/main/java/galena/doom_and_gloom/data/OBlockTags.java @@ -59,5 +59,7 @@ protected void addTags(HolderLookup.Provider provider) { tag(GRAVETENDER_LIGHTABLE) .addTag(BlockTags.CANDLES) .addOptionalTag(new ResourceLocation("amendments:skull_candles")); + + tag(BlockTags.DIRT).add(OBlocks.BURIAL_DIRT.get()); } } diff --git a/src/main/java/galena/doom_and_gloom/data/OItemModels.java b/src/main/java/galena/doom_and_gloom/data/OItemModels.java index 11ee68ef..5fb90242 100644 --- a/src/main/java/galena/doom_and_gloom/data/OItemModels.java +++ b/src/main/java/galena/doom_and_gloom/data/OItemModels.java @@ -23,6 +23,7 @@ protected void registerModels() { toolItem(OItems.BUSH_HAMMER); block(OBlocks.SEPULCHER); block(OBlocks.BONE_PILE); + block(OBlocks.BURIAL_DIRT); OBlocks.vigilCandles().forEach(this::normalItem); spawnEggItem(OItems.HOLLER_SPAWN_EGG); normalItem(OItems.MUSIC_DISC_AFTERLIFE); diff --git a/src/main/java/galena/doom_and_gloom/data/OLang.java b/src/main/java/galena/doom_and_gloom/data/OLang.java index f33264e6..59f2d698 100644 --- a/src/main/java/galena/doom_and_gloom/data/OLang.java +++ b/src/main/java/galena/doom_and_gloom/data/OLang.java @@ -44,8 +44,8 @@ protected void addTranslations() { addSubtitle("entity", "holler_shrieks", "Holler shrieks"); addSubtitle("entity", "holler_hollers", "Holler wails"); //howls? howls? whispers? - addSubtitle("gui", "stone_tablet.engrave", "Engrave"); - addSubtitle("gui", "stone_tablet.cancel", "Cancel"); + add("gui.doom_and_gloom.stone_tablet.engrave", "Engrave"); + add("gui.doom_and_gloom.stone_tablet.cancel", "Cancel"); /* Automatically create translations for blocks and items based on their registry name. diff --git a/src/main/java/galena/doom_and_gloom/data/OLootTables.java b/src/main/java/galena/doom_and_gloom/data/OLootTables.java index 905cb37f..37589219 100644 --- a/src/main/java/galena/doom_and_gloom/data/OLootTables.java +++ b/src/main/java/galena/doom_and_gloom/data/OLootTables.java @@ -13,6 +13,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.flag.FeatureFlags; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.ValidationContext; @@ -54,6 +55,7 @@ protected void generate() { dropSelf(OBlocks.BONE_PILE); dropNothing(OBlocks.ROTTING_FLESH); dropSelf(OBlocks.STONE_TABLET); + dropOther(OBlocks.BURIAL_DIRT, Blocks.DIRT); OBlocks.vigilCandles().forEach(this::vigilCandle); } diff --git a/src/main/java/galena/doom_and_gloom/index/OBlocks.java b/src/main/java/galena/doom_and_gloom/index/OBlocks.java index 39598df3..f466e6b7 100644 --- a/src/main/java/galena/doom_and_gloom/index/OBlocks.java +++ b/src/main/java/galena/doom_and_gloom/index/OBlocks.java @@ -3,6 +3,7 @@ import com.teamabnormals.blueprint.core.util.registry.BlockSubRegistryHelper; import galena.doom_and_gloom.DoomAndGloom; import galena.doom_and_gloom.content.block.BonePileBlock; +import galena.doom_and_gloom.content.block.BurialDirtBlock; import galena.doom_and_gloom.content.block.SepulcherBlock; import galena.doom_and_gloom.content.block.StoneTabletBlock; import galena.doom_and_gloom.content.block.VigilCandleBlock; @@ -38,6 +39,8 @@ public class OBlocks { public static final RegistryObject VIGIL_CANDLE = register("vigil_candle", () -> new VigilCandleBlock(VIGIL_CANDLE_PROPERTIES.get())); public static final Map> COLORED_VIGIL_CANDLES = registerColored("vigil_candle", color -> new VigilCandleBlock(VIGIL_CANDLE_PROPERTIES.get().mapColor(color))); + public static final RegistryObject BURIAL_DIRT = register("burial_dirt", () -> new BurialDirtBlock(BlockBehaviour.Properties.copy(Blocks.DIRT))); + public static Stream> vigilCandles() { return Stream.of( Stream.of(VIGIL_CANDLE), diff --git a/src/main/resources/assets/doom_and_gloom/textures/block/burial_dirt.png b/src/main/resources/assets/doom_and_gloom/textures/block/burial_dirt.png new file mode 100644 index 0000000000000000000000000000000000000000..e78109735c89914af19b2a59f431cced6a9379a1 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF|KY!Mfiq7hbISfbkkKO*vA9=% zfvlQ^xvosej+b+rHIis^44GD^?l3 fYZupB|BHFq6yDX|UsEiARx)_H`njxgN@xNAc`H)` literal 0 HcmV?d00001