mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 18:55:06 +00:00
Added config option to chisel across colors
This commit is contained in:
1 parent
0064ec320d
commit
c279200fc7
2 files changed
+37
-75
No files matched your search
@@ -1,7 +1,25 @@
|
||||
package com.cricketcraft.chisel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.block.*;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.carving.CarvingGroup;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.entity.EntityBallOMoss;
|
||||
import com.cricketcraft.chisel.entity.EntityCloudInABottle;
|
||||
import com.cricketcraft.chisel.entity.EntitySmashingRock;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.chisel.item.*;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel.ChiselType;
|
||||
import com.google.common.collect.Lists;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -14,72 +32,10 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.block.BlockAutoChisel;
|
||||
import com.cricketcraft.chisel.block.BlockBeaconBase;
|
||||
import com.cricketcraft.chisel.block.BlockCarvable;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableAntiBlock;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableBookshelf;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlass;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlow;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlowstone;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableIce;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableIcePillar;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableIceStairs;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableLayered;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePackedIce;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePackedIcePillar;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePackedIceStairs;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePane;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePillar;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePowered;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePumpkin;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableSlab;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableStairs;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableTorch;
|
||||
import com.cricketcraft.chisel.block.BlockCloud;
|
||||
import com.cricketcraft.chisel.block.BlockConcrete;
|
||||
import com.cricketcraft.chisel.block.BlockEldritch;
|
||||
import com.cricketcraft.chisel.block.BlockGrimstone;
|
||||
import com.cricketcraft.chisel.block.BlockHolystone;
|
||||
import com.cricketcraft.chisel.block.BlockLavastone;
|
||||
import com.cricketcraft.chisel.block.BlockLeaf;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleCarpet;
|
||||
import com.cricketcraft.chisel.block.BlockMarbleTexturedOre;
|
||||
import com.cricketcraft.chisel.block.BlockPresent;
|
||||
import com.cricketcraft.chisel.block.BlockRoadLine;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestone;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
|
||||
import com.cricketcraft.chisel.block.BlockWaterstone;
|
||||
import com.cricketcraft.chisel.block.CarvableStairsMaker;
|
||||
import com.cricketcraft.chisel.block.IStairsCreator;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.carving.CarvingGroup;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.entity.EntityBallOMoss;
|
||||
import com.cricketcraft.chisel.entity.EntityCloudInABottle;
|
||||
import com.cricketcraft.chisel.entity.EntitySmashingRock;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.chisel.item.ItemBallOMoss;
|
||||
import com.cricketcraft.chisel.item.ItemBlockPresent;
|
||||
import com.cricketcraft.chisel.item.ItemCarvable;
|
||||
import com.cricketcraft.chisel.item.ItemCarvableSlab;
|
||||
import com.cricketcraft.chisel.item.ItemCloudInABottle;
|
||||
import com.cricketcraft.chisel.item.ItemSmashingRock;
|
||||
import com.cricketcraft.chisel.item.ItemUpgrade;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel.ChiselType;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.*;
|
||||
import static com.cricketcraft.chisel.utils.General.*;
|
||||
import static com.cricketcraft.chisel.utils.General.sGNames;
|
||||
|
||||
public enum Features {
|
||||
|
||||
@@ -154,7 +110,8 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable antiBlock = (BlockCarvable) new BlockCarvableAntiBlock().setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
antiBlock.carverHelper.setChiselBlockName("Anti Block");
|
||||
antiBlock.carverHelper.forbidChiseling = true;
|
||||
if (!Configurations.allowChiselCrossColors)
|
||||
antiBlock.carverHelper.forbidChiseling = true;
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
antiBlock.carverHelper.addVariation("tile.antiBlock." + ItemDye.field_150921_b[i] + ".desc", i, "antiblock/" + ItemDye.field_150921_b[i] + "-antiBlock");
|
||||
@@ -355,7 +312,8 @@ public enum Features {
|
||||
carpet_block.carverHelper.addVariation("tile.carpet_block.13.desc", 13, "carpet/green");
|
||||
carpet_block.carverHelper.addVariation("tile.carpet_block.14.desc", 14, "carpet/red");
|
||||
carpet_block.carverHelper.addVariation("tile.carpet_block.15.desc", 15, "carpet/black");
|
||||
carpet_block.carverHelper.forbidChiseling = true;
|
||||
if (!Configurations.allowChiselCrossColors)
|
||||
carpet_block.carverHelper.forbidChiseling = true;
|
||||
carpet_block.carverHelper.registerAll(carpet_block, "carpet_block");
|
||||
OreDictionary.registerOre("blockCarpet", carpet_block);
|
||||
}
|
||||
@@ -394,7 +352,8 @@ public enum Features {
|
||||
carpet.carverHelper.addVariation("tile.carpet.13.desc", 13, "carpet/green");
|
||||
carpet.carverHelper.addVariation("tile.carpet.14.desc", 14, "carpet/red");
|
||||
carpet.carverHelper.addVariation("tile.carpet.15.desc", 15, "carpet/black");
|
||||
carpet.carverHelper.forbidChiseling = true;
|
||||
if (!Configurations.allowChiselCrossColors)
|
||||
carpet.carverHelper.forbidChiseling = true;
|
||||
carpet.carverHelper.registerAll(carpet, "carpet");
|
||||
|
||||
// for (int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.cricketcraft.chisel.config;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.cricketcraft.chisel.Features;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.cricketcraft.chisel.Features;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Configurations {
|
||||
|
||||
@@ -43,6 +41,7 @@ public class Configurations {
|
||||
public static boolean ironChiselHasModes;
|
||||
public static int ironChiselAttackDamage;
|
||||
public static int diamondChiselAttackDamage;
|
||||
public static boolean allowChiselCrossColors;
|
||||
|
||||
public static boolean useRoadLineTool;
|
||||
public static String getRoadLineTool;
|
||||
@@ -63,7 +62,9 @@ public class Configurations {
|
||||
chiselRecipe = config.get(category, "chiselAlternateRecipe", false, "Use alternative crafting recipe for the chisel").getBoolean(false);
|
||||
enableFMP = config.get(category, "enableFMP", true, "Do you want to enable FMP").getBoolean(true);
|
||||
chiselStoneToCobbleBricks = config.get(category, "chiselStoneToCobbleBricks", true, "Chisel stone to cobblestone and bricks by left clicking.").getBoolean(false);
|
||||
chiselBackToVanillaLeaves = config.get(category, "chiselBackToVanillaLeaves", false, "If this is true, you can chisel from the chisel leaves back to vanilla ones. If it is false, you cannot.").getBoolean(false);
|
||||
chiselBackToVanillaLeaves = config.get(category, "chiselBackToVanillaLeaves", false, "If this is true, you can chisel from the chisel leaves back to vanilla ones. If it is false, you cannot.")
|
||||
.getBoolean(
|
||||
false);
|
||||
|
||||
/* worldgen */
|
||||
category = "worldgen";
|
||||
@@ -90,7 +91,9 @@ public class Configurations {
|
||||
ironChiselCanLeftClick = config.get(category, "ironChiselCanLeftClick", true, "If this is true, the iron chisel can left click chisel blocks. If false, it cannot.").getBoolean();
|
||||
ironChiselHasModes = config.get(category, "ironChiselHasModes", false, "If this is true, the iron chisel can change its chisel mode just as the diamond chisel can.").getBoolean();
|
||||
ironChiselAttackDamage = config.get(category, "ironChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the iron chisel inflicts when it is used to attack an entity.").getInt();
|
||||
diamondChiselAttackDamage = config.get(category, "diamondChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt();
|
||||
diamondChiselAttackDamage = config.get(category, "diamondChiselAttackDamage", 2,
|
||||
"The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt();
|
||||
allowChiselCrossColors = config.get(category, "allowChiselCrossColors", true, "Should someone be able to chisel something into a different color.").getBoolean();
|
||||
|
||||
/* block */
|
||||
category = "block";
|
||||
|
||||
Reference in new issue
Block a user