mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2025-09-04 00:50:32 +02:00
19 lines
527 B
Java
19 lines
527 B
Java
package thetadev.constructionwand.items;
|
|
|
|
import net.minecraft.entity.player.PlayerEntity;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import thetadev.constructionwand.basics.ConfigServer;
|
|
|
|
public class ItemWandInfinity extends ItemWand
|
|
{
|
|
public ItemWandInfinity(String name)
|
|
{
|
|
super(name, new Properties().maxStackSize(1).isBurnable());
|
|
}
|
|
|
|
@Override
|
|
public int getLimit(PlayerEntity player, ItemStack stack) {
|
|
return player.isCreative() ? ConfigServer.LIMIT_CREATIVE.get() : getLimit();
|
|
}
|
|
}
|