mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-11 15:57:31 +00:00
Merge pull request #6 from Prometheus0000/add-chisel
Add more durable chisel
This commit is contained in:
6 files changed
+19
-6
No files matched your search
@@ -461,9 +461,11 @@ public enum Features {
|
||||
ItemChisel chisel = (ItemChisel) new ItemChisel(ItemChisel.ChiselType.IRON).setCreativeTab(ChiselTabs.tabChisel);
|
||||
ItemChisel diamondChisel = (ItemChisel) new ItemChisel(ItemChisel.ChiselType.DIAMOND).setCreativeTab(ChiselTabs.tabChisel);
|
||||
ItemChisel obsidianChisel = (ItemChisel) new ItemChisel(ItemChisel.ChiselType.OBSIDIAN).setCreativeTab(ChiselTabs.tabChisel);
|
||||
ItemChisel netherStarChisel = (ItemChisel) new ItemChisel(ItemChisel.ChiselType.NETHERSTAR).setCreativeTab(ChiselTabs.tabChisel);
|
||||
GameRegistry.registerItem(chisel, "chisel");
|
||||
GameRegistry.registerItem(diamondChisel, "diamondChisel");
|
||||
GameRegistry.registerItem(obsidianChisel, "obsidianChisel");
|
||||
GameRegistry.registerItem(netherStarChisel, "netherStarChisel");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -472,10 +474,12 @@ public enum Features {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.chisel), " YY", " YY", "X ", 'X', "stickWood", 'Y', "ingotIron"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.diamondChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', "gemDiamond"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.obsidianChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', Blocks.obsidian));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.netherStarChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', "netherStar"));
|
||||
} else {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.chisel), " Y", "X ", 'X', "stickWood", 'Y', "ingotIron"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.diamondChisel), " Y", "X ", 'X', "stickWood", 'Y', "gemDiamond"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.obsidianChisel), " Y", "X ", 'X', "stickWood", 'Y', Blocks.obsidian));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.netherStarChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', "netherStar"));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -44,11 +44,13 @@ public class Configurations {
|
||||
public static int ironChiselMaxDamage;
|
||||
public static int diamondChiselMaxDamage;
|
||||
public static int obsidianChiselMaxDamage;
|
||||
public static int netherStarChiselMaxDamage;
|
||||
public static boolean ironChiselCanLeftClick;
|
||||
public static boolean ironChiselHasModes;
|
||||
public static int ironChiselAttackDamage;
|
||||
public static int diamondChiselAttackDamage;
|
||||
public static int obsidianChiselAttackDamage;
|
||||
public static int netherStarChiselAttackDamage;
|
||||
public static boolean allowChiselCrossColors;
|
||||
|
||||
public static boolean useRoadLineTool;
|
||||
@@ -102,6 +104,7 @@ public class Configurations {
|
||||
ironChiselMaxDamage = config.getInt("ironChiselMaxDamage", category, 500, 1, Short.MAX_VALUE, "The max damage of the standard iron chisel.");
|
||||
diamondChiselMaxDamage = config.getInt("diamondChiselMaxDamage", category, 5000, 1, Short.MAX_VALUE, "The max damage of the diamond chisel.");
|
||||
obsidianChiselMaxDamage = config.getInt("obsidianChiselMaxDamage", category, 2500, 1, Short.MAX_VALUE, "The max damage of the obsidian chisel.");
|
||||
netherStarChiselMaxDamage = config.getInt("netherStarChiselMaxDamage", category, 32767, 1, Short.MAX_VALUE, "The max damage of the nether star chisel.");
|
||||
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();
|
||||
allowChiselCrossColors = config.get(category, "allowChiselCrossColors", true, "Should someone be able to chisel something into a different color.").getBoolean();
|
||||
@@ -112,6 +115,8 @@ public class Configurations {
|
||||
"The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt();
|
||||
obsidianChiselAttackDamage = config.get(category, "obsidianChiselAttackDamage", 4,
|
||||
"The extra attack damage points (in half hearts) that the obsidian chisel inflicts when it is used to attack an entity.").getInt();
|
||||
netherStarChiselAttackDamage = config.get(category, "netherStarChiselAttackDamage", 6,
|
||||
"The extra attack damage points (in half hearts) that the obsidian chisel inflicts when it is used to attack an entity.").getInt();
|
||||
|
||||
/* block */
|
||||
category = "block";
|
||||
|
||||
@@ -14,6 +14,7 @@ public final class ChiselItems {
|
||||
public static final ItemChisel chisel = null;
|
||||
public static final ItemChisel diamondChisel = null;
|
||||
public static final ItemChisel obsidianChisel = null;
|
||||
public static final ItemChisel netherStarChisel = null;
|
||||
public static final ItemCloudInABottle cloudinabottle = null;
|
||||
public static final ItemBallOMoss ballomoss = null;
|
||||
public static final ItemSmashingRock smashingrock = null;
|
||||
|
||||
@@ -30,7 +30,8 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
public enum ChiselType {
|
||||
IRON(Configurations.ironChiselMaxDamage, Configurations.ironChiselAttackDamage),
|
||||
DIAMOND(Configurations.diamondChiselMaxDamage, Configurations.diamondChiselAttackDamage),
|
||||
OBSIDIAN(Configurations.obsidianChiselMaxDamage, Configurations.obsidianChiselAttackDamage);
|
||||
OBSIDIAN(Configurations.obsidianChiselMaxDamage, Configurations.obsidianChiselAttackDamage),
|
||||
NETHERSTAR(Configurations.netherStarChiselMaxDamage, Configurations.netherStarChiselAttackDamage);
|
||||
|
||||
final int maxDamage;
|
||||
final int attackDamage;
|
||||
@@ -74,8 +75,9 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
return repairMaterial.getItem().equals(Items.iron_ingot);
|
||||
case OBSIDIAN:
|
||||
return repairMaterial.getItem().equals(Item.getItemFromBlock(Blocks.obsidian));
|
||||
case NETHERSTAR:
|
||||
return repairMaterial.getItem().equals(Items.nether_star);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -93,11 +95,11 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
String lc2 = I18n.format(base + "lc2");
|
||||
String modes = I18n.format(base + "modes");
|
||||
list.add(gui);
|
||||
if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselCanLeftClick) {
|
||||
if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || type == ChiselType.NETHERSTAR || Configurations.ironChiselCanLeftClick) {
|
||||
list.add(lc1);
|
||||
list.add(lc2);
|
||||
}
|
||||
if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselHasModes) {
|
||||
if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || type == ChiselType.NETHERSTAR || Configurations.ironChiselHasModes) {
|
||||
list.add("");
|
||||
list.add(modes);
|
||||
}
|
||||
@@ -139,11 +141,11 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
|
||||
@Override
|
||||
public boolean canChiselBlock(World world, EntityPlayer player, int x, int y, int z, Block block, int metadata) {
|
||||
return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselCanLeftClick;
|
||||
return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || type == ChiselType.NETHERSTAR || Configurations.ironChiselCanLeftClick;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasModes(ItemStack chisel) {
|
||||
return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselHasModes;
|
||||
return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || type == ChiselType.NETHERSTAR || Configurations.ironChiselHasModes;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ item.chisel.chisel.desc.modes=Has multiple modes for chiseling.
|
||||
|
||||
item.chisel.chisel_diamond.name=Diamond Chisel
|
||||
item.chisel.chisel_obsidian.name=Obsidian Chisel
|
||||
item.chisel.chisel_netherstar.name=Nether Star Chisel
|
||||
|
||||
item.ballMoss.name=Ball O' Moss
|
||||
item.ballMoss.desc=Right-Click to throw. This will turn Cobblestone to Moss Stone on impact.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 228 B |
Reference in new issue
Block a user