From 2fa65727d5f563311e0c0950f44e36fc69d105be Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 22 Mar 2022 00:29:46 +0100 Subject: [PATCH] Holder Holdups - Finished work on compilation errors --- .../java/com/simibubi/create/AllItems.java | 6 +- .../create/AllMovementBehaviours.java | 2 +- .../java/com/simibubi/create/AllTags.java | 56 +++++++++++-------- src/main/java/com/simibubi/create/Create.java | 2 +- .../dispenser/DispenserMovementBehaviour.java | 26 +++------ .../BlockMovementChecks.java | 7 +-- .../processing/InWorldProcessing.java | 23 +++++--- .../contraptions/relays/belt/BeltBlock.java | 11 +++- .../tools/BlueprintOverlayRenderer.java | 10 +++- .../weapons/BuiltinPotatoProjectileTypes.java | 53 +++++++++++------- .../palettes/AllPaletteStoneTypes.java | 8 ++- .../MechanicalCraftingRecipeBuilder.java | 4 +- .../foundation/fluid/FluidIngredient.java | 21 ++++--- .../item/TagDependentIngredientItem.java | 17 +++--- .../accessor/DispenserBlockAccessor.java | 14 +++++ .../behaviour/ValueBoxRenderer.java | 11 +++- .../foundation/worldgen/AllWorldFeatures.java | 25 +++++---- .../worldgen/ConfigDrivenDecorator.java | 5 +- .../worldgen/ConfigDrivenFeatureEntry.java | 18 ++---- .../resources/META-INF/accesstransformer.cfg | 1 + src/main/resources/META-INF/mods.toml | 8 +-- src/main/resources/create.mixins.json | 3 +- 22 files changed, 188 insertions(+), 143 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/mixin/accessor/DispenserBlockAccessor.java diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index f87b7aea6..523d16e81 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -60,7 +60,6 @@ import com.simibubi.create.foundation.item.TagDependentIngredientItem; import com.simibubi.create.foundation.item.TooltipHelper; import com.tterrag.registrate.util.entry.ItemEntry; -import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.food.FoodProperties; @@ -308,7 +307,8 @@ public class AllItems { public static final ItemEntry WAND_OF_SYMMETRY = REGISTRATE.item("wand_of_symmetry", SymmetryWandItem::new) - .properties(p -> p.stacksTo(1).rarity(Rarity.UNCOMMON)) + .properties(p -> p.stacksTo(1) + .rarity(Rarity.UNCOMMON)) .model(AssetLookup.itemModelWithPartials()) .register(); @@ -380,7 +380,7 @@ public class AllItems { String metalName = metal.getName(); return REGISTRATE .item("crushed_" + metalName + "_ore", - props -> new TagDependentIngredientItem(props, new ResourceLocation("forge", "ores/" + metalName))) + props -> new TagDependentIngredientItem(props, AllTags.forgeItemTag("ores/" + metalName))) .tag(CRUSHED_ORES.tag) .register(); } diff --git a/src/main/java/com/simibubi/create/AllMovementBehaviours.java b/src/main/java/com/simibubi/create/AllMovementBehaviours.java index 03cd553c3..857ea7ab4 100644 --- a/src/main/java/com/simibubi/create/AllMovementBehaviours.java +++ b/src/main/java/com/simibubi/create/AllMovementBehaviours.java @@ -57,7 +57,7 @@ public class AllMovementBehaviours { addMovementBehaviour(Blocks.BELL, new BellMovementBehaviour()); addMovementBehaviour(Blocks.CAMPFIRE, new CampfireMovementBehaviour()); - DispenserMovementBehaviour.gatherMovedDispenseItemBehaviours(); + DispenserMovementBehaviour.gatherMovedDispenseItemBehaviours(); addMovementBehaviour(Blocks.DISPENSER, new DispenserMovementBehaviour()); addMovementBehaviour(Blocks.DROPPER, new DropperMovementBehaviour()); } diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index b571387ba..b13bace98 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -4,6 +4,7 @@ import static com.simibubi.create.AllTags.NameSpace.FORGE; import static com.simibubi.create.AllTags.NameSpace.MOD; import static com.simibubi.create.AllTags.NameSpace.TIC; +import java.util.Collections; import java.util.function.Function; import com.simibubi.create.foundation.data.CreateRegistrate; @@ -15,8 +16,6 @@ import com.tterrag.registrate.util.nullness.NonNullFunction; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; -import net.minecraft.tags.FluidTags; -import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; @@ -28,6 +27,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.Fluids; import net.minecraftforge.common.Tags; +import net.minecraftforge.registries.ForgeRegistries; public class AllTags { @@ -44,15 +44,18 @@ public class AllTags { } public static TagKey forgeBlockTag(String path) { - return forgeTag(BlockTags::createOptional, path); + return forgeTag(r -> ForgeRegistries.BLOCKS.tags() + .createOptionalTagKey(r, Collections.emptySet()), path); } public static TagKey forgeItemTag(String path) { - return forgeTag(ItemTags::createOptional, path); + return forgeTag(r -> ForgeRegistries.ITEMS.tags() + .createOptionalTagKey(r, Collections.emptySet()), path); } public static TagKey forgeFluidTag(String path) { - return forgeTag(FluidTags::createOptional, path); + return forgeTag(r -> ForgeRegistries.FLUIDS.tags() + .createOptionalTagKey(r, Collections.emptySet()), path); } public static NonNullFunction, BlockBuilder> axeOrPickaxe() { @@ -71,10 +74,10 @@ public class AllTags { public static NonNullFunction, ItemBuilder>> tagBlockAndItem( String... path) { return b -> { - for (String p : path) + for (String p : path) b.tag(forgeBlockTag(p)); - ItemBuilder> item = b.item(); - for (String p : path) + ItemBuilder> item = b.item(); + for (String p : path) item.tag(forgeItemTag(p)); return item; }; @@ -82,9 +85,7 @@ public class AllTags { public enum NameSpace { - MOD(Create.ID, false, true), - FORGE("forge"), - TIC("tconstruct") + MOD(Create.ID, false, true), FORGE("forge"), TIC("tconstruct") ; @@ -119,6 +120,7 @@ public class AllTags { WRENCH_PICKUP, WG_STONE(FORGE), + RELOCATION_NOT_SUPPORTED(FORGE), SLIMY_LOGS(TIC), @@ -145,9 +147,10 @@ public class AllTags { AllBlockTags(NameSpace namespace, String path, boolean optional, boolean alwaysDatagen) { ResourceLocation id = new ResourceLocation(namespace.id, path == null ? Lang.asId(name()) : path); if (optional) { - tag = BlockTags.createOptional(id); + tag = ForgeRegistries.BLOCKS.tags() + .createOptionalTagKey(id, Collections.emptySet()); } else { - tag = BlockTags.bind(id.toString()); + tag = TagKey.create(ForgeRegistries.BLOCKS.getRegistryKey(), id); } if (alwaysDatagen) { REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, prov -> prov.tag(tag)); @@ -155,7 +158,9 @@ public class AllTags { } public boolean matches(Block block) { - return tag.contains(block); + return ForgeRegistries.BLOCKS.getHolder(block) + .map(h -> h.containsTag(tag)) + .orElse(false); } public boolean matches(BlockState state) { @@ -221,9 +226,10 @@ public class AllTags { AllItemTags(NameSpace namespace, String path, boolean optional, boolean alwaysDatagen) { ResourceLocation id = new ResourceLocation(namespace.id, path == null ? Lang.asId(name()) : path); if (optional) { - tag = ItemTags.createOptional(id); + tag = ForgeRegistries.ITEMS.tags() + .createOptionalTagKey(id, Collections.emptySet()); } else { - tag = ItemTags.bind(id.toString()); + tag = TagKey.create(ForgeRegistries.ITEMS.getRegistryKey(), id); } if (alwaysDatagen) { REGISTRATE.addDataGenerator(ProviderType.ITEM_TAGS, prov -> prov.tag(tag)); @@ -231,7 +237,9 @@ public class AllTags { } public boolean matches(ItemStack stack) { - return tag.contains(stack.getItem()); + return ForgeRegistries.ITEMS.getHolder(stack.getItem()) + .map(h -> h.containsTag(tag)) + .orElse(false); } public void add(Item... values) { @@ -285,17 +293,19 @@ public class AllTags { AllFluidTags(NameSpace namespace, String path, boolean optional, boolean alwaysDatagen) { ResourceLocation id = new ResourceLocation(namespace.id, path == null ? Lang.asId(name()) : path); if (optional) { - tag = FluidTags.createOptional(id); + tag = ForgeRegistries.FLUIDS.tags() + .createOptionalTagKey(id, Collections.emptySet()); } else { - tag = FluidTags.bind(id.toString()); + tag = TagKey.create(ForgeRegistries.FLUIDS.getRegistryKey(), id); } - if (alwaysDatagen) { + if (alwaysDatagen) REGISTRATE.addDataGenerator(ProviderType.FLUID_TAGS, prov -> prov.tag(tag)); - } } public boolean matches(Fluid fluid) { - return fluid != null && fluid.is(tag); + return fluid != null && ForgeRegistries.FLUIDS.getHolder(fluid) + .map(h -> h.containsTag(tag)) + .orElse(false); } public void add(Fluid... values) { @@ -347,7 +357,7 @@ public class AllTags { AllBlockTags.WRENCH_PICKUP.add(Blocks.REDSTONE_WIRE, Blocks.REDSTONE_TORCH, Blocks.REPEATER, Blocks.LEVER, Blocks.COMPARATOR, Blocks.OBSERVER, Blocks.REDSTONE_WALL_TORCH, Blocks.PISTON, Blocks.STICKY_PISTON, Blocks.TRIPWIRE, Blocks.TRIPWIRE_HOOK, Blocks.DAYLIGHT_DETECTOR, Blocks.TARGET); - + AllBlockTags.ORE_OVERRIDE_STONE.includeAll(BlockTags.STONE_ORE_REPLACEABLES); } diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 8aeaae1ff..c27666bd6 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -57,7 +57,7 @@ public class Create { public static final String ID = "create"; public static final String NAME = "Create"; - public static final String VERSION = "0.4f"; + public static final String VERSION = "0.4.1"; public static final Logger LOGGER = LogManager.getLogger(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java index 008fe9ba2..48bbc0caf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java @@ -2,11 +2,9 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; import java.util.HashMap; -import javax.annotation.ParametersAreNonnullByDefault; - import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.foundation.mixin.accessor.DispenserBlockAccessor; -import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.dispenser.AbstractProjectileDispenseBehavior; @@ -16,23 +14,26 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.DispenserBlock; -import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.phys.Vec3; public class DispenserMovementBehaviour extends DropperMovementBehaviour { private static final HashMap MOVED_DISPENSE_ITEM_BEHAVIOURS = new HashMap<>(); private static final HashMap MOVED_PROJECTILE_DISPENSE_BEHAVIOURS = new HashMap<>(); - private static final DispenserLookup BEHAVIOUR_LOOKUP = new DispenserLookup(); private static boolean spawneggsRegistered = false; public static void gatherMovedDispenseItemBehaviours() { IMovedDispenseItemBehaviour.init(); } - public static void registerMovedDispenseItemBehaviour(Item item, IMovedDispenseItemBehaviour movedDispenseItemBehaviour) { + public static void registerMovedDispenseItemBehaviour(Item item, + IMovedDispenseItemBehaviour movedDispenseItemBehaviour) { MOVED_DISPENSE_ITEM_BEHAVIOURS.put(item, movedDispenseItemBehaviour); } + public static DispenseItemBehavior getDispenseMethod(ItemStack itemstack) { + return ((DispenserBlockAccessor) Blocks.DISPENSER).create$callGetDispenseMethod(itemstack); + } + @Override protected void activate(MovementContext context, BlockPos pos) { if (!spawneggsRegistered) { @@ -59,7 +60,7 @@ public class DispenserMovementBehaviour extends DropperMovementBehaviour { return; } - DispenseItemBehavior idispenseitembehavior = BEHAVIOUR_LOOKUP.getDispenseMethod(itemstack); + DispenseItemBehavior idispenseitembehavior = getDispenseMethod(itemstack); if (idispenseitembehavior instanceof AbstractProjectileDispenseBehavior) { // Projectile behaviours can be converted most of the time IMovedDispenseItemBehaviour iMovedDispenseItemBehaviour = MovedProjectileDispenserBehaviour.of((AbstractProjectileDispenseBehavior) idispenseitembehavior); setItemStackAt(location, iMovedDispenseItemBehaviour.dispense(itemstack, context, pos), context); @@ -85,15 +86,4 @@ public class DispenserMovementBehaviour extends DropperMovementBehaviour { } } - @ParametersAreNonnullByDefault - @MethodsReturnNonnullByDefault - private static class DispenserLookup extends DispenserBlock { - protected DispenserLookup() { - super(BlockBehaviour.Properties.copy(Blocks.DISPENSER)); - } - - public DispenseItemBehavior getDispenseMethod(ItemStack itemStack) { - return super.getDispenseMethod(itemStack); - } - } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java index eee909ddb..66d7b09a1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java @@ -5,7 +5,6 @@ import java.util.List; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTags.AllBlockTags; -import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.components.actors.AttachedActorBlock; import com.simibubi.create.content.contraptions.components.actors.HarvesterBlock; import com.simibubi.create.content.contraptions.components.actors.PloughBlock; @@ -36,7 +35,6 @@ import com.simibubi.create.foundation.config.ContraptionMovementSetting; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BasePressurePlateBlock; import net.minecraft.world.level.block.BaseRailBlock; @@ -75,7 +73,6 @@ public class BlockMovementChecks { private static final List BRITTLE_CHECKS = new ArrayList<>(); private static final List ATTACHED_CHECKS = new ArrayList<>(); private static final List NOT_SUPPORTIVE_CHECKS = new ArrayList<>(); - public static final ResourceLocation NON_MOVABLE = Create.asResource("non_movable"); // Registration // Add new checks to the front instead of the end @@ -194,7 +191,7 @@ public class BlockMovementChecks { return true; if (state.getDestroySpeed(world, pos) == -1) return false; - if (state.getBlock().getTags().contains(NON_MOVABLE)) + if (AllBlockTags.RELOCATION_NOT_SUPPORTED.matches(state)) return false; if (ContraptionMovementSetting.get(state.getBlock()) == ContraptionMovementSetting.UNMOVABLE) return false; @@ -255,7 +252,7 @@ public class BlockMovementChecks { return true; if (block instanceof WoolCarpetBlock) return true; - return AllBlockTags.BRITTLE.tag.contains(block); + return AllBlockTags.BRITTLE.matches(block); } private static boolean isBlockAttachedTowardsFallback(BlockState state, Level world, BlockPos pos, diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java b/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java index 47c42026d..1d46c76b0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java @@ -56,6 +56,7 @@ import net.minecraft.world.phys.Vec3; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.wrapper.RecipeWrapper; +import net.minecraftforge.registries.ForgeRegistries; public class InWorldProcessing { @@ -292,8 +293,8 @@ public class InWorldProcessing { } if (entity.isOnFire()) { entity.clearFire(); - level.playSound(null, entity.blockPosition(), SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.NEUTRAL, - 0.7F, 1.6F + (level.random.nextFloat() - level.random.nextFloat()) * 0.4F); + level.playSound(null, entity.blockPosition(), SoundEvents.GENERIC_EXTINGUISH_FIRE, + SoundSource.NEUTRAL, 0.7F, 1.6F + (level.random.nextFloat() - level.random.nextFloat()) * 0.4F); } } @@ -467,14 +468,20 @@ public class InWorldProcessing { if (block == Blocks.SOUL_FIRE || block == Blocks.SOUL_CAMPFIRE && blockState.getOptionalValue(CampfireBlock.LIT) .orElse(false) - || AllBlocks.LIT_BLAZE_BURNER.has(blockState) && blockState.getOptionalValue(LitBlazeBurnerBlock.FLAME_TYPE) - .map(flame -> flame == LitBlazeBurnerBlock.FlameType.SOUL).orElse(false)) + || AllBlocks.LIT_BLAZE_BURNER.has(blockState) + && blockState.getOptionalValue(LitBlazeBurnerBlock.FLAME_TYPE) + .map(flame -> flame == LitBlazeBurnerBlock.FlameType.SOUL) + .orElse(false)) return Type.HAUNTING; - if (block == Blocks.FIRE - || BlockTags.CAMPFIRES.contains(block) && blockState.getOptionalValue(CampfireBlock.LIT) + if (block == Blocks.FIRE || ForgeRegistries.BLOCKS.getHolder(block) + .map(h -> h.containsTag(BlockTags.CAMPFIRES)) + .orElse(false) + && blockState.getOptionalValue(CampfireBlock.LIT) .orElse(false) - || AllBlocks.LIT_BLAZE_BURNER.has(blockState) && blockState.getOptionalValue(LitBlazeBurnerBlock.FLAME_TYPE) - .map(flame -> flame == LitBlazeBurnerBlock.FlameType.REGULAR).orElse(false) + || AllBlocks.LIT_BLAZE_BURNER.has(blockState) + && blockState.getOptionalValue(LitBlazeBurnerBlock.FLAME_TYPE) + .map(flame -> flame == LitBlazeBurnerBlock.FlameType.REGULAR) + .orElse(false) || getHeatLevelOf(blockState) == BlazeBurnerBlock.HeatLevel.SMOULDERING) return Type.SMOKING; if (block == Blocks.LAVA || getHeatLevelOf(blockState).isAtLeast(BlazeBurnerBlock.HeatLevel.FADING)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java index 5dfddd725..020711c3b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java @@ -82,6 +82,7 @@ import net.minecraftforge.client.IBlockRenderProperties; import net.minecraftforge.common.Tags; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.registries.ForgeRegistries; public class BeltBlock extends HorizontalKineticBlock implements ITE, ISpecialBlockItemRequirement { @@ -130,7 +131,8 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE h.containsTag(Tags.Items.DYES)) + .orElse(false); boolean hasWater = EmptyingByBasin.emptyItem(world, heldItem, true) .getFirst() .getFluid() @@ -603,7 +607,8 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE itag = ItemTags.getAllTags() - .getTag(inTag.tagName); + TagKey itag = ForgeRegistries.ITEMS.tags() + .getTagNames() + .filter(tk -> tk.location() + .equals(inTag.tagName)) + .findAny() + .orElse(null); if (itag != null) return Ingredient.of(itag) .getItems(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/weapons/BuiltinPotatoProjectileTypes.java b/src/main/java/com/simibubi/create/content/curiosities/weapons/BuiltinPotatoProjectileTypes.java index f9ddc997f..4724fdbdd 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/weapons/BuiltinPotatoProjectileTypes.java +++ b/src/main/java/com/simibubi/create/content/curiosities/weapons/BuiltinPotatoProjectileTypes.java @@ -22,6 +22,7 @@ import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.animal.Fox; import net.minecraft.world.entity.item.FallingBlockEntity; @@ -147,7 +148,7 @@ public class BuiltinPotatoProjectileTypes { .knockback(0.1f) .renderTumbling() .soundPitch(1.1f) - .onEntityHit(potion(MobEffects.MOVEMENT_SLOWDOWN, 2,160, true)) + .onEntityHit(potion(MobEffects.MOVEMENT_SLOWDOWN, 2, 160, true)) .registerAndAssign(AllItems.HONEYED_APPLE.get()), GOLDEN_APPLE = create("golden_apple").damage(1) @@ -160,8 +161,7 @@ public class BuiltinPotatoProjectileTypes { Entity entity = ray.getEntity(); Level world = entity.level; - if (!(entity instanceof ZombieVillager) - || !((ZombieVillager) entity).hasEffect(MobEffects.WEAKNESS)) + if (!(entity instanceof ZombieVillager) || !((ZombieVillager) entity).hasEffect(MobEffects.WEAKNESS)) return foodEffects(Foods.GOLDEN_APPLE, false).test(ray); if (world.isClientSide) return false; @@ -261,7 +261,8 @@ public class BuiltinPotatoProjectileTypes { private static Predicate setFire(int seconds) { return ray -> { - ray.getEntity().setSecondsOnFire(seconds); + ray.getEntity() + .setSecondsOnFire(seconds); return false; }; } @@ -294,8 +295,10 @@ public class BuiltinPotatoProjectileTypes { } private static void applyEffect(LivingEntity entity, MobEffectInstance effect) { - if (effect.getEffect().isInstantenous()) - effect.getEffect().applyInstantenousEffect(null, null, entity, effect.getDuration(), 1.0); + if (effect.getEffect() + .isInstantenous()) + effect.getEffect() + .applyInstantenousEffect(null, null, entity, effect.getDuration(), 1.0); else entity.addEffect(effect); } @@ -319,12 +322,14 @@ public class BuiltinPotatoProjectileTypes { BlockState blockState = world.getBlockState(hitPos); if (!blockState.canSustainPlant(world, hitPos, face, (IPlantable) cropBlock.get())) return false; - world.setBlock(placePos, cropBlock.get().defaultBlockState(), 3); + world.setBlock(placePos, cropBlock.get() + .defaultBlockState(), 3); return true; }; } - private static BiPredicate placeBlockOnGround(IRegistryDelegate block) { + private static BiPredicate placeBlockOnGround( + IRegistryDelegate block) { return (world, ray) -> { if (world.isClientSide()) return true; @@ -340,18 +345,23 @@ public class BuiltinPotatoProjectileTypes { return false; if (face == Direction.UP) { - world.setBlock(placePos, block.get().defaultBlockState(), 3); - } else if (world instanceof Level) { + world.setBlock(placePos, block.get() + .defaultBlockState(), 3); + } else if (world instanceof Level level) { double y = ray.getLocation().y - 0.5; if (!world.isEmptyBlock(placePos.above())) y = Math.min(y, placePos.getY()); if (!world.isEmptyBlock(placePos.below())) y = Math.max(y, placePos.getY()); - FallingBlockEntity falling = new FallingBlockEntity((Level) world, placePos.getX() + 0.5, y, - placePos.getZ() + 0.5, block.get().defaultBlockState()); - falling.time = 1; - world.addFreshEntity(falling); + BlockState fallingState = block.get() + .defaultBlockState(); + + FallingBlockEntity fallingBlockEntity = new FallingBlockEntity(EntityType.FALLING_BLOCK, level); + fallingBlockEntity.setPos(placePos.getX() + 0.5, y, placePos.getZ() + 0.5); + fallingBlockEntity.time = 1; + fallingBlockEntity.blockState = fallingState; + world.addFreshEntity(fallingBlockEntity); } return true; @@ -373,18 +383,23 @@ public class BuiltinPotatoProjectileTypes { double entityZ = livingEntity.getZ(); for (int teleportTry = 0; teleportTry < 16; ++teleportTry) { - double teleportX = entityX + (livingEntity.getRandom().nextDouble() - 0.5D) * teleportDiameter; - double teleportY = Mth.clamp(entityY + (livingEntity.getRandom().nextInt((int) teleportDiameter) - (int) (teleportDiameter / 2)), 0.0D, world.getHeight() - 1); - double teleportZ = entityZ + (livingEntity.getRandom().nextDouble() - 0.5D) * teleportDiameter; + double teleportX = entityX + (livingEntity.getRandom() + .nextDouble() - 0.5D) * teleportDiameter; + double teleportY = Mth.clamp(entityY + (livingEntity.getRandom() + .nextInt((int) teleportDiameter) - (int) (teleportDiameter / 2)), 0.0D, world.getHeight() - 1); + double teleportZ = entityZ + (livingEntity.getRandom() + .nextDouble() - 0.5D) * teleportDiameter; - EntityTeleportEvent.ChorusFruit event = ForgeEventFactory.onChorusFruitTeleport(livingEntity, teleportX, teleportY, teleportZ); + EntityTeleportEvent.ChorusFruit event = + ForgeEventFactory.onChorusFruitTeleport(livingEntity, teleportX, teleportY, teleportZ); if (event.isCanceled()) return false; if (livingEntity.randomTeleport(event.getTargetX(), event.getTargetY(), event.getTargetZ(), true)) { if (livingEntity.isPassenger()) livingEntity.stopRiding(); - SoundEvent soundevent = livingEntity instanceof Fox ? SoundEvents.FOX_TELEPORT : SoundEvents.CHORUS_FRUIT_TELEPORT; + SoundEvent soundevent = + livingEntity instanceof Fox ? SoundEvents.FOX_TELEPORT : SoundEvents.CHORUS_FRUIT_TELEPORT; world.playSound(null, entityX, entityY, entityZ, soundevent, SoundSource.PLAYERS, 1.0F, 1.0F); livingEntity.playSound(soundevent, 1.0F, 1.0F); livingEntity.setDeltaMovement(Vec3.ZERO); diff --git a/src/main/java/com/simibubi/create/content/palettes/AllPaletteStoneTypes.java b/src/main/java/com/simibubi/create/content/palettes/AllPaletteStoneTypes.java index c13c9ed0f..e477914ef 100644 --- a/src/main/java/com/simibubi/create/content/palettes/AllPaletteStoneTypes.java +++ b/src/main/java/com/simibubi/create/content/palettes/AllPaletteStoneTypes.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.palettes; import static com.simibubi.create.content.palettes.PaletteBlockPattern.STANDARD_RANGE; import static com.simibubi.create.content.palettes.PaletteBlockPattern.VANILLA_RANGE; +import java.util.Collections; import java.util.function.Function; import com.simibubi.create.AllTags; @@ -11,11 +12,11 @@ import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.utility.Lang; import com.tterrag.registrate.util.nullness.NonNullSupplier; -import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; +import net.minecraftforge.registries.ForgeRegistries; public enum AllPaletteStoneTypes { @@ -57,7 +58,7 @@ public enum AllPaletteStoneTypes { private Function> factory; private PalettesVariantEntry variants; - + public NonNullSupplier baseBlock; public PaletteBlockPattern[] variantTypes; public TagKey materialTag; @@ -81,7 +82,8 @@ public enum AllPaletteStoneTypes { NonNullSupplier baseBlock = paletteStoneVariants.factory.apply(registrate); paletteStoneVariants.baseBlock = baseBlock; String id = Lang.asId(paletteStoneVariants.name()); - paletteStoneVariants.materialTag = AllTags.tag(ItemTags::createOptional, Create.ID, "stone_types/" + id); + paletteStoneVariants.materialTag = AllTags.tag(r -> ForgeRegistries.ITEMS.tags() + .createOptionalTagKey(r, Collections.emptySet()), Create.ID, "stone_types/" + id); paletteStoneVariants.variants = new PalettesVariantEntry(id, paletteStoneVariants); } } diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/MechanicalCraftingRecipeBuilder.java b/src/main/java/com/simibubi/create/foundation/data/recipe/MechanicalCraftingRecipeBuilder.java index 0058a8eb5..54a12eb5f 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/MechanicalCraftingRecipeBuilder.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/MechanicalCraftingRecipeBuilder.java @@ -18,7 +18,7 @@ import com.simibubi.create.AllRecipeTypes; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.SetTag; +import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; @@ -62,7 +62,7 @@ public class MechanicalCraftingRecipeBuilder { /** * Adds a key to the recipe pattern. */ - public MechanicalCraftingRecipeBuilder key(Character p_200469_1_, SetTag p_200469_2_) { + public MechanicalCraftingRecipeBuilder key(Character p_200469_1_, TagKey p_200469_2_) { return this.key(p_200469_1_, Ingredient.of(p_200469_2_)); } diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java index 614b05090..3e59bc848 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java @@ -18,12 +18,12 @@ import net.minecraft.core.Registry; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.SerializationTags; import net.minecraft.tags.TagKey; import net.minecraft.util.GsonHelper; import net.minecraft.world.level.material.FlowingFluid; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.registries.ForgeRegistries; public abstract class FluidIngredient implements Predicate { @@ -207,8 +207,9 @@ public abstract class FluidIngredient implements Predicate { if (accepted.getFluid() .isSame(t.getFluid())) return true; - return t.getFluid() - .is(tag); + return ForgeRegistries.FLUIDS.getHolder(t.getFluid()) + .map(h -> h.containsTag(tag)) + .orElse(false); } @Override @@ -230,22 +231,20 @@ public abstract class FluidIngredient implements Predicate { @Override protected void readInternal(JsonObject json) { - ResourceLocation id = new ResourceLocation(GsonHelper.getAsString(json, "fluidTag")); - tag = SerializationTags.getInstance().getTagOrThrow(Registry.FLUID_REGISTRY, id, rl -> { - return new JsonSyntaxException("Unknown fluid tag '" + rl + "'"); - }); + ResourceLocation resourcelocation = new ResourceLocation(GsonHelper.getAsString(json, "fluidTag")); + tag = TagKey.create(Registry.FLUID_REGISTRY, resourcelocation); } @Override protected void writeInternal(JsonObject json) { - json.addProperty("fluidTag", SerializationTags.getInstance().getIdOrThrow(Registry.FLUID_REGISTRY, tag, () -> { - return new IllegalStateException("Unknown fluid tag"); - }).toString()); + json.addProperty("fluidTag", tag.location() + .toString()); } @Override protected List determineMatchingFluidStacks() { - return tag.getValues() + return ForgeRegistries.FLUIDS.tags() + .getTag(tag) .stream() .map(f -> { if (f instanceof FlowingFluid) diff --git a/src/main/java/com/simibubi/create/foundation/item/TagDependentIngredientItem.java b/src/main/java/com/simibubi/create/foundation/item/TagDependentIngredientItem.java index c65d2d3af..2f422ea7e 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TagDependentIngredientItem.java +++ b/src/main/java/com/simibubi/create/foundation/item/TagDependentIngredientItem.java @@ -1,18 +1,18 @@ package com.simibubi.create.foundation.item; import net.minecraft.core.NonNullList; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; +import net.minecraft.tags.TagKey; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.tags.ITagManager; public class TagDependentIngredientItem extends Item { - private ResourceLocation tag; + private TagKey tag; - public TagDependentIngredientItem(Properties properties, ResourceLocation tag) { + public TagDependentIngredientItem(Properties properties, TagKey tag) { super(properties); this.tag = tag; } @@ -24,9 +24,10 @@ public class TagDependentIngredientItem extends Item { } public boolean shouldHide() { - Tag tag = ItemTags.getAllTags() - .getTag(this.tag); - return tag == null || tag.getValues() + ITagManager tags = ForgeRegistries.ITEMS.tags(); + if (tags == null || !tags.isKnownTagName(tag)) + return false; + return tags.getTag(tag) .isEmpty(); } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/accessor/DispenserBlockAccessor.java b/src/main/java/com/simibubi/create/foundation/mixin/accessor/DispenserBlockAccessor.java new file mode 100644 index 000000000..6f6e4c833 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/mixin/accessor/DispenserBlockAccessor.java @@ -0,0 +1,14 @@ +package com.simibubi.create.foundation.mixin.accessor; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Invoker; + +import net.minecraft.core.dispenser.DispenseItemBehavior; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.DispenserBlock; + +@Mixin(DispenserBlock.class) +public interface DispenserBlockAccessor { + @Invoker("getDispenseMethod") + DispenseItemBehavior create$callGetDispenseMethod(ItemStack stack); +} diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxRenderer.java index 56d201d34..8b0d511d3 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxRenderer.java @@ -17,11 +17,14 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.FenceBlock; import net.minecraftforge.client.model.ItemMultiLayerBakedModel; +import net.minecraftforge.registries.ForgeRegistries; public class ValueBoxRenderer { - public static void renderItemIntoValueBox(ItemStack filter, PoseStack ms, MultiBufferSource buffer, int light, int overlay) { - ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); + public static void renderItemIntoValueBox(ItemStack filter, PoseStack ms, MultiBufferSource buffer, int light, + int overlay) { + ItemRenderer itemRenderer = Minecraft.getInstance() + .getItemRenderer(); BakedModel modelWithOverrides = itemRenderer.getModel(filter, null, null, 0); boolean blockItem = modelWithOverrides.isGui3d() && !(modelWithOverrides instanceof ItemMultiLayerBakedModel); float scale = (!blockItem ? .5f : 1f) - 1 / 64f; @@ -41,7 +44,9 @@ public class ValueBoxRenderer { return NUDGE; if (block instanceof FenceBlock) return NUDGE; - if (BlockTags.BUTTONS.contains(block)) + if (ForgeRegistries.BLOCKS.getHolder(block) + .map(h -> h.containsTag(BlockTags.BUTTONS)) + .orElse(false)) return NUDGE; if (block == Blocks.END_ROD) return NUDGE; diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java b/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java index 4cbd7ead6..11a703644 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java @@ -3,10 +3,10 @@ package com.simibubi.create.foundation.worldgen; import java.util.HashMap; import java.util.Map; +import com.google.common.collect.ImmutableList; import com.simibubi.create.AllBlocks; import com.simibubi.create.Create; import com.simibubi.create.foundation.utility.Couple; -import com.simibubi.create.foundation.utility.Pair; import net.minecraft.core.Registry; import net.minecraft.data.BuiltinRegistries; @@ -14,7 +14,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.biome.Biome.BiomeCategory; import net.minecraft.world.level.levelgen.GenerationStep; import net.minecraft.world.level.levelgen.GenerationStep.Decoration; -import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.placement.PlacedFeature; import net.minecraftforge.common.ForgeConfigSpec; @@ -33,8 +32,9 @@ public class AllWorldFeatures { // - public static final ConfigDrivenFeatureEntry ZINC_ORE = register("zinc_ore", 12, 8, OVERWORLD_BIOMES).between(-63, 70) - .withBlocks(Couple.create(AllBlocks.ZINC_ORE, AllBlocks.DEEPSLATE_ZINC_ORE)); + public static final ConfigDrivenFeatureEntry ZINC_ORE = + register("zinc_ore", 12, 8, OVERWORLD_BIOMES).between(-63, 70) + .withBlocks(Couple.create(AllBlocks.ZINC_ORE, AllBlocks.DEEPSLATE_ZINC_ORE)); public static final ConfigDrivenFeatureEntry STRIATED_ORES_OVERWORLD = register("striated_ores_overworld", 32, 1 / 12f, OVERWORLD_BIOMES).between(-30, 70) @@ -72,10 +72,12 @@ public class AllWorldFeatures { .forEach(entry -> { String id = Create.ID + "_" + entry.getKey() .getPath(); - ConfigDrivenFeatureEntry value = entry.getValue(); - Pair, PlacedFeature> feature = value.getFeature(); - Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, id, feature.getFirst()); - Registry.register(BuiltinRegistries.PLACED_FEATURE, id, feature.getSecond()); + ConfigDrivenFeatureEntry featureEntry = entry.getValue(); + featureEntry.configuredFeature = BuiltinRegistries.register(BuiltinRegistries.CONFIGURED_FEATURE, id, + featureEntry.factory.apply(featureEntry)); + featureEntry.placedFeature = + BuiltinRegistries.register(BuiltinRegistries.PLACED_FEATURE, id, new PlacedFeature( + featureEntry.configuredFeature, ImmutableList.of(new ConfigDrivenDecorator(featureEntry.id)))); }); } @@ -84,10 +86,9 @@ public class AllWorldFeatures { Decoration decoStep = GenerationStep.Decoration.UNDERGROUND_ORES; ENTRIES.values() .forEach(entry -> { - if (!entry.biomeFilter.test(event.getName(), event.getCategory())) - return; - generation.addFeature(decoStep, entry.getFeature() - .getSecond()); + ConfigDrivenFeatureEntry value = entry; + if (value.biomeFilter.test(event.getName(), event.getCategory())) + generation.addFeature(decoStep, value.placedFeature); }); } diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenDecorator.java b/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenDecorator.java index 26f4a49ba..a1af6270d 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenDecorator.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenDecorator.java @@ -38,8 +38,9 @@ public class ConfigDrivenDecorator extends PlacementModifier { @Override public Stream getPositions(PlacementContext context, Random random, BlockPos pos) { - ConfigDrivenOreConfiguration config = (ConfigDrivenOreConfiguration) entry().getFeature() - .getFirst().config; + ConfigDrivenOreConfiguration config = (ConfigDrivenOreConfiguration) entry().configuredFeature.value() + .config(); + float frequency = config.getFrequency(); int floored = Mth.floor(frequency); int count = floored + (random.nextFloat() < frequency - floored ? 1 : 0); diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenFeatureEntry.java b/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenFeatureEntry.java index fc0b01a12..b2b87db7c 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenFeatureEntry.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/ConfigDrivenFeatureEntry.java @@ -2,16 +2,15 @@ package com.simibubi.create.foundation.worldgen; import java.util.ArrayList; import java.util.List; -import java.util.Optional; import java.util.function.Function; import com.google.common.collect.ImmutableList; import com.simibubi.create.Create; import com.simibubi.create.foundation.config.ConfigBase; import com.simibubi.create.foundation.utility.Couple; -import com.simibubi.create.foundation.utility.Pair; import com.tterrag.registrate.util.nullness.NonNullSupplier; +import net.minecraft.core.Holder; import net.minecraft.data.worldgen.features.OreFeatures; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; @@ -37,7 +36,8 @@ public class ConfigDrivenFeatureEntry extends ConfigBase { protected ConfigFloat frequency; Function> factory; - Optional, PlacedFeature>> feature = Optional.empty(); + Holder> configuredFeature; + Holder placedFeature; public ConfigDrivenFeatureEntry(String id, int clusterSize, float frequency) { this.id = id; @@ -79,25 +79,17 @@ public class ConfigDrivenFeatureEntry extends ConfigBase { return this; } - public Pair, PlacedFeature> getFeature() { - if (!feature.isPresent()) { - ConfiguredFeature configured = factory.apply(this); - feature = Optional.of(Pair.of(configured, configured.placed(new ConfigDrivenDecorator(id)))); - } - return feature.get(); - } - private ConfiguredFeature layersFactory(ConfigDrivenFeatureEntry entry) { ConfigDrivenOreConfiguration config = new ConfigDrivenOreConfiguration(ImmutableList.of(), 0, id); LayeredOreFeature.LAYER_PATTERNS.put(Create.asResource(id), layers.stream() .map(NonNullSupplier::get) .toList()); - return LayeredOreFeature.INSTANCE.configured(config); + return new ConfiguredFeature<>(LayeredOreFeature.INSTANCE, config); } private ConfiguredFeature standardFactory(ConfigDrivenFeatureEntry entry) { ConfigDrivenOreConfiguration config = new ConfigDrivenOreConfiguration(createTarget(), 0, id); - return VanillaStyleOreFeature.INSTANCE.configured(config); + return new ConfiguredFeature<>(VanillaStyleOreFeature.INSTANCE, config); } private List createTarget() { diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index dbf7cf3d1..fa9a613a4 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -6,6 +6,7 @@ protected net.minecraft.client.particle.Particle f_107205_ # stoppedByCollision public net.minecraft.client.renderer.ItemInHandRenderer f_109300_ # mainHandItem public net.minecraft.client.renderer.ItemInHandRenderer f_109301_ # offHandItem public net.minecraft.client.renderer.entity.ItemRenderer f_115096_ # textureManager +public net.minecraft.world.entity.item.FallingBlockEntity f_31946_ # blockState public-f net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket f_132663_ # flyingSpeed diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index fda36255c..e19cc36fd 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -5,7 +5,7 @@ license="MIT" [[mods]] modId="create" -version="0.4f" +version="0.4.1" displayName="Create" #updateJSONURL="" displayURL="https://www.curseforge.com/minecraft/mc-mods/create" @@ -18,20 +18,20 @@ Technology that empowers the player.''' [[dependencies.create]] modId="forge" mandatory=true - versionRange="[39.0.46,)" + versionRange="[40.0.0,)" ordering="NONE" side="BOTH" [[dependencies.create]] modId="minecraft" mandatory=true - versionRange="[1.18.1,1.19)" + versionRange="[1.18.2,1.19)" ordering="NONE" side="BOTH" [[dependencies.create]] modId="flywheel" mandatory=true - versionRange="[1.18-0.6.1,1.18-0.6.2)" + versionRange="[1.18-0.6.2,1.18-0.6.3)" ordering="AFTER" side="CLIENT" diff --git a/src/main/resources/create.mixins.json b/src/main/resources/create.mixins.json index deba44920..170ae7622 100644 --- a/src/main/resources/create.mixins.json +++ b/src/main/resources/create.mixins.json @@ -7,7 +7,8 @@ "mixins": [ "CustomItemUseEffectsMixin", "accessor.AbstractProjectileDispenseBehaviorAccessor", - "accessor.LivingEntityAccessor" + "accessor.LivingEntityAccessor", + "accessor.DispenserBlockAccessor" ], "client": [ "DestroyProgressMixin",