-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55c2fdb
commit eeeafe0
Showing
8 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/mod/emt/harkenscythe/items/tools/HSShears.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package mod.emt.harkenscythe.items.tools; | ||
|
||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.item.EnumRarity; | ||
import net.minecraft.item.ItemShears; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.item.crafting.Ingredient; | ||
|
||
public class HSShears extends ItemShears | ||
{ | ||
private final EnumRarity rarity; | ||
public Ingredient repairMaterial; | ||
|
||
public HSShears(int durability, EnumRarity rarity, Ingredient repairMaterial) | ||
{ | ||
this.maxStackSize = 1; | ||
this.rarity = rarity; | ||
this.repairMaterial = repairMaterial; | ||
this.setMaxDamage(durability); | ||
} | ||
|
||
// Hardcoded blocks... | ||
@Override | ||
public float getDestroySpeed(ItemStack stack, IBlockState state) | ||
{ | ||
Material material = state.getMaterial(); | ||
|
||
if (material != Material.WEB && material != Material.LEAVES) | ||
{ | ||
return material == Material.CLOTH ? 5.0F : super.getDestroySpeed(stack, state); | ||
} | ||
else | ||
{ | ||
return 15.0F; | ||
} | ||
} | ||
|
||
@Override | ||
public EnumRarity getRarity(ItemStack stack) | ||
{ | ||
return rarity; | ||
} | ||
|
||
@Override | ||
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) | ||
{ | ||
return repairMaterial.test(repair) || super.getIsRepairable(toRepair, repair); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/harkenscythe/models/item/livingmetal_shears.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "harkenscythe:items/livingmetal_shears" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/resources/assets/harkenscythe/recipes/livingmetal_shears.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"type": "forge:ore_shaped", | ||
"pattern": [ | ||
" M", | ||
"M " | ||
], | ||
"key": { | ||
"M": { | ||
"item": "harkenscythe:livingmetal_ingot" | ||
} | ||
}, | ||
"result": { | ||
"item": "harkenscythe:livingmetal_shears" | ||
} | ||
} |
Binary file added
BIN
+773 Bytes
src/main/resources/assets/harkenscythe/textures/entities/necronomicon_book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+259 Bytes
src/main/resources/assets/harkenscythe/textures/items/livingmetal_shears.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.