mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-28 07:56:09 +00:00
Seperated configurations into a new class.
This commit is contained in:
1 parent
0eccfcda10
commit
a8152e626f
12 files changed
+94
-81
No files matched your search
@@ -1,12 +1,9 @@
|
||||
package info.jbcs.minecraft.chisel.item;
|
||||
|
||||
import info.jbcs.minecraft.chisel.Configurations;
|
||||
import info.jbcs.minecraft.chisel.api.ICarvable;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvableVariation;
|
||||
import info.jbcs.minecraft.chisel.Chisel;
|
||||
import info.jbcs.minecraft.utilities.General;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -14,6 +11,8 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCarvable extends ItemBlock
|
||||
{
|
||||
|
||||
@@ -46,7 +45,7 @@ public class ItemCarvable extends ItemBlock
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips)
|
||||
{
|
||||
if(!Chisel.blockDescriptions) return;
|
||||
if(!Configurations.blockDescriptions) return;
|
||||
|
||||
Item item = General.getItem(stack);
|
||||
if(item == null) return;
|
||||
|
||||
@@ -3,6 +3,7 @@ package info.jbcs.minecraft.chisel.item;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import info.jbcs.minecraft.chisel.Chisel;
|
||||
import info.jbcs.minecraft.chisel.ChiselBlocks;
|
||||
import info.jbcs.minecraft.chisel.Configurations;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvableHelper;
|
||||
import info.jbcs.minecraft.chisel.carving.Carving;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvingVariation;
|
||||
@@ -61,7 +62,7 @@ public class ItemChisel extends ItemTool
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack stack, final int x, final int y, final int z, EntityPlayer player)
|
||||
{
|
||||
if(!Chisel.enableChiseling) return true;
|
||||
if(!Configurations.enableChiseling) return true;
|
||||
|
||||
World world = player.worldObj;
|
||||
Block block = world.getBlock(x, y, z);
|
||||
@@ -123,7 +124,7 @@ public class ItemChisel extends ItemTool
|
||||
result = target;
|
||||
|
||||
/* special case: stone can be carved to cobble and bricks */
|
||||
if(Chisel.chiselStoneToCobbleBricks)
|
||||
if(Configurations.chiselStoneToCobbleBricks)
|
||||
{
|
||||
if(!match && block.equals(Blocks.stone) && Block.getBlockFromItem(target).equals(ChiselBlocks.blockCobblestone))
|
||||
match = true;
|
||||
|
||||
Reference in new issue
Block a user