mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 10:45:02 +00:00
Config for mossy blocks being made from stone
This commit is contained in:
1 parent
6a39b1f230
commit
9143e19089
3 files changed
+22
-16
No files matched your search
@@ -59,6 +59,7 @@ public class Chisel
|
||||
public static boolean blockDescriptions;
|
||||
public static boolean ghostCloud;
|
||||
public static int factoryBlockAmount;
|
||||
public static boolean allowMossy;
|
||||
|
||||
public static final StepSoundEx soundHolystoneFootstep = new StepSoundEx("chisel:holystone", "chisel:holystone", "chisel:holystone", 1.0f);
|
||||
public static final StepSoundEx soundTempleFootstep = new StepSoundEx("dig.stone", "chisel:temple-footstep", "dig.stone", 1.0f);
|
||||
@@ -190,6 +191,7 @@ public class Chisel
|
||||
enableChiseling = config.get("general", "enableChiselingLeftClicking", false, "Change blocks to another block using the Chisel and left-click.").getBoolean(false);
|
||||
ghostCloud = config.get("general", "doesCloudRenderLikeGhost", true).getBoolean(true);
|
||||
factoryBlockAmount = config.get("general", "amountYouGetFromFactoryBlockCrafting", 32).getInt(32);
|
||||
allowMossy = config.get("general", "allowCobbleToMossyInChisel", true).getBoolean(true);
|
||||
|
||||
if(config.hasChanged())
|
||||
{
|
||||
|
||||
@@ -627,7 +627,14 @@ public class ChiselBlocks
|
||||
{
|
||||
stoneBrick = (BlockCarvable) new BlockCarvable().setHardness(1.5F).setResistance(10.0F).setStepSound(Block.soundTypeStone);
|
||||
for(int i = 0; i < 4; i++)
|
||||
Carving.chisel.addVariation("stoneBrick", Blocks.stonebrick, i, i);
|
||||
{
|
||||
if(i == 1)
|
||||
{
|
||||
if(Chisel.allowMossy)
|
||||
Carving.chisel.addVariation("stoneBrick", Blocks.stonebrick, i, i);
|
||||
} else
|
||||
Carving.chisel.addVariation("stoneBrick", Blocks.stonebrick, i, i);
|
||||
}
|
||||
stoneBrick.carverHelper.addVariation(StatCollector.translateToLocal("chisel.tile.stoneBrick.4.desc"), 4, "stonebrick/smallbricks");
|
||||
stoneBrick.carverHelper.addVariation(StatCollector.translateToLocal("chisel.tile.stoneBrick.5.desc"), 5, "stonebrick/largebricks");
|
||||
stoneBrick.carverHelper.addVariation(StatCollector.translateToLocal("chisel.tile.stoneBrick.6.desc"), 6, "stonebrick/smallchaotic");
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
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.carving.CarvableHelper;
|
||||
import info.jbcs.minecraft.chisel.carving.Carving;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvingVariation;
|
||||
import info.jbcs.minecraft.chisel.Chisel;
|
||||
import info.jbcs.minecraft.chisel.ChiselBlocks;
|
||||
import info.jbcs.minecraft.chisel.client.GeneralChiselClient;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -20,7 +15,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemChisel extends ItemTool
|
||||
{
|
||||
@@ -39,7 +38,7 @@ public class ItemChisel extends ItemTool
|
||||
setUnlocalizedName("chisel");
|
||||
|
||||
toolSet.add("chisel");
|
||||
carving = c;
|
||||
this.carving = c;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +130,8 @@ public class ItemChisel extends ItemTool
|
||||
if(!match && block.equals(Blocks.stone) && Block.getBlockFromItem(target).equals(ChiselBlocks.stoneBrick))
|
||||
match = true;
|
||||
}
|
||||
if(match == false) noReplace = true;
|
||||
if(!match)
|
||||
noReplace = true;
|
||||
}
|
||||
|
||||
int updateValue = 2;
|
||||
@@ -179,10 +179,7 @@ public class ItemChisel extends ItemTool
|
||||
stack.damageItem(1, player);
|
||||
if(stack.stackSize == 0)
|
||||
{
|
||||
player.inventory.mainInventory[player.inventory.currentItem] =
|
||||
chiselHasBlockInside ?
|
||||
chiselTarget :
|
||||
null;
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = chiselHasBlockInside ? chiselTarget : null;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user