mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2025-08-27 21:21:11 +02:00
20 lines
608 B
Java
20 lines
608 B
Java
package thetadev.constructionwand.items;
|
|
|
|
import net.minecraft.entity.player.PlayerEntity;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.item.crafting.Ingredient;
|
|
import thetadev.constructionwand.basics.ConfigHandler;
|
|
|
|
public class ItemWandInfinity extends ItemWand
|
|
{
|
|
public ItemWandInfinity(int maxBlocks, int angelDistance)
|
|
{
|
|
super(new Item.Properties().maxStackSize(1), maxBlocks, angelDistance);
|
|
}
|
|
|
|
@Override
|
|
public int getLimit(PlayerEntity player, ItemStack stack) {
|
|
return player.isCreative() ? ConfigHandler.LIMIT_CREATIVE.get() : maxBlocks;
|
|
}
|
|
}
|