Lay the groundwork for prisma random drops
This commit is contained in:
@@ -9,6 +9,10 @@ import net.minecraft.entity.ItemEntity;
|
|||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.*;
|
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.Registries;
|
||||||
import net.minecraft.registry.tag.BlockTags;
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
import net.minecraft.registry.tag.TagKey;
|
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.hit.HitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -78,6 +83,11 @@ public class HammerItem extends MiningToolItem {
|
|||||||
// @Override
|
// @Override
|
||||||
// public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) {
|
// public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) {
|
||||||
// ItemStack nextItem = stack;
|
// 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)){
|
// if(isValidItem(stack)){
|
||||||
// int chance = r.nextInt(1,21); // 1-20
|
// int chance = r.nextInt(1,21); // 1-20
|
||||||
// replacementItems.add(ModItems.RAW_ENTROPY);
|
// replacementItems.add(ModItems.RAW_ENTROPY);
|
||||||
@@ -90,6 +100,6 @@ public class HammerItem extends MiningToolItem {
|
|||||||
// nextItem = replacementStack;
|
// nextItem = replacementStack;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// return super.postMine(nextItem, world, state, pos, miner);
|
// return super.postMine(stack, world, state, pos, miner);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user