ConstructionWand/src/main/java/thetadev/constructionwand/items/ItemWandInfinity.java
Theta-Dev 64f947e535 Revert "Merge branch '1.16' into 1.15"
This reverts commit cd99733803, reversing
changes made to fa1587f269.
2020-08-26 17:24:31 +02:00

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;
}
}