• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Ok, so my modifier looks like the following: public class UseHammerModifier extends LootModifier { public UseHammerModifier(ILootCondition[] conditionsIn) { super(conditionsIn); } @Nonnull @Override public List<ItemStack> doApply(List<ItemStack> generatedLoot, LootContext context) { LogUtil.info("Fired Modifier"); ItemStack tool = context.get(LootParameters.TOOL); BlockState blockState = context.get(LootParameters.BLOCK_STATE); if (tool != null && blockState != null) { if (tool.getItem() instanceof HammerBaseItem) { List<ItemStack> newLoot = new ArrayList<>(); Block returnBlock = ModRegistries.HAMMER .getResult(blockState.getBlock().getRegistryName()); newLoot.add(new ItemStack(returnBlock)); return newLoot; } } return generatedLoot; } public static class Serializer extends GlobalLootModifierSerializer<UseHammerModifier> { @Override public UseHammerModifier read(ResourceLocation location, JsonObject object, ILootCondition[] ailootcondition) { LogUtil.info("UseHammerModifier.Serializer.read"); return new UseHammerModifier(ailootcondition); } } }   I have a file under data/<mymodid>/loot_modifiers that looks like: { "type": "exnihilosequentia:use_hammer", "conditions": [ { "condition": "minecraft:alternative", "terms": [ { "condition": "minecraft:block_state_property", "block": "minecraft:cobblestone" }, { "condition": "minecraft:block_state_property", "block": "minecraft:gravel" }, { "condition": "minecraft:block_state_property", "block": "minecraft:sand" }, { "condition": "minecraft:block_state_property", "block": "minecraft:andesite" }, { "condition": "minecraft:block_state_property", "block": "minecraft:diorite" }, { "condition": "minecraft:block_state_property", "block": "minecraft:granite" }, { "condition": "minecraft:block_state_property", "block": "minecraft:netherrack" }, { "condition": "minecraft:block_state_property", "block": "minecraft:end_stone" }, { "condition": "minecraft:block_state_property", "block": "minecraft:tube_coral_block" }, { "condition": "minecraft:block_state_property", "block": "minecraft:brain_coral_block" }, { "condition": "minecraft:block_state_property", "block": "minecraft:bubble_coral_block" }, { "condition": "minecraft:block_state_property", "block": "minecraft:fire_coral_block" }, { "condition": "minecraft:block_state_property", "block": "minecraft:horn_coral_block" } ] } ] }   The modifier is fired for all the blocks in the list, except for the coral blocks. What is wrong with my modifier to cause it to only fire with those blocks? You said that it should fire even when an empty drop happens, but that's not the case here.
    • That looks right... have you closed all your Explorer windows after running JarFix?
    • You're not supposed to have a jar file in there, just restart your launcher and Forge should be in the list of Minecraft versions.
  • Topics

  • Who's Online (See full list)