mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-19 03:59:15 +00:00
The great format and clean up. IMPORTANT: Read below.
All devs and contributors should use the provided formatter settings. If your IDE does not support the format, the rules are simple, it is the default java formatting rules, with 200char line lengths and 1 extra line after class definitions.
This commit is contained in:
1 parent
06c5f5930f
commit
82792ed22e
136 files changed
+10365
-11272
No files matched your search
@@ -14,45 +14,43 @@ import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
public class ItemCarvable extends ItemBlock
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips)
|
||||
{
|
||||
if(!Configurations.blockDescriptions) return;
|
||||
@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;
|
||||
CarvableVariation var = carvable.getVariation(stack.getItemDamage());
|
||||
if(var == null)
|
||||
return;
|
||||
ICarvable carvable = (ICarvable) block;
|
||||
CarvableVariation var = carvable.getVariation(stack.getItemDamage());
|
||||
if (var == null)
|
||||
return;
|
||||
|
||||
lines.add(var.description);
|
||||
}
|
||||
lines.add(var.description);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user