Lay the groundwork for prisma random drops

This commit is contained in:
Vos
2025-11-09 12:48:07 -06:00
parent cf0e954c50
commit 16a043352d
@@ -9,6 +9,10 @@ import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.*;
import net.minecraft.loot.context.LootContextParameter;
import net.minecraft.loot.context.LootContextParameterSet;
import net.minecraft.loot.context.LootContextParameters;
import net.minecraft.loot.context.LootContextType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.registry.tag.TagKey;
@@ -20,6 +24,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import java.util.ArrayList;
@@ -78,6 +83,11 @@ public class HammerItem extends MiningToolItem {
// @Override
// public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) {
// ItemStack nextItem = stack;
// ItemStack testing = new ItemStack(ModItems.LEMON, 1);
// state.getDroppedStacks(new LootContextParameterSet.Builder(world.getServer().getWorld(world.getRegistryKey()))
// .add(LootContextParameters.ORIGIN, Vec3d.ofCenter(pos))
// .add(LootContextParameters.TOOL, stack)
// ).removeFirst();
// if(isValidItem(stack)){
// int chance = r.nextInt(1,21); // 1-20
// replacementItems.add(ModItems.RAW_ENTROPY);
@@ -90,6 +100,6 @@ public class HammerItem extends MiningToolItem {
// nextItem = replacementStack;
// }
// }
// return super.postMine(nextItem, world, state, pos, miner);
// return super.postMine(stack, world, state, pos, miner);
// }
}