mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 18:55:06 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
a314fccd1b
commit
8f026dad8f
161 files changed
+14073
-12846
No files matched your search
@@ -2,11 +2,6 @@ package team.chisel.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.utils.General;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -14,43 +9,45 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.utils.General;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
public class ItemCarvable extends ItemBlock {
|
||||
|
||||
public ItemCarvable(Block block) {
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
public ItemCarvable(Block block) {
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int i) {
|
||||
return i;
|
||||
}
|
||||
@Override
|
||||
public int getMetadata(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
return Block.getBlockFromItem(this).getIcon(2, damage);
|
||||
}
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
return Block.getBlockFromItem(this).getIcon(2, damage);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) {
|
||||
if (!Configurations.blockDescriptions)
|
||||
return;
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) {
|
||||
if (!Configurations.blockDescriptions) return;
|
||||
|
||||
Item item = General.getItem(stack);
|
||||
if (item == null)
|
||||
return;
|
||||
Item item = General.getItem(stack);
|
||||
if (item == null) return;
|
||||
|
||||
Block block = Block.getBlockFromItem(this);
|
||||
if (!(block instanceof ICarvable))
|
||||
return;
|
||||
Block block = Block.getBlockFromItem(this);
|
||||
if (!(block instanceof ICarvable)) return;
|
||||
|
||||
ICarvable carvable = (ICarvable) block;
|
||||
IVariationInfo var = carvable.getManager(stack.getItemDamage());
|
||||
if (var == null)
|
||||
return;
|
||||
ICarvable carvable = (ICarvable) block;
|
||||
IVariationInfo var = carvable.getManager(stack.getItemDamage());
|
||||
if (var == null) return;
|
||||
|
||||
lines.add(var.getDescription());
|
||||
}
|
||||
lines.add(var.getDescription());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user