From b22ce27681ef9748770c9a0f30bf21373fe38892 Mon Sep 17 00:00:00 2001 From: MehVahdJukaar Date: Thu, 31 Oct 2024 02:53:43 +0100 Subject: [PATCH] goal stuff --- .../galena/doom_and_gloom/DoomAndGloom.java | 4 + ...CandlePoiSensor.java => CandleSensor.java} | 33 ++--- .../compat/moonlight/LightUpCandles.java | 118 +++++++++++++++++- .../compat/moonlight/MoonlightCompat.java | 26 ++-- .../compat/moonlight/TurnOffCandles.java | 78 +++++++++--- .../doom_and_gloom/data/OBlockTags.java | 10 +- .../galena/doom_and_gloom/index/OTags.java | 1 + .../blockstates/stone_tablet.json | 3 +- .../tags/blocks/mineable/pickaxe.json | 5 - 9 files changed, 219 insertions(+), 59 deletions(-) rename src/main/java/galena/doom_and_gloom/compat/moonlight/{CandlePoiSensor.java => CandleSensor.java} (56%) delete mode 100644 src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json diff --git a/src/main/java/galena/doom_and_gloom/DoomAndGloom.java b/src/main/java/galena/doom_and_gloom/DoomAndGloom.java index 7a0df0ed..3e753dbd 100644 --- a/src/main/java/galena/doom_and_gloom/DoomAndGloom.java +++ b/src/main/java/galena/doom_and_gloom/DoomAndGloom.java @@ -2,6 +2,7 @@ import com.mojang.serialization.Codec; import com.teamabnormals.blueprint.core.util.registry.RegistryHelper; +import galena.doom_and_gloom.compat.moonlight.MoonlightCompat; import galena.doom_and_gloom.compat.supplementaries.AmendmentsCompat; import galena.doom_and_gloom.content.entity.holler.Holler; import galena.doom_and_gloom.data.OBlockStates; @@ -114,6 +115,9 @@ public DoomAndGloom() { if (ModList.get().isLoaded("amendments")) { AmendmentsCompat.register(); } + if(ModList.get().isLoaded("moonlight")) { + MoonlightCompat.init(); + } } private void registerAttributes(EntityAttributeCreationEvent event) { diff --git a/src/main/java/galena/doom_and_gloom/compat/moonlight/CandlePoiSensor.java b/src/main/java/galena/doom_and_gloom/compat/moonlight/CandleSensor.java similarity index 56% rename from src/main/java/galena/doom_and_gloom/compat/moonlight/CandlePoiSensor.java rename to src/main/java/galena/doom_and_gloom/compat/moonlight/CandleSensor.java index bd112fb0..897ed0d9 100644 --- a/src/main/java/galena/doom_and_gloom/compat/moonlight/CandlePoiSensor.java +++ b/src/main/java/galena/doom_and_gloom/compat/moonlight/CandleSensor.java @@ -1,7 +1,8 @@ package galena.doom_and_gloom.compat.moonlight; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; +import galena.doom_and_gloom.index.OTags; +import galena.doom_and_gloom.index.OVillagerTypes; import net.minecraft.core.BlockPos; import net.minecraft.core.GlobalPos; import net.minecraft.resources.ResourceKey; @@ -11,42 +12,42 @@ import net.minecraft.world.entity.ai.sensing.Sensor; import net.minecraft.world.entity.npc.Villager; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Blocks; -import java.util.List; import java.util.Set; -public class CandlePoiSensor extends Sensor { +public class CandleSensor extends Sensor { - public CandlePoiSensor() { + public CandleSensor() { super(200); } @Override protected void doTick(ServerLevel pLevel, Villager pEntity) { - if (pEntity.isBaby()) { + if (!pEntity.isBaby() && pEntity.getVillagerData().getProfession() == OVillagerTypes.GRAVETENDER.get()) { ResourceKey resourcekey = pLevel.dimension(); BlockPos blockpos = pEntity.blockPosition(); - List list = Lists.newArrayList(); - int i = 4; + GlobalPos found = null; + int rad = 4; - for (int j = -4; j <= 4; ++j) { + for (int j = -rad; j <= rad; ++j) { for (int k = -2; k <= 2; ++k) { - for (int l = -4; l <= 4; ++l) { + for (int l = -rad; l <= rad; ++l) { BlockPos blockpos1 = blockpos.offset(j, k, l); - if (pLevel.getBlockState(blockpos1).is(Blocks.PUMPKIN)) { - list.add(GlobalPos.of(resourcekey, blockpos1)); + if (pLevel.getBlockState(blockpos1).is(OTags.Blocks.GRAVETENDER_LIGHTABLE)) { + found = (GlobalPos.of(resourcekey, blockpos1)); break; } } } } + Brain brain = pEntity.getBrain(); - if (!list.isEmpty()) { - brain.setMemory(MoonlightCompat.NEAREST_PUMPKIN.get(), list.get(0)); + + if (found != null) { + brain.setMemory(MoonlightCompat.NEAREST_UNLIT_CANDLE.get(), found); } else { - brain.eraseMemory(MoonlightCompat.NEAREST_PUMPKIN.get()); + brain.eraseMemory(MoonlightCompat.NEAREST_UNLIT_CANDLE.get()); } } @@ -54,6 +55,6 @@ protected void doTick(ServerLevel pLevel, Villager pEntity) { @Override public Set> requires() { - return ImmutableSet.of(MoonlightCompat.NEAREST_PUMPKIN.get()); + return ImmutableSet.of(MoonlightCompat.NEAREST_UNLIT_CANDLE.get()); } } \ No newline at end of file diff --git a/src/main/java/galena/doom_and_gloom/compat/moonlight/LightUpCandles.java b/src/main/java/galena/doom_and_gloom/compat/moonlight/LightUpCandles.java index bdcdb8c5..a510b837 100644 --- a/src/main/java/galena/doom_and_gloom/compat/moonlight/LightUpCandles.java +++ b/src/main/java/galena/doom_and_gloom/compat/moonlight/LightUpCandles.java @@ -1,6 +1,118 @@ package galena.doom_and_gloom.compat.moonlight; -public class LightUpCandles { - public LightUpCandles(float v) { +import com.google.common.collect.ImmutableMap; +import com.mojang.authlib.GameProfile; +import galena.doom_and_gloom.index.OTags; +import net.mehvahdjukaar.moonlight.api.platform.PlatHelper; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.GlobalPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.ai.behavior.Behavior; +import net.minecraft.world.entity.ai.behavior.BlockPosTracker; +import net.minecraft.world.entity.ai.memory.MemoryModuleType; +import net.minecraft.world.entity.ai.memory.MemoryStatus; +import net.minecraft.world.entity.ai.memory.WalkTarget; +import net.minecraft.world.entity.npc.Villager; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.util.FakePlayerFactory; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +public class LightUpCandles extends Behavior { + private final float speedModifier; + private int ticksSinceReached = 0; + private int cooldown = 20 * 30; + protected int lastBreakProgress = -1; + protected GlobalPos targetPos = null; + + public LightUpCandles(float speed) { + super(ImmutableMap.of( + MemoryModuleType.INTERACTION_TARGET, MemoryStatus.VALUE_ABSENT, + MoonlightCompat.NEAREST_UNLIT_CANDLE.get(), MemoryStatus.VALUE_PRESENT, + MemoryModuleType.WALK_TARGET, MemoryStatus.VALUE_ABSENT), + 270, 350); + this.speedModifier = speed * 1.1f; + + } + + @Override + protected boolean checkExtraStartConditions(ServerLevel pLevel, Villager pOwner) { + if (cooldown-- > 0) return false; + if (!PlatHelper.isMobGriefingOn(pLevel, pOwner)) { + cooldown = 20 * 60; + return false; + } + GlobalPos globalpos = pOwner.getBrain().getMemory(MoonlightCompat.NEAREST_UNLIT_CANDLE.get()).get(); + targetPos = globalpos; + return globalpos.dimension() == pLevel.dimension(); + } + + @Override + protected void start(ServerLevel pLevel, Villager pEntity, long pGameTime) { + this.cooldown = 20 * (5 + pLevel.random.nextInt(20)) + pLevel.random.nextInt(20); + this.ticksSinceReached = 0; + this.lastBreakProgress = -1; + + pEntity.getBrain().eraseMemory(MemoryModuleType.INTERACTION_TARGET); + pEntity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, new WalkTarget(targetPos.pos(), this.speedModifier, 1)); + // AskCandy.displayAsHeldItem(pEntity, new ItemStack(Items.IRON_AXE)); + } + + @Override + protected void stop(ServerLevel pLevel, Villager pEntity, long pGameTime) { + super.stop(pLevel, pEntity, pGameTime); + // AskCandy.clearHeldItem(pEntity); + } + + @Override + protected boolean canStillUse(ServerLevel pLevel, Villager pEntity, long pGameTime) { + return pEntity.getBrain().hasMemoryValue(MoonlightCompat.NEAREST_UNLIT_CANDLE.get()); + } + + private static final GameProfile GRAVETENDER = new GameProfile(UUID.fromString("f3f3f3f3-2233-f3f3-f3f3-f3f3f3f3f3f3"), "[Gravetender]"); + + @Override + protected void tick(ServerLevel pLevel, Villager pOwner, long pGameTime) { + BlockPos pos = targetPos.pos(); + + //hax + pOwner.getBrain().eraseMemory(MemoryModuleType.INTERACTION_TARGET); + pOwner.getBrain().setMemory(MemoryModuleType.WALK_TARGET, new WalkTarget(pos, this.speedModifier, 2)); + + pOwner.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, new BlockPosTracker(pos)); + if (pos.closerToCenterThan(pOwner.position(), 2.3)) { + this.ticksSinceReached++; + + BlockState state = pLevel.getBlockState(pos); + if (!state.is(OTags.Blocks.GRAVETENDER_LIGHTABLE)) { + pOwner.getBrain().eraseMemory(MoonlightCompat.NEAREST_UNLIT_CANDLE.get()); + } else { + //breaking animation. same as fodder lol. might have the same issues + int k = (int) ((float) this.ticksSinceReached / (float) 20 * 10.0F); + if (k != this.lastBreakProgress) { + this.lastBreakProgress = k; + } + + //TODO: this task is run for candles that are already on too. We would need to clear them off first and validate thatthey canbe extinguished + if (ticksSinceReached > 20) { + ServerPlayer player = FakePlayerFactory.get(pLevel, GRAVETENDER); + player.setItemInHand(InteractionHand.MAIN_HAND, Items.FLINT_AND_STEEL.getDefaultInstance()); + BlockHitResult hit = new BlockHitResult(Vec3.atBottomCenterOf(pos), Direction.UP, pos, false); + state.use(pLevel, player, InteractionHand.MAIN_HAND, hit); + } + } + + } } -} +} \ No newline at end of file diff --git a/src/main/java/galena/doom_and_gloom/compat/moonlight/MoonlightCompat.java b/src/main/java/galena/doom_and_gloom/compat/moonlight/MoonlightCompat.java index 77a2ce2f..208df1ae 100644 --- a/src/main/java/galena/doom_and_gloom/compat/moonlight/MoonlightCompat.java +++ b/src/main/java/galena/doom_and_gloom/compat/moonlight/MoonlightCompat.java @@ -5,6 +5,7 @@ import galena.doom_and_gloom.index.OVillagerTypes; import net.mehvahdjukaar.moonlight.api.entity.VillagerAIHooks; import net.mehvahdjukaar.moonlight.api.events.IVillagerBrainEvent; +import net.mehvahdjukaar.moonlight.api.platform.PlatHelper; import net.mehvahdjukaar.moonlight.api.platform.RegHelper; import net.minecraft.core.GlobalPos; import net.minecraft.world.entity.ai.memory.MemoryModuleType; @@ -12,36 +13,41 @@ import net.minecraft.world.entity.npc.Villager; import net.minecraft.world.entity.schedule.Activity; +import java.util.List; import java.util.Optional; import java.util.function.Supplier; public class MoonlightCompat { - public static final Supplier> PUMPKIN_POS = - RegHelper.registerMemoryModule(DoomAndGloom.modLoc("pumpkin_pos"), () -> - new MemoryModuleType<>(Optional.of(GlobalPos.CODEC))); + public static final Supplier>> CANDLES_I_LIT = + RegHelper.registerMemoryModule(DoomAndGloom.modLoc("candles_i_lit"), () -> + new MemoryModuleType<>(Optional.of(GlobalPos.CODEC.listOf()))); - public static final Supplier> NEAREST_PUMPKIN = - RegHelper.registerMemoryModule(DoomAndGloom.modLoc("nearest_pumpkin"), () -> + //list as these could be lit + public static final Supplier> NEAREST_UNLIT_CANDLE = + RegHelper.registerMemoryModule(DoomAndGloom.modLoc("nearest_candle"), () -> new MemoryModuleType<>(Optional.empty())); - public static final Supplier> PUMPKIN_POI_SENSOR = + public static final Supplier> CANDLES_SENSOR = RegHelper.registerSensor(DoomAndGloom.modLoc("candle_poi"), () -> - new SensorType<>(CandlePoiSensor::new)); + new SensorType<>(CandleSensor::new)); public static void init() { VillagerAIHooks.addBrainModification(MoonlightCompat::onVillagerBrainInitialize); - VillagerAIHooks.registerMemory(PUMPKIN_POS.get()); - VillagerAIHooks.registerMemory(NEAREST_PUMPKIN.get()); + PlatHelper.addCommonSetup(() -> { + VillagerAIHooks.registerMemory(CANDLES_I_LIT.get()); + VillagerAIHooks.registerMemory(NEAREST_UNLIT_CANDLE.get()); + }); } public static void onVillagerBrainInitialize(IVillagerBrainEvent event) { Villager villager = event.getVillager(); if (!villager.isBaby() && villager.getVillagerData().getProfession() == OVillagerTypes.GRAVETENDER.get()) { - // event.addTaskToActivity(Activity.WORK, Pair.of(3, new LightUpCandles(0.5f))); + event.addTaskToActivity(Activity.WORK, Pair.of(3, new LightUpCandles(0.5f))); event.addTaskToActivity(Activity.IDLE, Pair.of(3, new TurnOffCandles(0.5f))); + event.addSensor(CANDLES_SENSOR.get()); } } } diff --git a/src/main/java/galena/doom_and_gloom/compat/moonlight/TurnOffCandles.java b/src/main/java/galena/doom_and_gloom/compat/moonlight/TurnOffCandles.java index dd063926..8b0ab1a4 100644 --- a/src/main/java/galena/doom_and_gloom/compat/moonlight/TurnOffCandles.java +++ b/src/main/java/galena/doom_and_gloom/compat/moonlight/TurnOffCandles.java @@ -1,31 +1,44 @@ package galena.doom_and_gloom.compat.moonlight; import com.google.common.collect.ImmutableMap; +import com.mojang.authlib.GameProfile; +import galena.doom_and_gloom.index.OTags; import net.mehvahdjukaar.moonlight.api.platform.PlatHelper; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.core.GlobalPos; import net.minecraft.server.level.ServerLevel; -import net.minecraft.sounds.SoundSource; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.ai.behavior.Behavior; import net.minecraft.world.entity.ai.behavior.BlockPosTracker; import net.minecraft.world.entity.ai.memory.MemoryModuleType; import net.minecraft.world.entity.ai.memory.MemoryStatus; import net.minecraft.world.entity.ai.memory.WalkTarget; import net.minecraft.world.entity.npc.Villager; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.util.FakePlayerFactory; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; public class TurnOffCandles extends Behavior { private final float speedModifier; private int ticksSinceReached = 0; private int cooldown = 20 * 30; protected int lastBreakProgress = -1; + protected GlobalPos targetPos = null; public TurnOffCandles(float speed) { super(ImmutableMap.of( MemoryModuleType.INTERACTION_TARGET, MemoryStatus.VALUE_ABSENT, - MoonlightCompat.PUMPKIN_POS.get(), MemoryStatus.VALUE_PRESENT, + MoonlightCompat.CANDLES_I_LIT.get(), MemoryStatus.VALUE_PRESENT, MemoryModuleType.WALK_TARGET, MemoryStatus.VALUE_ABSENT), 270, 350); this.speedModifier = speed * 1.1f; @@ -39,8 +52,25 @@ protected boolean checkExtraStartConditions(ServerLevel pLevel, Villager pOwner) cooldown = 20 * 60; return false; } - GlobalPos globalpos = pOwner.getBrain().getMemory(MoonlightCompat.PUMPKIN_POS.get()).get(); - return globalpos.dimension() == pLevel.dimension() && !pOwner.isBaby(); + List globalpos = pOwner.getBrain().getMemory(MoonlightCompat.CANDLES_I_LIT.get()).get(); + GlobalPos closest = findClosestCandleILit(globalpos, pLevel, pOwner, 20); + targetPos = closest; + return closest != null; + } + + @Nullable + public GlobalPos findClosestCandleILit(List pos, Level level, Villager owner, int maxDistance) { + GlobalPos closest = null; + double closestDist = Double.MAX_VALUE; + for (GlobalPos p : pos) { + if (p.dimension() != level.dimension()) continue; + double dist = owner.position().distanceToSqr(Vec3.atBottomCenterOf(p.pos())); + if (dist < closestDist) { + closest = p; + closestDist = dist; + } + } + return closest; } @Override @@ -48,27 +78,30 @@ protected void start(ServerLevel pLevel, Villager pEntity, long pGameTime) { this.cooldown = 20 * (5 + pLevel.random.nextInt(20)) + pLevel.random.nextInt(20); this.ticksSinceReached = 0; this.lastBreakProgress = -1; - GlobalPos globalpos = pEntity.getBrain().getMemory(MoonlightCompat.PUMPKIN_POS.get()).get(); pEntity.getBrain().eraseMemory(MemoryModuleType.INTERACTION_TARGET); - pEntity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, new WalkTarget(globalpos.pos(), this.speedModifier, 1)); - // AskCandy.displayAsHeldItem(pEntity, new ItemStack(Items.IRON_AXE)); + pEntity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, new WalkTarget(targetPos.pos(), this.speedModifier, 1)); + // AskCandy.displayAsHeldItem(pEntity, new ItemStack(Items.IRON_AXE)); } @Override protected void stop(ServerLevel pLevel, Villager pEntity, long pGameTime) { super.stop(pLevel, pEntity, pGameTime); - // AskCandy.clearHeldItem(pEntity); + // AskCandy.clearHeldItem(pEntity); } @Override protected boolean canStillUse(ServerLevel pLevel, Villager pEntity, long pGameTime) { - return pEntity.getBrain().hasMemoryValue(MoonlightCompat.PUMPKIN_POS.get()); + Optional> memory = pEntity.getBrain() + .getMemory(MoonlightCompat.CANDLES_I_LIT.get()); + return memory.isPresent() && memory.get().contains(targetPos); } + private static final GameProfile GRAVETENDER = new GameProfile(UUID.fromString("f3f3f3f3-2233-f3f3-f3f3-f3f3f3f3f3f3"), "[Gravetender]"); + @Override protected void tick(ServerLevel pLevel, Villager pOwner, long pGameTime) { - BlockPos pos = pOwner.getBrain().getMemory(MoonlightCompat.PUMPKIN_POS.get()).get().pos(); + BlockPos pos = targetPos.pos(); //hax pOwner.getBrain().eraseMemory(MemoryModuleType.INTERACTION_TARGET); @@ -79,22 +112,27 @@ protected void tick(ServerLevel pLevel, Villager pOwner, long pGameTime) { this.ticksSinceReached++; BlockState state = pLevel.getBlockState(pos); - if (!state.is(Blocks.PUMPKIN)) { - pOwner.getBrain().eraseMemory(MoonlightCompat.PUMPKIN_POS.get()); + if (!state.is(OTags.Blocks.GRAVETENDER_LIGHTABLE)) { + var list = pOwner.getBrain().getMemory(MoonlightCompat.CANDLES_I_LIT.get()); + if (list.isPresent()) { + list.get().remove(targetPos); + if (list.get().isEmpty()) { + pOwner.getBrain().eraseMemory(MoonlightCompat.CANDLES_I_LIT.get()); + } + } } else { //breaking animation. same as fodder lol. might have the same issues int k = (int) ((float) this.ticksSinceReached / (float) 20 * 10.0F); if (k != this.lastBreakProgress) { - pLevel.destroyBlockProgress(pOwner.getId(), pos, k); this.lastBreakProgress = k; } + //TODO: this task is run for candles that are already on too. We would need to clear them off first and validate thatthey canbe extinguished if (ticksSinceReached > 20) { - - SoundType soundtype = state.getSoundType(); - pLevel.playSound(null, pos, soundtype.getBreakSound(), SoundSource.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F); - pOwner.getBrain().eraseMemory(MoonlightCompat.PUMPKIN_POS.get()); - pLevel.destroyBlock(pos, true); + ServerPlayer player = FakePlayerFactory.get(pLevel, GRAVETENDER); + player.setItemInHand(InteractionHand.MAIN_HAND, ItemStack.EMPTY); + BlockHitResult hit = new BlockHitResult(Vec3.atBottomCenterOf(pos), Direction.UP, pos, false); + state.use(pLevel, player, InteractionHand.MAIN_HAND, hit); } } 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 35cc46e1..62b46c90 100644 --- a/src/main/java/galena/doom_and_gloom/data/OBlockTags.java +++ b/src/main/java/galena/doom_and_gloom/data/OBlockTags.java @@ -6,6 +6,7 @@ import net.minecraft.core.registries.Registries; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.IntrinsicHolderTagsProvider; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -15,9 +16,7 @@ import javax.annotation.Nullable; import java.util.concurrent.CompletableFuture; -import static galena.doom_and_gloom.index.OTags.Blocks.CAN_TURN_INTO_BURIAL_DIRT; -import static galena.doom_and_gloom.index.OTags.Blocks.HEAT_SOURCE; -import static galena.doom_and_gloom.index.OTags.Blocks.VIGIL_CANDLES; +import static galena.doom_and_gloom.index.OTags.Blocks.*; public class OBlockTags extends IntrinsicHolderTagsProvider { @@ -46,6 +45,7 @@ protected void addTags(HolderLookup.Provider provider) { tag(BlockTags.CANDLES).addTags(VIGIL_CANDLES); tag(BlockTags.MINEABLE_WITH_PICKAXE).addTags(VIGIL_CANDLES); + tag(BlockTags.MINEABLE_WITH_PICKAXE).add(OBlocks.SEPULCHER.get()); tag(CAN_TURN_INTO_BURIAL_DIRT).add( Blocks.DIRT, @@ -55,5 +55,9 @@ protected void addTags(HolderLookup.Provider provider) { Blocks.COARSE_DIRT, Blocks.ROOTED_DIRT ); + + tag(GRAVETENDER_LIGHTABLE) + .addTag(BlockTags.CANDLES) + .addOptionalTag(new ResourceLocation("amendments:skull_candles")); } } diff --git a/src/main/java/galena/doom_and_gloom/index/OTags.java b/src/main/java/galena/doom_and_gloom/index/OTags.java index c191fdf1..6bde29b2 100644 --- a/src/main/java/galena/doom_and_gloom/index/OTags.java +++ b/src/main/java/galena/doom_and_gloom/index/OTags.java @@ -35,6 +35,7 @@ public static class Blocks { public static final TagKey HEAT_SOURCE = BlockTags.create(new ResourceLocation("oreganized", "fire_source")); public static final TagKey VIGIL_CANDLES = tag("vigil_candles"); public static final TagKey CAN_TURN_INTO_BURIAL_DIRT = tag("burial_dirt_convertible"); + public static final TagKey GRAVETENDER_LIGHTABLE = tag("gravetender_lightables"); private static TagKey tag(String name) { return BlockTags.create(DoomAndGloom.modLoc(name)); diff --git a/src/main/resources/assets/doom_and_gloom/blockstates/stone_tablet.json b/src/main/resources/assets/doom_and_gloom/blockstates/stone_tablet.json index 671b02e6..e9e0700b 100644 --- a/src/main/resources/assets/doom_and_gloom/blockstates/stone_tablet.json +++ b/src/main/resources/assets/doom_and_gloom/blockstates/stone_tablet.json @@ -125,7 +125,7 @@ }, "attachment=floor,facing=north,type=engraved": { - "model": "doom_and_gloom:block/stone_tablet_floor_engraved", + "model": "doom_and_gloom:block/stone_tablet_floor_engraved" }, "attachment=floor,facing=east,type=engraved": { "model": "doom_and_gloom:block/stone_tablet_floor_engraved", @@ -135,7 +135,6 @@ "attachment=floor,facing=south,type=engraved": { "model": "doom_and_gloom:block/stone_tablet_floor_engraved", "y": 180 - }, "attachment=floor,facing=west,type=engraved": { "model": "doom_and_gloom:block/stone_tablet_floor_engraved", diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json deleted file mode 100644 index e2a0779e..00000000 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "doom_and_gloom:stone_tablet" - ] -} \ No newline at end of file