diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 90d0abbb..0fe1bf2b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,29 +2,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
@@ -33,33 +13,23 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -72,279 +42,110 @@
-
-
-
+
+
+
+
+ true
+ DEFINITION_ORDER
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
@@ -353,72 +154,57 @@
1482033001334
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/exampleModifiers.xlsx b/exampleModifiers.xlsx
new file mode 100644
index 00000000..a55e85ae
Binary files /dev/null and b/exampleModifiers.xlsx differ
diff --git a/kfc/To-Dos.md b/kfc/To-Dos.md
index 60bd3e1d..764b5857 100644
--- a/kfc/To-Dos.md
+++ b/kfc/To-Dos.md
@@ -1,14 +1,15 @@
# To-Dos
## Bugs
+- [ ] Texture mismatch for 4diamond 1 redstone
+- [ ] ForgeHammer extend Gallagher
+- [ ] Placement bug for crucible from tongs
## Current Feature
-- [ ] FIX LONGBOW
-- [ ] Copper Tools
+
+- [ ] Untick Bloomery and Forge
- [ ] Craft Tweaker Support
-- [ ] Config Usage
-- [ ] Config for lowering fortune multiplier
-- [ ] Hardened Leather Helmet Inventory Model
+- [ ] Recipe Handler for Block Breaker
## Feature Musket
- [ ] Create powder charge item (copper, charcoal, gunpowder)
@@ -22,18 +23,24 @@
- [ ] Create lock assembly item
## Backlog
+- [ ] Play a sound when bloomery or forge finishes
+- [ ] Hardness and Resistance calculation for durability damage
+- [ ] Hardened Leather Helmet Inventory Model
+- [ ] Add Achievements
+- [ ] Bloomery Print out
+- [ ] Random Floats for hot texture
- [ ] Mass Ore Production
- [ ] Silver/Lead Production
- [ ] Sparks to forging
-- [x] Move Ingot break into chunks logic out of the block and into the ForgeHammer
- [ ] Add Iron Ring Recipe
- [ ] Add chainmail recipe
- [ ] Add Iron Shield
- [ ] Gold Smelting
-- [ ] Create a method which adds the types of NBT upgrades and creates a unique float instead of using magic numbers
- [ ] Add forgehammer to oreDict
### Tid-Bits
+NonNullList tempDrops = NonNullList.create();
+ItemStack iron_gear = RecipeHelper.getFirstDictionaryMatch("gearIron", 1);
```
sed -i -- 's/iron/steel/g' *
rm *.json--
@@ -41,6 +48,33 @@ rename s/iron/steel/ iron*
```
### Completed
+- [x] WorkBench
+- [x] Longbow change NBT management
+- [x] Check dict name for cluster
+- [x] Check block break code for NBTCrucible
+- [x] Cooldown for sledgehammer not working
+- [x] tune volume down on sledgehammer
+- [x] when placing crucibles on the side of a block it replaces the block above
+- [x] Check on disable for soft crucible in bloomery
+- [x] Correct Tooltip for RawLongbow
+- [x] Add tooltip to Chisel and SledgeHammer
+- [x] Damascus workblade
+- [x] Config to map only wrought iron to vanilla iron or wrought iron to another iron
+- [x] Config to map damascus steel to generic mod steel
+- [x] If blockbreaker charge is 0 shift right click will remove the gallagher
+- [x] drop a tool handle when crafting
+- [x] Hot Crucible block form missing texture
+- [x] Soft Crucible drop from tongs
+- [x] Pickaxe upgrades printout
+- [x] Can't put a crucible straight from creative inventory into bloomery and pull with tongs
+- [x] SledgeHammer and Chisel item and blocks
+- [x] ToolTip rawLongbow
+- [x] Update Recipes with oreDict for slackLime
+- [x] Chisel Bounding Box changes
+- [x] SledgeHammer Supid Damage Modifier
+- [x] SledgeHammer and Chisel crafting
+- [x] SledgeHammer and Chisel assets
+- [x] SoftCrucible Color Issues
- [x] Apply Forge turn off logic to Bloomery
- [x] Soft Crucible Hibachi Recipe
- [x] Fix Plate Crafting
diff --git a/kfc/gradle.properties b/kfc/gradle.properties
index 49416ba1..92809329 100644
--- a/kfc/gradle.properties
+++ b/kfc/gradle.properties
@@ -6,8 +6,8 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft
-mod_version=1.6.14
-forge_version=14.23.4.2744
+mod_version=1.6.31
+forge_version=14.23.4.2765
mcp_mappings=snapshot_20171003
mc_version=1.12.2
diff --git a/kfc/idea_backup/excludeFromValidation.xml b/kfc/idea_backup/excludeFromValidation.xml
new file mode 100644
index 00000000..21318969
--- /dev/null
+++ b/kfc/idea_backup/excludeFromValidation.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kfc/idea_backup/gradle.xml b/kfc/idea_backup/gradle.xml
new file mode 100644
index 00000000..ba1ec5c7
--- /dev/null
+++ b/kfc/idea_backup/gradle.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kfc/idea_backup/inspectionProfiles/Project_Default.xml b/kfc/idea_backup/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..929940d4
--- /dev/null
+++ b/kfc/idea_backup/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kfc/idea_backup/misc.xml b/kfc/idea_backup/misc.xml
new file mode 100644
index 00000000..0164d4e2
--- /dev/null
+++ b/kfc/idea_backup/misc.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ ApexVCS
+
+
+
+
+
\ No newline at end of file
diff --git a/kfc/idea_backup/vcs.xml b/kfc/idea_backup/vcs.xml
new file mode 100644
index 00000000..6c0b8635
--- /dev/null
+++ b/kfc/idea_backup/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kfc/idea_backup/workspace.xml b/kfc/idea_backup/workspace.xml
new file mode 100644
index 00000000..3d77aeb3
--- /dev/null
+++ b/kfc/idea_backup/workspace.xml
@@ -0,0 +1,1649 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ spec
+ ore:oreI
+ special
+ specia
+ remove
+ gall
+ onBlockS
+ destro
+ onItem
+ attackS
+ update
+ onitemuse
+ break
+ block
+ DamageT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1538460072488
+
+
+ 1538460072488
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/CommonEvents.java b/kfc/src/main/java/nmd/primal/forgecraft/CommonEvents.java
index 5c747360..fee31fbd 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/CommonEvents.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/CommonEvents.java
@@ -5,9 +5,13 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
-import nmd.primal.forgecraft.items.parts.BronzeToolPart;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.items.parts.ToolPart;
-import nmd.primal.forgecraft.items.tools.*;
+import nmd.primal.forgecraft.items.tools.CustomAxe;
+import nmd.primal.forgecraft.items.tools.CustomHoe;
+import nmd.primal.forgecraft.items.tools.CustomPickaxe;
+import nmd.primal.forgecraft.items.tools.CustomShovel;
import nmd.primal.forgecraft.util.ToolNBT;
/**
@@ -16,104 +20,44 @@ import nmd.primal.forgecraft.util.ToolNBT;
public class CommonEvents implements ToolNBT {
- @SubscribeEvent(priority= EventPriority.LOWEST, receiveCanceled=true)
+ @SubscribeEvent(priority= EventPriority.HIGHEST, receiveCanceled=true)
public void onItemCrafted(PlayerEvent.ItemCraftedEvent event) {
if(!event.player.getEntityWorld().isRemote) {
- if (event.crafting.getItem() instanceof CustomPickaxe || event.crafting.getItem() instanceof BronzePickaxe) {
- NBTTagCompound tempTag = new NBTTagCompound();
- for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
-
- if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
- ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
- if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
- }
- }
- }
+ if (event.crafting.getItem() instanceof CustomPickaxe) {
+ doToolNBT(event);
}
- if (event.crafting.getItem() instanceof CustomAxe || event.crafting.getItem() instanceof BronzeAxe) {
- NBTTagCompound tempTag = new NBTTagCompound();
- for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
-
- if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
- ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
- if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
- }
- }
- }
+ if (event.crafting.getItem() instanceof CustomAxe ) {
+ doToolNBT(event);
}
- if (event.crafting.getItem() instanceof CustomShovel || event.crafting.getItem() instanceof BronzeShovel) {
- NBTTagCompound tempTag = new NBTTagCompound();
- for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
-
- if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
- ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
- if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
- }
- }
- }
+ if (event.crafting.getItem() instanceof CustomShovel ) {
+ doToolNBT(event);
}
- if (event.crafting.getItem() instanceof CustomHoe || event.crafting.getItem() instanceof BronzeHoe) {
- NBTTagCompound tempTag = new NBTTagCompound();
- for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
-
- if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
- ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
- if (a.getItem() instanceof ToolPart || a.getItem() instanceof BronzeToolPart) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
- }
- }
- }
+ if (event.crafting.getItem() instanceof CustomHoe) {
+ doToolNBT(event);
}
- if (event.crafting.getItem() instanceof ToolPart || event.crafting.getItem() instanceof BronzeToolPart) {
- NBTTagCompound tempTag = new NBTTagCompound();
+ if (event.crafting.getItem() instanceof ToolPart) {
+
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
- if (a.getItem() instanceof CustomAxe || a.getItem() instanceof BronzeAxe) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
- event.crafting.setItemDamage(tempDamage);
+ if (a.getItem() instanceof CustomAxe) {
+ doQuickNBT(event, i, a);
+ PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
}
- if (a.getItem() instanceof CustomPickaxe || a.getItem() instanceof BronzePickaxe) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
- event.crafting.setItemDamage(tempDamage);
+ if (a.getItem() instanceof CustomPickaxe) {
+ doQuickNBT(event, i, a);
+ PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
}
- if (a.getItem() instanceof CustomShovel || a.getItem() instanceof BronzeShovel) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
- event.crafting.setItemDamage(tempDamage);
+ if (a.getItem() instanceof CustomShovel) {
+ doQuickNBT(event, i, a);
+ PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
}
- if (a.getItem() instanceof CustomHoe || a.getItem() instanceof BronzeHoe) {
- tempTag = a.getSubCompound("tags").copy();
- event.crafting.getTagCompound().setTag("tags", tempTag);
- event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
- Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
- event.crafting.setItemDamage(tempDamage);
+ if (a.getItem() instanceof CustomHoe) {
+ doQuickNBT(event, i, a);
+ PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
}
}
}
@@ -121,5 +65,28 @@ public class CommonEvents implements ToolNBT {
}
}
+ private void doQuickNBT(PlayerEvent.ItemCraftedEvent event, Integer i, ItemStack a){
+ NBTTagCompound tempTag;
+ tempTag = a.getSubCompound("tags").copy();
+ event.crafting.getTagCompound().setTag("tags", tempTag);
+ event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
+ Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
+ event.crafting.setItemDamage(tempDamage);
+ }
+ private void doToolNBT(PlayerEvent.ItemCraftedEvent event) {
+ NBTTagCompound tempTag;
+ for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
+
+ if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
+ ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
+ if (a.getItem() instanceof ToolPart) {
+ tempTag = a.getSubCompound("tags").copy();
+ event.crafting.getTagCompound().setTag("tags", tempTag);
+ event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
+ event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
+ }
+ }
+ }
+ }
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/ForgeCraft.java b/kfc/src/main/java/nmd/primal/forgecraft/ForgeCraft.java
index 4b008d2e..79593f2e 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/ForgeCraft.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/ForgeCraft.java
@@ -11,7 +11,6 @@ import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import nmd.primal.forgecraft.commands.CommandShowWiki;
-import nmd.primal.forgecraft.compat.ModDictionary;
import nmd.primal.forgecraft.gui.GuiHandler;
import nmd.primal.forgecraft.init.*;
import nmd.primal.forgecraft.proxy.CommonProxy;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java
index 9e455a91..23ce5e5c 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java
@@ -2,8 +2,12 @@ package nmd.primal.forgecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
+import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+import net.minecraftforge.registries.IForgeRegistry;
+import nmd.primal.forgecraft.crafting.CrucibleCrafting;
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
import nmd.primal.forgecraft.init.ModItems;
//import nmd.primal.forgecraft.Item.ModItems;
@@ -18,7 +22,7 @@ public class ModInfo {
//public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID;
- public static final String MOD_VERSION = "1.6.14";
+ public static final String MOD_VERSION = "1.6.31";
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);";
@@ -46,13 +50,13 @@ public class ModInfo {
};
// ***************************************************************************** //
- // PrimalAPI.Registries
+ // ForgeCraft.Registries
// ***************************************************************************** //
public static class Registries
{
// In-World Recipes
- //public static final IForgeRegistry CRUCIBLE_CRAFTINGS = GameRegistry.findRegistry(CrucibleCrafting.class);
-
+ public static final IForgeRegistry CRUCIBLE_CRAFTING = GameRegistry.findRegistry(CrucibleCrafting.class);
+ public static final IForgeRegistry WORKBENCH_CRAFTING = GameRegistry.findRegistry(WorkbenchCrafting.class);
}
}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java
deleted file mode 100644
index 029436bf..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilBase.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package nmd.primal.forgecraft.blocks.Anvil;
-
-import net.minecraft.block.material.Material;
-import net.minecraft.block.properties.IProperty;
-import net.minecraft.block.state.BlockStateContainer;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumBlockRenderType;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.blocks.CustomContainerFacing;
-import nmd.primal.forgecraft.tiles.TileAnvil;
-import nmd.primal.forgecraft.util.AnvilHandler;
-
-/**
- * Created by mminaie on 6/11/17.
- */
-public abstract class AnvilBase extends CustomContainerFacing implements AnvilHandler{
-
- private boolean anvil;
-
- public AnvilBase(Material material, String registryName, Float hardness, Boolean anvil) {
- super(material, registryName);
- setCreativeTab(ModInfo.TAB_FORGECRAFT);
- setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
- setHardness(hardness);
- this.setIsAnvil(anvil);
- }
-
- public boolean isAnvil() {
- return anvil;
- }
-
- public void setIsAnvil(boolean anvil) {
- anvil = anvil;
- }
-
- @Override
- public void breakBlock(World world, BlockPos pos, IBlockState state)
- {
- if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops")) {
- TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
- if (tile != null) {
- for (ItemStack stack : tile.getSlotList()) {
- if (stack != ItemStack.EMPTY) {
- float offset = 0.7F;
- double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
- double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
- double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
- stack.setCount(1);
- ItemStack dropStack = stack.copy();
- System.out.println(dropStack);
- dropStack.setCount(1);
- EntityItem itemDrop = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, dropStack);
- itemDrop.setDefaultPickupDelay();
- world.spawnEntity(itemDrop);
- }
- }
- }
- }
- }
-
- @Override
- public TileEntity createNewTileEntity(World worldIn, int meta)
- {
- return new TileAnvil();
- }
-
- @Override
- public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
- {
- //if(!worldIn.isRemote) {
- worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
- //}
- }
-
- @Override
- public int getMetaFromState(IBlockState state) {
- int i = 0;
-
- if( state.getValue(FACING) == EnumFacing.EAST) {
- i = 0;
- return i;
- }
- if( state.getValue(FACING) == EnumFacing.WEST) {
- i = 1;
- return i;
- }
- if( state.getValue(FACING) == EnumFacing.SOUTH){
- i = 2;
- return i;
- }
- if( state.getValue(FACING) == EnumFacing.NORTH){
- i = 3;
- return i;
- }
- return i;
- }
-
- @Override
- public IBlockState getStateFromMeta(int meta)
- {
- IBlockState iblockstate = this.getDefaultState();
-
- if (meta == 0){
- iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST);
- }
- if (meta == 1) {
- iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST);
- }
- if (meta == 2) {
- iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH);
- }
- if (meta == 3) {
- iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH);
- }
- return iblockstate;
- }
-
- @Override
- protected BlockStateContainer createBlockState() {
- return new BlockStateContainer(this, new IProperty[] {FACING});
- }
-
-
-
- @Override
- public boolean isFullCube(IBlockState state)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube(IBlockState state)
- {
- return false;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
- {
- return true;
- }
-
- @Override
- public EnumBlockRenderType getRenderType(IBlockState state)
- {
- return EnumBlockRenderType.MODEL;
- }
-
-
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilSteel.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilSteel.java
deleted file mode 100644
index 4c096ba2..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilSteel.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package nmd.primal.forgecraft.blocks.Anvil;
-
-/**
- * Created by mminaie on 6/10/17.
- */
-public class AnvilSteel {
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilBase.java
new file mode 100644
index 00000000..490c4c8e
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilBase.java
@@ -0,0 +1,71 @@
+package nmd.primal.forgecraft.blocks;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import nmd.primal.forgecraft.blocks.CustomContainerFacing;
+import nmd.primal.forgecraft.tiles.TileAnvil;
+import nmd.primal.forgecraft.util.AnvilHandler;
+
+/**
+ * Created by mminaie on 6/11/17.
+ */
+public abstract class AnvilBase extends CustomContainerFacing implements AnvilHandler{
+
+ private boolean anvil;
+
+ public AnvilBase(Material material, String registryName, Float hardness, Boolean anvil) {
+ super(material, registryName);
+
+ setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
+ setHardness(hardness);
+ this.setIsAnvil(anvil);
+ }
+
+ public boolean isAnvil() {
+ return anvil;
+ }
+
+ public void setIsAnvil(boolean anvil) {
+ anvil = anvil;
+ }
+
+ @Override
+ public void breakBlock(World world, BlockPos pos, IBlockState state)
+ {
+ if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops")) {
+ TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
+ if (tile != null) {
+ for (ItemStack stack : tile.getSlotList()) {
+ if (stack != ItemStack.EMPTY) {
+ float offset = 0.7F;
+ double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
+ double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
+ double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
+ stack.setCount(1);
+ ItemStack dropStack = stack.copy();
+ dropStack.setCount(1);
+ EntityItem itemDrop = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, dropStack);
+ itemDrop.setDefaultPickupDelay();
+ world.spawnEntity(itemDrop);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta)
+ {
+ return new TileAnvil();
+ }
+
+
+
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilIron.java
similarity index 98%
rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java
rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilIron.java
index 3d03fcf2..d890d370 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilIron.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.blocks.Anvil;
+package nmd.primal.forgecraft.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilSteel.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilSteel.java
new file mode 100644
index 00000000..c820430d
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilSteel.java
@@ -0,0 +1,7 @@
+package nmd.primal.forgecraft.blocks;
+
+/**
+ * Created by mminaie on 6/10/17.
+ */
+public class AnvilSteel {
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilStone.java
similarity index 87%
rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java
rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilStone.java
index f087bc88..474ae00a 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/AnvilStone.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.blocks.Anvil;
+package nmd.primal.forgecraft.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
@@ -34,7 +34,6 @@ public class AnvilStone extends AnvilBase {
ItemStack stack12 = tile.getSlotStack(12).copy();
if (!world.isRemote) {
if (hand.equals(hand.MAIN_HAND)) {
-
if (!stack12.isEmpty()) {
if (tile != null) {
if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) {
@@ -55,8 +54,9 @@ public class AnvilStone extends AnvilBase {
ItemStack tempwootzchunk = new ItemStack(ModItems.wootzchunk, 1);
tempwootzchunk.setTagCompound(tempTag);
tempwootzchunk.getTagCompound().setBoolean("hot", true);
-
+ world.playEvent(1031, pos, 0);
if (stack12.getItem().equals(ModItems.ironingotball) && stack12.getTagCompound().getBoolean("hot")) {
+ world.playEvent(1031, pos, 0);
tile.setSlotStack(6, tempironchunk);
tile.setSlotStack(7, tempironchunk);
tile.setSlotStack(8, tempironchunk);
@@ -70,6 +70,7 @@ public class AnvilStone extends AnvilBase {
return true;
}
if (stack12.getItem().equals(ModItems.ironcleaningotball) && stack12.getTagCompound().getBoolean("hot")) {
+ world.playEvent(1031, pos, 0);
tile.setSlotStack(6, tempironcleanchunk);
tile.setSlotStack(7, tempironcleanchunk);
tile.setSlotStack(8, tempironcleanchunk);
@@ -83,6 +84,7 @@ public class AnvilStone extends AnvilBase {
return true;
}
if (stack12.getItem().equals(ModItems.steelingotball) && stack12.getTagCompound().getBoolean("hot")) {
+ world.playEvent(1031, pos, 0);
tile.setSlotStack(6, tempsteelchunk);
tile.setSlotStack(7, tempsteelchunk);
tile.setSlotStack(8, tempsteelchunk);
@@ -95,6 +97,7 @@ public class AnvilStone extends AnvilBase {
return true;
}
if (stack12.getItem().equals(ModItems.wootzingotball) && stack12.getTagCompound().getBoolean("hot")) {
+ world.playEvent(1031, pos, 0);
tile.setSlotStack(6, tempwootzchunk);
tile.setSlotStack(7, tempwootzchunk);
tile.setSlotStack(8, tempwootzchunk);
@@ -109,15 +112,16 @@ public class AnvilStone extends AnvilBase {
}
}
}
- if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) {
- ItemStack[] tempArray = new ItemStack[25];
- for (int i = 0; i < 25; i++) {
- tempArray[i] = tile.getSlotStack(i);
+ //if(! (pItem.getItem() instanceof SledgeHammer) ) {
+ if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) {
+ ItemStack[] tempArray = new ItemStack[25];
+ for (int i = 0; i < 25; i++) {
+ tempArray[i] = tile.getSlotStack(i);
+ }
+ doAnvilRecipe(pItem, stack12, tempArray, world, tile, pos, player);
+ return true;
}
- doAnvilRecipe(pItem, stack12, tempArray, world, tile, pos, player);
- return true;
- }
-
+ //}
doAnvilInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
return true;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java
new file mode 100644
index 00000000..8bb282f5
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java
@@ -0,0 +1,472 @@
+package nmd.primal.forgecraft.blocks;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.block.properties.IProperty;
+import net.minecraft.block.state.BlockStateContainer;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.MobEffects;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.EnumHand;
+import net.minecraft.util.EnumParticleTypes;
+import net.minecraft.util.SoundCategory;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.text.ITextComponent;
+import net.minecraft.util.text.TextComponentString;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.forgecraft.init.ModSounds;
+import nmd.primal.forgecraft.items.SledgeHammer;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
+
+import javax.annotation.Nullable;
+
+public class Chisel extends CustomFacing implements ToolMaterialMap {
+
+ private AxisAlignedBB boundBoxDown = new AxisAlignedBB(
+ 0.4375D, 0.0D, 0.4375D,
+ 0.5625D, 0.875D, 0.5625D);
+ private AxisAlignedBB boundBoxDownActive = new AxisAlignedBB(
+ 0.4375D, 0.0D, 0.4375D,
+ 0.5625D, 0.375D, 0.5625D);
+ private AxisAlignedBB boundBoxUp = new AxisAlignedBB(
+ 0.4375D, 0.125D, 0.4375D,
+ 0.5625D, 1.0, 0.5625D);
+ private AxisAlignedBB boundBoxUpActive = new AxisAlignedBB
+ (0.4375D, 0.625D, 0.4375D,
+ 0.5625D, 1.0D, 0.5625D);
+ private AxisAlignedBB boundBoxEast = new AxisAlignedBB(
+ 0.125D, 0.4375D, 0.4375D,
+ 1.0D, 0.5625D, 0.5625D);
+ private AxisAlignedBB boundBoxEastActive = new AxisAlignedBB(
+ 0.625D, 0.4375D, 0.4375D,
+ 1.0D, 0.5625D, 0.5625D);
+ private AxisAlignedBB boundBoxWest = new AxisAlignedBB(
+ 0.0D, 0.4375D, 0.4375D,
+ 0.875D, 0.5625D, 0.5625D);
+ private AxisAlignedBB boundBoxWestActive = new AxisAlignedBB(
+ 0.0D, 0.4375D, 0.4375D,
+ 0.375D, 0.5625D, 0.5625D);
+ private AxisAlignedBB boundBoxNorth = new AxisAlignedBB(
+ 0.4375D, 0.4375D, 0.0D,
+ 0.5625D, 0.5625D, 0.875D);
+ private AxisAlignedBB boundBoxNorthActive = new AxisAlignedBB(
+ 0.4375D, 0.4375D, 0.0D,
+ 0.5625D, 0.5625D, 0.375D);
+ private AxisAlignedBB boundBoxSouth = new AxisAlignedBB(
+ 0.4375D, 0.4375D, 0.125D,
+ 0.5625D, 0.5625D, 1.0D);
+ private AxisAlignedBB boundBoxSouthActive = new AxisAlignedBB(
+ 0.4375D, 0.4375D, 0.625D,
+ 0.5625D, 0.5625D, 1.0D);
+
+ private Item.ToolMaterial realMaterial;
+
+ public Chisel(Material material, String name, Item.ToolMaterial realMaterial) {
+ super(material, name);
+ this.setHardness(8.0f);
+ this.setResistance(8.0f);
+ this.realMaterial = realMaterial;
+ this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.DOWN).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)));
+ }
+
+ @Override
+ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
+ {
+ if(state.getValue(FACING)==EnumFacing.UP && !state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxUp;
+ }
+ if(state.getValue(FACING)==EnumFacing.UP && state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxUpActive;
+ }
+ if(state.getValue(FACING)==EnumFacing.DOWN && !state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxDown;
+ }
+ if(state.getValue(FACING)==EnumFacing.DOWN && state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxDownActive;
+ }
+ if(state.getValue(FACING)==EnumFacing.EAST && !state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxEast;
+ }
+ if(state.getValue(FACING)==EnumFacing.EAST && state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxEastActive;
+ }
+ if(state.getValue(FACING)==EnumFacing.WEST && !state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxWest;
+ }
+ if(state.getValue(FACING)==EnumFacing.WEST && state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxWestActive;
+ }
+ if(state.getValue(FACING)==EnumFacing.NORTH && !state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxNorth;
+ }
+ if(state.getValue(FACING)==EnumFacing.NORTH && state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxNorthActive;
+ }
+ if(state.getValue(FACING)==EnumFacing.SOUTH && !state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxSouth;
+ }
+ if(state.getValue(FACING)==EnumFacing.SOUTH && state.getValue(PrimalAPI.States.ACTIVE)){
+ return boundBoxSouthActive;
+ }
+ return boundBoxDown;
+ }
+
+ @Override
+ public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
+ {
+ if(!world.isRemote) {
+ world.setBlockState(pos, state.withProperty(FACING, EnumFacing.getFacingFromVector((float)placer.getLookVec().x, (float)placer.getLookVec().y, (float)placer.getLookVec().z)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
+ }
+ }
+
+ protected BlockStateContainer createBlockState()
+ {
+ return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.ACTIVE});
+ }
+ public Item.ToolMaterial getRealMaterial() {
+ return realMaterial;
+ }
+
+
+
+ @Override
+ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
+
+ if(!world.isRemote){
+ ItemStack playerStack = player.inventory.getCurrentItem();
+ ItemStack offStack = player.inventory.offHandInventory.get(0);
+ int toolHarvestLevel = playerStack.getItem().getHarvestLevel(playerStack, "pickaxe", player, state);
+ if (hand.equals(hand.MAIN_HAND) && offStack == ItemStack.EMPTY) {
+ if(!player.isSwingInProgress) {
+ if(player.getActivePotionEffect(MobEffects.MINING_FATIGUE ) == null){
+ if (playerStack.getItem() instanceof SledgeHammer) {
+ SledgeHammer playerItem = (SledgeHammer) playerStack.getItem();
+ world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.CHISEL_HIT, SoundCategory.BLOCKS, (float) (PrimalAPI.getRandom().nextDouble(0.5D, 0.8D)), (float) (PrimalAPI.getRandom().nextDouble(0.3D, 1.0D)));
+ playerStack.damageItem(1, player);
+ player.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, (100 - ((materialModifiers.get(playerItem.getMaterial()) * 8) + (materialModifiers.get(this.getRealMaterial()) * 8))), 100));
+ if (PrimalAPI.getRandom().nextInt(1, 10) != 1) {
+
+ if (state.getValue(FACING) == EnumFacing.UP) {
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (1), (i - 1));
+ IBlockState breakState = world.getBlockState(movePos);
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ doBreaking(world, movePos, breakState, player);
+ }
+ }
+ }
+ doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING));
+ return true;
+ }
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (1), (i - 1));
+ if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) {
+ IBlockState breakState = world.getBlockState(movePos);
+ doDamaging(world, movePos, breakState, player);
+ }
+ }
+ }
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ return true;
+ }
+ }
+
+ if (state.getValue(FACING) == EnumFacing.DOWN) {
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (-1), (i - 1));
+ IBlockState breakState = world.getBlockState(movePos);
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ doBreaking(world, movePos, breakState, player);
+ }
+ }
+ }
+ doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING));
+ return true;
+ }
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (-1), (i - 1));
+ if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) {
+ IBlockState breakState = world.getBlockState(movePos);
+ doDamaging(world, movePos, breakState, player);
+ }
+ }
+ }
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ return true;
+ }
+ }
+ if (state.getValue(FACING) == EnumFacing.SOUTH) {
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (i - 1), (1));
+ IBlockState breakState = world.getBlockState(movePos);
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ doBreaking(world, movePos, breakState, player);
+ }
+ }
+ }
+ doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING));
+ return true;
+ }
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (i - 1), (1));
+ if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) {
+ IBlockState breakState = world.getBlockState(movePos);
+ doDamaging(world, movePos, breakState, player);
+ }
+ }
+ }
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ return true;
+ }
+ }
+ if (state.getValue(FACING) == EnumFacing.NORTH) {
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (i - 1), (-1));
+ IBlockState breakState = world.getBlockState(movePos);
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ doBreaking(world, movePos, breakState, player);
+ }
+ }
+ }
+ doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING));
+ return true;
+ }
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((a - 1), (i - 1), (-1));
+ if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) {
+ IBlockState breakState = world.getBlockState(movePos);
+ doDamaging(world, movePos, breakState, player);
+ }
+ }
+ }
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ return true;
+ }
+ }
+ if (state.getValue(FACING) == EnumFacing.EAST) {
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((1), (i - 1), (a - 1));
+ IBlockState breakState = world.getBlockState(movePos);
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ doBreaking(world, movePos, breakState, player);
+ }
+ }
+ }
+ doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING));
+ return true;
+ }
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((1), (i - 1), (a - 1));
+ if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) {
+ IBlockState breakState = world.getBlockState(movePos);
+ doDamaging(world, movePos, breakState, player);
+ }
+ }
+ }
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ return true;
+ }
+ }
+ if (state.getValue(FACING) == EnumFacing.WEST) {
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((-1), (i - 1), (a - 1));
+ IBlockState breakState = world.getBlockState(movePos);
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ doBreaking(world, movePos, breakState, player);
+ }
+ }
+ }
+ doMoving(world, pos, toolHarvestLevel, state, state.getValue(FACING));
+ return true;
+ }
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ for (int i = 0; i < 3; i++) {
+ for (int a = 0; a < 3; a++) {
+ BlockPos movePos = pos.add((-1), (i - 1), (a - 1));
+ if (!(world.getBlockState(movePos).getBlock() instanceof Chisel)) {
+ IBlockState breakState = world.getBlockState(movePos);
+ doDamaging(world, movePos, breakState, player);
+ }
+ }
+ }
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if(offStack != ItemStack.EMPTY) {
+ String printout = "Is your offhand empty?";
+ ITextComponent text = new TextComponentString(printout);
+ player.sendStatusMessage(text, true);
+ return false;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Convert the given metadata into a BlockState for this Block
+ */
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(FACING, getFacing(meta)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf((meta & 8) > 0));
+ }
+
+ @Nullable
+ public static EnumFacing getFacing(int meta)
+ {
+ int i = meta & 7;
+ return i > 5 ? null : EnumFacing.getFront(i);
+ }
+
+ /**
+ * Convert the BlockState into the correct metadata value
+ */
+ public int getMetaFromState(IBlockState state)
+ {
+ int i = 0;
+ i = i | ((EnumFacing)state.getValue(FACING)).getIndex();
+
+ if (((Boolean)state.getValue(PrimalAPI.States.ACTIVE)).booleanValue())
+ {
+ i |= 8;
+ }
+
+ return i;
+ }
+
+ private EnumFacing reverseFacing(EnumFacing facing){
+ if(facing == EnumFacing.UP){
+ return EnumFacing.DOWN;
+ }
+ if(facing == EnumFacing.DOWN){
+ return EnumFacing.UP;
+ }
+ if(facing == EnumFacing.NORTH){
+ return EnumFacing.SOUTH;
+ }
+ if(facing == EnumFacing.SOUTH){
+ return EnumFacing.NORTH;
+ }
+ if(facing == EnumFacing.EAST){
+ return EnumFacing.WEST;
+ }
+ if(facing == EnumFacing.WEST){
+ return EnumFacing.EAST;
+ }
+ return null;
+ }
+
+
+ @SideOnly(Side.CLIENT)
+ public boolean hasCustomBreakingProgress(IBlockState state)
+ {
+ return true;
+ }
+
+ private void doMoving(World world, BlockPos pos, int toolHarvestLevel, IBlockState state, EnumFacing facing){
+ if( (world.getBlockState(pos.offset(facing, 2)).getBlock() != Blocks.AIR) ) {
+ if ((compareHarvestLevel(toolHarvestLevel, world.getBlockState(pos.offset(facing, 1)).getBlock().getHarvestLevel(world.getBlockState(pos.offset(facing, 1))))) &&
+ (world.getBlockState(pos.offset(facing, 1)).getBlock() == Blocks.AIR)) {
+ world.setBlockState(pos.offset(facing, 1), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
+ world.setBlockToAir(pos);
+ }
+ } else {
+ world.destroyBlock(pos, true);
+ }
+ }
+
+ private void doBreaking(World world, BlockPos movePos, IBlockState state, EntityPlayer player){
+ if (!(state.getBlock().equals(Blocks.AIR))) {
+ if(world.getBlockState(movePos).getBlock().getBlockHardness(state, world, movePos)>0) {
+
+ ItemStack playerStack = player.inventory.getCurrentItem();
+ int toolHarvestLevel = playerStack.getItem().getHarvestLevel(playerStack, "pickaxe", player, state);
+ world.destroyBlock(movePos, compareHarvestLevel(toolHarvestLevel, state.getBlock().getHarvestLevel(state)));
+ world.sendBlockBreakProgress(player.getEntityId()+PrimalAPI.getRandom().nextInt(100), movePos, 0);
+ }
+ }
+ }
+
+ private void doDamaging(World world, BlockPos movePos, IBlockState state, EntityPlayer player){
+ if (!(state.getBlock().equals(Blocks.AIR))) {
+ if(world.getBlockState(movePos).getBlock().blockHardness>0) {
+ world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, PrimalAPI.getRandom().nextInt(3,10));
+ }
+ }
+ }
+
+ private boolean compareHarvestLevel(int inputLevel, int compareHarvest){
+ if(inputLevel >= compareHarvest && inputLevel >=0){
+ return true;
+ } else return false;
+ }
+
+ private void makeParticles(World world, BlockPos pos, EnumParticleTypes particle, EnumFacing facing){
+
+ double d0 = (double)pos.getX() + 0.5D;
+ double d1 = (double)pos.getY() + 0.5D;
+ double d2 = (double)pos.getZ() + 0.5D;
+ double xVelocity = 0.0D;
+ double yVelocity = 0.0D;
+ double zVelocity = 0.0D;
+ double d4 = PrimalAPI.getRandom().nextDouble(0.066, 0.33);
+
+ if(facing == EnumFacing.NORTH){
+ d0 += 0.5D;
+ }
+ if(facing == EnumFacing.DOWN){
+ d1 += 0.5D;
+ yVelocity += 0.1D;
+ }
+ if(facing == EnumFacing.UP){
+ d1 -= 0.5D;
+ }
+
+ //if(PrimalAPI.getRandom().nextInt(3) == 0){
+ world.spawnParticle(particle, d0, d1, d2, 0.0D + xVelocity, 0.0 + yVelocity, 0.0D + zVelocity, new int[1]);
+ world.spawnParticle(particle, d0, d1, d2, 0.0D + xVelocity, 0.0 + yVelocity, 0.0D + zVelocity, new int[1]);
+ //}
+
+
+
+ //double ySpeed = ThreadLocalRandom.current().nextDouble(0.05, 0.20);
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java
index b0e191b2..b657763f 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomContainerFacing.java
@@ -1,10 +1,21 @@
package nmd.primal.forgecraft.blocks;
import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
+import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
+import net.minecraft.block.state.BlockStateContainer;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.forgecraft.ModInfo;
/**
* Created by kitsu on 12/3/2016.
@@ -20,10 +31,89 @@ public abstract class CustomContainerFacing extends BlockContainer {
this.setUnlocalizedName(registryName);
this.setHardness(3.0f);
this.setResistance(4.0f);
+ setCreativeTab(ModInfo.TAB_FORGECRAFT);
}
- protected CustomContainerFacing(Material material, MapColor color)
+ @Override
+ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
- super(material, color);
+ //if(!worldIn.isRemote) {
+ worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
+ //}
+ }
+
+ @Override
+ public int getMetaFromState(IBlockState state) {
+ int i = 0;
+
+ if( state.getValue(FACING) == EnumFacing.EAST) {
+ i = 0;
+ return i;
+ }
+ if( state.getValue(FACING) == EnumFacing.WEST) {
+ i = 1;
+ return i;
+ }
+ if( state.getValue(FACING) == EnumFacing.SOUTH){
+ i = 2;
+ return i;
+ }
+ if( state.getValue(FACING) == EnumFacing.NORTH){
+ i = 3;
+ return i;
+ }
+ return i;
+ }
+
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ IBlockState iblockstate = this.getDefaultState();
+
+ if (meta == 0){
+ iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST);
+ }
+ if (meta == 1) {
+ iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST);
+ }
+ if (meta == 2) {
+ iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH);
+ }
+ if (meta == 3) {
+ iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH);
+ }
+ return iblockstate;
+ }
+
+ @Override
+ protected BlockStateContainer createBlockState() {
+ return new BlockStateContainer(this, new IProperty[] {FACING});
+ }
+
+
+
+ @Override
+ public boolean isFullCube(IBlockState state)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isOpaqueCube(IBlockState state)
+ {
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
+ {
+ return true;
+ }
+
+ @Override
+ public EnumBlockRenderType getRenderType(IBlockState state)
+ {
+ return EnumBlockRenderType.MODEL;
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomFacing.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomFacing.java
index abfa3fcc..0824bee0 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomFacing.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/CustomFacing.java
@@ -1,26 +1,51 @@
package nmd.primal.forgecraft.blocks;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.MapColor;
+import net.minecraft.block.BlockDirectional;
import net.minecraft.block.material.Material;
-import net.minecraft.block.properties.PropertyDirection;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.forgecraft.ModInfo;
/**
* Created by mminaie on 1/1/17.
*/
-public abstract class CustomFacing extends Block {
+public abstract class CustomFacing extends BlockDirectional {
- public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
-
- protected CustomFacing(Material material)
- {
+ protected CustomFacing(Material material, String name) {
super(material);
+ this.setRegistryName(name);
+ this.setUnlocalizedName(name);
+ setCreativeTab(ModInfo.TAB_FORGECRAFT);
}
- protected CustomFacing(Material material, MapColor color)
+ @Override
+ public boolean isFullCube(IBlockState state)
{
- super(material, color);
+ return false;
+ }
+
+ @Override
+ public boolean isOpaqueCube(IBlockState state)
+ {
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
+ {
+ return true;
+ }
+
+ @Override
+ public EnumBlockRenderType getRenderType(IBlockState state)
+ {
+ return EnumBlockRenderType.MODEL;
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/NBTCrucible.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/NBTCrucible.java
similarity index 84%
rename from kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/NBTCrucible.java
rename to kfc/src/main/java/nmd/primal/forgecraft/blocks/NBTCrucible.java
index ff84223c..77ec9de5 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/NBTCrucible.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/NBTCrucible.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.blocks.Crucibles;
+package nmd.primal.forgecraft.blocks;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.ITileEntityProvider;
@@ -34,6 +34,8 @@ import nmd.primal.forgecraft.tiles.TileNBTCrucible;
import java.util.Random;
+import static net.minecraft.util.EnumHand.MAIN_HAND;
+
/**
* Created by mminaie on 11/11/17.
@@ -58,8 +60,14 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing face, float hitX, float hitY, float hitZ) {
if (!world.isRemote) {
- if(hand == player.getActiveHand()) {
- TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos);
+
+ TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos);
+
+ if(hand.equals(MAIN_HAND)) {
+
+ System.out.println(player.inventory.getCurrentItem());
+ System.out.println(hand);
+
ItemStack pItem = player.inventory.getCurrentItem().copy();
pItem.setCount(1);
@@ -72,36 +80,46 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
}
PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getCrucibleItem(world, pos, state, player));
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
+ world.markTileEntityForRemoval(tile);
return true;
}
}
+ }
- /**SET INGREDIENT ARRAY FOR THE CRUCIBLE NOW**/
+ /**SET INGREDIENT ARRAY FOR THE CRUCIBLE NOW**/
+ if( player.inventory.getSlotFor(player.inventory.getCurrentItem()) != -1 ) {
+ ItemStack pItem = player.inventory.getCurrentItem().copy();
+ pItem.setCount(1);
if (!player.isSneaking()) {
if (!pItem.isEmpty()) {
- if (pItem.getItem() instanceof SlottedTongs) {
- return false;
- } else {
- pItem.setCount(1);
- for (int i = 1; i < tile.ingList.size()+1; i++) {
- if (tile.ingList.get(i-1).isEmpty()) {
- tile.ingList.set(i-1, pItem);
- tile.setHot(i);
- world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, i), 2);
- player.inventory.getCurrentItem().shrink(1);
- tile.update();
- tile.markDirty();
- return true;
+ if (!tile.getStatus() || tile.getHot() == 15 || tile.getHot() == 6) {
+ if (pItem.getItem() instanceof SlottedTongs) {
+ return false;
+ } else {
+ pItem.setCount(1);
+ for (int i = 1; i < tile.ingList.size() + 1; i++) {
+ if (tile.ingList.get(i - 1).isEmpty()) {
+ tile.ingList.set(i - 1, pItem);
+ tile.setHot(i);
+ world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, i), 2);
+ player.inventory.getCurrentItem().shrink(1);
+ tile.update();
+ tile.markDirty();
+ return true;
+ }
}
- }
+ }
}
}
}
- /**CLEARS THE INVENTORY**/
+ }
+ /**CLEARS THE INVENTORY**/
+ if(hand.equals(MAIN_HAND)) {
if (player.isSneaking()) {
+ ItemStack pItem = player.inventory.getCurrentItem().copy();
if (pItem.isEmpty()) {
- if (tile.getHot()!=15) {
+ if (tile.getHot() != 15) {
if (!tile.getStatus()) {
for (int i = 0; i < tile.ingList.size(); i++) {
if (!tile.ingList.get(i).isEmpty()) {
@@ -119,10 +137,13 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
}
}
}
- /**REMOVE COOKED ITEM**/
- if (player.isSneaking() == true) {
+ }
+ /**REMOVE COOKED ITEM**/
+ if (player.isSneaking() == true) {
+ if (hand.equals(MAIN_HAND)) {
+ ItemStack pItem = player.inventory.getCurrentItem().copy();
if (pItem.isEmpty()) {
- if (tile.getStatus() && tile.getHot()==6) {
+ if (tile.getStatus() && tile.getHot() == 6) {
ItemStack dropStack = tile.getDrops().copy();
world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, 0), 2);
tile.setHot(0);
@@ -170,6 +191,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
ItemStack dropStack = new ItemStack(ModBlocks.nbtCrucible, 1);
PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
+ world.markTileEntityForRemoval(tile);
return true;
}
}
@@ -212,11 +234,9 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
if (tileentity instanceof TileNBTCrucible) {
TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos);
if(NBTHelper.hasNBT(stack)){
- NBTTagCompound tag = stack.getSubCompound("BlockEntityTag").copy();
- ItemStack temp = stack.copy();
- int i = temp.getItem().getMetadata(stack.getMetadata());
- //TODO update this with number instead of the boolean
- world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, tile.getHot()), 2);
+ NBTTagCompound tag = stack.getTagCompound();
+ world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, tile.getHot()), 2);
+ //tile.readNBT(tag);
}
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/ingots/IngotBall.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/ingots/IngotBall.java
deleted file mode 100644
index ac0b2ef4..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/ingots/IngotBall.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package nmd.primal.forgecraft.blocks.ingots;
-
-import net.minecraft.block.BlockDynamicLiquid;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.properties.IProperty;
-import net.minecraft.block.state.BlockStateContainer;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.SoundEvents;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.SoundCategory;
-import net.minecraft.util.math.AxisAlignedBB;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.blocks.BlockCustomBase;
-
-import java.util.Random;
-import java.util.concurrent.ThreadLocalRandom;
-
-/**
- * Created by mminaie on 2/6/17.
- */
-public class IngotBall extends BlockCustomBase {
-
- protected static AxisAlignedBB boundBoxLarge = new AxisAlignedBB(6/16D, 0.0D, 6/16D, 10/16D, 4/16D, 10/16D);
- protected static AxisAlignedBB boundBoxSmall = new AxisAlignedBB(7/16D, 0.0D, 7/16D, 9/16D, 2/16D, 9/16D);
- //public static final PropertyBool ACTIVE = PropertyBool.create("active");
- private String AABBsize;
-
- public IngotBall(Material material, String registryName, Float hardness, String size){
- super(material, registryName, hardness);
- this.setTickRandomly(true);
- this.AABBsize = size;
- setCreativeTab(ModInfo.TAB_FORGECRAFT);
- setDefaultState(this.blockState.getBaseState().withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)));
- }
-
-
- @Override
- public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
- {
-
- if(this.AABBsize.equals("small")){
- return boundBoxSmall;
- }else
- return boundBoxLarge;
- }
-
-
-
- @Override
- public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
- {
- System.out.println("Print Something");
- System.out.println(stack.getTagCompound());
- //worldIn.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
- //System.out.println(state.getValue(ACTIVE));
- }
-
- public void onBlockDestroyedByPlayer(World world, BlockPos pos, IBlockState state)
- {
-
- if(!world.isRemote){
- if(state.getValue(PrimalAPI.States.ACTIVE)){
- world.setBlockState(pos, Blocks.FLOWING_LAVA.getDefaultState().withProperty(BlockDynamicLiquid.LEVEL, 1), 3);
- }
- if(!state.getValue(PrimalAPI.States.ACTIVE)){
- //PlayerHelper.spawnItemOnGround(world, pos, new ItemStack(this, 1));
- }
- }
- }
-
- @Override
- public int getMetaFromState(IBlockState state) {
- int i = 0;
-
- if( state.getValue(PrimalAPI.States.ACTIVE) == false) {
- i = 0;
- return i;
- }
- if( state.getValue(PrimalAPI.States.ACTIVE) == true) {
- i = 1;
- return i;
- }
- return i;
- }
-
- @Override
- public IBlockState getStateFromMeta(int meta)
- {
- IBlockState iblockstate = this.getDefaultState();
-
- if (meta == 0){
- iblockstate = iblockstate.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false));
- }
- if (meta == 1) {
- iblockstate = iblockstate.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(true));
- }
- return iblockstate;
- }
-
- @Override
- protected BlockStateContainer createBlockState() {
- return new BlockStateContainer(this, new IProperty[] {PrimalAPI.States.ACTIVE});
- }
-
- @Override
- public void randomTick(World world, BlockPos pos, IBlockState state, Random random)
- {
- this.updateTick(world, pos, state, random);
- if(!world.isRemote){
- if ( ThreadLocalRandom.current().nextInt(0,4) == 0) {
- if(state.getValue(PrimalAPI.States.ACTIVE) == true) {
- world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
- world.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
- }
- }
- }
- }
-
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java
index de30270e..62479599 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/BloomeryBase.java
@@ -105,13 +105,12 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr
if(pItem.isEmpty()) {
if(!player.isSneaking()){
- if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true){
+ if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE)){
Integer bloomeryHeat = tile.getHeat();
- String display = "\n" + "Current Temp: " + bloomeryHeat.toString() +
- " Fuel Remaining: " + tileItem.getCount();
+ String display = "Fuel Remaining: " + tileItem.getCount() + "\n" + "Current Temp: " + bloomeryHeat.toString();
ITextComponent itextcomponent = new TextComponentString(display);
- player.sendStatusMessage(itextcomponent, false);
+
NBTTagCompound tag = tile.getSlotStack(1).getSubCompound("BlockEntityTag");
if(tag != null) {
@@ -121,26 +120,44 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr
ItemStackHelper.loadAllItems(tag, dropList);
CrucibleCrafting recipe = CrucibleCrafting.getRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4));
if (recipe != null) {
- Integer minTemp = recipe.getCookTemp();
- Integer cookCounter = tile.getCookCounter();
- Integer idealTime = recipe.getCookTime();
- Integer remainingTime = idealTime - cookCounter;
+ if(!recipe.isHidden()) {
+ if (!recipe.isDisabled()) {
+ Integer minTemp = recipe.getCookTemp();
+ Integer cookCounter = tile.getCookCounter();
+ Integer idealTime = recipe.getCookTime();
+ Integer remainingTime = idealTime - cookCounter;
- String display1 =
- "Cooking: " + tileItem1.getDisplayName() +
- " Target Temp: " + minTemp.toString() +
- " Time Left: " + remainingTime.toString();
- String display2 = tileItem1.getDisplayName() + "finished.";
- ITextComponent itextcomponent1 = null;
- if (tileItem1.getSubCompound("BlockEntityTag").getBoolean("status")) {
- itextcomponent1 = new TextComponentString(display2);
- } else itextcomponent1 = new TextComponentString(display1);
- player.sendStatusMessage(itextcomponent1, false);
+ String display1 = "Cooking: " + recipe.getDropsCooked().getItem().getItemStackDisplayName(recipe.getDropsCooked());
+ String display2 = "Target Temp: " + minTemp.toString();
+ String display3 = "Time Left: " + remainingTime.toString() + "\n";
+ String display4 = "Finished";
+ //String display5 = "Current Temp: " + tile.getHeat();
+
+ ITextComponent cookingText = new TextComponentString(display1);
+ ITextComponent targetTempText = new TextComponentString(display2);
+ ITextComponent timeLeftText = new TextComponentString(display3);
+ ITextComponent finishedText = new TextComponentString(display4);
+ //ITextComponent itextcomponent5 = new TextComponentString(display5);
+ if (tileItem1.getSubCompound("BlockEntityTag").getBoolean("status")) {
+ player.sendMessage(finishedText);
+ } else {
+ player.sendMessage(cookingText);
+ player.sendMessage(itextcomponent);
+ player.sendMessage(targetTempText);
+ player.sendMessage(timeLeftText);
+ }
+ }
+ }
}
return true;
}
+ else {
+ String noRecipe = "Fuel Remaining: " + tileItem.getCount() + "\n" + "Current Temp: " + bloomeryHeat.toString() + "\n";
+ ITextComponent noRecipeText = new TextComponentString(noRecipe);
+ player.sendMessage(noRecipeText);
+ }
}
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Breaker.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Breaker.java
index 09ae5e44..57dec978 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Breaker.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Breaker.java
@@ -19,6 +19,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.core.common.items.tools.Gallagher;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
@@ -49,40 +50,44 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler {
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
if(!world.isRemote){
- TileBreaker tile = (TileBreaker) world.getTileEntity(pos);
- ItemStack pItem = player.inventory.getCurrentItem();
+ if (hand.equals(player.getActiveHand())) {
+ TileBreaker tile = (TileBreaker) world.getTileEntity(pos);
+ ItemStack pItem = player.inventory.getCurrentItem();
- if(state.getValue(PrimalAPI.States.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
+ if (state.getValue(PrimalAPI.States.ACTIVE) && player.isSneaking() && pItem.isEmpty()) {
- doBreaking(world, state, pos, tile);
- world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, false));
+ doBreaking(world, state, pos, tile);
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, false));
- tile.setCharge(0);
- return true;
- }
- if(!player.isSneaking() && pItem.isEmpty()) {
- if (!state.getValue(PrimalAPI.States.ACTIVE)) {
- world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
+ tile.setCharge(0);
return true;
}
- if(state.getValue(PrimalAPI.States.ACTIVE)) {
- if (tile.getCharge() < 181) {
- tile.setCharge(tile.getCharge() + 2.0f);
- tile.updateBlock();
- //System.out.println(tile.charge);
+ if (!state.getValue(PrimalAPI.States.ACTIVE) && player.isSneaking() && pItem.isEmpty() && tile.getCharge() == 0) {
+ PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(0));
+ tile.setSlotStack(0, ItemStack.EMPTY);
+ return true;
+ }
+ if (!player.isSneaking() && pItem.isEmpty()) {
+ if (!state.getValue(PrimalAPI.States.ACTIVE)) {
+ world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
return true;
}
+ if (state.getValue(PrimalAPI.States.ACTIVE)) {
+ if (tile.getCharge() < 181) {
+ tile.setCharge(tile.getCharge() + 2.0f);
+ tile.updateBlock();
+ //System.out.println(tile.charge);
+ return true;
+ }
+ }
+ }
+
+ if (pItem.getItem() instanceof Gallagher) {
+ tile.setSlotStack(0, player.inventory.getCurrentItem());
+ player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
+ return true;
}
}
-
- if(pItem.getItem() instanceof Gallagher){
- tile.setSlotStack(0, player.inventory.getCurrentItem());
- player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
- return true;
- }
-
-
-
}
return false;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/CastingForm.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/CastingForm.java
index c8958233..287cfabd 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/CastingForm.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/CastingForm.java
@@ -31,7 +31,6 @@ import nmd.primal.forgecraft.crafting.CrucibleCrafting;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.SlottedTongs;
-import nmd.primal.forgecraft.items.parts.BronzeToolPart;
import nmd.primal.forgecraft.tiles.TileCastingForm;
import nmd.primal.forgecraft.util.CastingFormHandler;
import nmd.primal.forgecraft.util.ToolNBT;
@@ -60,23 +59,27 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
ItemStack pItem = player.inventory.getCurrentItem();
- IItemHandler inventory = pItem.getCapability(ITEM_HANDLER, null);
- ItemStack slotStack = inventory.getStackInSlot(0).copy();
-
if(pItem.getItem() != ModItems.slottedtongs) {
doInventoryManager(pItem, world, tile, pos, hitx, hity, hitz, state, player);
}
if(pItem.getItem().equals(ModItems.slottedtongs)){
- SlottedTongs tongs = (SlottedTongs) pItem.getItem();
- if(slotStack.getItem().equals(Item.getItemFromBlock(ModBlocks.nbtCrucible))) {
- ItemStack tongsStack = slotStack.copy();
+
+ IItemHandler inventory = pItem.getCapability(ITEM_HANDLER, null);
+ SlottedTongs itemstackItem = (SlottedTongs) pItem.getItem();
+ ItemStack tongsStack = inventory.getStackInSlot(0).copy();
+
+ //SlottedTongs tongs = (SlottedTongs) pItem.getItem();
+ if(tongsStack.getItem().equals(Item.getItemFromBlock(ModBlocks.nbtCrucible))) {
+
NBTTagCompound tag = tongsStack.getTagCompound().copy();
if(tag != null){
NonNullList ingList = NonNullList.withSize(5, ItemStack.EMPTY);
NonNullList ingListEmpty = NonNullList.withSize(5, ItemStack.EMPTY);
ItemStackHelper.loadAllItems(tag.getCompoundTag("BlockEntityTag"), ingList);
+
CrucibleCrafting crucibleRecipe = CrucibleCrafting.getRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4));
+
if(crucibleRecipe != null){
if(tag.getCompoundTag("BlockEntityTag").getBoolean("status") && tag.getCompoundTag("BlockEntityTag").getInteger("hot") == 15){
Item[] tempArray = new Item[25];
@@ -84,57 +87,52 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
tempArray[i] = tile.getSlotStack(i).getItem();
}
- CastingCrafting casting = CastingCrafting.getRecipe(tongsStack, tempArray);
+ CastingCrafting casting = CastingCrafting.getRecipe(crucibleRecipe.getDropsCooked(), tempArray);
if(casting != null){
- NBTTagCompound tagOutput = casting.getOutput().getTagCompound();
- //System.out.println(tagOutput);
+ NBTTagCompound tagOutput = casting.getOutput().getOrCreateSubCompound("tags");
+ NBTTagCompound crucibleOutput = crucibleRecipe.getDropsCooked().getTagCompound();
+
if(tagOutput != null) {
ItemStack dropStack = casting.getOutput();
+
dropStack.setTagCompound(new NBTTagCompound());
NBTTagCompound tags = new NBTTagCompound();
dropStack.getTagCompound().setTag("tags", tags);
setHot(dropStack, false);
- if (tagOutput.getString("upgrades") == "emerald") {
+ if (crucibleOutput.getString("upgrades") == "emerald") {
setEmerald(dropStack, true);
+ setModifiers(dropStack, 1);
} else {
setEmerald(dropStack, false);
}
- if (tagOutput.getString("upgrades") == "diamond") {
+ if (crucibleOutput.getString("upgrades") == "diamond") {
setDiamondLevel(dropStack, 1);
+ setModifiers(dropStack, 1);
} else {
setDiamondLevel(dropStack, 0);
}
- if (tagOutput.getString("upgrades") == "redstone") {
+ if (crucibleOutput.getString("upgrades") == "redstone") {
setRedstoneLevel(dropStack, 1);
+ setModifiers(dropStack, 1);
} else {
setRedstoneLevel(dropStack, 0);
}
- if (tagOutput.getString("upgrades") == "lapis") {
+ if (crucibleOutput.getString("upgrades") == "lapis") {
setLapisLevel(dropStack, 1);
+ setModifiers(dropStack, 1);
} else {
setLapisLevel(dropStack, 0);
}
- setModifiers(dropStack, 1);
+
CommonUtils.spawnItemEntityFromWorld(world, pos, dropStack);
tag.getCompoundTag("BlockEntityTag").setBoolean("status", false);
tag.getCompoundTag("BlockEntityTag").setInteger("hot", 0);
ItemStackHelper.saveAllItems(tag.getCompoundTag("BlockEntityTag"), ingListEmpty);
inventory.getStackInSlot(0).setTagCompound(tag);
+ itemstackItem.markDirty(pItem);
return true;
}
- if(tagOutput == null){
- System.out.println("Tag is null");
- if( !(casting.getOutput().getItem() instanceof BronzeToolPart) ){
- ItemStack dropStack = casting.getOutput();
- CommonUtils.spawnItemEntityFromWorld(world, pos, dropStack);
- tag.getCompoundTag("BlockEntityTag").setBoolean("status", false);
- tag.getCompoundTag("BlockEntityTag").setInteger("hot", 0);
- ItemStackHelper.saveAllItems(tag.getCompoundTag("BlockEntityTag"), ingListEmpty);
- inventory.getStackInSlot(0).setTagCompound(tag);
- return true;
- }
- }
}
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Forge.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Forge.java
index 3277257a..28df46a2 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Forge.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Forge.java
@@ -29,6 +29,7 @@ import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
import nmd.primal.forgecraft.tiles.TileForge;
import nmd.primal.forgecraft.util.ForgeHandler;
+import nmd.primal.forgecraft.util.SlotHelper;
import javax.annotation.Nullable;
import java.util.Random;
@@ -42,7 +43,7 @@ import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
/**
* Created by kitsu on 11/26/2016.
*/
-public class Forge extends CustomContainerFacing implements ITileEntityProvider, ForgeHandler{
+public class Forge extends CustomContainerFacing implements ITileEntityProvider, ForgeHandler, SlotHelper {
private int maxHeat;
//public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("PrimalAPI.States.ACTIVE");
@@ -97,7 +98,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
ItemStack fuelItem = tile.getSlotStack(0);
/***********************
- FUEL SLOT CODE
+ FUEL SLOT REMOVAL CODE
***********************/
if (!tile.getSlotStack(0).isEmpty()) {
if (player.inventory.getCurrentItem().getItem() instanceof ItemSpade) {
@@ -107,6 +108,10 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
return true;
}
}
+
+ /***********************
+ TEMP PRINT OUT CODE
+ ***********************/
if (pItem.isEmpty()) {
if (!player.isSneaking()) {
if (world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true) {
@@ -119,6 +124,9 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
}
}
}
+ /***********************
+ Forge Activation Code
+ ***********************/
if ((FireSource.useSource(world, pos, facing, player, hand, pItem, hitX, hitY, hitZ))) {
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2);
tile.setHeat(100);
@@ -126,34 +134,49 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
tile.updateBlock();
return true;
}
- if ((!pItem.isEmpty()) && tile.isItemValidForSlot(0, pItem)) {
- if (!fuelItem.isEmpty()) {
- if (pItem.getItem() == fuelItem.getItem()) {
- if (fuelItem.getCount() < 64) {
- if (fuelItem.getCount() + pItem.getCount() <= 64) {
- fuelItem.grow(pItem.getCount());
- player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
- tile.markDirty();
- tile.updateBlock();
- return true;
- }
- if (fuelItem.getCount() + pItem.getCount() > 64) {
- pItem.setCount(64 - pItem.getCount());
- fuelItem.setCount(64);
- tile.markDirty();
- tile.updateBlock();
- return true;
- }
- }
- }
- }
- if (fuelItem.isEmpty()) {
- tile.setSlotStack(0, pItem);
+
+ /***********************
+ FUEL SLOT MANAGEMENT Code
+ ***********************/
+
+ /***********************
+ FUEL SLOT IS EMPTYT
+ ***********************/
+ if (tile.getSlotStack(0).isEmpty()) {
+ if(tile.isItemValidForSlot(0, player.inventory.getCurrentItem())) {
+ tile.setSlotStack(0, player.inventory.getCurrentItem());
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
+ tile.markDirty();
+ tile.updateBlock();
return true;
}
}
+ /***********************
+ FUEL SLOT HAS STUFF
+ ***********************/
+ if(ItemStack.areItemsEqual(player.inventory.getCurrentItem(), tile.getSlotStack(0)) && !tile.getSlotStack(0).isEmpty()) {
+ if (tile.getSlotStack(0).getCount() < 64) {
+ if (tile.getSlotStack(0).getCount() + player.inventory.getCurrentItem().getCount() <= 64) {
+ tile.getSlotStack(0).grow(pItem.getCount());
+ player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
+ tile.markDirty();
+ tile.updateBlock();
+ return true;
+ }
+ if (tile.getSlotStack(0).getCount() + player.inventory.getCurrentItem().getCount() > 64) {
+ int count = 64 - tile.getSlotStack(0).getCount();
+ tile.getSlotStack(0).grow(count);
+ pItem.shrink(count);
+ tile.markDirty();
+ tile.updateBlock();
+ return true;
+ }
+ }
+ }
+
+
+
if (facing == EnumFacing.UP) {
doForgeInventoryManager(pItem, world, tile, pos, hitX, hitY, hitZ, state, player);
return true;
@@ -184,7 +207,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
{
if(state.getValue(PrimalAPI.States.ACTIVE) == true){
- return 15;
+ return 5;
}
return 0;
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/PistonBellows.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/PistonBellows.java
index 5763e6b2..8311f878 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/PistonBellows.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/PistonBellows.java
@@ -459,24 +459,4 @@ public class PistonBellows extends CustomContainerFacing {
}
-}
-
-
-/*
- if(rand.nextInt(4) == 1){
- world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- }
- if(rand.nextInt(4) == 2){
- world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2-d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- }
- if(rand.nextInt(4) == 3){
- world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2+d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- }
- if(rand.nextInt(4) == 4){
- world.spawnParticle(EnumParticleTypes.FLAME, d0-d4, d1, d2-d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- world.spawnParticle(EnumParticleTypes.FLAME, d0+d4, d1, d2+d4, 0.0D, (double) (rand.nextInt(2) + 1)/1000, 0.0D, new int[0]);
- }
- */
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java
new file mode 100644
index 00000000..d1c4ebcd
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/machine/Workbench.java
@@ -0,0 +1,265 @@
+package nmd.primal.forgecraft.blocks.machine;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.EnumHand;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import nmd.primal.core.common.helper.PlayerHelper;
+import nmd.primal.core.common.items.tools.Gallagher;
+import nmd.primal.forgecraft.blocks.CustomContainerFacing;
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
+import nmd.primal.forgecraft.tiles.TileWorkbench;
+
+import javax.annotation.Nullable;
+
+public class Workbench extends CustomContainerFacing {
+
+
+ protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 10 / 16D, 8/16D);
+ protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 8/16D, 1.0D, 10 / 16D, 1.0D);
+ protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(8/16D, 0.0D, 0.0D, 1.0D, 10 / 16D, 1.0D);
+ protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 8/16D, 10 / 16D, 1.0D);
+
+ public Workbench(Material material, String registryName) {
+ super(material, registryName);
+ this.setHardness(4.0f);
+ }
+
+ @Override
+ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
+
+ if (!world.isRemote) {
+ if (hand.equals(hand.MAIN_HAND) ) {
+
+ TileWorkbench tile = (TileWorkbench) world.getTileEntity(pos);
+ ItemStack playerStack = player.inventory.getCurrentItem();
+
+ if (tile != null) {
+ ItemStack slot0 = tile.getSlotStack(0);
+ ItemStack slot1 = tile.getSlotStack(1);
+ ItemStack slot2 = tile.getSlotStack(2);
+ ItemStack slot3 = tile.getSlotStack(3);
+ ItemStack slot4 = tile.getSlotStack(4);
+ ItemStack slot5 = tile.getSlotStack(5);
+ ItemStack slot6 = tile.getSlotStack(6);
+ if (hitY > 0.5D) {
+ if (!player.isSneaking()) {
+ /*if (tile.isItemValidForSlot(6, playerStack)) {
+ if (slot6.isEmpty()) {
+ tile.setSlotStack(6, playerStack.splitStack(1));
+ //player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }*/
+ if(! (playerStack.getItem() instanceof Gallagher)) {
+ if (slot4.isEmpty() && slot3.isEmpty() && slot2.isEmpty()) {
+ if (tile.isItemValidForSlot(5, playerStack)) {
+ if (slot5.isEmpty()) {
+ tile.setSlotStack(5, playerStack.splitStack(1));
+ //player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }
+ }
+ if (tile.isItemValidForSlot(4, playerStack)) {
+ if (slot4.isEmpty()) {
+ tile.setSlotStack(4, playerStack.splitStack(1));
+ //player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }
+ if (tile.isItemValidForSlot(3, playerStack)) {
+ if (slot3.isEmpty()) {
+ tile.setSlotStack(3, playerStack.splitStack(1));
+ //player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }
+ if (tile.isItemValidForSlot(2, playerStack)) {
+ if (slot2.isEmpty()) {
+ tile.setSlotStack(2, playerStack.splitStack(1));
+ //player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }
+ }
+ if(playerStack.getItem() instanceof Gallagher) {
+ if (!slot2.isEmpty() && !slot3.isEmpty() && !slot4.isEmpty() && slot5.isEmpty()) {
+ WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5);
+ System.out.println(slot5);
+ if (recipe != null) {
+ ItemStack drops = recipe.getOutput();
+ if (slot3.hasTagCompound()) {
+ drops.setTagCompound(slot3.getTagCompound());
+ }
+ PlayerHelper.spawnItemOnPlayer(world, player, drops);
+ tile.clearSlot(2);
+ tile.clearSlot(3);
+ tile.clearSlot(4);
+ tile.clearSlot(5);
+ playerStack.damageItem(1, player);
+ return true;
+ }
+ }
+ if (slot2.isEmpty() && slot3.isEmpty() && slot4.isEmpty() && !slot5.isEmpty()) {
+ WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5);
+ if (recipe != null) {
+ ItemStack drops = recipe.getOutput();
+ if (slot5.hasTagCompound()) {
+ drops.setTagCompound(slot5.getTagCompound());
+ drops.setItemDamage(slot5.getItemDamage());
+ }
+ PlayerHelper.spawnItemOnPlayer(world, player, drops);
+ tile.clearSlot(2);
+ tile.clearSlot(3);
+ tile.clearSlot(4);
+ tile.clearSlot(5);
+ playerStack.damageItem(1, player);
+ return true;
+ }
+ }
+ }
+ }
+ if(player.isSneaking()){
+ if(!slot2.isEmpty()){
+ PlayerHelper.spawnItemOnPlayer(world, player, slot2);
+ tile.clearSlot(2);
+ }
+ if(!slot3.isEmpty()){
+ PlayerHelper.spawnItemOnPlayer(world, player, slot3);
+ tile.clearSlot(3);
+ }
+ if(!slot4.isEmpty()){
+ PlayerHelper.spawnItemOnPlayer(world, player, slot4);
+ tile.clearSlot(4);
+ }
+ if(!slot5.isEmpty()){
+ PlayerHelper.spawnItemOnPlayer(world, player, slot5);
+ tile.clearSlot(5);
+ }
+ if(!slot6.isEmpty()){
+ PlayerHelper.spawnItemOnPlayer(world, player, slot6);
+ tile.clearSlot(6);
+ }
+
+ }
+ }
+ if (hitY < 0.5D) {
+ if (state.getValue(FACING) == EnumFacing.NORTH) {
+ if (hitX < 0.5) {
+ return sideInventoryManager(world, player, tile, slot0, 0);
+ }
+ if (hitX > 0.5) {
+ return sideInventoryManager(world, player, tile, slot1, 1);
+ }
+
+ return true;
+ }
+ if (state.getValue(FACING) == EnumFacing.SOUTH) {
+ if (hitX > 0.5) {
+ return sideInventoryManager(world, player, tile, slot0, 0);
+ }
+ if (hitX < 0.5) {
+ return sideInventoryManager(world, player, tile, slot1, 1);
+ }
+
+ return true;
+ }
+ if (state.getValue(FACING) == EnumFacing.EAST) {
+ if (hitZ < 0.5) {
+ return sideInventoryManager(world, player, tile, slot0, 0);
+ }
+ if (hitZ > 0.5) {
+ return sideInventoryManager(world, player, tile, slot1, 1);
+ }
+
+ return true;
+ }
+ if (state.getValue(FACING) == EnumFacing.WEST) {
+ if (hitZ > 0.5) {
+ return sideInventoryManager(world, player, tile, slot0, 0);
+ }
+ if (hitZ < 0.5) {
+ return sideInventoryManager(world, player, tile, slot1, 1);
+ }
+
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ private boolean sideInventoryManager(World world, EntityPlayer player, TileWorkbench tile, ItemStack slot, int index)
+ {
+
+ if(!player.isSneaking()) {
+
+ ItemStack stack = player.inventory.getCurrentItem();
+ if (!(stack.isEmpty()) ) {
+ if( stack.isItemEqual(slot) ) {
+ if (slot.getCount() < 64) {
+ if (stack.getCount() + slot.getCount() > 64) {
+ stack.shrink(64 - slot.getCount());
+ slot.setCount(64);
+ return true;
+ }
+ if (stack.getCount() + slot.getCount() < 64) {
+ slot.grow(stack.getCount());
+ stack.shrink(stack.getCount());
+ return true;
+ }
+ }
+ }
+ if (slot.isEmpty()) {
+ tile.setSlotStack(index, stack);
+ player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
+ return true;
+ }
+ }
+ }
+ if(player.isSneaking()){
+ if(!slot.isEmpty()){
+ PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(index));
+ tile.clearSlot(index);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
+ {
+ state = state.getActualState(source, pos);
+ EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
+
+ switch (enumfacing)
+ {
+ case EAST:
+ default:
+ return boundBoxEast;
+ case SOUTH:
+ return boundBoxSouth;
+ case WEST:
+ return boundBoxWest;
+ case NORTH:
+ return boundBoxNorth;
+ }
+ }
+
+ @Nullable
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta) {
+ return new TileWorkbench();
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/ModJEI.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/ModJEI.java
deleted file mode 100644
index e3307239..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/ModJEI.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package nmd.primal.forgecraft.compat.JEI;
-
-import mezz.jei.api.*;
-import mezz.jei.api.gui.ICraftingGridHelper;
-import mezz.jei.api.recipe.IRecipeCategoryRegistration;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-import nmd.primal.forgecraft.compat.JEI.anvil.AnvilRecipeCategory;
-import nmd.primal.forgecraft.compat.JEI.anvil.AnvilRecipeChecker;
-import nmd.primal.forgecraft.compat.JEI.anvil.AnvilRecipeHandler;
-import nmd.primal.forgecraft.compat.JEI.casting.CastingRecipeCategory;
-import nmd.primal.forgecraft.compat.JEI.casting.CastingRecipeChecker;
-import nmd.primal.forgecraft.compat.JEI.casting.CastingRecipeHandler;
-import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeCategory;
-import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeChecker;
-import nmd.primal.forgecraft.compat.JEI.crucible.CrucibleRecipeHandler;
-import nmd.primal.forgecraft.compat.JEI.forge.ForgeRecipeCategory;
-import nmd.primal.forgecraft.compat.JEI.forge.ForgeRecipeChecker;
-import nmd.primal.forgecraft.compat.JEI.forge.ForgeRecipeHandler;
-import nmd.primal.forgecraft.crafting.AnvilCrafting;
-import nmd.primal.forgecraft.crafting.CastingCrafting;
-import nmd.primal.forgecraft.crafting.CrucibleCrafting;
-import nmd.primal.forgecraft.crafting.ForgeCrafting;
-import nmd.primal.forgecraft.init.ModBlocks;
-
-import javax.annotation.Nonnull;
-
-/**
- * Created by mminaie on 9/11/18.
- */
-@JEIPlugin
-public class ModJEI implements IModPlugin
-{
- public static IJeiHelpers jeiHelper;
- public static ICraftingGridHelper craftingGridHelper;
- public static IRecipeRegistry recipeRegistry;
- public static IGuiHelper guiHelper;
- private static final int craftOutputSlot = 0;
- private static final int craftInputSlot1 = 1;
-
- @Override
- public void registerCategories(IRecipeCategoryRegistration registry)
- {
- final IJeiHelpers jeiHelpers = registry.getJeiHelpers();
- final IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
-
- //
- // Recipe Categories
- //
- registry.addRecipeCategories(new ForgeRecipeCategory(guiHelper));
- registry.addRecipeCategories(new CrucibleRecipeCategory(guiHelper));
- registry.addRecipeCategories(new AnvilRecipeCategory(guiHelper));
- registry.addRecipeCategories(new CastingRecipeCategory(guiHelper));
-
- }
-
- @Override
- public void register(@Nonnull IModRegistry registry) {
- jeiHelper = registry.getJeiHelpers();
- guiHelper = jeiHelper.getGuiHelper();
- craftingGridHelper = guiHelper.createCraftingGridHelper(craftInputSlot1, craftOutputSlot);
-
- // ***************************************************************************** //
- // Recipes
- // ***************************************************************************** //
- //
- // Forging
- //
- registry.handleRecipes(ForgeCrafting.class, new ForgeRecipeHandler(), ForgeRecipeCategory.CATEGORY);
- registry.addRecipes(ForgeRecipeChecker.getRecipes(), ForgeRecipeCategory.CATEGORY);
- registry.addRecipeCatalyst(new ItemStack(ModBlocks.forge_brick), ForgeRecipeCategory.CATEGORY);
- //
- // Crucible
- //
- registry.handleRecipes(CrucibleCrafting.class, new CrucibleRecipeHandler(), CrucibleRecipeCategory.CATEGORY);
- registry.addRecipes(CrucibleRecipeChecker.getRecipes(), CrucibleRecipeCategory.CATEGORY);
- registry.addRecipeCatalyst(new ItemStack(ModBlocks.nbtCrucible), CrucibleRecipeCategory.CATEGORY);
- //
- // Anvil
- //
- registry.handleRecipes(AnvilCrafting.class, new AnvilRecipeHandler(), AnvilRecipeCategory.CATEGORY);
- registry.addRecipes(AnvilRecipeChecker.getRecipes(), AnvilRecipeCategory.CATEGORY);
- registry.addRecipeCatalyst(new ItemStack(ModBlocks.stoneanvil), AnvilRecipeCategory.CATEGORY);
- //
- // Casting
- //
- registry.handleRecipes(CastingCrafting.class, new CastingRecipeHandler(), CastingRecipeCategory.CATEGORY);
- registry.addRecipes(CastingRecipeChecker.getRecipes(), CastingRecipeCategory.CATEGORY);
- registry.addRecipeCatalyst(new ItemStack(ModBlocks.castingform), CastingRecipeCategory.CATEGORY);
-
-
-
-
-
- // ***************************************************************************** //
- // Info
- // ***************************************************************************** //
- //registry.addIngredientInfo(ItemStack.EMPTY, ItemStack.class, "jei.info.forgecraft.crucible");
- registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
- //registry.addIngredientInfo(new OreIngredient("oreIron"), OreIngredient.class, "jei.info.forgecraft.oreiron");
- registry.addIngredientInfo(new ItemStack(ModBlocks.castingform, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.casting");
- registry.addIngredientInfo(new ItemStack(ModBlocks.stoneanvil, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.anvil");
- }
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeChecker.java
deleted file mode 100644
index 704b7329..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeChecker.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package nmd.primal.forgecraft.compat.JEI.crucible;
-
-import nmd.primal.forgecraft.crafting.CrucibleCrafting;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by mminaie on 9/13/18.
- */
-public class CrucibleRecipeChecker {
-
- public static List getRecipes() {
- List recipes = new ArrayList<>();
- for (CrucibleCrafting recipe : CrucibleCrafting.getCrucibleCrafting()) {
- recipes.add(recipe);
- }
- return recipes;
- }
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/ModDictionary.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/ModDictionary.java
deleted file mode 100644
index 6111c44b..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/ModDictionary.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package nmd.primal.forgecraft.compat;
-
-import net.minecraftforge.oredict.OreDictionary;
-import nmd.primal.forgecraft.init.ModItems;
-
-/**
- * Created by mminaie on 2/7/17.
- */
-public class ModDictionary {/*******************************************************************************
- * Register Only Vanilla OreDictionary Entries Here
- * Mod Items/Blocks have their names added through the respective
- * registration methods as a list of comma delineated strings.
- *
- * EXAMPLE:
- * LEATHER_CORDAGE = registerItem(new PrimalItem("leather_cordage"), "cordageGeneral, cordageLeather");
- *
- */
- public static void registerDictionaryNames()
- {
- //if (ModConfig.COMPATIBILITY_DICTIONARY_MAGMACREAM_AS_SLIME)
- //OreDictionary.registerOre("clayball", Items.CLAY_BALL);
- OreDictionary.registerOre("ingotIron", ModItems.ironingotball);
- OreDictionary.registerOre("nuggetIron", ModItems.wroughtironchunk);
- OreDictionary.registerOre("ingotIron", ModItems.ironcleaningotball);
- OreDictionary.registerOre("nuggetIron", ModItems.ironcleanchunk);
- OreDictionary.registerOre("ingotSteel", ModItems.steelingotball);
- OreDictionary.registerOre("nuggetSteel", ModItems.steelchunk);
- OreDictionary.registerOre("ingotBronze", ModItems.bronzeingotball);
- OreDictionary.registerOre("nuggetBronze", ModItems.bronzechunk);
- }
-}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/ct/CTCrucible.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/ct/CTCrucible.java
new file mode 100644
index 00000000..2941de11
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/ct/CTCrucible.java
@@ -0,0 +1,224 @@
+package nmd.primal.forgecraft.compat.ct;
+
+
+import crafttweaker.CraftTweakerAPI;
+import crafttweaker.IAction;
+import crafttweaker.annotations.ModOnly;
+import crafttweaker.annotations.ZenRegister;
+import crafttweaker.api.item.IIngredient;
+import crafttweaker.api.item.IItemStack;
+import crafttweaker.api.minecraft.CraftTweakerMC;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.Ingredient;
+import nmd.primal.core.common.PrimalCore;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.crafting.CrucibleCrafting;
+import stanhebben.zenscript.annotations.ZenClass;
+import stanhebben.zenscript.annotations.ZenMethod;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+@ZenClass("mods.forgecraft.NBTCrucible")
+@ModOnly(ModInfo.MOD_ID)
+@ZenRegister
+public class CTCrucible {
+
+
+
+ static
+ {
+ PrimalCore.LOGGER.info("Registering CraftTweaker: " + CrucibleCrafting.RECIPE_PREFIX);
+ }
+
+ @ZenMethod
+ public static void addRecipe(IIngredient ing0,
+ IIngredient ing1,
+ IIngredient ing2,
+ IIngredient ing3,
+ IIngredient ing4,
+ IItemStack dropsRaw,
+ IItemStack dropsCooked,
+ int cookTemp,
+ int cookTime,
+ int coolTime,
+ String recipe_name)
+ {
+ CraftTweakerAPI.apply(new Add( ing0,
+ ing1,
+ ing2,
+ ing3,
+ ing4,
+ (ItemStack) dropsRaw.getInternal(),
+ (ItemStack) dropsCooked.getInternal(),
+ cookTemp, cookTime, coolTime, recipe_name) );
+ }
+
+ @ZenMethod
+ public static void removeRecipe(String recipe_name)
+ {
+ CraftTweakerAPI.apply(new Remove(recipe_name));
+ }
+
+ @ZenMethod
+ public static void removeAll()
+ {
+ CraftTweakerAPI.apply(new RemoveAll());
+ }
+
+ private static class Add implements IAction
+ {
+ private final String recipe_name;
+ private final int cookTemp;
+ private final int cookTime;
+ private final int coolTime;
+ private final Ingredient ing0, ing1, ing2, ing3, ing4;
+ private final ItemStack dropsCooked;
+ private final ItemStack dropsRaw;
+ private boolean isDisabled, isHidden;
+
+ public Add(IIngredient I0, IIngredient I1, IIngredient I2, IIngredient I3, IIngredient I4, ItemStack dropsRaw, ItemStack dropsCooked, int cookTemp, int cookTime, int coolTime, String recipe_name)
+ {
+
+ ItemStack[] array0 = null;
+ ItemStack[] array1 = null;
+ ItemStack[] array2 = null;
+ ItemStack[] array3 = null;
+ ItemStack[] array4 = null;
+ ItemStack[] emptyArray = new ItemStack[1];
+ emptyArray[0] = ItemStack.EMPTY;
+
+ if(I0 != null) {
+ Ingredient temp0 = null;
+ List zeroIList = I0.getItems().stream().map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
+ array0 = zeroIList.stream().toArray(ItemStack[]::new);
+ }
+ if(I0 == null) {
+ array0 = emptyArray;
+ }
+
+ if(I1 != null) {
+ Ingredient temp1 = null;
+ List oneIList = I1.getItems().stream().map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
+ array1 = oneIList.stream().toArray(ItemStack[]::new);
+ }
+ if(I1 == null) {
+ array1 = emptyArray;
+ }
+
+ if(I2 != null) {
+ Ingredient temp2 = null;
+ List twoIList = I2.getItems().stream().map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
+ array2 = twoIList.stream().toArray(ItemStack[]::new);
+ }
+ if(I2 == null) {
+ array2 = emptyArray;
+ }
+
+ if(I3 != null) {
+ Ingredient temp3 = null;
+ List threeIList = I3.getItems().stream().map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
+ array3 = threeIList.stream().toArray(ItemStack[]::new);
+ }
+ if(I3 == null) {
+ array3 = emptyArray;
+ }
+
+ if(I4 != null) {
+ Ingredient temp4 = null;
+ List fourIList = I4.getItems().stream().map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
+ array4 = fourIList.stream().toArray(ItemStack[]::new);
+ }
+ if(I4 == null) {
+ array4 = emptyArray;
+ }
+
+ this.recipe_name = recipe_name;
+ this.cookTemp = cookTemp;
+ this.cookTime = cookTime;
+ this.coolTime = coolTime;
+ this.ing0 = Ingredient.fromStacks(array0);
+ this.ing1 = Ingredient.fromStacks(array1);
+ this.ing2 = Ingredient.fromStacks(array2);
+ this.ing3 = Ingredient.fromStacks(array3);
+ this.ing4 = Ingredient.fromStacks(array4);
+ this.dropsCooked = dropsCooked;
+ this.dropsRaw = dropsRaw;
+ this.isDisabled = false;
+ this.isHidden = false;
+ }
+
+ @Override
+ public void apply()
+ {
+ PrimalCore.LOGGER.info("Add CraftTweaker Recipe: " + this.recipe_name);
+ CrucibleCrafting.REGISTRY.register(new CrucibleCrafting(
+ this.ing0,
+ this.ing1,
+ this.ing2,
+ this.ing3,
+ this.ing4,
+ this.dropsRaw,
+ this.dropsCooked,
+ this.cookTemp,
+ this.cookTime,
+ this.coolTime).setRecipeName(this.recipe_name));
+ }
+
+ @Override
+ public String describe()
+ {
+ return "[" + ModInfo.MOD_NAME + "] Adding Crafting Tweaker recipe for: " + CrucibleCrafting.RECIPE_PREFIX;
+ }
+ }
+
+
+ private static class Remove implements IAction
+ {
+ private String recipe_name;
+
+ public Remove(String recipe_name)
+ {
+ this.recipe_name = recipe_name;
+ }
+
+ @Override
+ public void apply()
+ {
+ CrucibleCrafting recipe = CrucibleCrafting.getRecipe(recipe_name);
+ if (recipe != null && !recipe.isHidden())
+ {
+ PrimalCore.LOGGER.info("Remove CraftTweaker Recipe: " + recipe_name);
+ recipe.setDisabled(true);
+ }
+ }
+
+ @Override
+ public String describe()
+ {
+ return "[" + ModInfo.MOD_NAME + "] Removing Crafting Tweaker recipe for:" + CrucibleCrafting.RECIPE_PREFIX;
+ }
+ }
+
+ private static class RemoveAll implements IAction
+ {
+ public RemoveAll() { }
+
+ @Override
+ public void apply()
+ {
+ for (CrucibleCrafting recipe : CrucibleCrafting.RECIPES)
+ {
+ if (!recipe.isHidden())
+ recipe.setDisabled(true);
+ }
+ }
+
+ @Override
+ public String describe()
+ {
+ return "[" + ModInfo.MOD_NAME + "] Removing Crafting Tweaker recipe for:" + CrucibleCrafting.RECIPE_PREFIX;
+ }
+ }
+}
+
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/AbstractCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/AbstractCategory.java
similarity index 94%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/AbstractCategory.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/AbstractCategory.java
index f200e3c5..2eed7637 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/AbstractCategory.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/AbstractCategory.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI;
+package nmd.primal.forgecraft.compat.jei;
import com.google.common.collect.ImmutableList;
import mezz.jei.api.gui.IDrawable;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java
new file mode 100644
index 00000000..850d4959
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/ModJEI.java
@@ -0,0 +1,111 @@
+package nmd.primal.forgecraft.compat.jei;
+
+import mezz.jei.api.*;
+import mezz.jei.api.gui.ICraftingGridHelper;
+import mezz.jei.api.recipe.IRecipeCategoryRegistration;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+import nmd.primal.forgecraft.compat.jei.anvil.AnvilRecipeCategory;
+import nmd.primal.forgecraft.compat.jei.anvil.AnvilRecipeChecker;
+import nmd.primal.forgecraft.compat.jei.anvil.AnvilRecipeHandler;
+import nmd.primal.forgecraft.compat.jei.casting.CastingRecipeCategory;
+import nmd.primal.forgecraft.compat.jei.casting.CastingRecipeChecker;
+import nmd.primal.forgecraft.compat.jei.casting.CastingRecipeHandler;
+import nmd.primal.forgecraft.compat.jei.crucible.CrucibleRecipeCategory;
+import nmd.primal.forgecraft.compat.jei.crucible.CrucibleRecipeChecker;
+import nmd.primal.forgecraft.compat.jei.crucible.CrucibleRecipeHandler;
+import nmd.primal.forgecraft.compat.jei.forge.ForgeRecipeCategory;
+import nmd.primal.forgecraft.compat.jei.forge.ForgeRecipeChecker;
+import nmd.primal.forgecraft.compat.jei.forge.ForgeRecipeHandler;
+import nmd.primal.forgecraft.compat.jei.workbench.WorkbenchRecipeCategory;
+import nmd.primal.forgecraft.compat.jei.workbench.WorkbenchRecipeChecker;
+import nmd.primal.forgecraft.compat.jei.workbench.WorkbenchRecipeHandler;
+import nmd.primal.forgecraft.crafting.*;
+import nmd.primal.forgecraft.init.ModBlocks;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Created by mminaie on 9/11/18.
+ */
+@JEIPlugin
+public class ModJEI implements IModPlugin
+{
+ public static IJeiHelpers jeiHelper;
+ public static ICraftingGridHelper craftingGridHelper;
+ public static IRecipeRegistry recipeRegistry;
+ public static IGuiHelper guiHelper;
+ private static final int craftOutputSlot = 0;
+ private static final int craftInputSlot1 = 1;
+
+ @Override
+ public void registerCategories(IRecipeCategoryRegistration registry)
+ {
+ final IJeiHelpers jeiHelpers = registry.getJeiHelpers();
+ final IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
+
+ //
+ // Recipe Categories
+ //
+ registry.addRecipeCategories(new ForgeRecipeCategory(guiHelper));
+ registry.addRecipeCategories(new CrucibleRecipeCategory(guiHelper));
+ registry.addRecipeCategories(new AnvilRecipeCategory(guiHelper));
+ registry.addRecipeCategories(new CastingRecipeCategory(guiHelper));
+ registry.addRecipeCategories(new WorkbenchRecipeCategory(guiHelper));
+ }
+
+ @Override
+ public void register(@Nonnull IModRegistry registry) {
+ jeiHelper = registry.getJeiHelpers();
+ guiHelper = jeiHelper.getGuiHelper();
+ craftingGridHelper = guiHelper.createCraftingGridHelper(craftInputSlot1, craftOutputSlot);
+
+ // ***************************************************************************** //
+ // Recipes
+ // ***************************************************************************** //
+ //
+ // Forging
+ //
+ registry.handleRecipes(ForgeCrafting.class, new ForgeRecipeHandler(), ForgeRecipeCategory.CATEGORY);
+ registry.addRecipes(ForgeRecipeChecker.getRecipes(), ForgeRecipeCategory.CATEGORY);
+ registry.addRecipeCatalyst(new ItemStack(ModBlocks.forge_brick), ForgeRecipeCategory.CATEGORY);
+ //
+ // Crucible
+ //
+ registry.handleRecipes(CrucibleCrafting.class, new CrucibleRecipeHandler(), CrucibleRecipeCategory.CATEGORY);
+ registry.addRecipes(CrucibleRecipeChecker.getRecipes(), CrucibleRecipeCategory.CATEGORY);
+ registry.addRecipeCatalyst(new ItemStack(ModBlocks.nbtCrucible), CrucibleRecipeCategory.CATEGORY);
+ //
+ // Anvil
+ //
+ registry.handleRecipes(AnvilCrafting.class, new AnvilRecipeHandler(), AnvilRecipeCategory.CATEGORY);
+ registry.addRecipes(AnvilRecipeChecker.getRecipes(), AnvilRecipeCategory.CATEGORY);
+ registry.addRecipeCatalyst(new ItemStack(ModBlocks.stoneanvil), AnvilRecipeCategory.CATEGORY);
+ //
+ // Casting
+ //
+ registry.handleRecipes(CastingCrafting.class, new CastingRecipeHandler(), CastingRecipeCategory.CATEGORY);
+ registry.addRecipes(CastingRecipeChecker.getRecipes(), CastingRecipeCategory.CATEGORY);
+ registry.addRecipeCatalyst(new ItemStack(ModBlocks.castingform), CastingRecipeCategory.CATEGORY);
+
+ //
+ // Workbench
+ //
+ registry.handleRecipes(WorkbenchCrafting.class, new WorkbenchRecipeHandler(), WorkbenchRecipeCategory.CATEGORY);
+ registry.addRecipes(WorkbenchRecipeChecker.getRecipes(), WorkbenchRecipeCategory.CATEGORY);
+ registry.addRecipeCatalyst(new ItemStack(ModBlocks.workbench), WorkbenchRecipeCategory.CATEGORY);
+
+
+
+ // ***************************************************************************** //
+ // Info
+ // ***************************************************************************** //
+ //registry.addIngredientInfo(ItemStack.EMPTY, ItemStack.class, "jei.info.forgecraft.crucible");
+ registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
+ //registry.addIngredientInfo(new OreIngredient("oreIron"), OreIngredient.class, "jei.info.forgecraft.oreiron");
+ registry.addIngredientInfo(new ItemStack(ModBlocks.castingform, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.casting");
+ registry.addIngredientInfo(new ItemStack(ModBlocks.stoneanvil, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.anvil");
+
+
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeCategory.java
similarity index 88%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeCategory.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeCategory.java
index 9bf0c8ba..39042d11 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeCategory.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeCategory.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.anvil;
+package nmd.primal.forgecraft.compat.jei.anvil;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
@@ -11,8 +11,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.compat.JEI.AbstractCategory;
+import nmd.primal.forgecraft.compat.jei.AbstractCategory;
import nmd.primal.forgecraft.init.ModItems;
+import nmd.primal.forgecraft.items.parts.ToolPart;
import javax.annotation.Nonnull;
@@ -98,7 +99,11 @@ public class AnvilRecipeCategory extends AbstractCategory
//items.set(0, recipe.getIngredient(0));
for(int i =0; i < 25; i++){
- items.set(i, recipe.getIngredient(i));
+ if(recipe.getIngredient(i).getItem() instanceof ToolPart) {
+ items.set(i, new ItemStack(recipe.getIngredient(i).getItem(), 1));
+ } else {
+ items.set(i, recipe.getIngredient(i));
+ }
}
/***OUTPUTS***/
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeChecker.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeChecker.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeChecker.java
index 7b9318da..415532e4 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeChecker.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeChecker.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.anvil;
+package nmd.primal.forgecraft.compat.jei.anvil;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeHandler.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeHandler.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeHandler.java
index f9c3e0d2..1c7e600f 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeHandler.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeHandler.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.anvil;
+package nmd.primal.forgecraft.compat.jei.anvil;
import mezz.jei.api.recipe.IRecipeWrapper;
import mezz.jei.api.recipe.IRecipeWrapperFactory;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeWrapper.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeWrapper.java
similarity index 96%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeWrapper.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeWrapper.java
index c256120c..4f79d12d 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/anvil/AnvilRecipeWrapper.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/anvil/AnvilRecipeWrapper.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.anvil;
+package nmd.primal.forgecraft.compat.jei.anvil;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeWrapper;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeCategory.java
similarity index 96%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeCategory.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeCategory.java
index 829c5a4c..25816252 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeCategory.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeCategory.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.casting;
+package nmd.primal.forgecraft.compat.jei.casting;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
@@ -10,7 +10,7 @@ import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.compat.JEI.AbstractCategory;
+import nmd.primal.forgecraft.compat.jei.AbstractCategory;
import javax.annotation.Nonnull;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeChecker.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeChecker.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeChecker.java
index 8c69e222..b30b16b9 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeChecker.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeChecker.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.casting;
+package nmd.primal.forgecraft.compat.jei.casting;
import nmd.primal.forgecraft.crafting.CastingCrafting;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeHandler.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeHandler.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeHandler.java
index e32769de..6fc1f95f 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeHandler.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeHandler.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.casting;
+package nmd.primal.forgecraft.compat.jei.casting;
import mezz.jei.api.recipe.IRecipeWrapper;
import mezz.jei.api.recipe.IRecipeWrapperFactory;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeWrapper.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeWrapper.java
similarity index 97%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeWrapper.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeWrapper.java
index 2f43eea9..6eb3c50b 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/casting/CastingRecipeWrapper.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/casting/CastingRecipeWrapper.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.casting;
+package nmd.primal.forgecraft.compat.jei.casting;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeWrapper;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeCategory.java
similarity index 96%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeCategory.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeCategory.java
index e8cb6836..11bc17f4 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeCategory.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeCategory.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.crucible;
+package nmd.primal.forgecraft.compat.jei.crucible;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
@@ -11,7 +11,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.compat.JEI.AbstractCategory;
+import nmd.primal.forgecraft.compat.jei.AbstractCategory;
import nmd.primal.forgecraft.init.ModBlocks;
import javax.annotation.Nonnull;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeChecker.java
new file mode 100644
index 00000000..55fc4c37
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeChecker.java
@@ -0,0 +1,24 @@
+package nmd.primal.forgecraft.compat.jei.crucible;
+
+import nmd.primal.forgecraft.crafting.CrucibleCrafting;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by mminaie on 9/13/18.
+ */
+public class CrucibleRecipeChecker {
+
+ public static List getRecipes() {
+ List recipes = new ArrayList<>();
+ for (CrucibleCrafting recipe : CrucibleCrafting.getRECIPES()) {
+ if(!recipe.isDisabled()) {
+ if(!recipe.isHidden()) {
+ recipes.add(recipe);
+ }
+ }
+ }
+ return recipes;
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeHandler.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeHandler.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeHandler.java
index 1664347c..c4e9432e 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeHandler.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeHandler.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.crucible;
+package nmd.primal.forgecraft.compat.jei.crucible;
import mezz.jei.api.recipe.IRecipeWrapper;
import mezz.jei.api.recipe.IRecipeWrapperFactory;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeWrapper.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeWrapper.java
similarity index 98%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeWrapper.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeWrapper.java
index c5d03b7b..1ea8b68f 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/crucible/CrucibleRecipeWrapper.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/crucible/CrucibleRecipeWrapper.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.crucible;
+package nmd.primal.forgecraft.compat.jei.crucible;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeWrapper;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeCategory.java
similarity index 95%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeCategory.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeCategory.java
index 382dd9c4..b1c95788 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeCategory.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeCategory.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.forge;
+package nmd.primal.forgecraft.compat.jei.forge;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
@@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.compat.JEI.AbstractCategory;
+import nmd.primal.forgecraft.compat.jei.AbstractCategory;
import nmd.primal.forgecraft.init.ModBlocks;
import javax.annotation.Nonnull;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeChecker.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeChecker.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeChecker.java
index d6f53d0a..554d578a 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeChecker.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeChecker.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.forge;
+package nmd.primal.forgecraft.compat.jei.forge;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeHandler.java
similarity index 90%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeHandler.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeHandler.java
index cf62cda3..fbce3940 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeHandler.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeHandler.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.forge;
+package nmd.primal.forgecraft.compat.jei.forge;
import mezz.jei.api.recipe.IRecipeWrapper;
import mezz.jei.api.recipe.IRecipeWrapperFactory;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeWrapper.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeWrapper.java
similarity index 97%
rename from kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeWrapper.java
rename to kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeWrapper.java
index ce7e7fae..e7ba0fac 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/compat/JEI/forge/ForgeRecipeWrapper.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/forge/ForgeRecipeWrapper.java
@@ -1,4 +1,4 @@
-package nmd.primal.forgecraft.compat.JEI.forge;
+package nmd.primal.forgecraft.compat.jei.forge;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeWrapper;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java
new file mode 100644
index 00000000..7a12367d
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeCategory.java
@@ -0,0 +1,105 @@
+package nmd.primal.forgecraft.compat.jei.workbench;
+
+import mezz.jei.api.IGuiHelper;
+import mezz.jei.api.gui.IDrawable;
+import mezz.jei.api.gui.IGuiItemStackGroup;
+import mezz.jei.api.gui.IRecipeLayout;
+import mezz.jei.api.ingredients.IIngredients;
+import net.minecraft.client.Minecraft;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.NonNullList;
+import net.minecraft.util.ResourceLocation;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.core.common.helper.CommonUtils;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.compat.jei.AbstractCategory;
+import nmd.primal.forgecraft.init.ModBlocks;
+
+import javax.annotation.Nonnull;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Created by mminaie on 9/16/18.
+ */
+public class WorkbenchRecipeCategory extends AbstractCategory
+{
+ public static String CATEGORY = CommonUtils.prefix("workbench");
+
+ private static ResourceLocation gui_background = new ResourceLocation(ModInfo.MOD_ID,"textures/gui/jei/workbench.png");
+ private final IDrawable background;
+
+ public WorkbenchRecipeCategory(IGuiHelper guiHelper)
+ {
+ //background = guiHelper.createDrawable(gui_background, 0, 0, 134, 144, 0, 0, 0, 0);
+ background = guiHelper.createDrawable(gui_background, 0,0,115,39);
+ }
+
+ @Nonnull
+ @Override
+ public String getUid()
+ {
+ return CATEGORY;
+ }
+
+ @Nonnull
+ @Override
+ public String getTitle()
+ {
+ return "jei.category.forgecraft.workbench";
+ }
+
+ @Nonnull
+ @Override
+ public IDrawable getBackground()
+ {
+ return background;
+ }
+
+ @Override
+ public void drawExtras(@Nonnull Minecraft minecraft)
+ {
+ //progress.draw(minecraft, 67, 18);
+ }
+
+ @Override
+ public void setRecipe(IRecipeLayout layout, WorkbenchRecipeWrapper recipe, IIngredients ingredients)
+ {
+ IGuiItemStackGroup items = layout.getItemStacks();
+
+ /***INPUTS***/
+ items.init(0, true, 1, 1);
+ List slot0 = Arrays.asList( recipe.toolPart.getMatchingStacks());
+ items.set(0,slot0);
+
+ items.init(1, true, 20, 1);
+ List slot1 = Arrays.asList( recipe.toolHead.getMatchingStacks());
+ items.set(1,slot1);
+
+ items.init(2, true, 39, 1);
+ List slot2 = Arrays.asList( recipe.toolPin.getMatchingStacks());
+ items.set(2,slot2);
+
+ items.init(3, true, 39, 20);
+ List slot3 = Arrays.asList( recipe.takeApart.getMatchingStacks());
+ items.set(3,slot3);
+
+ /***OUTPUTS***/
+ items.init(4, false, 96, 11);
+ items.set(4, recipe.output);
+
+ /***EXTRAS***/
+ items.init(5, false, 66, 20);
+ ItemStack bench = new ItemStack(Item.getItemFromBlock(ModBlocks.workbench), 1);
+ items.set(5, bench);
+
+ items.init(6, false, 66, 1);
+ NonNullList tempDrops = NonNullList.create();
+ tempDrops.add(0, new ItemStack(PrimalAPI.Items.STONE_GALLAGHER, 1));
+ tempDrops.add(1, new ItemStack(PrimalAPI.Items.NETHER_GALLAGHER, 1));
+ tempDrops.add(2, new ItemStack(PrimalAPI.Items.IRON_GALLAGHER, 1));
+ tempDrops.add(3, new ItemStack(PrimalAPI.Items.QUARTZ_GALLAGHER, 1));
+ items.set(6, tempDrops);
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java
new file mode 100644
index 00000000..a3cab9f0
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeChecker.java
@@ -0,0 +1,24 @@
+package nmd.primal.forgecraft.compat.jei.workbench;
+
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by mminaie on 9/16/18.
+ */
+public class WorkbenchRecipeChecker {
+
+ public static List getRecipes() {
+ List recipes = new ArrayList<>();
+ for (WorkbenchCrafting recipe : WorkbenchCrafting.getRECIPES()) {
+ if(!recipe.isDisabled()) {
+ if(!recipe.isHidden()) {
+ recipes.add(recipe);
+ }
+ }
+ }
+ return recipes;
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java
new file mode 100644
index 00000000..15c7c910
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeHandler.java
@@ -0,0 +1,18 @@
+package nmd.primal.forgecraft.compat.jei.workbench;
+
+import mezz.jei.api.recipe.IRecipeWrapper;
+import mezz.jei.api.recipe.IRecipeWrapperFactory;
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Created by mminaie on 9/17/18.
+ */
+public class WorkbenchRecipeHandler implements IRecipeWrapperFactory {
+ @Nonnull
+ @Override
+ public IRecipeWrapper getRecipeWrapper(@Nonnull WorkbenchCrafting recipe) {
+ return new WorkbenchRecipeWrapper(recipe);
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java
new file mode 100644
index 00000000..7ab4606f
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/compat/jei/workbench/WorkbenchRecipeWrapper.java
@@ -0,0 +1,55 @@
+package nmd.primal.forgecraft.compat.jei.workbench;
+
+import mezz.jei.api.ingredients.IIngredients;
+import mezz.jei.api.recipe.IRecipeWrapper;
+import net.minecraft.client.Minecraft;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.Ingredient;
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Created by mminaie on 9/16/18.
+ */
+public class WorkbenchRecipeWrapper implements IRecipeWrapper {
+
+ protected final WorkbenchCrafting recipe;
+
+ protected Ingredient toolPart;
+ protected Ingredient toolHead;
+ protected Ingredient toolPin;
+ protected Ingredient takeApart;
+ protected ItemStack output;
+
+ public WorkbenchRecipeWrapper(WorkbenchCrafting recipe) {
+
+ this.recipe = recipe;
+ this.toolPart = recipe.getToolPart();
+ this.toolHead = recipe.getToolHead();
+ this.toolPin = recipe.getToolPin();
+ this.takeApart = recipe.getTakeApart();
+ this.output = recipe.getOutput();
+ }
+
+
+ @Override
+ public void getIngredients(IIngredients ingredients) {
+
+ ingredients.setInput(ItemStack.class, this.toolPart);
+ ingredients.setInput(ItemStack.class, this.toolHead);
+ ingredients.setInput(ItemStack.class, this.toolPin);
+ ingredients.setInput(ItemStack.class, this.takeApart);
+ ingredients.setOutput(ItemStack.class, this.output);
+ }
+
+ @Override
+ public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY)
+ {
+ //String tempString = new String("To an empty crucible add: " + recipe.getSource().getDisplayName() + ". For details reference the appropriate crucible recipe. Pick up the hot crucible with Stonetongs and right click your casting block.");
+ //minecraft.fontRenderer.drawSplitString(tempString, 97, 0, 150, Color.black.getRGB());
+ //minecraft.fontRenderer.drawString(String.valueOf(recipe.getHeatThreshold() + "\u00b0"), 24, 36, Color.red.getRGB());
+ //minecraft.fontRenderer.drawString(String.valueOf(recipe.getIdealTime()), 26, 13, Color.green.getRGB());
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/AnvilCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/AnvilCrafting.java
index e70086a9..8e7ebfbb 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/crafting/AnvilCrafting.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/AnvilCrafting.java
@@ -31,7 +31,6 @@ public class AnvilCrafting {
this.input = input;
this.output = output;
this.upgradeType = upgrade;
-
}
// ***************************************************************************** //
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CastingCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CastingCrafting.java
index a41a0906..a7933f45 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CastingCrafting.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CastingCrafting.java
@@ -59,7 +59,7 @@ public class CastingCrafting {
public static CastingCrafting getRecipe(ItemStack source, Item[] array)
{
for(CastingCrafting recipe : castingRecipes) {
- if (source.isItemEqualIgnoreDurability(source)) {
+ if (source.getItem() == recipe.getSource().getItem() ) {
if (Arrays.equals(array, recipe.input))
return recipe;
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CrucibleCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CrucibleCrafting.java
index 9c39accd..874ad58d 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/crafting/CrucibleCrafting.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/CrucibleCrafting.java
@@ -1,29 +1,40 @@
package nmd.primal.forgecraft.crafting;
+import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
+import net.minecraftforge.registries.IForgeRegistry;
+import nmd.primal.core.common.recipes.AbstractRecipe;
+import nmd.primal.forgecraft.ModInfo;
+import javax.annotation.Nullable;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
/**
* Created by mminaie on 11/11/17.
*/
-public class CrucibleCrafting { //extends AbstractCrafting {
+public class CrucibleCrafting extends AbstractRecipe { //extends AbstractCrafting {
// ***************************************************************************** //
// Recipe Handler CrucibleHandler
// ***************************************************************************** //
- //public static final String RECIPE_PREFIX = "crucible";
- //public static final IForgeRegistry REGISTRY = ModInfo.Registries.CRUCIBLE_CRAFTINGS;
- //public static final Collection RECIPES = REGISTRY.getValuesCollection();
+ public static final String RECIPE_PREFIX = "crucible";
+ public static final IForgeRegistry REGISTRY = ModInfo.Registries.CRUCIBLE_CRAFTING;
- public static ArrayList getCrucibleCrafting() {
- return crucibleCrafting;
+ public static Collection getRECIPES() {
+ return RECIPES;
}
- private static ArrayList crucibleCrafting = new ArrayList<>();
+ public static final Collection RECIPES = REGISTRY.getValuesCollection();
+
+ //public static ArrayList getCrucibleCrafting() {
+ //return crucibleCrafting;
+ //}
+
+ //private static ArrayList crucibleCrafting = new ArrayList<>();
private int cookTemp;
private int cookTime;
@@ -91,7 +102,7 @@ public class CrucibleCrafting { //extends AbstractCrafting {
public CrucibleCrafting(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3, Ingredient i4,
ItemStack outputRaw, ItemStack outputCooked,
Integer temp, Integer cookTime, Integer coolTime){
- //super();
+ super();
this.ing0 = i0;
this.ing1 = i1;
this.ing2 = i2;
@@ -109,16 +120,49 @@ public class CrucibleCrafting { //extends AbstractCrafting {
this.coolTime = coolTime;
}
- public static void addRecipe(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3, Ingredient i4,
- ItemStack outputRaw, ItemStack outputCooked,
- Integer temp, Integer cookTime, Integer coolTime)
- {
- crucibleCrafting.add(new CrucibleCrafting(i0, i1, i2, i3, i4, outputRaw, outputCooked, temp, cookTime, coolTime));
+ public static boolean compare(Ingredient ingredient, ItemStack stack){
+ if(stack == null){
+ stack = new ItemStack(Items.AIR, 1);
+ }
+ if(ingredient == null && stack.isEmpty()) {
+ return true;
+ }
+
+ if (ingredient.test(ItemStack.EMPTY)) {
+ if (stack.isEmpty()) {
+ return true;
+ }
+ }
+
+ if(ingredient.apply(stack)){
+ return true;
+ }
+
+ return false;
}
public static boolean isRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3, ItemStack i4){
- for(CrucibleCrafting recipe : crucibleCrafting){
- if(recipe.ing0.apply(i0) && recipe.ing1.apply(i1) && recipe.ing2.apply(i2) && recipe.ing3.apply(i3) && recipe.ing4.apply(i4) ){
+ for(CrucibleCrafting recipe : RECIPES){
+ if(i0 == null){
+ i0 = ItemStack.EMPTY;
+ }
+ if(i1 == null){
+ i1 = ItemStack.EMPTY;
+ }
+ if(i2 == null){
+ i2 = ItemStack.EMPTY;
+ }
+ if(i3 == null){
+ i3 = ItemStack.EMPTY;
+ }
+ if(i4 == null){
+ i4 = ItemStack.EMPTY;
+ }
+ if(compare(recipe.ing0, i0) &&
+ compare(recipe.ing1, i1) &&
+ compare(recipe.ing2, i2) &&
+ compare(recipe.ing3, i3) &&
+ compare(recipe.ing4, i4) ){
return true;
}
}
@@ -126,16 +170,32 @@ public class CrucibleCrafting { //extends AbstractCrafting {
}
public static CrucibleCrafting getRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3, ItemStack i4){
- for(CrucibleCrafting recipe : crucibleCrafting){
- if(recipe.ing0.test(i0) && recipe.ing1.test(i1) && recipe.ing2.test(i2) && recipe.ing3.test(i3) && recipe.ing4.test(i4) ){
+ for(CrucibleCrafting recipe : RECIPES){
+
+ if(i0 == null){
+ i0 = ItemStack.EMPTY;
+ }
+ if(i1 == null){
+ i1 = ItemStack.EMPTY;
+ }
+ if(i2 == null){
+ i2 = ItemStack.EMPTY;
+ }
+ if(i3 == null){
+ i3 = ItemStack.EMPTY;
+ }
+ if(i4 == null){
+ i4 = ItemStack.EMPTY;
+ }
+
+ if(recipe.ing0.apply(i0) && recipe.ing1.apply(i1) && recipe.ing2.apply(i2) && recipe.ing3.apply(i3) && recipe.ing4.apply(i4) ){
return recipe;
}
}
return null;
}
-
public static boolean isValidIngredient(ItemStack checkStack){
- for(CrucibleCrafting recipe : crucibleCrafting) {
+ for(CrucibleCrafting recipe : RECIPES) {
if (recipe.ing0.apply(checkStack) ||
recipe.ing1.apply(checkStack) ||
recipe.ing2.apply(checkStack) ||
@@ -168,18 +228,16 @@ public class CrucibleCrafting { //extends AbstractCrafting {
}
-/*
- /// forge registries require a unique REGISTRY_NAME ///
+
+
@Override
- public String getRecipePrefix()
- {
- return RECIPE_PREFIX;
+ public Collection getRecipes() {
+ return RECIPES;
}
@Override
- public Collection getRecipes()
- {
- return RECIPES;
+ public String getRecipePrefix() {
+ return RECIPE_PREFIX;
}
/**
@@ -187,11 +245,9 @@ public class CrucibleCrafting { //extends AbstractCrafting {
* @param recipe_name basic recipe name, no prefix or mod id
* @return Recipe object
*/
-/*
@Nullable
public static CrucibleCrafting getRecipe(String recipe_name)
{
return REGISTRY.getValue(getFullRecipeName(RECIPE_PREFIX, recipe_name));
}
-*/
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/ForgeCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/ForgeCrafting.java
index 91948551..3c0803ad 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/crafting/ForgeCrafting.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/ForgeCrafting.java
@@ -57,7 +57,8 @@ public class ForgeCrafting {
public static ForgeCrafting getRecipe(Item item)
{
for(ForgeCrafting recipe : forgeRecipes) {
- if (item.equals(recipe.input))
+
+ if (item.equals(recipe.getInput()))
return recipe;
}
return null;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java
new file mode 100644
index 00000000..42fb904d
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/WorkbenchCrafting.java
@@ -0,0 +1,199 @@
+package nmd.primal.forgecraft.crafting;
+
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.Ingredient;
+import net.minecraftforge.registries.IForgeRegistry;
+import nmd.primal.core.common.recipes.AbstractRecipe;
+import nmd.primal.forgecraft.ModInfo;
+
+import javax.annotation.Nullable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Created by mminaie on 11/11/17.
+ */
+public class WorkbenchCrafting extends AbstractRecipe { //extends AbstractCrafting {
+
+ // ***************************************************************************** //
+ // Recipe Handler CrucibleHandler
+ // ***************************************************************************** //
+
+ public static final String RECIPE_PREFIX = "workbench";
+ public static final IForgeRegistry REGISTRY = ModInfo.Registries.WORKBENCH_CRAFTING;
+
+ public static Collection getRECIPES() {
+ return RECIPES;
+ }
+
+ public static final Collection RECIPES = REGISTRY.getValuesCollection();
+
+ private Ingredient toolPart;
+ private Ingredient toolHead;
+ private Ingredient toolPin;
+ private Ingredient takeApart;
+ private ItemStack output;
+
+ public Ingredient getTakeApart() {
+ return takeApart;
+ }
+
+ public void setTakeApart(Ingredient takeApart) {
+ this.takeApart = takeApart;
+ }
+
+ public Ingredient getToolPart() {
+ return toolPart;
+ }
+
+ public void setToolPart(Ingredient toolPart) {
+ this.toolPart = toolPart;
+ }
+
+ public Ingredient getToolHead() {
+ return toolHead;
+ }
+
+ public void setToolHead(Ingredient toolHead) {
+ this.toolHead = toolHead;
+ }
+
+ public Ingredient getToolPin() {
+ return toolPin;
+ }
+
+ public void setToolPin(Ingredient toolPin) {
+ this.toolPin = toolPin;
+ }
+
+ public ItemStack getOutput() {
+ return output;
+ }
+
+ public void setOutput(ItemStack output) {
+ this.output = output;
+ }
+
+ public List getIngredientList() {
+ return ingredientList;
+ }
+
+ public void setIngredientList(List ingredientList) {
+ this.ingredientList = ingredientList;
+ }
+
+ private List ingredientList = new ArrayList<>();
+
+ public WorkbenchCrafting(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3 , ItemStack output){
+ super();
+ this.toolPart = i0;
+ this.toolHead = i1;
+ this.toolPin = i2;
+ this.takeApart = i3;
+ this.output = output;
+ }
+
+ public static boolean compare(Ingredient ingredient, ItemStack stack){
+ if(stack == null){
+ stack = new ItemStack(Items.AIR, 1);
+ }
+ if(ingredient == null && stack.isEmpty()) {
+ return true;
+ }
+
+ if (ingredient.test(ItemStack.EMPTY)) {
+ if (stack.isEmpty()) {
+ return true;
+ }
+ }
+
+ if(ingredient.apply(stack)){
+ return true;
+ }
+
+ return false;
+ }
+
+ public static boolean isRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3){
+ for(WorkbenchCrafting recipe : RECIPES){
+ if(i0 == null){
+ i0 = ItemStack.EMPTY;
+ }
+ if(i1 == null){
+ i1 = ItemStack.EMPTY;
+ }
+ if(i2 == null){
+ i2 = ItemStack.EMPTY;
+ }
+ if(i3 == null){
+ i3 = ItemStack.EMPTY;
+ }
+ if(compare(recipe.toolPart, i0) &&
+ compare(recipe.toolHead, i1) &&
+ compare(recipe.toolPin, i2) &&
+ compare(recipe.takeApart, i3) ){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static WorkbenchCrafting getRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3){
+ for(WorkbenchCrafting recipe : RECIPES){
+
+ if(i0 == null){
+ i0 = ItemStack.EMPTY;
+ }
+ if(i1 == null){
+ i1 = ItemStack.EMPTY;
+ }
+ if(i2 == null){
+ i2 = ItemStack.EMPTY;
+ }
+ if(i3 == null){
+ i3 = ItemStack.EMPTY;
+ }
+
+ if(recipe.toolPart.apply(i0) && recipe.toolHead.apply(i1) && recipe.toolPin.apply(i2) && recipe.takeApart.apply(i3) ){
+ return recipe;
+ }
+ }
+ return null;
+ }
+ /*public static boolean isValidIngredient(ItemStack checkStack){
+ for(WorkbenchCrafting recipe : RECIPES) {
+ if (recipe.ing0.apply(checkStack) ||
+ recipe.ing1.apply(checkStack) ||
+ recipe.ing2.apply(checkStack) ||
+ recipe.ing3.apply(checkStack) ||
+ recipe.ing4.apply(checkStack)) {
+ return true;
+ }
+ }
+ return false;
+ }*/
+
+
+ @Override
+ public Collection getRecipes() {
+ return RECIPES;
+ }
+
+ @Override
+ public String getRecipePrefix() {
+ return RECIPE_PREFIX;
+ }
+
+ /**
+ * Shim for getting a recipe directly from correctly formatted name
+ * @param recipe_name basic recipe name, no prefix or mod id
+ * @return Recipe object
+ */
+ @Nullable
+ public static WorkbenchCrafting getRecipe(String recipe_name)
+ {
+ return REGISTRY.getValue(getFullRecipeName(RECIPE_PREFIX, recipe_name));
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/registery/RecipesCrucible.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/registery/RecipesCrucible.java
new file mode 100644
index 00000000..11e4fc7e
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/registery/RecipesCrucible.java
@@ -0,0 +1,650 @@
+package nmd.primal.forgecraft.crafting.registery;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.Ingredient;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.event.RegistryEvent;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.registry.GameRegistry;
+import net.minecraftforge.oredict.OreIngredient;
+import net.minecraftforge.registries.IForgeRegistry;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.crafting.CrucibleCrafting;
+import nmd.primal.forgecraft.init.ModItems;
+
+@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
+@Mod.EventBusSubscriber
+public final class RecipesCrucible {
+ @SubscribeEvent
+ public static void registerRecipes(RegistryEvent.Register event) {
+ PrimalAPI.logger(7, "Registering Recipes: " + CrucibleCrafting.RECIPE_PREFIX);
+ final IForgeRegistry recipes = event.getRegistry();
+
+/*
+ ItemStack emptyAir = ItemStack.EMPTY;
+
+ NBTTagCompound newTag = new NBTTagCompound();
+
+ NBTTagCompound setHot = new NBTTagCompound();
+ setHot.setBoolean("hot", true);
+
+ ItemStack hotBronzeIngot = new ItemStack(ModItems.bronzeingotball, 1);
+ hotBronzeIngot.setTagCompound(setHot);
+ ItemStack hotIronIngot = new ItemStack(ModItems.ironingotball, 1);
+ hotIronIngot.setTagCompound(setHot);
+ ItemStack hotCleanIronIngot = new ItemStack(ModItems.ironcleaningotball, 1);
+ hotCleanIronIngot.setTagCompound(setHot);
+ ItemStack hotSteelIngot = new ItemStack(ModItems.steelingotball, 1);
+ hotSteelIngot.setTagCompound(setHot);
+ ItemStack hotWootzIngot = new ItemStack(ModItems.wootzingotball, 1);
+ hotWootzIngot.setTagCompound(setHot);
+
+ ItemStack hotBronzeChunk = new ItemStack( ModItems.bronzechunk, 1);
+ hotBronzeChunk.setTagCompound(setHot);
+ ItemStack hotChunk = new ItemStack( ModItems.wroughtironchunk, 1);
+ hotChunk.setTagCompound(setHot);
+ ItemStack hotCleanChunk = new ItemStack(ModItems.ironcleanchunk, 1);
+ hotCleanChunk.setTagCompound(setHot);
+ ItemStack hotSteelChunk = new ItemStack(ModItems.steelchunk, 1);
+ hotSteelChunk.setTagCompound(setHot);
+ ItemStack hotWootzChunk = new ItemStack(ModItems.wootzchunk, 1);
+ hotWootzChunk.setTagCompound(setHot);
+
+ ItemStack diamond = new ItemStack(Items.DIAMOND, 1);
+ ItemStack emerald = new ItemStack(Items.EMERALD, 1);
+
+ ItemStack emeraldShard = new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, 1);
+ ItemStack diamondShard = new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, 1);
+ ItemStack redstone = new ItemStack(Items.REDSTONE, 1);
+ ItemStack lapis = new ItemStack(Items.DYE, 1, 4);
+
+
+
+ ItemStack[] toolArray = new ItemStack[24];
+ ItemStack[] hotToolArray = new ItemStack[16];
+
+ ItemStack bronzepickaxehead = new ItemStack(ModItems.bronzepickaxehead, 1);
+ bronzepickaxehead.setTagCompound(newTag);
+ toolArray[0] = bronzepickaxehead;
+ ItemStack bronzeaxehead = new ItemStack(ModItems.bronzeaxehead, 1);
+ bronzeaxehead.setTagCompound(newTag);
+ toolArray[1] = bronzeaxehead;
+ ItemStack bronzeshovelhead = new ItemStack(ModItems.bronzeshovelhead, 1);
+ bronzeshovelhead.setTagCompound(newTag);
+ toolArray[2] = bronzeshovelhead;
+ ItemStack bronzehoehead = new ItemStack(ModItems.bronzehoehead, 1);
+ bronzehoehead.setTagCompound(newTag);
+ toolArray[3] = bronzehoehead;
+
+ ItemStack pickaxehead = new ItemStack(ModItems.pickaxehead, 1);
+ pickaxehead.setTagCompound(newTag);
+ toolArray[4] = pickaxehead;
+ ItemStack ironaxehead = new ItemStack(ModItems.ironaxehead, 1);
+ ironaxehead.setTagCompound(newTag);
+ toolArray[5] = ironaxehead;
+ ItemStack ironshovelhead = new ItemStack(ModItems.ironshovelhead, 1);
+ ironshovelhead.setTagCompound(newTag);
+ toolArray[6] = ironshovelhead;
+ ItemStack ironhoehead = new ItemStack(ModItems.ironhoehead, 1);
+ ironhoehead.setTagCompound(newTag);
+ toolArray[7] = ironhoehead;
+
+ ItemStack cleanpickaxehead = new ItemStack(ModItems.cleanironpickaxehead, 1);
+ cleanpickaxehead.setTagCompound(newTag);
+ toolArray[8] = cleanpickaxehead;
+ ItemStack cleanaxehead = new ItemStack(ModItems.cleanironaxehead, 1);
+ cleanaxehead.setTagCompound(newTag);
+ toolArray[9] = cleanaxehead;
+ ItemStack cleanshovelhead = new ItemStack(ModItems.cleanironshovelhead, 1);
+ cleanshovelhead.setTagCompound(newTag);
+ toolArray[10] = cleanshovelhead;
+ ItemStack cleanhoehead = new ItemStack(ModItems.cleanironhoehead, 1);
+ cleanhoehead.setTagCompound(newTag);
+ toolArray[11] =cleanhoehead ;
+
+ ItemStack steelpickaxehead = new ItemStack(ModItems.steelpickaxehead, 1);
+ steelpickaxehead.setTagCompound(newTag);
+ toolArray[12] = steelpickaxehead;
+ ItemStack steelaxehead = new ItemStack(ModItems.steelaxehead, 1);
+ steelaxehead.setTagCompound(newTag);
+ toolArray[13] =steelaxehead ;
+ ItemStack steelshovelhead = new ItemStack(ModItems.steelshovelhead, 1);
+ steelshovelhead.setTagCompound(newTag);
+ toolArray[14] = steelshovelhead;
+ ItemStack steelhoehead = new ItemStack(ModItems.steelhoehead, 1);
+ steelhoehead.setTagCompound(newTag);
+ toolArray[15] =steelhoehead ;
+
+ ItemStack wootzpickaxehead = new ItemStack(ModItems.wootzpickaxehead, 1);
+ wootzpickaxehead.setTagCompound(newTag);
+ toolArray[16] = wootzpickaxehead;
+ ItemStack wootzaxehead = new ItemStack(ModItems.wootzaxehead, 1);
+ wootzaxehead.setTagCompound(newTag);
+ toolArray[17] = wootzaxehead;
+ ItemStack wootzshovelhead = new ItemStack(ModItems.wootzshovelhead, 1);
+ wootzshovelhead.setTagCompound(newTag);
+ toolArray[18] =wootzshovelhead ;
+ ItemStack wootzhoehead = new ItemStack(ModItems.wootzhoehead, 1);
+ wootzhoehead.setTagCompound(newTag);
+ toolArray[19] = wootzhoehead;
+
+ ItemStack copperpickaxehead = new ItemStack(ModItems.copperpickaxehead, 1);
+ copperpickaxehead.setTagCompound(newTag);
+ toolArray[20] = copperpickaxehead;
+ ItemStack copperaxehead = new ItemStack(ModItems.copperaxehead, 1);
+ copperaxehead.setTagCompound(newTag);
+ toolArray[21] = copperaxehead;
+ ItemStack coppershovelhead = new ItemStack(ModItems.coppershovelhead, 1);
+ coppershovelhead.setTagCompound(newTag);
+ toolArray[22] =coppershovelhead ;
+ ItemStack copperhoehead = new ItemStack(ModItems.copperhoehead, 1);
+ copperhoehead.setTagCompound(newTag);
+ toolArray[23] = copperhoehead;
+
+ ItemStack hotpickaxehead = pickaxehead.copy();
+ hotToolArray[0] =hotpickaxehead;
+ ItemStack hotironaxehead = ironaxehead.copy();
+ hotToolArray[1] =hotironaxehead;
+ ItemStack hotironshovelhead = ironshovelhead.copy();
+ hotToolArray[2] =hotironshovelhead;
+ ItemStack hotironhoehead = ironhoehead.copy();
+ hotToolArray[3] =hotironhoehead;
+
+ ItemStack hotcleanpickaxehead = cleanpickaxehead.copy();
+ hotToolArray[4] = hotcleanpickaxehead;
+ ItemStack hotcleanaxehead = cleanaxehead.copy();
+ hotToolArray[5] = hotcleanaxehead;
+ ItemStack hotcleanshovelhead = cleanshovelhead.copy();
+ hotToolArray[6] = hotcleanshovelhead;
+ ItemStack hotcleanhoehead = cleanhoehead.copy();
+ hotToolArray[7] = hotcleanhoehead;
+
+ ItemStack hotsteelpickaxehead = steelpickaxehead.copy();
+ hotToolArray[8] = hotsteelpickaxehead;
+ ItemStack hotsteelaxehead = steelaxehead.copy();
+ hotToolArray[9] = hotsteelaxehead;
+ ItemStack hotsteelshovelhead = steelshovelhead.copy();
+ hotToolArray[10] = hotsteelshovelhead;
+ ItemStack hotsteelhoehead = steelhoehead.copy();
+ hotToolArray[11] = hotsteelhoehead;
+
+ ItemStack hotwootzpickaxehead = wootzpickaxehead.copy();
+ hotToolArray[12] = hotwootzpickaxehead;
+ ItemStack hotwootzaxehead = wootzaxehead.copy();
+ hotToolArray[13] = hotwootzaxehead;
+ ItemStack hotwootzshovelhead = wootzshovelhead.copy();
+ hotToolArray[14] = hotwootzshovelhead;
+ ItemStack hotwootzhoehead = wootzhoehead.copy();
+ hotToolArray[15] = hotwootzhoehead;
+
+
+
+ for(ItemStack temp : toolArray) {
+ NBTTagCompound tags = temp.getTagCompound();
+ tags.setTag("tags", tags);
+
+ tags.getCompoundTag("tags").setBoolean("hot", false);
+ tags.getCompoundTag("tags").setBoolean("emerald", false);
+ tags.getCompoundTag("tags").setInteger("diamond", 0);
+ tags.getCompoundTag("tags").setInteger("redstone", 0);
+ tags.getCompoundTag("tags").setInteger("lapis", 0);
+ tags.getCompoundTag("tags").setInteger("modifiers", 0);
+ temp.setTagCompound(tags);
+ }
+
+ bronzepickaxehead = toolArray[0];
+ bronzeaxehead = toolArray[1];
+ bronzeshovelhead = toolArray[2];
+ bronzehoehead = toolArray[3];
+
+ pickaxehead = toolArray[4];
+ ironaxehead = toolArray[5];
+ ironshovelhead = toolArray[6];
+ ironhoehead = toolArray[7];
+
+ cleanpickaxehead = toolArray[8];
+ cleanaxehead = toolArray[9];
+ cleanshovelhead = toolArray[10];
+ cleanhoehead = toolArray[11];
+
+ steelpickaxehead = toolArray[12] ;
+ steelaxehead = toolArray[13] ;
+ steelshovelhead = toolArray[14];
+ steelhoehead = toolArray[15] ;
+
+ wootzpickaxehead = toolArray[16];
+ wootzaxehead = toolArray[17];
+ wootzshovelhead = toolArray[18] ;
+ wootzhoehead = toolArray[19];
+
+ copperpickaxehead = toolArray[20];
+ copperaxehead = toolArray[21];
+ coppershovelhead = toolArray[22];
+ copperhoehead = toolArray[23];
+
+ for(ItemStack temp : hotToolArray) {
+ //NBTTagCompound newTag = new NBTTagCompound();
+ NBTTagCompound tags = new NBTTagCompound();
+
+ //temp.setTagCompound(newTag);
+ temp.getTagCompound().setTag("tags", tags);
+
+ temp.getTagCompound().setTag("tags", tags);
+ temp.getSubCompound("tags").setBoolean("hot", true);
+ temp.getSubCompound("tags").setBoolean("emerald", false);
+ temp.getSubCompound("tags").setInteger("diamond", 0);
+ temp.getSubCompound("tags").setInteger("redstone", 0);
+ temp.getSubCompound("tags").setInteger("lapis", 0);
+ temp.getSubCompound("tags").setInteger("modifiers", 0);
+ }
+
+ hotpickaxehead = hotToolArray[0];
+ hotironaxehead = hotToolArray[1];
+ hotironshovelhead = hotToolArray[2];
+ hotironhoehead = hotToolArray[3];
+
+ hotcleanpickaxehead = hotToolArray[4];
+ hotcleanaxehead = hotToolArray[5];
+ hotcleanshovelhead = hotToolArray[6];
+ hotcleanhoehead = hotToolArray[7];
+
+ hotsteelpickaxehead = hotToolArray[8] ;
+ hotsteelaxehead = hotToolArray[9] ;
+ hotsteelshovelhead = hotToolArray[10];
+ hotsteelhoehead = hotToolArray[11] ;
+
+ hotwootzpickaxehead = hotToolArray[12];
+ hotwootzaxehead = hotToolArray[13];
+ hotwootzshovelhead = hotToolArray[14] ;
+ hotwootzhoehead = hotToolArray[15];
+*/
+ //RecipeHandler.addSmelting(ModItems.softcrucible, new ItemStack(ModBlocks.nbtCrucible, 1));
+
+ /***********************/
+ /***CRUCIBLE CRAFTING***/
+ /***********************/
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreIron"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(Blocks.IRON_ORE, 1),
+ new ItemStack(ModItems.ironingotball, 1),
+ 1400,
+ 1200,
+ 800).setRecipeName("wroughtIron1"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustIron"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(Blocks.IRON_ORE, 1),
+ new ItemStack(ModItems.ironingotball, 1),
+ 1250,
+ 1100,
+ 800).setRecipeName("wroughtIron2"));
+
+ recipes.register (new CrucibleCrafting(
+ Ingredient.fromStacks(new ItemStack(ModItems.brokenwroughtirontool, 1)),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ new ItemStack(ModItems.ironingotball, 1),
+ 1250,
+ 1100,
+ 800).setRecipeName("wroughtIron3"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustIron"),
+ new OreIngredient("slackLime"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.IRON_DUST, 1),
+ new ItemStack(ModItems.ironcleaningotball, 1),
+ 1550,
+ 1200,
+ 800).setRecipeName("cleanIron1"));
+
+ recipes.register (new CrucibleCrafting(
+ Ingredient.fromStacks(new ItemStack(ModItems.brokencleanirontool, 1)),
+ new OreIngredient("nuggetIron"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ new ItemStack(ModItems.ironcleaningotball, 1),
+ 1550,
+ 1200,
+ 800).setRecipeName("cleanIron2"));
+
+ recipes.register (new CrucibleCrafting(
+ Ingredient.fromStacks(new ItemStack(ModItems.ironcleaningotball, 1)),
+ Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_HIGH, 1)),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.ironcleaningotball, 1),
+ new ItemStack(ModItems.steelingotball, 1),
+ 2100,
+ 1500,
+ 1000).setRecipeName("steel1"));
+
+ recipes.register (new CrucibleCrafting(
+ Ingredient.fromStacks(new ItemStack(ModItems.brokensteeltool, 1)),
+ new OreIngredient("nuggetSteel"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ new ItemStack(ModItems.steelingotball, 1),
+ 2100,
+ 1500,
+ 1000).setRecipeName("steel2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreClusterMagnetite"),
+ Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
+ new OreIngredient("oreClusterMagnetite"),
+ Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
+ new OreIngredient("specialCarbon"),
+ new ItemStack(PrimalAPI.Items.ORE_CLUSTER_MAGNETITE, 1),
+ new ItemStack(ModItems.wootzingotball, 1),
+ 2100,
+ 1800,
+ 1500).setRecipeName("wootz2"));
+
+ recipes.register (new CrucibleCrafting(
+ Ingredient.fromStacks(new ItemStack(ModItems.brokenwootztool, 1)),
+ new OreIngredient("nuggetWootz"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ new ItemStack(ModItems.wootzingotball, 1),
+ 2100,
+ 1800,
+ 1500).setRecipeName("wootz3"));
+
+ /***BRONZE***/
+ NBTTagCompound tagBronzeDefault = new NBTTagCompound();
+ tagBronzeDefault.setString("upgrades", "");
+ tagBronzeDefault.setBoolean("hot", false);
+ ItemStack defaultBronze = new ItemStack(ModItems.bronzeingotball, 1);
+ defaultBronze.setTagCompound(tagBronzeDefault.copy());
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustTin"),
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ defaultBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("bronze1"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotBronze"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ defaultBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("bronze2"));
+
+ ItemStack redBronze = defaultBronze.copy();
+ redBronze.getTagCompound().setString("upgrades", "redstone");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotBronze"),
+ new OreIngredient("dustRedstone"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ redBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("redBronze1"));
+
+ ItemStack diamondBronze = defaultBronze.copy();
+ diamondBronze.getTagCompound().setString("upgrades", "diamond");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotBronze"),
+ new OreIngredient("flakeDiamond"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ diamondBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("diamondBronze1"));
+
+ ItemStack emeraldBronze = defaultBronze.copy();
+ emeraldBronze.getTagCompound().setString("upgrades", "emerald");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotBronze"),
+ new OreIngredient("flakeEmerald"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ emeraldBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("emeraldBronze1"));
+
+ ItemStack lapisBronze = defaultBronze.copy();
+ lapisBronze.getTagCompound().setString("upgrades", "lapis");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotBronze"),
+ new OreIngredient("gemLapis"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ lapisBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("lapisBronze1"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustTin"),
+ new OreIngredient("dustRedstone"),
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ redBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("redBronze2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustTin"),
+ new OreIngredient("flakeDiamond"),
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ diamondBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("diamondBronze2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustTin"),
+ new OreIngredient("flakeEmerald"),
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ emeraldBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("emeraldBronze2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustCopper"),
+ new OreIngredient("dustTin"),
+ new OreIngredient("gemLapis"),
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ lapisBronze,
+ 1100,
+ 800,
+ 600).setRecipeName("lapisBronze2"));
+
+
+ /***COPPER***/
+ NBTTagCompound tagCopperDefault = new NBTTagCompound();
+ tagCopperDefault.setString("upgrades", "");
+ tagCopperDefault.setBoolean("hot", false);
+ ItemStack defaultCopper = new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1);
+ defaultCopper.setTagCompound(tagCopperDefault.copy());
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreCopper"),
+ new OreIngredient("slackLime"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ defaultCopper,
+ 900,
+ 800,
+ 600).setRecipeName("copper1"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotCopper"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ defaultCopper,
+ 900,
+ 750,
+ 550).setRecipeName("copper2"));
+
+ ItemStack redCopper = defaultCopper.copy();
+ redCopper.getTagCompound().setString("upgrades", "redstone");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotCopper"),
+ new OreIngredient("dustRedstone"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ redCopper,
+ 900,
+ 750,
+ 550).setRecipeName("redCopper1"));
+
+ ItemStack diamondCopper = defaultCopper.copy();
+ diamondCopper.getTagCompound().setString("upgrades", "diamond");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotCopper"),
+ new OreIngredient("flakeDiamond"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ diamondCopper,
+ 900,
+ 750,
+ 550).setRecipeName("diamondCopper1"));
+
+ ItemStack emeraldCopper = defaultCopper.copy();
+ emeraldCopper.getTagCompound().setString("upgrades", "emerald");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotCopper"),
+ new OreIngredient("flakeEmerald"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ emeraldCopper,
+ 900,
+ 750,
+ 550).setRecipeName("emeraldCopper1"));
+
+ ItemStack lapisCopper = defaultCopper.copy();
+ lapisCopper.getTagCompound().setString("upgrades", "lapis");
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("ingotCopper"),
+ new OreIngredient("gemLapis"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ lapisCopper,
+ 900,
+ 750,
+ 550).setRecipeName("lapisCopper1"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreCopper"),
+ new OreIngredient("slackLime"),
+ new OreIngredient("dustRedstone"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ redCopper,
+ 900,
+ 750,
+ 550).setRecipeName("redCopper2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreCopper"),
+ new OreIngredient("slackLime"),
+ new OreIngredient("flakeDiamond"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ diamondCopper,
+ 900,
+ 750,
+ 550).setRecipeName("diamondCopper2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreCopper"),
+ new OreIngredient("slackLime"),
+ new OreIngredient("flakeEmerald"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ emeraldCopper,
+ 900,
+ 750,
+ 550).setRecipeName("emeraldCopper2"));
+
+ recipes.register (new CrucibleCrafting(
+ new OreIngredient("oreCopper"),
+ new OreIngredient("slackLime"),
+ new OreIngredient("gemLapis"),
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ new ItemStack(PrimalAPI.Items.SLAG, 1),
+ lapisCopper,
+ 900,
+ 750,
+ 550).setRecipeName("lapisCopper2"));
+
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/crafting/registery/RecipesWorkbench.java b/kfc/src/main/java/nmd/primal/forgecraft/crafting/registery/RecipesWorkbench.java
new file mode 100644
index 00000000..acd89ac4
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/crafting/registery/RecipesWorkbench.java
@@ -0,0 +1,380 @@
+package nmd.primal.forgecraft.crafting.registery;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.Ingredient;
+import net.minecraftforge.event.RegistryEvent;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.registry.GameRegistry;
+import net.minecraftforge.oredict.OreDictionary;
+import net.minecraftforge.oredict.OreIngredient;
+import net.minecraftforge.registries.IForgeRegistry;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
+import nmd.primal.forgecraft.init.ModItems;
+
+import java.lang.reflect.WildcardType;
+
+@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
+@Mod.EventBusSubscriber
+public final class RecipesWorkbench {
+ @SubscribeEvent
+ public static void registerRecipes(RegistryEvent.Register event) {
+ PrimalAPI.logger(7, "Registering Recipes: " + WorkbenchCrafting.RECIPE_PREFIX);
+ final IForgeRegistry recipes = event.getRegistry();
+
+ /***COPPER***/
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.copperaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.copperaxe, 1)).setRecipeName("copperaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.copperaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.copperaxehead, 1)).setRecipeName("copperaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.copperhoehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.copperhoe, 1)).setRecipeName("copperhoe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.copperhoe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.copperhoehead, 1)).setRecipeName("copperhoesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.copperpickaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.copperpickaxe, 1)).setRecipeName("copperpickaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.copperpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.copperpickaxehead, 1)).setRecipeName("copperpickaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.coppershovelhead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.coppershovel, 1)).setRecipeName("coppershovel"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.coppershovel, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.coppershovelhead, 1)).setRecipeName("coppershovelsplit"));
+
+ /***BRONZE***/
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzeaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.bronzeaxe, 1)).setRecipeName("bronzeaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.bronzeaxehead, 1)).setRecipeName("bronzeaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzehoehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.bronzehoe, 1)).setRecipeName("bronzehoe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.bronzehoehead, 1)).setRecipeName("bronzehoesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzepickaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.bronzepickaxe, 1)).setRecipeName("bronzepickaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.bronzepickaxehead, 1)).setRecipeName("bronzepickaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzeshovelhead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.bronzeshovel, 1)).setRecipeName("bronzeshovel"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.bronzeshovelhead, 1)).setRecipeName("bronzeshovelsplit"));
+
+
+ /***iron***/
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.ironaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.ironaxe, 1)).setRecipeName("ironaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.ironaxehead, 1)).setRecipeName("ironaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.ironhoehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.ironhoe, 1)).setRecipeName("ironhoe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.ironhoehead, 1)).setRecipeName("ironhoesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.pickaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.ironpickaxe, 1)).setRecipeName("ironpickaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.pickaxehead, 1)).setRecipeName("ironpickaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.ironshovelhead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.ironshovel, 1)).setRecipeName("ironshovel"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.ironshovelhead, 1)).setRecipeName("ironshovelsplit"));
+
+
+ /***cleaniron***/
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.cleanironaxe, 1)).setRecipeName("cleanironaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.cleanironaxehead, 1)).setRecipeName("cleanironaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironhoehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.cleanironhoe, 1)).setRecipeName("cleanironhoe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.cleanironhoehead, 1)).setRecipeName("cleanironhoesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironpickaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.cleanironpickaxe, 1)).setRecipeName("cleanironpickaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.cleanironpickaxehead, 1)).setRecipeName("cleanironpickaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironshovelhead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.cleanironshovel, 1)).setRecipeName("cleanironshovel"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.cleanironshovelhead, 1)).setRecipeName("cleanironshovelsplit"));
+
+
+ /***steel***/
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.steelaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.steelaxe, 1)).setRecipeName("steelaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.steelaxehead, 1)).setRecipeName("steelaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.steelhoehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.steelhoe, 1)).setRecipeName("steelhoe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.steelhoehead, 1)).setRecipeName("steelhoesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.steelpickaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.steelpickaxe, 1)).setRecipeName("steelpickaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.steelpickaxehead, 1)).setRecipeName("steelpickaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.steelshovelhead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.steelshovel, 1)).setRecipeName("steelshovel"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.steelshovelhead, 1)).setRecipeName("steelshovelsplit"));
+
+
+ /***wootz***/
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.wootzaxe, 1)).setRecipeName("wootzaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.wootzaxehead, 1)).setRecipeName("wootzaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzhoehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.wootzhoe, 1)).setRecipeName("wootzhoe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzhoe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.wootzhoehead, 1)).setRecipeName("wootzhoesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzpickaxehead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.wootzpickaxe, 1)).setRecipeName("wootzpickaxe"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.wootzpickaxehead, 1)).setRecipeName("wootzpickaxesplit"));
+
+ recipes.register (new WorkbenchCrafting(
+ new OreIngredient("stickTreatedWood"),
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzshovelhead, 1)),
+ new OreIngredient("pinBasic"),
+ Ingredient.EMPTY,
+ new ItemStack(ModItems.wootzshovel, 1)).setRecipeName("wootzshovel"));
+
+ recipes.register (new WorkbenchCrafting(
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.EMPTY,
+ Ingredient.fromStacks(new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE)),
+ new ItemStack(ModItems.wootzshovelhead, 1)).setRecipeName("wootzshovelsplit"));
+
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java
index 0864301f..ee8a992d 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java
@@ -10,10 +10,11 @@ import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.forgecraft.blocks.Anvil.AnvilIron;
-import nmd.primal.forgecraft.blocks.Anvil.AnvilStone;
-import nmd.primal.forgecraft.blocks.Crucibles.NBTCrucible;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.forgecraft.blocks.Chisel;
import nmd.primal.forgecraft.blocks.YewStave;
+import nmd.primal.forgecraft.blocks.AnvilStone;
+import nmd.primal.forgecraft.blocks.NBTCrucible;
import nmd.primal.forgecraft.blocks.machine.*;
/**
@@ -29,6 +30,13 @@ public class ModBlocks {
public static Block blockbreaker;
public static Block castingform;
+ public static Block bronzechisel;
+ public static Block copperchisel;
+ public static Block ironchisel;
+ public static Block cleanironchisel;
+ public static Block steelchisel;
+ public static Block wootzchisel;
+
public static Block pistonbellowsoak;
public static Block pistonbellowsjungle;
public static Block pistonbellowsbirch;
@@ -36,50 +44,15 @@ public class ModBlocks {
public static Block pistonbellowsdarkoak;
public static Block pistonbellowsacacia;
- /**
- public static Block emptycrucible;
- public static Block emptycruciblehot;
- public static Block emptycruciblecracked;
- public static Block emptycruciblecrackedhot;
-
- public static Block rawbronzecrucible;
- public static Block hotbronzecrucible;
- public static Block hotcookedbronzecrucible;
-
- public static Block rawbronzecrucible_redstone;
- public static Block hotbronzecrucible_redstone;
- public static Block hotcookedbronzecrucible_redstone;
-
- public static Block rawbronzecrucible_lapis;
- public static Block hotbronzecrucible_lapis;
- public static Block hotcookedbronzecrucible_lapis;
-
- public static Block rawbronzecrucible_diamond;
- public static Block hotbronzecrucible_diamond;
- public static Block hotcookedbronzecrucible_diamond;
-
- public static Block rawbronzecrucible_emerald;
- public static Block hotbronzecrucible_emerald;
- public static Block hotcookedbronzecrucible_emerald;
- **/
-
- //public static Block ironball;
- //public static Block ironchunk;
- //public static Block ironcleanball;
- //public static Block ironcleanchunk;
- //public static Block steelball;
- //public static Block steelchunk;
- //public static Block wootzball;
- //public static Block wootzchunk;
-
public static Block stoneanvil;
public static Block ironanvil;
+ public static Block workbench;
+
public static Block yewstave;
-
public static void init() {
- //FISH_TRAP = RegistryHelper.addBlock("fish_trap", new FishTrap(), ItemFishTraps::new, "fishtrap");
+
nbtCrucible = new NBTCrucible(Material.ROCK, "nbtcrucible");
forge_brick = new Forge(Material.ROCK, "forge_brick", 5000);
forge_adobe = new Forge(Material.ROCK, "forge_adobe", 5000);
@@ -88,6 +61,13 @@ public class ModBlocks {
blockbreaker = new Breaker(Material.WOOD, "blockbreaker", 4.0f);
castingform = new CastingForm(Material.WOOD, "castingform");
+ copperchisel = new Chisel(Material.IRON, "copperchisel", PrimalAPI.ToolMaterials.TOOL_COPPER);
+ bronzechisel = new Chisel(Material.IRON, "bronzechisel", PrimalAPI.ToolMaterials.TOOL_BRONZE);
+ ironchisel = new Chisel(Material.IRON, "ironchisel", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
+ cleanironchisel = new Chisel(Material.IRON, "cleanironchisel", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON);
+ steelchisel = new Chisel(Material.IRON, "steelchisel", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL);
+ wootzchisel = new Chisel(Material.IRON, "wootzchisel", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
+
pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak");
pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle");
pistonbellowsbirch = new PistonBellows(Material.WOOD, "pistonbellowsbirch");
@@ -95,274 +75,11 @@ public class ModBlocks {
pistonbellowsdarkoak = new PistonBellows(Material.WOOD, "pistonbellowsdarkoak");
pistonbellowsacacia = new PistonBellows(Material.WOOD, "pistonbellowsacacia");
- /*emptycrucible = new Crucible(Material.ROCK, "emptycrucible");
- emptycruciblehot = new CrucibleHot(Material.ROCK, "emptycruciblehot");
- emptycruciblecracked = new Crucible(Material.ROCK, "emptycruciblecracked");
- emptycruciblecrackedhot = new CrucibleHot(Material.ROCK, "emptycruciblecrackedhot");
-
- rawbronzecrucible = new Crucible(Material.ROCK, "rawbronzecrucible");
- hotbronzecrucible = new CrucibleHot(Material.ROCK, "hotbronzecrucible");
- hotcookedbronzecrucible = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible");
-
- rawbronzecrucible_redstone = new Crucible(Material.ROCK, "rawbronzecrucible_redstone");
- hotbronzecrucible_redstone = new CrucibleHot(Material.ROCK, "hotbronzecrucible_redstone");
- hotcookedbronzecrucible_redstone = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_redstone");
-
- rawbronzecrucible_diamond = new Crucible(Material.ROCK, "rawbronzecrucible_diamond");
- hotbronzecrucible_diamond = new CrucibleHot(Material.ROCK, "hotbronzecrucible_diamond");
- hotcookedbronzecrucible_diamond = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_diamond");
-
- rawbronzecrucible_lapis = new Crucible(Material.ROCK, "rawbronzecrucible_lapis");
- hotbronzecrucible_lapis = new CrucibleHot(Material.ROCK, "hotbronzecrucible_lapis");
- hotcookedbronzecrucible_lapis = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_lapis");
-
- rawbronzecrucible_emerald = new Crucible(Material.ROCK, "rawbronzecrucible_emerald");
- hotbronzecrucible_emerald = new CrucibleHot(Material.ROCK, "hotbronzecrucible_emerald");
- hotcookedbronzecrucible_emerald = new CrucibleHot(Material.ROCK, "hotcookedbronzecrucible_emerald");
- */
-
- /*
- ironball = new IngotBall(Material.IRON, "ironball", 5.0F, "big") {
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz)
- {
- if(!world.isRemote){
- Item pItem = player.getHeldItem(hand).getItem();
- ItemStack pstack = player.getHeldItemMainhand();
- BlockPos belowPos = pos.down();
- //System.out.println("Activating");
- if (pItem instanceof Gallagher && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
- world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
- world.playEvent(1031, pos, 0);
- //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
- return true;
- }
- if (pstack.isEmpty()) {
- System.out.println(state);
- PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getItem(world, pos, state));
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 3);
- return true;
- }
- if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
- if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
-
- TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
-
- if (tile.getSlotStack(6).isEmpty() &&
- tile.getSlotStack(7).isEmpty() &&
- tile.getSlotStack(8).isEmpty() &&
- tile.getSlotStack(11).isEmpty() &&
- tile.getSlotStack(12).isEmpty() &&
- tile.getSlotStack(13).isEmpty() &&
- tile.getSlotStack(16).isEmpty() &&
- tile.getSlotStack(17).isEmpty() &&
- tile.getSlotStack(18).isEmpty()
- ) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
-
- Block tempBlock = ModBlocks.ironchunk;
- tempBlock.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true);
-
- tile.setSlotStack(6, new ItemStack(tempBlock, 1));
- tile.setSlotStack(7, new ItemStack(tempBlock, 1));
- tile.setSlotStack(8, new ItemStack(tempBlock, 1));
- tile.setSlotStack(11, new ItemStack(tempBlock, 1));
- tile.setSlotStack(12, new ItemStack(tempBlock, 1));
- tile.setSlotStack(13, new ItemStack(tempBlock, 1));
- tile.setSlotStack(16, new ItemStack(tempBlock, 1));
- tile.setSlotStack(17, new ItemStack(tempBlock, 1));
- tile.setSlotStack(18, new ItemStack(tempBlock, 1));
- world.playEvent(1031, pos, 0);
- return true;
- }
- }
- }
- }
- return false;
- }
- };
- ironcleanball = new IngotBall(Material.IRON, "ironcleanball", 5.0f,"big") {
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz)
- {
- //System.out.println("Level 0");
- if(!world.isRemote){
- Item pItem = player.getHeldItem(hand).getItem();
- BlockPos belowPos = pos.down();
- //System.out.println("Activating1");
- if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
- world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
- world.playEvent(1031, pos, 0);
- //System.out.println("Activating");
- return true;
- }
- if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
- if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
-
- TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
-
- if (tile.getSlotStack(6).isEmpty() &&
- tile.getSlotStack(7).isEmpty() &&
- tile.getSlotStack(8).isEmpty() &&
- tile.getSlotStack(11).isEmpty() &&
- tile.getSlotStack(12).isEmpty() &&
- tile.getSlotStack(13).isEmpty() &&
- tile.getSlotStack(16).isEmpty() &&
- tile.getSlotStack(17).isEmpty() &&
- tile.getSlotStack(18).isEmpty()
- ) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
-
- Block tempBlock = ModBlocks.ironcleanchunk;
- tempBlock.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true);
- tile.setSlotStack(6, new ItemStack(tempBlock, 1));
- tile.setSlotStack(7, new ItemStack(tempBlock, 1));
- tile.setSlotStack(8, new ItemStack(tempBlock, 1));
- tile.setSlotStack(11, new ItemStack(tempBlock, 1));
- tile.setSlotStack(12, new ItemStack(tempBlock, 1));
- tile.setSlotStack(13, new ItemStack(tempBlock, 1));
- tile.setSlotStack(16, new ItemStack(tempBlock, 1));
- tile.setSlotStack(17, new ItemStack(tempBlock, 1));
- tile.setSlotStack(18, new ItemStack(tempBlock, 1));
- world.playEvent(1031, pos, 0);
- return true;
- }
- }
- }
-
- }
- return false;
- }
- };
- steelball = new IngotBall(Material.IRON, "steelball", 6.0f,"big"){
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz)
- {
- if(!world.isRemote){
- Item pItem = player.getHeldItem(hand).getItem();
- BlockPos belowPos = pos.down();
- //System.out.println("Activating");
- if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
- world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
- world.playEvent(1031, pos, 0);
- //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
- return true;
- }
- if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
- if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
-
- TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
-
- if (tile.getSlotStack(6).isEmpty() &&
- tile.getSlotStack(7).isEmpty() &&
- tile.getSlotStack(8).isEmpty() &&
- tile.getSlotStack(11).isEmpty() &&
- tile.getSlotStack(12).isEmpty() &&
- tile.getSlotStack(13).isEmpty() &&
- tile.getSlotStack(16).isEmpty() &&
- tile.getSlotStack(17).isEmpty() &&
- tile.getSlotStack(18).isEmpty()
- ) {
- player.swingArm(hand);
-
- Block tempBlock = ModBlocks.steelchunk;
- tempBlock.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true);
-
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
- tile.setSlotStack(6, new ItemStack(tempBlock, 1));
- tile.setSlotStack(7, new ItemStack(tempBlock, 1));
- tile.setSlotStack(8, new ItemStack(tempBlock, 1));
- tile.setSlotStack(11, new ItemStack(tempBlock, 1));
- tile.setSlotStack(12, new ItemStack(tempBlock, 1));
- tile.setSlotStack(13, new ItemStack(tempBlock, 1));
- tile.setSlotStack(16, new ItemStack(tempBlock, 1));
- tile.setSlotStack(17, new ItemStack(tempBlock, 1));
- tile.setSlotStack(18, new ItemStack(tempBlock, 1));
- world.playEvent(1031, pos, 0);
- return true;
- }
- }
- }
-
- }
- return false;
- }
- };
- wootzball = new IngotBall(Material.IRON, "wootzball", 6.0f,"big") {
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz)
- {
- if(!world.isRemote){
- Item pItem = player.getHeldItem(hand).getItem();
- BlockPos belowPos = pos.down();
- //System.out.println("Activating");
- if (pItem instanceof ForgeHammer && world.getBlockState(belowPos).getBlock().equals(Blocks.IRON_BLOCK)) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
- world.setBlockState(belowPos, ModBlocks.ironanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2);
- world.playEvent(1031, pos, 0);
- //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
- return true;
- }
- if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) {
- if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) {
-
- TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
-
- if (tile.getSlotStack(6).isEmpty() &&
- tile.getSlotStack(7).isEmpty() &&
- tile.getSlotStack(8).isEmpty() &&
- tile.getSlotStack(11).isEmpty() &&
- tile.getSlotStack(12).isEmpty() &&
- tile.getSlotStack(13).isEmpty() &&
- tile.getSlotStack(16).isEmpty() &&
- tile.getSlotStack(17).isEmpty() &&
- tile.getSlotStack(18).isEmpty()
- ) {
- player.swingArm(hand);
- world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
-
- Block tempBlock = ModBlocks.wootzchunk;
- tempBlock.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true);
-
- tile.setSlotStack(6, new ItemStack(tempBlock, 1));
- tile.setSlotStack(7, new ItemStack(tempBlock, 1));
- tile.setSlotStack(8, new ItemStack(tempBlock, 1));
- tile.setSlotStack(11, new ItemStack(tempBlock, 1));
- tile.setSlotStack(12, new ItemStack(tempBlock, 1));
- tile.setSlotStack(13, new ItemStack(tempBlock, 1));
- tile.setSlotStack(16, new ItemStack(tempBlock, 1));
- tile.setSlotStack(17, new ItemStack(tempBlock, 1));
- tile.setSlotStack(18, new ItemStack(tempBlock, 1));
- world.playEvent(1031, pos, 0);
- return true;
- }
- }
- }
-
- }
- return false;
- }
- };
-
- ironchunk = new IngotBall(Material.IRON, "ironchunk", 5.0F, "small");
- ironcleanchunk = new IngotBall(Material.IRON, "ironcleanchunk", 5.0F, "small");
- steelchunk = new IngotBall(Material.IRON, "steelchunk", 6.0f,"small");
- wootzchunk = new IngotBall(Material.IRON, "wootzchunk", 6.0f,"small");
-*/
-
stoneanvil = new AnvilStone(Material.ANVIL, "stoneanvil", 5.0f, true);
- ironanvil = new AnvilIron(Material.ANVIL, "ironanvil", 6.0f, true);
- //ironballitemcool = new ItemBlockIngotBall(ironball);
- //ironballitemhot = new ItemBlockIngotBall(ironball);
+ //ironanvil = new AnvilIron(Material.ANVIL, "ironanvil", 6.0f, true);
+
+ workbench = new Workbench(Material.WOOD, "toolbench");
+
yewstave = new YewStave(Material.WOOD, "yewstave", 3.0F);
}
@@ -377,6 +94,13 @@ public class ModBlocks {
registerBlockWithItem(blockbreaker);
registerBlockWithItem(castingform);
+ registerBlockWithItem(copperchisel);
+ registerBlockWithItem(bronzechisel);
+ registerBlockWithItem(ironchisel);
+ registerBlockWithItem(cleanironchisel);
+ registerBlockWithItem(steelchisel);
+ registerBlockWithItem(wootzchisel);
+
registerBlockWithItem(pistonbellowsoak);
registerBlockWithItem(pistonbellowsjungle);
registerBlockWithItem(pistonbellowsbirch);
@@ -384,47 +108,10 @@ public class ModBlocks {
registerBlockWithItem(pistonbellowsdarkoak);
registerBlockWithItem(pistonbellowsacacia);
- /*registerBlockWithItem(emptycrucible);
- registerBlockWithItem(emptycruciblehot);
- registerBlockWithItem(emptycruciblecracked);
- registerBlockWithItem(emptycruciblecrackedhot);
-
- registerBlockWithItem(rawbronzecrucible);
- registerBlockWithItem(hotbronzecrucible);
- registerBlockWithItem(hotcookedbronzecrucible);
-
- registerBlockWithItem(rawbronzecrucible_diamond);
- registerBlockWithItem(hotbronzecrucible_diamond);
- registerBlockWithItem(hotcookedbronzecrucible_diamond);
-
- registerBlockWithItem(rawbronzecrucible_emerald);
- registerBlockWithItem(hotbronzecrucible_emerald);
- registerBlockWithItem(hotcookedbronzecrucible_emerald);
-
- registerBlockWithItem(rawbronzecrucible_redstone);
- registerBlockWithItem(hotbronzecrucible_redstone);
- registerBlockWithItem(hotcookedbronzecrucible_redstone);
-
- registerBlockWithItem(rawbronzecrucible_lapis);
- registerBlockWithItem(hotbronzecrucible_lapis);
- registerBlockWithItem(hotcookedbronzecrucible_lapis);
-*/
- //registerBlockWithItem(ironball);
- //registerBlockWithItem(ironchunk);
-
- //registerBlockWithItem(ironcleanball);
- //registerBlockWithItem(ironcleanchunk);
-
- //registerBlockWithItem(steelball);
- //registerBlockWithItem(steelchunk);
-
- //registerBlockWithItem(wootzball);
- //registerBlockWithItem(wootzchunk);
- //registerBlockWithItemSubType(ironball, ironballitemcool, "ironcool");
- //registerBlockWithItemSubType(ironball, ironballitemhot, "ironhot");
-
registerBlockWithItem(stoneanvil);
- registerBlockWithItem(ironanvil);
+ //registerBlockWithItem(ironanvil);
+
+ registerBlockWithItem(workbench);
registerBlockWithItem(yewstave);
}
@@ -436,6 +123,13 @@ public class ModBlocks {
registerRender(forge_adobe);
registerRender(castingform);
+ registerRender(copperchisel);
+ registerRender(bronzechisel);
+ registerRender(ironchisel);
+ registerRender(cleanironchisel);
+ registerRender(steelchisel);
+ registerRender(wootzchisel);
+
registerRender(blockbreaker);
registerRender(pistonbellowsoak);
registerRender(pistonbellowsjungle);
@@ -446,49 +140,10 @@ public class ModBlocks {
registerRender(bloomery_brick);
registerRender(bloomery_adobe);
- /*
- registerRender(emptycrucible);
- registerRender(emptycruciblehot);
- registerRender(emptycruciblecracked);
- registerRender(emptycruciblecrackedhot);
-
- registerRender(rawbronzecrucible);
- registerRender(hotbronzecrucible);
- registerRender(hotcookedbronzecrucible);
-
- registerRender(rawbronzecrucible_diamond);
- registerRender(hotbronzecrucible_diamond);
- registerRender(hotcookedbronzecrucible_diamond);
-
- registerRender(rawbronzecrucible_emerald);
- registerRender(hotbronzecrucible_emerald);
- registerRender(hotcookedbronzecrucible_emerald);
-
- registerRender(rawbronzecrucible_redstone);
- registerRender(hotbronzecrucible_redstone);
- registerRender(hotcookedbronzecrucible_redstone);
-
- registerRender(rawbronzecrucible_lapis);
- registerRender(hotbronzecrucible_lapis);
- registerRender(hotcookedbronzecrucible_lapis);
- */
- //registerRender(ironball);
- //registerRender(ironchunk);
-
- //registerRender(ironcleanball);
- //registerRender(ironcleanchunk);
-
- //registerRender(steelball);
- //registerRender(steelchunk);
-
- //registerRender(wootzball);
- //registerRender(wootzchunk);
-
- //registerRenderCustom(ironballitemcool, 0, new ModelResourceLocation(ironballitemcool.getUnlocalizedName()));
- //registerRenderCustom(ironballitemhot, 1, new ModelResourceLocation(ironballitemhot.getUnlocalizedName()));
registerRender(stoneanvil);
- registerRender(ironanvil);
+ //registerRender(ironanvil);
+ registerRender(workbench);
registerRender(yewstave);
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModConfig.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModConfig.java
index e4eb2722..ad5a7adf 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModConfig.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModConfig.java
@@ -1,47 +1,72 @@
package nmd.primal.forgecraft.init;
import net.minecraftforge.common.config.Config;
-import nmd.primal.forgecraft.ForgeCraft;
import nmd.primal.forgecraft.ModInfo;
@Config(modid = ModInfo.MOD_ID, name = ModInfo.MOD_CONFIG, category = "")
@Config.LangKey("forgecraft.config.title")
-@SuppressWarnings("unused")
-public class ModConfig
+
+
+public final class ModConfig
{
- static {
- ForgeCraft.LOGGER.info("Loading Config File: " + ModInfo.MOD_CONFIG + ".cfg");
- }
+ //static {
+ // ForgeCraft.LOGGER.info("Loading Config File: " + ModInfo.MOD_CONFIG + ".cfg");
+ //}
/**
* Main Config Sections
*/
public static Compatibility compatibility;
- public static ModConfig.Features features;
+ public static Features features;
/**
* Options related to compatibility with mods and vanilla features
*/
public static class Compatibility
{
- @Config.Comment({"Ore Dictionary Wootz steel for compatibility with common mod steel"})
- public static boolean COMPAT_DICTIONARY_WOOTZ_STEEL;
+ @Config.Comment({"Ore Dictionary Wrought Iron to common Iron"})
+ public static boolean COMPAT_DICTIONARY_WROUGHT_IRON = true;
+
+ //@Config.Comment({"Ore Dictionary Damascus Steel to common Steel"})
+ //public static boolean COMPAT_DICTIONARY_DAMASCUS_STEEL = true;
}
/**
* Customize main features of the mod
*/
+
public static class Features
{
- @Config.Comment({"Smoke is produced from various forge blocks when active"})
- public static boolean FEATURE_ENABLE_SMOKE = true;
+// @Config.RequiresMcRestart
+// @Config.Comment({"Config to allow or dissallow Copper Tools"})
+// public static boolean ENABLE_COPPER_TOOLS = false;
- @Config.RequiresMcRestart
- @Config.Comment({"Various forge blocks will set fire to their surroundings when active"})
- public static boolean FEATURE_ENABLE_FIRE = true;
-
- @Config.Comment({"Sample config for a numeric range"})
- @Config.RangeInt(min = 0, max = 1000)
- public static int FEATURE_HEAT_RANGE = 0;
}
-}
\ No newline at end of file
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java
index 64606673..b82420d1 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java
@@ -1,19 +1,15 @@
package nmd.primal.forgecraft.init;
-import net.minecraft.block.BlockPlanks;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.Ingredient;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.oredict.OreDictionary;
-import net.minecraftforge.oredict.OreIngredient;
import nmd.primal.core.api.PrimalAPI;
import nmd.primal.core.common.recipes.irecipe.RecipeHandler;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.crafting.CastingCrafting;
-import nmd.primal.forgecraft.crafting.CrucibleCrafting;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
import java.util.Random;
@@ -30,7 +26,6 @@ public class ModCrafting{
NBTTagCompound newTag = new NBTTagCompound();
-
NBTTagCompound setHot = new NBTTagCompound();
setHot.setBoolean("hot", true);
@@ -66,7 +61,7 @@ public class ModCrafting{
- ItemStack[] toolArray = new ItemStack[20];
+ ItemStack[] toolArray = new ItemStack[24];
ItemStack[] hotToolArray = new ItemStack[16];
ItemStack bronzepickaxehead = new ItemStack(ModItems.bronzepickaxehead, 1);
@@ -134,6 +129,18 @@ public class ModCrafting{
wootzhoehead.setTagCompound(newTag);
toolArray[19] = wootzhoehead;
+ ItemStack copperpickaxehead = new ItemStack(ModItems.copperpickaxehead, 1);
+ copperpickaxehead.setTagCompound(newTag);
+ toolArray[20] = copperpickaxehead;
+ ItemStack copperaxehead = new ItemStack(ModItems.copperaxehead, 1);
+ copperaxehead.setTagCompound(newTag);
+ toolArray[21] = copperaxehead;
+ ItemStack coppershovelhead = new ItemStack(ModItems.coppershovelhead, 1);
+ coppershovelhead.setTagCompound(newTag);
+ toolArray[22] =coppershovelhead ;
+ ItemStack copperhoehead = new ItemStack(ModItems.copperhoehead, 1);
+ copperhoehead.setTagCompound(newTag);
+ toolArray[23] = copperhoehead;
ItemStack hotpickaxehead = pickaxehead.copy();
hotToolArray[0] =hotpickaxehead;
@@ -174,15 +181,16 @@ public class ModCrafting{
for(ItemStack temp : toolArray) {
- NBTTagCompound tags = new NBTTagCompound();
- temp.getTagCompound().setTag("tags", tags);
+ NBTTagCompound tags = temp.getTagCompound();
+ tags.setTag("tags", tags);
- temp.getSubCompound("tags").setBoolean("hot", false);
- temp.getSubCompound("tags").setBoolean("emerald", false);
- temp.getSubCompound("tags").setInteger("diamond", 0);
- temp.getSubCompound("tags").setInteger("redstone", 0);
- temp.getSubCompound("tags").setInteger("lapis", 0);
- temp.getSubCompound("tags").setInteger("modifiers", 0);
+ tags.getCompoundTag("tags").setBoolean("hot", false);
+ tags.getCompoundTag("tags").setBoolean("emerald", false);
+ tags.getCompoundTag("tags").setInteger("diamond", 0);
+ tags.getCompoundTag("tags").setInteger("redstone", 0);
+ tags.getCompoundTag("tags").setInteger("lapis", 0);
+ tags.getCompoundTag("tags").setInteger("modifiers", 0);
+ temp.setTagCompound(tags);
}
bronzepickaxehead = toolArray[0];
@@ -210,6 +218,17 @@ public class ModCrafting{
wootzshovelhead = toolArray[18] ;
wootzhoehead = toolArray[19];
+ copperpickaxehead = toolArray[20];
+ copperaxehead = toolArray[21];
+ coppershovelhead = toolArray[22];
+ copperhoehead = toolArray[23];
+
+ ItemStack ironsledgehammer = new ItemStack(ModItems.ironsledgehammer, 1);
+ ItemStack cleanironsledgehammer = new ItemStack(ModItems.cleanironsledgehammer, 1);
+ ItemStack steelsledgehammer = new ItemStack(ModItems.steelsledgehammer, 1);
+ ItemStack wootzsledgehammer = new ItemStack(ModItems.wootzsledgehammer, 1);
+
+
for(ItemStack temp : hotToolArray) {
//NBTTagCompound newTag = new NBTTagCompound();
NBTTagCompound tags = new NBTTagCompound();
@@ -246,288 +265,6 @@ public class ModCrafting{
hotwootzshovelhead = hotToolArray[14] ;
hotwootzhoehead = hotToolArray[15];
- //RecipeHandler.addSmelting(ModItems.softcrucible, new ItemStack(ModBlocks.nbtCrucible, 1));
-
- /***********************/
- /***CRUCIBLE CRAFTING***/
- /***********************/
-
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("oreIron"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(Blocks.IRON_ORE, 1),
- new ItemStack(ModItems.ironingotball, 1),
- 1400,
- 1200,
- 800);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustIron"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(Blocks.IRON_ORE, 1),
- new ItemStack(ModItems.ironingotball, 1),
- 1250,
- 1100,
- 800);
-
- CrucibleCrafting.addRecipe(
- Ingredient.fromStacks(new ItemStack(ModItems.brokenwroughtirontool, 1)),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- new ItemStack(ModItems.ironingotball, 1),
- 1250,
- 1100,
- 800);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustIron"),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.IRON_DUST, 1),
- new ItemStack(ModItems.ironcleaningotball, 1),
- 1550,
- 1200,
- 800);
-
- CrucibleCrafting.addRecipe(
- Ingredient.fromStacks(new ItemStack(ModItems.brokencleanirontool, 1)),
- new OreIngredient("nuggetIron"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- new ItemStack(ModItems.ironcleaningotball, 1),
- 1550,
- 1200,
- 800);
-
- CrucibleCrafting.addRecipe(
- Ingredient.fromStacks(new ItemStack(ModItems.ironcleaningotball, 1)),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_HIGH, 1)),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(ModItems.ironcleaningotball, 1),
- new ItemStack(ModItems.steelingotball, 1),
- 2100,
- 1500,
- 1000);
-
- CrucibleCrafting.addRecipe(
- Ingredient.fromStacks(new ItemStack(ModItems.brokensteeltool, 1)),
- new OreIngredient("nuggetSteel"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- new ItemStack(ModItems.steelingotball, 1),
- 2100,
- 1500,
- 1000);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustMagnetite"),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
- new ItemStack(ModItems.wootzingotball, 1),
- 2100,
- 1800,
- 1500);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("magnetite"),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, BlockPlanks.EnumType.JUNGLE.getMetadata())),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
- new ItemStack(ModItems.wootzingotball, 1),
- 2100,
- 1800,
- 1500);
-
- CrucibleCrafting.addRecipe(
- Ingredient.fromStacks(new ItemStack(ModItems.brokenwootztool, 1)),
- new OreIngredient("nuggetWootz"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- new ItemStack(ModItems.wootzingotball, 1),
- 2100,
- 1800,
- 1500);
-
-//TODO change plate recipe
-
- NBTTagCompound tagBronzeDefault = new NBTTagCompound();
- tagBronzeDefault.setString("upgrades", "");
- tagBronzeDefault.setBoolean("hot", false);
- ItemStack defaultBronze = new ItemStack(ModItems.bronzeingotball, 1);
- defaultBronze.setTagCompound(tagBronzeDefault.copy());
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustTin"),
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- defaultBronze,
- 1100,
- 800,
- 600);
-
-
- /*CrucibleCrafting.addRecipe(
- new OreIngredient("oreBronze"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- defaultBronze,
- 1100,
- 800,
- 600);
- */
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("ingotBronze"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- defaultBronze,
- 1100,
- 800,
- 600);
-
- //NBTTagCompound tag = new NBTTagCompound();
- //tag.setString("upgrades", "redstone");
- //ItemStack redBronze = new ItemStack(ModItems.bronzeingotball, 1);
- //redBronze.setTagCompound(tag.copy());
- ItemStack redBronze = defaultBronze.copy();
- redBronze.getTagCompound().setString("upgrades", "redstone");
- CrucibleCrafting.addRecipe(
- new OreIngredient("ingotBronze"),
- new OreIngredient("dustRedstone"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- redBronze,
- 1100,
- 800,
- 600);
-
- ItemStack diamondBronze = defaultBronze.copy();
- diamondBronze.getTagCompound().setString("upgrades", "diamond");
- CrucibleCrafting.addRecipe(
- new OreIngredient("ingotBronze"),
- new OreIngredient("flakeDiamond"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- diamondBronze,
- 1100,
- 800,
- 600);
-
- ItemStack emeraldBronze = defaultBronze.copy();
- emeraldBronze.getTagCompound().setString("upgrades", "emerald");
- CrucibleCrafting.addRecipe(
- new OreIngredient("ingotBronze"),
- new OreIngredient("flakeEmerald"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- emeraldBronze,
- 1100,
- 800,
- 600);
-
- ItemStack lapisBronze = defaultBronze.copy();
- lapisBronze.getTagCompound().setString("upgrades", "lapis");
- CrucibleCrafting.addRecipe(
- new OreIngredient("ingotBronze"),
- new OreIngredient("dustLapis"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- lapisBronze,
- 1100,
- 800,
- 600);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustTin"),
- new OreIngredient("dustRedstone"),
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- redBronze,
- 1100,
- 800,
- 600);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustTin"),
- new OreIngredient("flakeDiamond"),
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- diamondBronze,
- 1100,
- 800,
- 600);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustTin"),
- new OreIngredient("flakeEmerald"),
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- emeraldBronze,
- 1100,
- 800,
- 600);
-
- CrucibleCrafting.addRecipe(
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustTin"),
- new OreIngredient("dustLapis"),
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- lapisBronze,
- 1100,
- 800,
- 600);
-
-
/***CASTING FORM***/
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
true, new Object[]{" S ", "S S", " S ",
@@ -606,440 +343,8 @@ public class ModCrafting{
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.stoneanvil, 1),
" ", " I ", " S ", 'I', "ingotIron", 'S', Blocks.STONE);
-
-
- /***************************************************************
- * TOOL CRAFTING RECIPES
- ***************************************************************/
-
- /***Pickaxe Crafting***/
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.wootzpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
- ('T'), ModItems.pickaxehead,
- ('S'), Items.STICK);
-
- /***Axe Crafting***/
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.wootzaxehead,1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S",
- ('T'), ModItems.ironaxehead,
- ('S'), Items.STICK);
-
- /***Shovel Crafting***/
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.wootzshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S",
- ('T'), ModItems.ironshovelhead,
- ('S'), Items.STICK);
-
- /***Hoe Crafting***/
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
- ('T'), new ItemStack(ModItems.wootzhoehead, 1, OreDictionary.WILDCARD_VALUE),
- ('S'), "stickTreatedWood",
- ('C'), "cordageGeneral");
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S",
- ('T'), ModItems.ironhoehead,
- ('S'), Items.STICK);
-
-
- /***************************************************************
- * TOOL DISASSEMBLY RECIPES
- ***************************************************************/
- //RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
- // " ", " X ", " ", 'X', ModItems.ironaxe);
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE));
-
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE));
-
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE));
-
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE));
-
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.wootzaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.wootzpickaxe, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzshovelhead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE));
-
- RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzhoehead, 1, OreDictionary.WILDCARD_VALUE),
- true, "X", ('X'), new ItemStack(ModItems.wootzhoe, 1, OreDictionary.WILDCARD_VALUE));
-
-
- /***************************************************************/
-
- /***Bloomery Crafting***/
-/*
-//Makes the Empty Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModItems.softcrucible, 1),
- new ItemStack(ModBlocks.emptycruciblehot, 1),
- new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
- new ItemStack(ModBlocks.emptycrucible, 1),
- 2000,
- 1600,
- 600,
- 0.25f,
- 0.25f);
-
-//Makes the Cracked Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.emptycruciblehot, 1),
- new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
- new ItemStack(ModBlocks.emptycruciblecrackedhot, 1),
- new ItemStack(ModBlocks.emptycruciblecracked, 1),
- 2250,
- 9000,
- 600,
- 0.0f,
- 0.0f);
-
- /*
-//Makes the Hot Iron Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawironcrucible, 1),
- new ItemStack(ModBlocks.hotironcrucible, 1),
- new ItemStack(ModBlocks.hotironcrucible, 1),
- new ItemStack(ModBlocks.rawironcrucible, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Iron Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotironcrucible, 1),
- new ItemStack(ModBlocks.hotcookedironcrucible, 1),
- new ItemStack(ModBlocks.failedironcruciblehot, 1),
- new ItemStack(ModBlocks.coolironcrucible, 1),
- 1400,
- 1200,
- 800,
- 0.33f,
- 0.5f
- );
-
-//Makes the Hot Clean Iron Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawcleanironcrucible, 1),
- new ItemStack(ModBlocks.hotcleanironcrucible, 1),
- new ItemStack(ModBlocks.hotcleanironcrucible, 1),
- new ItemStack(ModBlocks.rawcleanironcrucible, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Clean Iron Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotcleanironcrucible, 1),
- new ItemStack(ModBlocks.hotcookedcleanironcrucible, 1),
- new ItemStack(ModBlocks.failedcleanironcrucible, 1),
- new ItemStack(ModBlocks.coolcleanironcrucible, 1),
- 1550,
- 1200,
- 800,
- 0.33f,
- 0.5f
- );
-
- //Makes the Hot Steel Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawsteelcrucible, 1),
- new ItemStack(ModBlocks.hotsteelcrucible, 1),
- new ItemStack(ModBlocks.hotsteelcrucible, 1),
- new ItemStack(ModBlocks.rawsteelcrucible, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Steel Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotsteelcrucible, 1),
- new ItemStack(ModBlocks.hotcookedsteelcrucible, 1),
- new ItemStack(ModBlocks.failedsteelcrucible, 1),
- new ItemStack(ModBlocks.coolsteelcrucible, 1),
- 2100,
- 1500,
- 1000,
- 0.2f,
- 0.25f
- );
- */
- /*
- //Makes the Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawbronzecrucible, 1),
- new ItemStack(ModBlocks.hotbronzecrucible, 1),
- new ItemStack(ModBlocks.hotbronzecrucible, 1),
- new ItemStack(ModBlocks.rawbronzecrucible, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotbronzecrucible, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible, 1),
- new ItemStack(ModBlocks.rawbronzecrucible, 1),
- 1100,
- 800,
- 600,
- 0.5f,
- 0.5f
- );
-
- //Makes the Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawbronzecrucible_diamond, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_diamond, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_diamond, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_diamond, 1),
- 800,
- 800,
- 500,
- 0.5f,
- 0.5f
- );
-
-//Makes the Finished Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotbronzecrucible_diamond, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_diamond, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_diamond, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_diamond, 1),
- 1100,
- 1100,
- 600,
- 0.5f,
- 0.5f
- );
- //Makes the Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawbronzecrucible_redstone, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_redstone, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_redstone, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_redstone, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotbronzecrucible_redstone, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_redstone, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_redstone, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_redstone, 1),
- 1100,
- 1100,
- 600,
- 0.5f,
- 0.5f
- );
-//Makes the Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawbronzecrucible_emerald, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_emerald, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_emerald, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_emerald, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotbronzecrucible_emerald, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_emerald, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_emerald, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_emerald, 1),
- 1100,
- 1100,
- 600,
- 0.5f,
- 0.5f
- );
- //Makes the Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.rawbronzecrucible_lapis, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_lapis, 1),
- new ItemStack(ModBlocks.hotbronzecrucible_lapis, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_lapis, 1),
- 800,
- 20,
- 500,
- 0.5f,
- 0.0f
- );
-
-//Makes the Finished Hot Bronze Crucible
- BloomeryCrafting.addRecipe(
- new ItemStack(ModBlocks.hotbronzecrucible_lapis, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_lapis, 1),
- new ItemStack(ModBlocks.hotcookedbronzecrucible_lapis, 1),
- new ItemStack(ModBlocks.rawbronzecrucible_lapis, 1),
- 1100,
- 1100,
- 600,
- 0.5f,
- 0.5f
- );
- */
-
+ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.workbench, 1),
+ "ss ", "rrr", "f f", 's', "slabWood", 'r', Blocks.STONE_SLAB, 'f', "fenceWood");
/******************************************************************************
CASTING
@@ -1120,11 +425,131 @@ public class ModCrafting{
new ItemStack(PrimalAPI.Items.BRONZE_PLATE, 1)
);
+ //Casting Pickaxe
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ muddd, muddd, muddd, muddd, muddd,
+ muddd, empty, empty, empty, muddd,
+ empty, muddd, muddd, muddd, empty,
+ muddd, muddd, muddd, muddd, muddd,
+ muddd, muddd, muddd, muddd, muddd},
+ copperpickaxehead
+ );
+
+ //Casting Shovel
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ muddd, muddd, muddd, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, muddd, empty, muddd},
+ coppershovelhead
+ );
+
+ //Casting Axe
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ muddd, empty, empty, muddd, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, muddd, muddd, muddd,
+ muddd, muddd, muddd, muddd, muddd},
+ copperaxehead
+ );
+
+ //Casting Hoe
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ muddd, muddd, muddd, empty, empty,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, empty, muddd, muddd, muddd,
+ empty, muddd, muddd, muddd, muddd,
+ muddd, muddd, muddd, muddd, muddd},
+ copperhoehead
+ );
+/*
+ //Casting Gladius
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[] {
+ muddd,muddd,muddd,muddd,muddd,
+ muddd,muddd,empty,muddd,muddd,
+ muddd,muddd,empty,muddd,muddd,
+ muddd,empty,empty,empty,muddd,
+ muddd,muddd,empty,muddd,muddd },
+ new ItemStack(ModItems.coppergladius, 1)
+ );
+*/
+
+ //Casting Bronze Plate
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ muddd, muddd, muddd, muddd, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, muddd, muddd, muddd, muddd},
+ new ItemStack(PrimalAPI.Items.COPPER_PLATE, 1)
+ );
+
+ /***CASTING SLEDGEHAMMER***/
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ empty, empty, empty, empty, empty,
+ muddd, empty, empty, empty, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd},
+ new ItemStack(ModItems.coppersledgehammer, 1)
+ );
+ /***CASTING SLEDGEHAMMER***/
+ CastingCrafting.addRecipe(
+ new ItemStack(ModItems.bronzeingotball, 1),
+ new Item[]{
+ empty, empty, empty, empty, empty,
+ muddd, empty, empty, empty, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd},
+ new ItemStack(ModItems.bronzesledgehammer, 1)
+ );
+
+ /***CASTING CHISEL***/
+ CastingCrafting.addRecipe(
+ new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
+ new Item[]{
+ muddd, muddd, empty, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd},
+ new ItemStack(ModBlocks.copperchisel, 1)
+ );
+ /***CASTING CHISEL***/
+ CastingCrafting.addRecipe(
+ new ItemStack(ModItems.bronzeingotball, 1),
+ new Item[]{
+ muddd, muddd, empty, muddd, muddd,
+ muddd, muddd, empty, muddd, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd,
+ muddd, empty, empty, empty, muddd},
+ new ItemStack(ModBlocks.bronzechisel, 1)
+ );
+
/******************************************************************************
FORGING
******************************************************************************/
-//Makes a Hot Iron Ingot
+ //TODO allow oreDict checks against my Item Ingots
+ /**Makes a Hot Iron Ingot**/
ForgeCrafting.addRecipe(
ModItems.ironingotball,
//800, 200
@@ -1135,7 +560,7 @@ public class ModCrafting{
1.0f,
1.0f
);
-//Makes a Hot Clean Iron Ingot
+ /**Makes a Hot Clean Iron Ingot**/
ForgeCrafting.addRecipe(
ModItems.ironcleaningotball,
hotCleanIronIngot,
@@ -1390,7 +815,101 @@ public class ModCrafting{
ANVILING
******************************************************************************/
+ /*** SLEDGEHAMMER ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ hotChunk,hotChunk,hotIronIngot,hotChunk,hotChunk,
+ emptyAir,hotChunk,hotIronIngot,hotChunk,emptyAir,
+ emptyAir,emptyAir,hotChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotChunk,emptyAir,emptyAir },
+ new ItemStack(ModItems.ironsledgehammer, 1),
+ "null"
+ );
+ /*** SLEDGEHAMMER ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ hotCleanChunk,hotCleanChunk,hotCleanIronIngot,hotCleanChunk,hotCleanChunk,
+ emptyAir,hotCleanChunk,hotCleanIronIngot,hotCleanChunk,emptyAir,
+ emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir },
+ new ItemStack(ModItems.cleanironsledgehammer, 1),
+ "null"
+ );
+
+ /*** SLEDGEHAMMER ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ hotSteelChunk,hotSteelChunk,hotSteelIngot,hotSteelChunk,hotSteelChunk,
+ emptyAir,hotSteelChunk,hotSteelIngot,hotSteelChunk,emptyAir,
+ emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir },
+ new ItemStack(ModItems.steelsledgehammer, 1),
+ "null"
+ );
+
+ /*** SLEDGEHAMMER ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ hotWootzChunk,hotWootzChunk,hotWootzIngot,hotWootzChunk,hotWootzChunk,
+ emptyAir,hotWootzChunk,hotWootzIngot,hotWootzChunk,emptyAir,
+ emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir },
+ new ItemStack(ModItems.wootzsledgehammer, 1),
+ "null"
+ );
+
+ /*** CHISEL ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ emptyAir,emptyAir,hotChunk,emptyAir,emptyAir,
+ emptyAir,hotChunk,hotChunk,hotChunk,emptyAir,
+ emptyAir,hotChunk,hotChunk,hotChunk,emptyAir,
+ emptyAir,emptyAir,hotIronIngot,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotIronIngot,emptyAir,emptyAir },
+ new ItemStack(ModBlocks.ironchisel, 1),
+ "null"
+ );
+
+ /*** CHISEL ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir,
+ emptyAir,hotCleanChunk,hotCleanChunk,hotCleanChunk,emptyAir,
+ emptyAir,hotCleanChunk,hotCleanChunk,hotCleanChunk,emptyAir,
+ emptyAir,emptyAir,hotCleanIronIngot,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotCleanIronIngot,emptyAir,emptyAir },
+ new ItemStack(ModBlocks.cleanironchisel, 1),
+ "null"
+ );
+
+ /*** CHISEL ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
+ emptyAir,hotSteelChunk,hotSteelChunk,hotSteelChunk,emptyAir,
+ emptyAir,hotSteelChunk,hotSteelChunk,hotSteelChunk,emptyAir,
+ emptyAir,emptyAir,hotSteelIngot,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotSteelIngot,emptyAir,emptyAir },
+ new ItemStack(ModBlocks.steelchisel, 1),
+ "null"
+ );
+
+ /*** CHISEL ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
+ emptyAir,hotWootzChunk,hotWootzChunk,hotWootzChunk,emptyAir,
+ emptyAir,hotWootzChunk,hotWootzChunk,hotWootzChunk,emptyAir,
+ emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir },
+ new ItemStack(ModBlocks.wootzchisel, 1),
+ "null"
+ );
/*** ForgeHammer ***/
AnvilCrafting.addRecipe(
@@ -1452,6 +971,30 @@ public class ModCrafting{
"null"
);
+ /*** Bucket ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
+ emptyAir,hotCleanChunk,emptyAir,hotCleanChunk,emptyAir,
+ emptyAir,hotCleanChunk,emptyAir,hotCleanChunk,emptyAir,
+ emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,emptyAir,emptyAir,emptyAir },
+ new ItemStack(Items.BUCKET, 1),
+ "null"
+ );
+
+ /*** Bucket ***/
+ AnvilCrafting.addRecipe(
+ new ItemStack [] {
+ emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
+ emptyAir,hotSteelChunk,emptyAir,hotSteelChunk,emptyAir,
+ emptyAir,hotSteelChunk,emptyAir,hotSteelChunk,emptyAir,
+ emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
+ emptyAir,emptyAir,emptyAir,emptyAir,emptyAir },
+ new ItemStack(Items.BUCKET, 1),
+ "null"
+ );
+
/*** Primal Plate ***/
AnvilCrafting.addRecipe(
new ItemStack [] {
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java
new file mode 100644
index 00000000..6c0d4eae
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModDictionary.java
@@ -0,0 +1,36 @@
+package nmd.primal.forgecraft.init;
+
+import net.minecraftforge.oredict.OreDictionary;
+
+import static nmd.primal.forgecraft.init.ModConfig.Compatibility.COMPAT_DICTIONARY_WROUGHT_IRON;
+
+/**
+ * Created by mminaie on 2/7/17.
+ */
+public class ModDictionary {/*******************************************************************************
+ * Register Only Vanilla OreDictionary Entries Here
+ * Mod Items/Blocks have their names added through the respective
+ * registration methods as a list of comma delineated strings.
+ *
+ * EXAMPLE:
+ * LEATHER_CORDAGE = registerItem(new PrimalItem("leather_cordage"), "cordageGeneral, cordageLeather");
+ *
+ */
+ public static void registerDictionaryNames()
+ {
+ if(COMPAT_DICTIONARY_WROUGHT_IRON) {
+ OreDictionary.registerOre("ingotIron", ModItems.ironingotball);
+ OreDictionary.registerOre("nuggetIron", ModItems.wroughtironchunk);
+ }
+ OreDictionary.registerOre("ingotIron", ModItems.ironcleaningotball);
+ OreDictionary.registerOre("nuggetIron", ModItems.ironcleanchunk);
+ OreDictionary.registerOre("ingotSteel", ModItems.steelingotball);
+ OreDictionary.registerOre("nuggetSteel", ModItems.steelchunk);
+ OreDictionary.registerOre("ingotBronze", ModItems.bronzeingotball);
+ OreDictionary.registerOre("nuggetBronze", ModItems.bronzechunk);
+ //if(COMPAT_DICTIONARY_DAMASCUS_STEEL) {
+ OreDictionary.registerOre("ingotWootz", ModItems.wootzingotball);
+ OreDictionary.registerOre("nuggetWootz", ModItems.wootzchunk);
+ //}
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java
index 36889de9..dc21d9e8 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java
@@ -12,17 +12,17 @@ import nmd.primal.core.api.PrimalAPI;
import nmd.primal.forgecraft.items.*;
import nmd.primal.forgecraft.items.armor.CustomHelmet;
import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
-import nmd.primal.forgecraft.items.parts.BronzeToolPart;
import nmd.primal.forgecraft.items.parts.ToolPart;
-import nmd.primal.forgecraft.items.tools.*;
-import nmd.primal.forgecraft.items.weapons.CustomShield;
-import nmd.primal.forgecraft.items.weapons.CustomSword;
-import nmd.primal.forgecraft.items.weapons.Longbow;
-import nmd.primal.forgecraft.items.weapons.SlayerSword;
+import nmd.primal.forgecraft.items.tools.CustomAxe;
+import nmd.primal.forgecraft.items.tools.CustomHoe;
+import nmd.primal.forgecraft.items.tools.CustomPickaxe;
+import nmd.primal.forgecraft.items.tools.CustomShovel;
+import nmd.primal.forgecraft.items.weapons.*;
/**
* Created by kitsu on 11/26/2016.
*/
+
public class ModItems {
//public static Item test;
@@ -47,6 +47,24 @@ public class ModItems {
public static Item wootzingotball;
public static Item wootzchunk;
+ public static Item ironsledgehammer;
+ public static Item coppersledgehammer;
+ public static Item bronzesledgehammer;
+ public static Item cleanironsledgehammer;
+ public static Item steelsledgehammer;
+ public static Item wootzsledgehammer;
+
+ public static Item copperpickaxehead;
+ public static Item copperaxehead;
+ public static Item coppershovelhead;
+ public static Item copperhoehead;
+
+ public static Item copperpickaxe;
+ public static Item copperaxe;
+ public static Item coppershovel;
+ public static Item copperhoe;
+
+
public static Item pickaxehead;
public static Item ironaxehead;
public static Item ironshovelhead;
@@ -113,6 +131,7 @@ public class ModItems {
public static Item steelslayer;
public static Item wootzslayer;
+ public static Item brokencoppertool;
public static Item brokenbronzetool;
public static Item brokenwroughtirontool;
public static Item brokencleanirontool;
@@ -128,6 +147,7 @@ public class ModItems {
public static Item rawlongbow;
public static Item unstrunglongbow;
public static Item longbow;
+ public static Item wootzworkblade;
public static Item leatherhelmet;
//public static Item testleggings;
@@ -135,6 +155,7 @@ public class ModItems {
//public static Item forgingmanual;
public static void init() {
+
//OBJLoader.INSTANCE.addDomain(ModInfo.MOD_ID);
//pistonbellows = new ItemBellowsHandle("pistonbellows");
itemnbtcrucible = new ItemNBTCrucible("itemnbtcrucible", ModBlocks.nbtCrucible);
@@ -146,18 +167,25 @@ public class ModItems {
forgehammer = new ForgeHammer("forgehammer");
castingmud = new BaseItem("castingmud");
- rawlongbow = new BaseItem("rawlongbow");
+ rawlongbow = new RawLongbow("rawlongbow");
unstrunglongbow = new BaseItem("unstrunglongbow");
longbow = new Longbow("longbow");
//matchlockmusket = new Musket("matchlock_musket");
+ wootzworkblade = new Workblade("wootzworkblade", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, -1.0F).setFireProof(true);
+
/**********
TOOL PARTS
**********/
- bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "pickaxe");
- bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "axe");
- bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "shovel");
- bronzehoehead = new BronzeToolPart("bronzehoehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "hoe");
+ copperpickaxehead = new ToolPart("copperpickaxehead", PrimalAPI.ToolMaterials.TOOL_COPPER, "pickaxe");
+ copperaxehead = new ToolPart("copperaxehead", PrimalAPI.ToolMaterials.TOOL_COPPER, "axe");
+ coppershovelhead= new ToolPart("coppershovelhead", PrimalAPI.ToolMaterials.TOOL_COPPER, "shovel");
+ copperhoehead = new ToolPart("copperhoehead", PrimalAPI.ToolMaterials.TOOL_COPPER, "hoe");
+
+ bronzepickaxehead = new ToolPart("bronzepickaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "pickaxe");
+ bronzeaxehead = new ToolPart("bronzeaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "axe");
+ bronzeshovelhead = new ToolPart("bronzeshovelhead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "shovel");
+ bronzehoehead = new ToolPart("bronzehoehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "hoe");
pickaxehead = new ToolPart("ironpickaxehead", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, "pickaxe");
ironaxehead = new ToolPart("ironaxehead", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, "axe");
@@ -182,30 +210,41 @@ public class ModItems {
/**********
TOOLS
**********/
- bronzepickaxe = new BronzePickaxe("bronzepickaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzepickaxehead);
- bronzeaxe = new BronzeAxe("bronzeaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeaxehead);
- bronzeshovel = new BronzeShovel("bronzeshovel", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeshovelhead);
- bronzehoe = new BronzeHoe("bronzehoe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzehoehead);
+ copperpickaxe = new CustomPickaxe("copperpickaxe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
+ copperaxe = new CustomAxe("copperaxe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool, 4, -2.6F);
+ coppershovel = new CustomShovel("coppershovel", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
+ copperhoe = new CustomHoe("copperhoe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
+ coppersledgehammer = new SledgeHammer("coppersledgehammer", PrimalAPI.ToolMaterials.TOOL_COPPER, 12, -3.7D);
+
+ bronzepickaxe = new CustomPickaxe("bronzepickaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzepickaxehead);
+ bronzeaxe = new CustomAxe("bronzeaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeaxehead, 5, -2.4f);
+ bronzeshovel = new CustomShovel("bronzeshovel", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeshovelhead);
+ bronzehoe = new CustomHoe("bronzehoe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzehoehead);
+ bronzesledgehammer = new SledgeHammer("bronzesledgehammer", PrimalAPI.ToolMaterials.TOOL_BRONZE, 12, -3.7D);
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, pickaxehead);
- ironaxe = new CustomAxe("ironaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironaxehead);
+ ironaxe = new CustomAxe("ironaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironaxehead, 5, -3.6f);
ironshovel = new CustomShovel("ironshovel", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironshovelhead);
ironhoe = new CustomHoe("ironhoe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironhoehead);
+ ironsledgehammer = new SledgeHammer("ironsledgehammer", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 12, -3.7D);
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironpickaxehead);
- cleanironaxe = new CustomAxe("cleanironaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironaxehead);
+ cleanironaxe = new CustomAxe("cleanironaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironaxehead, 6, -3.2f);
cleanironshovel = new CustomShovel("cleanironshovel", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironshovelhead);
cleanironhoe = new CustomHoe("cleanironhoe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironhoehead);
+ cleanironsledgehammer = new SledgeHammer("cleanironsledgehammer", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 12, -3.7D);
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelpickaxehead);
- steelaxe = new CustomAxe("steelaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelaxehead);
+ steelaxe = new CustomAxe("steelaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelaxehead, 7, -2.8f);
steelshovel = new CustomShovel("steelshovel", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelshovelhead);
steelhoe = new CustomHoe("steelhoe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelhoehead);
+ steelsledgehammer = new SledgeHammer("steelsledgehammer", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 12, -3.5D);
wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzpickaxehead);
- wootzaxe = new CustomAxe("wootzaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzaxehead);
+ wootzaxe = new CustomAxe("wootzaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzaxehead, 8, -2.4f);
wootzshovel = new CustomShovel("wootzshovel", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzshovelhead);
wootzhoe = new CustomHoe("wootzhoe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzhoehead);
+ wootzsledgehammer = new SledgeHammer("wootzsledgehammer", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 12, -3.4D);
/**********
WEAPONS
@@ -248,6 +287,7 @@ public class ModItems {
//forgingmanual = new ItemForgingManual();
//test = new ItemTest("ironsword");
+ brokencoppertool = new BaseItem("brokencoppertool");
brokenbronzetool = new BaseItem("brokenbronzetool");
brokenwroughtirontool = new BaseItem("brokenwroughtirontool");
brokencleanirontool = new BaseItem("brokencleanirontool");
@@ -269,7 +309,7 @@ public class ModItems {
ForgeRegistries.ITEMS.register(castingmud);
ForgeRegistries.ITEMS.register(bellowshandle);
ForgeRegistries.ITEMS.register(softcrucible);
- //ForgeRegistries.ITEMS.register(stonetongs);
+ ForgeRegistries.ITEMS.register(wootzworkblade);
ForgeRegistries.ITEMS.register(forgehammer);
ForgeRegistries.ITEMS.register(bronzeingotball);
@@ -288,6 +328,12 @@ public class ModItems {
/**********
TOOL PARTS
**********/
+
+ ForgeRegistries.ITEMS.register(copperpickaxehead);
+ ForgeRegistries.ITEMS.register(copperaxehead);
+ ForgeRegistries.ITEMS.register(coppershovelhead);
+ ForgeRegistries.ITEMS.register(copperhoehead);
+
ForgeRegistries.ITEMS.register(bronzepickaxehead);
ForgeRegistries.ITEMS.register(bronzeaxehead);
ForgeRegistries.ITEMS.register(bronzeshovelhead);
@@ -316,30 +362,41 @@ public class ModItems {
/**********
TOOLS
**********/
+ ForgeRegistries.ITEMS.register(copperpickaxe);
+ ForgeRegistries.ITEMS.register(copperaxe);
+ ForgeRegistries.ITEMS.register(coppershovel);
+ ForgeRegistries.ITEMS.register(copperhoe);
+ ForgeRegistries.ITEMS.register(coppersledgehammer);
+
ForgeRegistries.ITEMS.register(bronzepickaxe);
ForgeRegistries.ITEMS.register(bronzeaxe);
ForgeRegistries.ITEMS.register(bronzeshovel);
ForgeRegistries.ITEMS.register(bronzehoe);
+ ForgeRegistries.ITEMS.register(bronzesledgehammer);
ForgeRegistries.ITEMS.register(ironpickaxe);
ForgeRegistries.ITEMS.register(ironaxe);
ForgeRegistries.ITEMS.register(ironshovel);
ForgeRegistries.ITEMS.register(ironhoe);
+ ForgeRegistries.ITEMS.register(ironsledgehammer);
ForgeRegistries.ITEMS.register(cleanironpickaxe);
ForgeRegistries.ITEMS.register(cleanironaxe);
ForgeRegistries.ITEMS.register(cleanironshovel);
ForgeRegistries.ITEMS.register(cleanironhoe);
+ ForgeRegistries.ITEMS.register(cleanironsledgehammer);
ForgeRegistries.ITEMS.register(steelpickaxe);
ForgeRegistries.ITEMS.register(steelaxe);
ForgeRegistries.ITEMS.register(steelshovel);
ForgeRegistries.ITEMS.register(steelhoe);
+ ForgeRegistries.ITEMS.register(steelsledgehammer);
ForgeRegistries.ITEMS.register(wootzpickaxe);
ForgeRegistries.ITEMS.register(wootzaxe);
ForgeRegistries.ITEMS.register(wootzshovel);
ForgeRegistries.ITEMS.register(wootzhoe);
+ ForgeRegistries.ITEMS.register(wootzsledgehammer);
/**********
WEAPONS
@@ -391,7 +448,7 @@ public class ModItems {
registerRender(bellowshandle);
registerRender(softcrucible);
registerRender(forgehammer);
-
+ registerRender(wootzworkblade);
registerRender(bronzeingotball);
registerRender(bronzechunk);
@@ -409,6 +466,12 @@ public class ModItems {
/**********
TOOL PARTS
**********/
+
+ registerRender(copperpickaxehead);
+ registerRender(copperaxehead);
+ registerRender(coppershovelhead);
+ registerRender(copperhoehead);
+
registerRender(bronzepickaxehead);
registerRender(bronzeaxehead);
registerRender(bronzeshovelhead);
@@ -437,30 +500,41 @@ public class ModItems {
/**********
TOOLS
**********/
+ registerRender(copperpickaxe);
+ registerRender(copperaxe);
+ registerRender(coppershovel);
+ registerRender(copperhoe);
+ registerRender(coppersledgehammer);
+
registerRender(bronzepickaxe);
registerRender(bronzeaxe);
registerRender(bronzeshovel);
registerRender(bronzehoe);
+ registerRender(bronzesledgehammer);
registerRender(ironpickaxe);
registerRender(ironaxe);
registerRender(ironshovel);
registerRender(ironhoe);
+ registerRender(ironsledgehammer);
registerRender(cleanironpickaxe);
registerRender(cleanironaxe);
registerRender(cleanironshovel);
registerRender(cleanironhoe);
+ registerRender(cleanironsledgehammer);
registerRender(steelpickaxe);
registerRender(steelaxe);
registerRender(steelshovel);
registerRender(steelhoe);
+ registerRender(steelsledgehammer);
registerRender(wootzpickaxe);
registerRender(wootzaxe);
registerRender(wootzshovel);
registerRender(wootzhoe);
+ registerRender(wootzsledgehammer);
/**********
WEAPONS
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java
index 34c3f219..269a7896 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModRegistries.java
@@ -1,14 +1,39 @@
package nmd.primal.forgecraft.init;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.event.RegistryEvent;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.registry.GameRegistry;
+import net.minecraftforge.registries.RegistryBuilder;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.crafting.CrucibleCrafting;
+import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
+
/**
* Created by kitsu on 12/3/2016.
*/
+
+@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
+@Mod.EventBusSubscriber
public class ModRegistries {
- public static void registerFuels()
- {
- //if (ModConfig.FEATURE_ENABLE_FUELS)
- //{
+ @SubscribeEvent
+ public static void customRegistries(RegistryEvent.NewRegistry event) {
+ PrimalAPI.logger(1, "Custom Registry", CrucibleCrafting.RECIPE_PREFIX);
+ RegistryBuilder registryCrucible = new RegistryBuilder();
+ registryCrucible.setType(CrucibleCrafting.class);
+ registryCrucible.setName(new ResourceLocation(ModInfo.MOD_ID, "recipes_" + CrucibleCrafting.RECIPE_PREFIX));
+ registryCrucible.setIDRange(0, 1000);
+ registryCrucible.create();
+
+ PrimalAPI.logger(1, "Custom Registry", WorkbenchCrafting.RECIPE_PREFIX);
+ RegistryBuilder registryWorkbench = new RegistryBuilder();
+ registryWorkbench.setType(WorkbenchCrafting.class);
+ registryWorkbench.setName(new ResourceLocation(ModInfo.MOD_ID, "recipes_" + WorkbenchCrafting.RECIPE_PREFIX));
+ registryWorkbench.setIDRange(0, 1000);
+ registryWorkbench.create();
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModSounds.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModSounds.java
index 72aa16fd..da5b56c2 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModSounds.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModSounds.java
@@ -13,12 +13,16 @@ public class ModSounds {
public static SoundEvent PISTON_BELLOWS;
public static SoundEvent MUSKET_SHOT;
public static SoundEvent BOW_TWANG;
+ public static SoundEvent CHISEL_HIT;
+ public static SoundEvent CHISEL_HIT_FINISHED;
public static void registerSounds()
{
PISTON_BELLOWS = registerSound("piston_bellows");
MUSKET_SHOT = registerSound("musket_shot");
BOW_TWANG = registerSound("bow_twang");
+ CHISEL_HIT = registerSound("chisel_hit");
+ CHISEL_HIT_FINISHED = registerSound("chisel_hit_finished");
}
private static SoundEvent registerSound(String name)
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java
new file mode 100644
index 00000000..94140c97
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTileRenders.java
@@ -0,0 +1,19 @@
+package nmd.primal.forgecraft.init;
+
+import net.minecraftforge.fml.client.registry.ClientRegistry;
+import nmd.primal.forgecraft.renders.blocks.*;
+import nmd.primal.forgecraft.tiles.*;
+
+public class ModTileRenders {
+
+ public static void init(){
+ ClientRegistry.bindTileEntitySpecialRenderer(TileForge.class, new TileForgeRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TilePistonBellows.class, new TilePistonBellowsRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileBloomery.class, new TileBloomeryRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileAnvil.class, new TileAnvilRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileWorkbench.class, new TileWorkbenchRender());
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java
index 535a4f43..b791d777 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModTiles.java
@@ -17,6 +17,7 @@ public class ModTiles {
registerTileEntity(TileBreaker.class, "breaker");
registerTileEntity(TileCastingForm.class, "castingform");
registerTileEntity(TileNBTCrucible.class, "nbtcrucible");
+ registerTileEntity(TileWorkbench.class, "workbench");
}
private static void registerTileEntity(Class extends TileEntity> tile_class, String baseName) {
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CauldronRecipes.java b/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CauldronRecipes.java
index ac62dfd7..396d62a2 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CauldronRecipes.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CauldronRecipes.java
@@ -33,22 +33,5 @@ public class CauldronRecipes
lapisBronze.getSubCompound("tags").setInteger("lapis", 1);
lapisBronze.getSubCompound("tags").setBoolean("modified", true);
-
-
-
-
-/*
- recipes.register(new CauldronRecipe(
- 5,
- FluidRegistry.getFluidStack("water", 1000),
- FluidRegistry.getFluidStack("water", 1000),
- new ItemStack(ModItems.rawbronzegladius, 1),
- new ItemStack(Items.DYE, 1, 4),
- ItemStack.EMPTY,
- ItemStack.EMPTY,
- lapisBronze,
- ItemStack.EMPTY).setRecipeName("finishedGladius")
- );
- */
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CrucibleRecipes.java b/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CrucibleRecipes.java
deleted file mode 100644
index 99ff29fd..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/init/recipes/CrucibleRecipes.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package nmd.primal.forgecraft.init.recipes;
-
-/**
- * Created by mminaie on 9/15/18.
- */
-/*
-@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
-@Mod.EventBusSubscriber
-public final class CrucibleRecipes {
-
- @SubscribeEvent
- public static void registerRecipes(RegistryEvent.Register event)
- {
- final IForgeRegistry registry = event.getRegistry();
-
- /***Default Recipe***/
- /**
- registry.register(new CrucibleCrafting(
-
- ).setRecipeName(""));
- ***/
-
- /*
- registry.register(new CrucibleCrafting(
- new OreIngredient("oreIron"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(Blocks.IRON_ORE, 1),
- new ItemStack(ModItems.ironingotball, 1),
- 100,
- 100,
- 1000).setRecipeName("wroughtiron"));
-
- registry.register(new CrucibleCrafting(
- new OreIngredient("dustIron"),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CARBONATE_SLACK, 1)),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.IRON_DUST, 1),
- new ItemStack(ModItems.ironcleaningotball, 1),
- 100,
- 100,
- 1000).setRecipeName("cleaniron"));
-
- registry.register(new CrucibleCrafting(
- Ingredient.fromStacks(new ItemStack(ModItems.ironcleaningotball, 1)),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_HIGH, 1)),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(ModItems.ironcleaningotball, 1),
- new ItemStack(ModItems.steelingotball, 1),
- 100,
- 100,
- 1000
- ).setRecipeName("steel"));
-
- registry.register(new CrucibleCrafting(
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
- new OreIngredient("dustMagnetite"),
- new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
- new ItemStack(ModItems.wootzingotball, 1),
- 100,
- 100,
- 1000
- ).setRecipeName("damascus"));
-
- registry.register(new CrucibleCrafting(
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
- Ingredient.fromStacks(new ItemStack(PrimalAPI.Items.CHARCOAL_PURE, 1)),
- Ingredient.fromStacks(new ItemStack(Blocks.LEAVES, 1, 15)),
- new OreIngredient("magnetite"),
- new ItemStack(PrimalAPI.Blocks.ORE_MAGNETITE, 1),
- new ItemStack(ModItems.wootzingotball, 1),
- 100,
- 100,
- 1000
- ).setRecipeName("damascus"));
-
- registry.register(new CrucibleCrafting(
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustCopper"),
- new OreIngredient("dustTin"),
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- new ItemStack(ModItems.bronzeingotball, 1),
- 100,
- 100,
- 1000
- ).setRecipeName("bronzebasic"));
-
- NBTTagCompound tagBronzeDefault = new NBTTagCompound();
- tagBronzeDefault.setString("upgrades", "");
- ItemStack defaultBronze = new ItemStack(ModItems.bronzeingotball, 1);
- defaultBronze.setTagCompound(tagBronzeDefault.copy());
- registry.register(new CrucibleCrafting(
- new OreIngredient("oreBronze"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- defaultBronze,
- 100,
- 100,
- 1000
- ).setRecipeName("defaultbronze"));
-
- NBTTagCompound tag = new NBTTagCompound();
- tag.setString("upgrades", "redstone");
- ItemStack redBronze = new ItemStack(ModItems.bronzeingotball, 1);
- registry.register(new CrucibleCrafting(
- new OreIngredient("ingotBronze"),
- new OreIngredient("dustRedstone"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- redBronze,
- 100,
- 100,
- 100
- ).setRecipeName("redbronze"));
-
- NBTTagCompound diamondBronzeTag = new NBTTagCompound();
- tag.setString("upgrades", "diamond");
- ItemStack diamondBronze = new ItemStack(ModItems.bronzeingotball, 1);
- diamondBronze.setTagCompound(diamondBronzeTag.copy());
- registry.register(new CrucibleCrafting(
- new OreIngredient("ingotBronze"),
- new OreIngredient("dustDiamond"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- diamondBronze,
- 100,
- 100,
- 100
- ).setRecipeName("diamondbronze"));
-
- NBTTagCompound emeraldBronzeTag = new NBTTagCompound();
- tag.setString("upgrades", "emerald");
- ItemStack emeraldBronze = new ItemStack(ModItems.bronzeingotball, 1);
- emeraldBronze.setTagCompound(emeraldBronzeTag.copy());
- registry.register(new CrucibleCrafting(
- new OreIngredient("ingotBronze"),
- new OreIngredient("dustEmerald"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- diamondBronze,
- 100,
- 100,
- 100
- ).setRecipeName("emeraldbronze"));
-
- NBTTagCompound tagBronzeLapis = new NBTTagCompound();
- tagBronzeDefault.setString("upgrades", "lapis");
- ItemStack lapisBronze = new ItemStack(ModItems.bronzeingotball, 1);
- lapisBronze.setTagCompound(tagBronzeLapis.copy());
- registry.register(new CrucibleCrafting(
- new OreIngredient("oreBronze"),
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- Ingredient.EMPTY,
- new ItemStack(PrimalAPI.Items.SLAG, 1),
- lapisBronze,
- 100,
- 100,
- 1000
- ).setRecipeName("lapisbronze"));
-
- }
-}
-*/
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/BaseMultiItem.java b/kfc/src/main/java/nmd/primal/forgecraft/items/BaseMultiItem.java
index c0f7667b..2cb17a4a 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/BaseMultiItem.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/BaseMultiItem.java
@@ -1,6 +1,5 @@
package nmd.primal.forgecraft.items;
-import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -16,7 +15,6 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.core.common.helper.FireHelper;
import nmd.primal.forgecraft.init.ModItems;
import javax.annotation.Nullable;
@@ -142,7 +140,7 @@ public class BaseMultiItem extends BaseItem {
{
if (item.hasTagCompound())
{
- tooltip.add(ChatFormatting.GRAY + "Upgrades: " + item.getTagCompound().getString("upgrades"));
+ //tooltip.add(ChatFormatting.GRAY + "Upgrades: " + item.getTagCompound().getString("upgrades"));
/*
tooltip.add(ChatFormatting.GRAY + "Upgrades: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java b/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java
new file mode 100644
index 00000000..d22ce8ec
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/SledgeHammer.java
@@ -0,0 +1,121 @@
+package nmd.primal.forgecraft.items;
+
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.Multimap;
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.ai.attributes.AttributeModifier;
+import net.minecraft.inventory.EntityEquipmentSlot;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.core.common.items.tools.Gallagher;
+import nmd.primal.core.common.recipes.irecipe.ToolCraftingRecipe;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
+
+import javax.annotation.Nullable;
+import java.util.List;
+
+public class SledgeHammer extends Gallagher implements ToolMaterialMap {
+
+ private int attack;
+ private double speed;
+ private ToolMaterial material;
+
+ public SledgeHammer(String name, Item.ToolMaterial material, Integer attack, Double speed) {
+ super(material, ToolCraftingRecipe.EnumToolType.MALLET_METAL);
+ this.setUnlocalizedName(name);
+ this.setRegistryName(name);
+ this.setMaxDamage(material.getMaxUses()*3);
+ this.setHarvestLevel("pickaxe" , material.getHarvestLevel());
+ this.material=material;
+ this.attack = attack;
+ this.speed = speed;
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
+ }
+
+ /*@Override
+ public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) {
+ if(!world.isRemote){
+ EntityPlayer player = (EntityPlayer) entity;
+
+ if(player.inventory.getCurrentItem().getItem().equals(stack.getItem())) {
+ if(player.isPotionActive(MobEffects.MINING_FATIGUE)) {
+ if (!player.isSwingInProgress) {
+ player.removeActivePotionEffect(MobEffects.MINING_FATIGUE);
+ }
+ }
+ }
+ }
+ if(isSelected){
+ entity.setSprinting(false);
+ }
+ }
+
+ @Override
+ public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing face, float hitx, float hity, float hitz)
+ {
+ if(!world.isRemote) {
+ IBlockState state = world.getBlockState(pos);
+ Block block = world.getBlockState(pos).getBlock();
+ if(!(block instanceof AnvilBase)) {
+ if (!player.isSwingInProgress) {
+ int tempInt = 0;
+ player.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, (100 - ((materialModifiers.get(this.getMaterial()) * 13) + tempInt)), 100));
+ player.swingArm(hand);
+ return EnumActionResult.SUCCESS;
+ }
+ }
+ }
+ return EnumActionResult.FAIL;
+ }*/
+
+ public ToolMaterial getMaterial() {
+ return material;
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public boolean hasEffect(ItemStack stack)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isRepairable()
+ {
+ return false;
+ }
+
+ public int getItemEnchantability(ItemStack stack)
+ {
+ return 0;
+ }
+
+ @Override
+ public Multimap getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
+ {
+ Multimap multimap = HashMultimap.create();
+
+ if (equipmentSlot == EntityEquipmentSlot.MAINHAND)
+ {
+ multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", this.attack, 0));
+ multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.speed, 0));
+ }
+
+ return multimap;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn) {
+ tooltip.add(ChatFormatting.GRAY + "Place a chisel and right click it");
+ tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
+
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java b/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java
index 6771b4a5..60ba1070 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java
@@ -32,8 +32,8 @@ import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.core.common.tiles.AbstractTileTank;
import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.blocks.Anvil.AnvilBase;
-import nmd.primal.forgecraft.blocks.Crucibles.NBTCrucible;
+import nmd.primal.forgecraft.blocks.AnvilBase;
+import nmd.primal.forgecraft.blocks.NBTCrucible;
import nmd.primal.forgecraft.blocks.machine.Forge;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
@@ -308,9 +308,11 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{
if (!(block instanceof Forge)) {
if (slotStack.isEmpty()) {
if (block instanceof NBTCrucible) {
+ TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos);
ItemStack tempStack = takeBlock(world, pos, state, face, player, block).copy();
inventory.insertItem(0, tempStack, false);
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
+ world.markTileEntityForRemoval(tile);
//itemstack.getItem().updateItemStackNBT(itemstack.getTagCompound());
itemstackItem.markDirty(itemstack);
return EnumActionResult.SUCCESS;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/Workblade.java b/kfc/src/main/java/nmd/primal/forgecraft/items/Workblade.java
new file mode 100644
index 00000000..4a20ecda
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/Workblade.java
@@ -0,0 +1,14 @@
+package nmd.primal.forgecraft.items;
+
+import nmd.primal.core.common.items.tools.WorkBlade;
+import nmd.primal.forgecraft.ModInfo;
+
+public class Workblade extends WorkBlade {
+
+ public Workblade(String name, ToolMaterial material, float speed) {
+ super(material, speed);
+ this.setRegistryName(name);
+ this.setUnlocalizedName(name);
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/blocks/ItemNBTCrucible.java b/kfc/src/main/java/nmd/primal/forgecraft/items/blocks/ItemNBTCrucible.java
index c3d2132b..d5078bfe 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/blocks/ItemNBTCrucible.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/blocks/ItemNBTCrucible.java
@@ -3,10 +3,12 @@ package nmd.primal.forgecraft.items.blocks;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
@@ -100,15 +102,18 @@ public class ItemNBTCrucible extends ItemBlock {
@Override
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
if(!world.isRemote) {
- //System.out.println("We doin it?");
- if (item.hasTagCompound()) {
- //item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tag = item.getSubCompound("BlockEntityTag");
- //item.getTagCompound().setTag("BlockEntityTag", tags);
- //System.out.println(tag.getBoolean("hot"));
+ if (!item.hasTagCompound()) {
+ NonNullList list = NonNullList.withSize(5, ItemStack.EMPTY);
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+ item.getTagCompound().setTag("BlockEntityTag", tags);
+ ItemStackHelper.saveAllItems(tags, list);
+ item.getSubCompound("BlockEntityTag").setInteger("heat", 0);
+ item.getSubCompound("BlockEntityTag").setInteger("hot", 0);
+ item.getSubCompound("BlockEntityTag").setBoolean("status", false);
}
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/BronzeToolPart.java b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/BronzeToolPart.java
deleted file mode 100644
index abecdb4c..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/BronzeToolPart.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package nmd.primal.forgecraft.items.parts;
-
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.client.util.ITooltipFlag;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.IItemPropertyGetter;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.forgecraft.util.ToolNBT;
-
-import javax.annotation.Nullable;
-import java.util.List;
-
-/**
- * Created by mminaie on 3/9/17.
- */
-public class BronzeToolPart extends Item implements ToolNBT{
-
- private String toolType;
-
- public BronzeToolPart(String name, ToolMaterial material, String type) {
- this.setMaxDamage(material.getMaxUses());
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- //this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
-
- this.toolType = type;
-
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter()
- {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
- {
- if (item.hasTagCompound()) {
-
-
- if (getModifiers(item) != 0) {
- if (getEmerald(item)) {
- return 0.1F;
- }
-
- if (getDiamondLevel(item) == 1) {
- return 0.2F;
- }
-
- if ( getRedstoneLevel(item) == 1) {
- return 0.3F;
- }
-
- if (getLapisLevel(item) == 1) {
- return 0.4F;
- }
- }
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- return 0.0F;
- }
- });
-
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- public String getID() {
- return toolType;
- }
-
- @Override
- public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) {
-
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
- }
-
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- if(item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades");
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item));
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item));
- }
- }
- }
-}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java
index 43e95325..db173fa7 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/ToolPart.java
@@ -16,8 +16,8 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.core.common.helper.FireHelper;
import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable;
@@ -42,194 +42,45 @@ public class ToolPart extends Item implements ToolNBT{
this.toolType = type;
this.toolMaterial = material;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter()
- {
+ this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
/***
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
+ hot | emerald | diamond | redstone | lapis
+ X.0 | 0.X | 0.0X | 0.00X | 0.000X
***/
@SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
- {
+ public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
if (item.hasTagCompound()) {
-
- if (getHot(item) == false) {
- if (getModifiers(item) != 0) {
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.1F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.11F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.12F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.111F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.102F;
- }
-
- // ============
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.01F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.02F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 3) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.03F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 3) &&
- (getLapisLevel(item) == 0)) {
- return 0.003F;
- }
-
- //=========
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 1)) {
- return 0.0001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2)) {
- return 0.0002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 3)) {
- return 0.0003F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 1)) {
- return 0.0111F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 2)) {
- return 0.0012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 1)) {
- return 0.0021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2) ) {
- return 0.0102F;
- }
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 1) ) {
- return 0.0011F;
- }
- }
+ Float returnFloat = 0.0F;
+ if(getEmerald(item)){
+ returnFloat += 0.1F;
}
- if (getHot(item) == true) {
- return 1.0F;
+ if(getDiamondLevel(item)>0){
+ returnFloat += (0.01F * getDiamondLevel(item));
}
-
- if (getHot(item) == false) {
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
+ if(getRedstoneLevel(item)>0){
+ returnFloat += (0.001F * getRedstoneLevel(item));
}
+ if(getLapisLevel(item)>0){
+ returnFloat += (0.0001F * getLapisLevel(item));
+ }
+ if(getHot(item)){
+ returnFloat = 1.0F;
+ }
+ return returnFloat;
}
return 0.0F;
}
});
+
+
}
+
public static boolean isHidden()
{
return false;
@@ -240,9 +91,7 @@ public class ToolPart extends Item implements ToolNBT{
}
public ToolMaterial getMaterial() {return toolMaterial;}
- @Override
- public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) {
-
+ public void createDefaultNBT(ItemStack item){
if (!item.hasTagCompound()) {
item.setTagCompound(new NBTTagCompound());
NBTTagCompound tags = new NBTTagCompound();
@@ -256,25 +105,19 @@ public class ToolPart extends Item implements ToolNBT{
setLapisLevel(item, 0);
setModifiers(item, 0);
}
+ }
+
+ @Override
+ public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) {
+
+ createDefaultNBT(item);
}
@Override
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
//System.out.println(item.getTagCompound());
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
- }
+ createDefaultNBT(item);
if (item.hasTagCompound()) {
if (item.getSubCompound("tags").getBoolean("hot")) {
player.setFire(1);
@@ -326,8 +169,8 @@ public class ToolPart extends Item implements ToolNBT{
{
if(item.hasTagCompound())
{
- tooltip.add(ChatFormatting.GRAY + "Upgrades");
- if (getEmerald(item) == true) {
+ tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item)));
+ if (getEmerald(item)) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/WeaponGuard.java b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/WeaponGuard.java
new file mode 100644
index 00000000..f3f1d11c
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/WeaponGuard.java
@@ -0,0 +1,10 @@
+package nmd.primal.forgecraft.items.parts;
+
+import nmd.primal.forgecraft.items.BaseItem;
+
+public class WeaponGuard extends BaseItem {
+
+ public WeaponGuard(String registryName) {
+ super(registryName);
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/parts/WeaponHandle.java b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/WeaponHandle.java
new file mode 100644
index 00000000..077029cc
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/parts/WeaponHandle.java
@@ -0,0 +1,10 @@
+package nmd.primal.forgecraft.items.parts;
+
+import nmd.primal.forgecraft.items.BaseItem;
+
+public class WeaponHandle extends BaseItem {
+
+ public WeaponHandle(String registryName) {
+ super(registryName);
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractAxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractAxe.java
new file mode 100644
index 00000000..076799e6
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractAxe.java
@@ -0,0 +1,268 @@
+package nmd.primal.forgecraft.items.tools;
+
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.block.material.Material;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.IItemPropertyGetter;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.core.common.helper.PlayerHelper;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
+import nmd.primal.forgecraft.util.ToolNBT;
+
+import javax.annotation.Nullable;
+import java.util.List;
+import java.util.concurrent.ThreadLocalRandom;
+
+public abstract class AbstractAxe extends ItemAxe implements ToolNBT {
+
+ Item drop;
+
+ public AbstractAxe(String name, ToolMaterial material, Item damageDrop, Integer damage, Float speed) {
+ super(material, damage, speed);
+ this.setUnlocalizedName(name);
+ this.setRegistryName(name);
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.drop = damageDrop;
+
+ this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
+
+ /***
+
+ hot | emerald | diamond | redstone | lapis
+ X.0 | 0.X | 0.0X | 0.00X | 0.000X
+
+ ***/
+
+ @SideOnly(Side.CLIENT)
+ public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
+ if (item.hasTagCompound()) {
+ Float returnFloat = 0.0F;
+ if(getEmerald(item)){
+ returnFloat += 0.1F;
+ }
+ if(getDiamondLevel(item)>0){
+ returnFloat += (0.01F * getDiamondLevel(item));
+ }
+ if(getRedstoneLevel(item)>0){
+ returnFloat += (0.001F * getRedstoneLevel(item));
+ }
+ if(getLapisLevel(item)>0){
+ returnFloat += (0.0001F * getLapisLevel(item));
+ }
+ if(getHot(item)){
+ returnFloat = 1.0F;
+ }
+ return returnFloat;
+ }
+ return 0.0F;
+ }
+ });
+ }
+
+ public static boolean isHidden()
+ {
+ return false;
+ }
+
+ @Override
+ public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
+
+ if(!world.isRemote) {
+ item.setItemDamage(item.getMaxDamage()-5);
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ /*setHot(item, false);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);*/
+ }
+ }
+
+ }
+
+ @Override
+ public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
+ if(!world.isRemote) {
+
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);
+ }
+
+ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
+ PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(this.drop, 1));
+ ((EntityPlayer) player).inventory.deleteStack(item);
+ }
+ }
+ }
+
+ //public void onItemTooltip(ItemTooltipEvent event){
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
+ {
+ if(!item.isEmpty())
+ {
+ if (item.hasTagCompound())
+ {
+ tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item)));
+ if (getEmerald(item)) {
+ tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
+ }
+ if (getDiamondLevel(item) > 0) {
+ tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
+ }
+ if (getRedstoneLevel(item) > 0) {
+ tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
+ }
+ if (getLapisLevel(item) > 0) {
+ tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
+ }
+ tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
+ }
+ }
+ }
+/*
+ @Override
+ public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
+ {
+ if(!player.world.isRemote){
+ World world = player.getEntityWorld();
+ if(itemstack.getItem() instanceof CustomAxe){
+ if( getEmerald(itemstack)){
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
+ }
+ if( getDiamondLevel(itemstack) > 0 ){
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
+ //itemstack.getItem().setHarvestLevel("pickaxe", 3);
+ }
+ if( getRedstoneLevel(itemstack) > 0 ){
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(32), getRedstoneLevel(itemstack));
+ //System.out.println(itemstack.getEnchantmentTagList());
+ }
+ if ( getLapisLevel(itemstack) > 0) {
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), getLapisLevel(itemstack));
+ }
+ }
+ }
+
+ return false;
+ }
+*/
+ @Override
+ public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
+ {
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ stack.damageItem(1, attacker);
+ return true;
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+
+ EntityPlayer player = (EntityPlayer) attacker;
+ World world = attacker.getEntityWorld();
+ if(!world.isRemote) {
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ attacker.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ @Override
+ public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
+ {
+ if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
+ {
+ stack.getTagCompound().removeTag("ench");
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ //stack.getTagCompound().removeTag("ench");
+ if(getDiamondLevel(stack) > 0) {
+ if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
+ stack.damageItem(1, entityLiving);
+ }
+ } else stack.damageItem(1, entityLiving);
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+ EntityPlayer player = (EntityPlayer) entityLiving;
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ entityLiving.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public float getDestroySpeed(ItemStack stack, IBlockState state)
+ {
+ Material material = state.getMaterial();
+ //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
+
+ if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
+ return super.getDestroySpeed(stack, state);
+ } else {
+ return this.efficiency + ( (this.getRedstoneLevel(stack) * 1.5F ));
+ }
+
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public boolean hasEffect(ItemStack stack)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isRepairable()
+ {
+ return false;
+ }
+
+ @Override
+ public int getItemEnchantability(ItemStack stack)
+ {
+ return 0;
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractHoe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractHoe.java
new file mode 100644
index 00000000..5919b5c6
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractHoe.java
@@ -0,0 +1,249 @@
+package nmd.primal.forgecraft.items.tools;
+
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.SoundEvents;
+import net.minecraft.item.IItemPropertyGetter;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemHoe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.SoundCategory;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.core.common.helper.PlayerHelper;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
+import nmd.primal.forgecraft.util.ToolNBT;
+
+import javax.annotation.Nullable;
+import java.util.List;
+import java.util.concurrent.ThreadLocalRandom;
+
+public abstract class AbstractHoe extends ItemHoe implements ToolNBT {
+
+ private Item drop;
+
+ public AbstractHoe(String name, ToolMaterial material, Item damageDrop) {
+ super(material);
+ this.setUnlocalizedName(name);
+ this.setRegistryName(name);
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.drop = damageDrop;
+ this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
+
+ /***
+
+ hot | emerald | diamond | redstone | lapis
+ X.0 | 0.X | 0.0X | 0.00X | 0.000X
+
+ ***/
+
+ @SideOnly(Side.CLIENT)
+ public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
+ if (item.hasTagCompound()) {
+ Float returnFloat = 0.0F;
+ if(getEmerald(item)){
+ returnFloat += 0.1F;
+ }
+ if(getDiamondLevel(item)>0){
+ returnFloat += (0.01F * getDiamondLevel(item));
+ }
+ if(getRedstoneLevel(item)>0){
+ returnFloat += (0.001F * getRedstoneLevel(item));
+ }
+ if(getLapisLevel(item)>0){
+ returnFloat += (0.0001F * getLapisLevel(item));
+ }
+ if(getHot(item)){
+ returnFloat = 1.0F;
+ }
+ return returnFloat;
+ }
+ return 0.0F;
+ }
+ });
+ }
+
+ public static boolean isHidden()
+ {
+ return false;
+ }
+
+ @Override
+ public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
+
+ if(!world.isRemote) {
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ /*setHot(item, false);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);*/
+ }
+ }
+ }
+
+ @Override
+ public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
+ if(!world.isRemote) {
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);
+
+ }
+
+ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
+ PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(this.drop, 1));
+ ((EntityPlayer) player).inventory.deleteStack(item);
+ }
+
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
+ {
+ if(!item.isEmpty())
+ {
+ if (item.hasTagCompound())
+ {
+ tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item)));
+ if (getEmerald(item) == true) {
+ tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
+ }
+ if (getDiamondLevel(item) > 0) {
+ tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
+ }
+ if (getRedstoneLevel(item) > 0) {
+ tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
+ }
+ if (getLapisLevel(item) > 0) {
+ tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
+ }
+ tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
+ }
+ }
+ }
+
+ @Override
+ protected void setBlock(ItemStack stack, EntityPlayer player, World worldIn, BlockPos pos, IBlockState state)
+ {
+ worldIn.playSound(player, pos, SoundEvents.ITEM_HOE_TILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
+
+ if (!worldIn.isRemote)
+ {
+ worldIn.setBlockState(pos, state, 11);
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ stack.damageItem(1, player);
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1);
+ dropStack.setItemDamage(stack.getItemDamage());
+ dropStack.setTagCompound(new NBTTagCompound());
+ NBTTagCompound copyNBT;
+ copyNBT = stack.getSubCompound("tags").copy();
+ dropStack.setTagCompound(copyNBT);
+ PlayerHelper.spawnItemOnPlayer(worldIn, player, dropStack);
+ player.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ }
+ }
+ }
+
+ @Override
+ public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
+ {
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ stack.damageItem(1, attacker);
+ return true;
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+
+ EntityPlayer player = (EntityPlayer) attacker;
+ World world = attacker.getEntityWorld();
+ if(!world.isRemote) {
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ attacker.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ @Override
+ public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
+ {
+ if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
+ {
+ stack.getTagCompound().removeTag("ench");
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ //stack.getTagCompound().removeTag("ench");
+ if(getDiamondLevel(stack) > 0) {
+ if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
+ stack.damageItem(1, entityLiving);
+ }
+ } else stack.damageItem(1, entityLiving);
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+ EntityPlayer player = (EntityPlayer) entityLiving;
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ entityLiving.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ }
+ }
+
+ return true;
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public boolean hasEffect(ItemStack stack)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isRepairable()
+ {
+ return false;
+ }
+
+ @Override
+ public int getItemEnchantability(ItemStack stack)
+ {
+ return 0;
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java
new file mode 100644
index 00000000..c8b6dd4b
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractPickaxe.java
@@ -0,0 +1,245 @@
+package nmd.primal.forgecraft.items.tools;
+
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.block.material.Material;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.IItemPropertyGetter;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.core.common.helper.PlayerHelper;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
+import nmd.primal.forgecraft.util.ToolNBT;
+
+import javax.annotation.Nullable;
+import java.util.List;
+import java.util.concurrent.ThreadLocalRandom;
+
+public abstract class AbstractPickaxe extends ItemPickaxe implements ToolNBT {
+ private Item drop;
+
+ public AbstractPickaxe(String name, Item.ToolMaterial material, Item damageDrop) {
+ super(material);
+ this.setUnlocalizedName(name);
+ this.setRegistryName(name);
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.drop=damageDrop;
+ //this.toolClass = "pickaxe";
+
+ this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
+
+ /***
+
+ hot | emerald | diamond | redstone | lapis
+ X.0 | 0.X | 0.0X | 0.00X | 0.000X
+
+ ***/
+
+ @SideOnly(Side.CLIENT)
+ public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
+ if (item.hasTagCompound()) {
+ Float returnFloat = 0.0F;
+ if(getEmerald(item)){
+ returnFloat += 0.1F;
+ }
+ if(getDiamondLevel(item)>0){
+ returnFloat += (0.01F * getDiamondLevel(item));
+ }
+ if(getRedstoneLevel(item)>0){
+ returnFloat += (0.001F * getRedstoneLevel(item));
+ }
+ if(getLapisLevel(item)>0){
+ returnFloat += (0.0001F * getLapisLevel(item));
+ }
+ if(getHot(item)){
+ returnFloat = 1.0F;
+ }
+ return returnFloat;
+ }
+ return 0.0F;
+ }
+ });
+ }
+
+ public static boolean isHidden()
+ {
+ return false;
+ }
+
+ @Override
+ public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
+
+ if(!world.isRemote) {
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ setHot(item, false);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);
+ }
+ }
+
+ }
+
+ @Override
+ public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
+ if(!world.isRemote) {
+ //item.setItemDamage(item.getMaxDamage()-2);
+
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);
+
+ }
+
+ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
+ PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(this.drop, 1));
+ ((EntityPlayer) player).inventory.deleteStack(item);
+ }
+
+ }
+ }
+
+ //public void onItemTooltip(ItemTooltipEvent event){
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
+ {
+ if(item.hasTagCompound())
+ {
+ tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item)));
+ if (getEmerald(item)) {
+ tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
+ }
+ if (getDiamondLevel(item) > 0) {
+ tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
+ }
+ if (getRedstoneLevel(item) > 0) {
+ tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
+ }
+ if (getLapisLevel(item) > 0) {
+ tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
+ }
+ tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
+ }
+ }
+
+
+
+ @Override
+ public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
+ {
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ stack.damageItem(1, attacker);
+ return true;
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+
+ EntityPlayer player = (EntityPlayer) attacker;
+ World world = attacker.getEntityWorld();
+ if(!world.isRemote) {
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ attacker.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ @Override
+ public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
+ {
+ if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
+ {
+ stack.getTagCompound().removeTag("ench");
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ //stack.getTagCompound().removeTag("ench");
+ if(getDiamondLevel(stack) > 0) {
+ if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
+ stack.damageItem(1, entityLiving);
+ }
+ } else stack.damageItem(1, entityLiving);
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+ EntityPlayer player = (EntityPlayer) entityLiving;
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ entityLiving.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ player.inventory.markDirty();
+ //player.inventory.inventoryChanged = true;
+ }
+ }
+
+ return true;
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public boolean hasEffect(ItemStack stack)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isRepairable()
+ {
+ return false;
+ }
+
+ @Override
+ public int getItemEnchantability(ItemStack stack)
+ {
+ return 0;
+ }
+
+ @Override
+ public float getDestroySpeed(ItemStack stack, IBlockState state)
+ {
+ Material material = state.getMaterial();
+ //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
+
+ if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
+ return super.getDestroySpeed(stack, state);
+ } else {
+ return this.efficiency + ( (this.getRedstoneLevel(stack) * 1.5F ));
+ }
+
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractShovel.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractShovel.java
new file mode 100644
index 00000000..af24fa51
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/AbstractShovel.java
@@ -0,0 +1,240 @@
+package nmd.primal.forgecraft.items.tools;
+
+import com.google.common.collect.Sets;
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.block.Block;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.IItemPropertyGetter;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.core.common.helper.PlayerHelper;
+import nmd.primal.forgecraft.ModInfo;
+import nmd.primal.forgecraft.util.ToolMaterialMap;
+import nmd.primal.forgecraft.util.ToolNBT;
+
+import javax.annotation.Nullable;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ThreadLocalRandom;
+
+public class AbstractShovel extends ItemSpade implements ToolNBT {
+
+ private static final Set EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND, Blocks.GRASS_PATH});
+ private Item drop;
+
+ public AbstractShovel(String name, Item.ToolMaterial material, Item damageDrop) {
+ super(material);
+ this.setUnlocalizedName(name);
+ this.setRegistryName(name);
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.drop = damageDrop;
+
+ this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
+
+ /***
+
+ hot | emerald | diamond | redstone | lapis
+ X.0 | 0.X | 0.0X | 0.00X | 0.000X
+
+ ***/
+
+ @SideOnly(Side.CLIENT)
+ public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
+ if (item.hasTagCompound()) {
+ Float returnFloat = 0.0F;
+ if(getEmerald(item)){
+ returnFloat += 0.1F;
+ }
+ if(getDiamondLevel(item)>0){
+ returnFloat += (0.01F * getDiamondLevel(item));
+ }
+ if(getRedstoneLevel(item)>0){
+ returnFloat += (0.001F * getRedstoneLevel(item));
+ }
+ if(getLapisLevel(item)>0){
+ returnFloat += (0.0001F * getLapisLevel(item));
+ }
+ if(getHot(item)){
+ returnFloat = 1.0F;
+ }
+ return returnFloat;
+ }
+ return 0.0F;
+ }
+ });
+ }
+
+ public static boolean isHidden()
+ {
+ return false;
+ }
+
+ @Override
+ public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
+
+ if(!world.isRemote) {
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ /*setHot(item, false);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);*/
+ }
+ }
+
+ }
+
+ @Override
+ public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
+ if(!world.isRemote) {
+ if (!item.hasTagCompound()) {
+ item.setTagCompound(new NBTTagCompound());
+ NBTTagCompound tags = new NBTTagCompound();
+
+ item.getTagCompound().setTag("tags", tags);
+
+ setHot(item, false);
+ setEmerald(item, false);
+ setDiamondLevel(item, 0);
+ setRedstoneLevel(item, 0);
+ setLapisLevel(item, 0);
+ setModifiers(item, 0);
+
+ }
+
+ if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
+ PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(this.drop, 1));
+ ((EntityPlayer) player).inventory.deleteStack(item);
+ }
+ }
+ }
+
+ //public void onItemTooltip(ItemTooltipEvent event){
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
+ {
+ if(item.hasTagCompound())
+ {
+
+ tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item)));
+ if (getEmerald(item)) {
+ tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
+ }
+ if (getDiamondLevel(item) > 0) {
+ tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
+ }
+ if (getRedstoneLevel(item) > 0) {
+ tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
+ }
+ if (getLapisLevel(item) > 0) {
+ tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
+ }
+ tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
+ }
+ }
+
+ @Override
+ public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
+ {
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ stack.damageItem(1, attacker);
+ return true;
+ } else {
+ ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+
+ EntityPlayer player = (EntityPlayer) attacker;
+ World world = attacker.getEntityWorld();
+ if(!world.isRemote) {
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ attacker.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ @Override
+ public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
+ {
+ if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
+ {
+ stack.getTagCompound().removeTag("ench");
+ if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
+ //stack.getTagCompound().removeTag("ench");
+ if(getDiamondLevel(stack) > 0) {
+ if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
+ stack.damageItem(1, entityLiving);
+ }
+ } else stack.damageItem(1, entityLiving);
+ } else {
+ ItemStack dropStack = new ItemStack(this.drop, 1, stack.getItemDamage());
+ NBTTagCompound copyNBT = stack.getTagCompound();
+ dropStack.setTagCompound(copyNBT);
+ EntityPlayer player = (EntityPlayer) entityLiving;
+ PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
+ entityLiving.renderBrokenItemStack(stack);
+ stack.shrink(1);
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public float getDestroySpeed(ItemStack stack, IBlockState state)
+ {
+ for (String type : getToolClasses(stack))
+ {
+ if (state.getBlock().isToolEffective(type, state))
+ return (efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1));
+ }
+ return this.EFFECTIVE_ON.contains(state.getBlock()) ? (this.efficiency + ( (this.getRedstoneLevel(stack) * 1.25F ))) : 1.0F;
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public boolean hasEffect(ItemStack stack)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isRepairable()
+ {
+ return false;
+ }
+
+ @Override
+ public int getItemEnchantability(ItemStack stack)
+ {
+ return 0;
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java
deleted file mode 100644
index 6049b45a..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package nmd.primal.forgecraft.items.tools;
-
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.IItemPropertyGetter;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemAxe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
-import nmd.primal.forgecraft.util.ToolNBT;
-
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-
-/**
- * Created by mminaie on 6/25/17.
- */
-public class BronzeAxe extends ItemAxe implements ToolNBT {
-
- Item drop;
-
- public BronzeAxe(String name, Item.ToolMaterial material, Item damageDrop) {
- super(material, 5, -2f);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop=damageDrop;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
- {
- if (item.hasTagCompound()) {
-
-
- if (getModifiers(item) != 0) {
- if (getEmerald(item)) {
- return 0.1F;
- }
-
- if (getDiamondLevel(item) == 1) {
- return 0.2F;
- }
-
- if ( getRedstoneLevel(item) == 1) {
- return 0.3F;
- }
-
- if (getLapisLevel(item) == 1) {
- return 0.4F;
- }
- }
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
- }
- //this.setDamage(item, this.getMaxDamage(item) -2);
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- if(!item.isEmpty())
- {
- if (item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + "1" );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + "5" );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
- }
- }
-
- @Override
- public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
- {
- if(!player.world.isRemote){
- World world = player.getEntityWorld();
- //System.out.println(world.getBlockState(pos).getBlock());
- if(itemstack.getItem() instanceof CustomAxe){
- if( getEmerald(itemstack)){
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
- }
- /*if( getDiamondLevel(itemstack) > 0 ){
- itemstack.getItem().setHarvestLevel("pickaxe", 3);
- }*/
- if ( getLapisLevel(itemstack) > 0) {
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), 5);
- }
- }
- }
-
- return false;
- }
-
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @Override
- public float getDestroySpeed(ItemStack stack, IBlockState state)
- {
- Material material = state.getMaterial();
- //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
-
- if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
- return super.getDestroySpeed(stack, state);
- } else {
- return this.efficiency + 1;
- }
-
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeHoe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeHoe.java
deleted file mode 100644
index fbd89e9f..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeHoe.java
+++ /dev/null
@@ -1,283 +0,0 @@
-package nmd.primal.forgecraft.items.tools;
-
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.SoundEvents;
-import net.minecraft.item.IItemPropertyGetter;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemHoe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.SoundCategory;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
-import nmd.primal.forgecraft.util.ToolNBT;
-
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-
-/**
- * Created by mminaie on 3/21/17.
- */
-public class BronzeHoe extends ItemHoe implements ToolNBT {
-
- Item drop;
-
- public BronzeHoe(String name, ToolMaterial material, Item damageDrop) {
- super(material);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop=damageDrop;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
- {
- if (item.hasTagCompound()) {
-
-
- if (getModifiers(item) != 0) {
- if (getEmerald(item)) {
- return 0.1F;
- }
-
- if (getDiamondLevel(item) == 1) {
- return 0.2F;
- }
-
- if ( getRedstoneLevel(item) == 1) {
- return 0.3F;
- }
-
- if (getLapisLevel(item) == 1) {
- return 0.4F;
- }
- }
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
-
- }
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
- if(item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
- }
-
- @Override
- public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
- {
- if(!player.world.isRemote){
- World world = player.getEntityWorld();
-
- if(itemstack.getItem() instanceof BronzeHoe){
- if( getEmerald(itemstack)){
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
- }
- /*if( getDiamondLevel(itemstack) > 0 ){
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
- itemstack.getItem().setHarvestLevel("pickaxe", 3);
- }*/
- /*if( getRedstoneLevel(itemstack) > 0 ){
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(32), getRedstoneLevel(itemstack));
- //System.out.println(itemstack.getEnchantmentTagList());
- }*/
- if ( getLapisLevel(itemstack) > 0) {
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), 5);
- }
- }
- }
-
- return false;
- }
-
- @Override
- protected void setBlock(ItemStack stack, EntityPlayer player, World worldIn, BlockPos pos, IBlockState state)
- {
- worldIn.playSound(player, pos, SoundEvents.ITEM_HOE_TILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
-
- if (!worldIn.isRemote)
- {
- worldIn.setBlockState(pos, state, 11);
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, player);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1);
- dropStack.setItemDamage(stack.getItemDamage());
- dropStack.setTagCompound(new NBTTagCompound());
- NBTTagCompound copyNBT;
- copyNBT = stack.getSubCompound("tags").copy();
- dropStack.setTagCompound(copyNBT);
- PlayerHelper.spawnItemOnPlayer(worldIn, player, dropStack);
- player.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
- }
-
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java
deleted file mode 100644
index 615ef331..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java
+++ /dev/null
@@ -1,270 +0,0 @@
-package nmd.primal.forgecraft.items.tools;
-
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.IItemPropertyGetter;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemPickaxe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
-import nmd.primal.forgecraft.util.ToolNBT;
-
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-
-/**
- * Created by mminaie on 3/14/17.
- */
-public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
-
- private Item drop;
-
- public BronzePickaxe(String name, ToolMaterial material, Item damageDrop) {
- super(material);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop=damageDrop;
- //this.toolClass = "pickaxe";
-
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
- {
- if (item.hasTagCompound()) {
-
-
- if (getModifiers(item) != 0) {
- if (getEmerald(item)) {
- return 0.1F;
- }
-
- if (getDiamondLevel(item) == 1) {
- return 0.2F;
- }
-
- if ( getRedstoneLevel(item) == 1) {
- return 0.3F;
- }
-
- if (getLapisLevel(item) == 1) {
- return 0.4F;
- }
- }
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
-
- }
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
- if(item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
- }
-
- @Override
- public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
- {
- if(!player.world.isRemote){
- World world = player.getEntityWorld();
- //System.out.println(world.getBlockState(pos).getBlock());
- if(itemstack.getItem() instanceof BronzePickaxe){
- if( getEmerald(itemstack)){
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
- }
- /*if( getDiamondLevel(itemstack) > 0 ){
- //itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
- itemstack.getItem().setHarvestLevel("pickaxe", 3);
- }*/
- if ( getLapisLevel(itemstack) > 0) {
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), 5);
- }
- }
- }
-
- return false;
- }
-
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
- @Override
- public float getDestroySpeed(ItemStack stack, IBlockState state)
- {
- Material material = state.getMaterial();
- //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
-
- if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
- return super.getDestroySpeed(stack, state);
- } else {
- return this.efficiency + 1;
- }
-
- }
-
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java
deleted file mode 100644
index a8d16f74..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java
+++ /dev/null
@@ -1,265 +0,0 @@
-package nmd.primal.forgecraft.items.tools;
-
-import com.google.common.collect.Sets;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.Block;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.IItemPropertyGetter;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemSpade;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
-import nmd.primal.forgecraft.util.ToolNBT;
-
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ThreadLocalRandom;
-
-/**
- * Created by mminaie on 3/21/17.
- */
-public class BronzeShovel extends ItemSpade implements ToolNBT {
-
- private static final Set EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND, Blocks.GRASS_PATH});
-Item drop;
-
- public BronzeShovel(String name, ToolMaterial material, Item damageDrop) {
- super(material);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop=damageDrop;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
- {
- if (item.hasTagCompound()) {
-
-
- if (getModifiers(item) != 0) {
- if (getEmerald(item)) {
- return 0.1F;
- }
-
- if (getDiamondLevel(item) == 1) {
- return 0.2F;
- }
-
- if ( getRedstoneLevel(item) == 1) {
- return 0.3F;
- }
-
- if (getLapisLevel(item) == 1) {
- return 0.4F;
- }
- }
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
-
- }
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenbronzetool, 1));
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
- if(item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
- }
-
- @Override
- public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
- {
- if(!player.world.isRemote){
- World world = player.getEntityWorld();
-
- if(itemstack.getItem() instanceof BronzeShovel){
- if( getEmerald(itemstack)){
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
- }
- if ( getLapisLevel(itemstack) > 0) {
- itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), 5);
- }
- }
- }
-
- return false;
- }
-
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @Override
- public float getDestroySpeed(ItemStack stack, IBlockState state)
- {
- for (String type : getToolClasses(stack))
- {
- if (state.getBlock().isToolEffective(type, state))
- return efficiency;
- }
- return this.efficiency + 1;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
-}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java
index 9b59eb7f..f9042506 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java
@@ -1,426 +1,44 @@
package nmd.primal.forgecraft.items.tools;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-
/**
* Created by mminaie on 3/20/17.
*/
-public class CustomAxe extends ItemAxe implements ToolNBT {
+public class CustomAxe extends AbstractAxe implements ToolNBT {
Item drop;
- public CustomAxe(String name, Item.ToolMaterial material, Item damageDrop) {
- super(material, 6, -3.1f);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop = damageDrop;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
- if (item.hasTagCompound()) {
-
-
-
- if (getHot(item) != true) {
- if (getModifiers(item) != 0) {
- if ((getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.1F;
- }
-
- if ((getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.11F;
- }
-
- if ((getEmerald(item) == true) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.12F;
- }
-
- if ((getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.111F;
- }
-
- if ((getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.102F;
- }
-
- // ============
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.01F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.02F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 3) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.03F;
- }
-
- //=======
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.001F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.002F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 3) &&
- (getLapisLevel(item) == 0)) {
- return 0.003F;
- }
-
- //=========
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 1)) {
- return 0.0001F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2)) {
- return 0.0002F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 3)) {
- return 0.0003F;
- }
-
- //=======
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 1)) {
- return 0.0111F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.021F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.012F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 2)) {
- return 0.0012F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 1)) {
- return 0.0021F;
- }
-
- if ((getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2)) {
- return 0.0102F;
- }
- }
- }
- if (getHot(item) == true) {
- return 1.0F;
- }
-
- if (getHot(item) == false) {
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
-
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- item.setItemDamage(item.getMaxDamage()-5);
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
-
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
- }
-
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
-
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
- }
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- if(!item.isEmpty())
- {
- if (item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
- }
+ public CustomAxe(String name, Item.ToolMaterial material, Item damageDrop, Integer damage, Float speed) {
+ super(name, material, damageDrop, damage, speed);
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
{
if(!player.world.isRemote){
- World world = player.getEntityWorld();
if(itemstack.getItem() instanceof CustomAxe){
if( getEmerald(itemstack)){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
}
if( getDiamondLevel(itemstack) > 0 ){
- //itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
- itemstack.getItem().setHarvestLevel("pickaxe", 3);
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
+ //itemstack.getItem().setHarvestLevel("pickaxe", 3);
}
- /*if( getRedstoneLevel(itemstack) > 0 ){
+ if( getRedstoneLevel(itemstack) > 0 ){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(32), getRedstoneLevel(itemstack));
//System.out.println(itemstack.getEnchantmentTagList());
- }*/
+ }
if ( getLapisLevel(itemstack) > 0) {
itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), getLapisLevel(itemstack));
}
}
}
-
return false;
}
-
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @Override
- public float getDestroySpeed(ItemStack stack, IBlockState state)
- {
- Material material = state.getMaterial();
- //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
-
- if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){
- return super.getDestroySpeed(stack, state);
- } else {
- return this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1);
- }
-
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomHoe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomHoe.java
index 965eaa49..fe21acbf 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomHoe.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomHoe.java
@@ -1,314 +1,21 @@
package nmd.primal.forgecraft.items.tools;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.SoundEvents;
-import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-
/**
* Created by mminaie on 3/21/17.
*/
-public class CustomHoe extends ItemHoe implements ToolNBT {
+public class CustomHoe extends AbstractHoe implements ToolNBT {
private Item drop;
public CustomHoe(String name, Item.ToolMaterial material, Item damageDrop) {
- super(material);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop = damageDrop;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
- if (item.hasTagCompound()) {
-
- if (getHot(item) == false) {
- if (getModifiers(item) != 0) {
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.1F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.11F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.12F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.111F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.102F;
- }
-
- // ============
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.01F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.02F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 3) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.03F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 3) &&
- (getLapisLevel(item) == 0)) {
- return 0.003F;
- }
-
- //=========
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 1)) {
- return 0.0001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2)) {
- return 0.0002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 3)) {
- return 0.0003F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 1)) {
- return 0.0111F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 2)) {
- return 0.0012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 1)) {
- return 0.0021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2) ) {
- return 0.0102F;
- }
- }
- }
- if (getHot(item) == true) {
- return 1.0F;
- }
-
- if (getHot(item) == false) {
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
-
- }
-
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
-
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
- }
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
-
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- if(item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
+ super(name, material, damageDrop);
}
@@ -316,20 +23,18 @@ public class CustomHoe extends ItemHoe implements ToolNBT {
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
{
if(!player.world.isRemote){
- World world = player.getEntityWorld();
-
if(itemstack.getItem() instanceof CustomHoe){
if( getEmerald(itemstack)){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
}
- /*if( getDiamondLevel(itemstack) > 0 ){
+ if( getDiamondLevel(itemstack) > 0 ){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
- itemstack.getItem().setHarvestLevel("pickaxe", 3);
- }*/
- /*if( getRedstoneLevel(itemstack) > 0 ){
+ //itemstack.getItem().setHarvestLevel("pickaxe", 3);
+ }
+ if( getRedstoneLevel(itemstack) > 0 ){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(32), getRedstoneLevel(itemstack));
//System.out.println(itemstack.getEnchantmentTagList());
- }*/
+ }
if ( getLapisLevel(itemstack) > 0) {
itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), getLapisLevel(itemstack));
}
@@ -339,95 +44,4 @@ public class CustomHoe extends ItemHoe implements ToolNBT {
return false;
}
- @Override
- protected void setBlock(ItemStack stack, EntityPlayer player, World worldIn, BlockPos pos, IBlockState state)
- {
- worldIn.playSound(player, pos, SoundEvents.ITEM_HOE_TILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
-
- if (!worldIn.isRemote)
- {
- worldIn.setBlockState(pos, state, 11);
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, player);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1);
- dropStack.setItemDamage(stack.getItemDamage());
- dropStack.setTagCompound(new NBTTagCompound());
- NBTTagCompound copyNBT;
- copyNBT = stack.getSubCompound("tags").copy();
- dropStack.setTagCompound(copyNBT);
- PlayerHelper.spawnItemOnPlayer(worldIn, player, dropStack);
- player.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
- }
-
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java
index 3c4c16cd..9aa3e1f3 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java
@@ -1,339 +1,39 @@
package nmd.primal.forgecraft.items.tools;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.ThreadLocalRandom;
-
/**
* Created by mminaie on 3/14/17.
*/
-public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
+public class CustomPickaxe extends AbstractPickaxe implements ToolNBT{
private Item drop;
public CustomPickaxe(String name, Item.ToolMaterial material, Item damageDrop) {
- super(material);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop=damageDrop;
- //this.toolClass = "pickaxe";
-
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
- if (item.hasTagCompound()) {
-
- if (getHot(item) == false) {
- if (getModifiers(item) != 0) {
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.1F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.11F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.12F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.111F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.102F;
- }
-
- // ============
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.01F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.02F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 3) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.03F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 3) &&
- (getLapisLevel(item) == 0)) {
- return 0.003F;
- }
-
- //=========
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 1)) {
- return 0.0001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2)) {
- return 0.0002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 3)) {
- return 0.0003F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 1)) {
- return 0.0111F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 2)) {
- return 0.0012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 1)) {
- return 0.0021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2) ) {
- return 0.0102F;
- }
- }
- }
- if (getHot(item) == true) {
- return 1.0F;
- }
-
- if (getHot(item) == false) {
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- //item.setItemDamage(item.getMaxDamage()-2);
-
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
-
- }
-
- //this.setDamage(item, this.getMaxDamage(item) -2);
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
-
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
- }
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
-
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
- if(item.hasTagCompound())
- {
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
+ super(name, material, damageDrop);
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
{
if(!player.world.isRemote){
- World world = player.getEntityWorld();
- //System.out.println(world.getBlockState(pos).getBlock());
if(itemstack.getItem() instanceof CustomPickaxe){
if( getEmerald(itemstack)){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
}
if( getDiamondLevel(itemstack) > 0 ){
- //itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
itemstack.getItem().setHarvestLevel("pickaxe", 3);
}
- /*if( getRedstoneLevel(itemstack) > 0 ){
+ if( getRedstoneLevel(itemstack) > 0 ){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(32), getRedstoneLevel(itemstack));
//System.out.println(itemstack.getEnchantmentTagList());
- }*/
+ }
if ( getLapisLevel(itemstack) > 0) {
itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), getLapisLevel(itemstack));
}
@@ -343,87 +43,4 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
return false;
}
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- player.inventory.markDirty();
- //player.inventory.inventoryChanged = true;
- }
- }
-
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
- @Override
- public float getDestroySpeed(ItemStack stack, IBlockState state)
- {
- Material material = state.getMaterial();
- //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
-
- if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){
- return super.getDestroySpeed(stack, state);
- } else {
- return this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1);
- }
-
- }
-
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java
index c38d9516..b616b845 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java
@@ -1,338 +1,38 @@
package nmd.primal.forgecraft.items.tools;
-import com.google.common.collect.Sets;
-import com.mojang.realmsclient.gui.ChatFormatting;
-import net.minecraft.block.Block;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.core.common.helper.PlayerHelper;
-import nmd.primal.forgecraft.ModInfo;
-import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ThreadLocalRandom;
-
/**
* Created by mminaie on 3/21/17.
*/
-public class CustomShovel extends ItemSpade implements ToolNBT {
-
- private static final Set EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND, Blocks.GRASS_PATH});
- private Item drop;
+public class CustomShovel extends AbstractShovel implements ToolNBT {
public CustomShovel(String name, Item.ToolMaterial material, Item damageDrop) {
- super(material);
- this.setUnlocalizedName(name);
- this.setRegistryName(name);
- this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.setMaxStackSize(1);
- this.setNoRepair();
- this.drop=damageDrop;
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
- /***
-
- hot . emerald . diamond . redstone . lapis
- 0 . 0 . 0 . 0 . 0
-
- ***/
-
- @SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
- if (item.hasTagCompound()) {
-
- if (getHot(item) == false) {
- if (getModifiers(item) != 0) {
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.1F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.11F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.12F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.111F;
- }
-
- if ( (getEmerald(item) == true) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.102F;
- }
-
- // ============
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.01F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.02F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 3) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 0)) {
- return 0.03F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 3) &&
- (getLapisLevel(item) == 0)) {
- return 0.003F;
- }
-
- //=========
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 1)) {
- return 0.0001F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2)) {
- return 0.0002F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 3)) {
- return 0.0003F;
- }
-
- //=======
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 1)) {
- return 0.0111F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 2) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 0)) {
- return 0.021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 0)) {
- return 0.012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 1) &&
- (getLapisLevel(item) == 2)) {
- return 0.0012F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 0) &&
- (getRedstoneLevel(item) == 2) &&
- (getLapisLevel(item) == 1)) {
- return 0.0021F;
- }
-
- if ( (getEmerald(item) == false) &&
- (getDiamondLevel(item) == 1) &&
- (getRedstoneLevel(item) == 0) &&
- (getLapisLevel(item) == 2) ) {
- return 0.0102F;
- }
- }
- }
- if (getHot(item) == true) {
- return 1.0F;
- }
-
- if (getHot(item) == false) {
- if (getModifiers(item) == 0) {
- return 0.0F;
- }
- }
- }
- return 0.0F;
- }
- });
- }
-
- public static boolean isHidden()
- {
- return false;
- }
-
- @Override
- public void onCreated(ItemStack item, World world, EntityPlayer playerIn) {
-
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- /*setHot(item, false);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);*/
- }
- }
-
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
- if(!world.isRemote) {
- if (!item.hasTagCompound()) {
- item.setTagCompound(new NBTTagCompound());
- NBTTagCompound tags = new NBTTagCompound();
-
- item.getTagCompound().setTag("tags", tags);
-
- setHot(item, false);
- setEmerald(item, false);
- setDiamondLevel(item, 0);
- setRedstoneLevel(item, 0);
- setLapisLevel(item, 0);
- setModifiers(item, 0);
-
- }
-
-
- if( this.getMaxDamage(item) - this.getDamage(item) <= 1 ){
-
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokenwroughtirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokencleanirontool, 1));
- }
- if(this.toolMaterial == PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL){
- PlayerHelper.spawnItemOnPlayer(world, (EntityPlayer) player, new ItemStack(ModItems.brokensteeltool, 1));
- }
- ((EntityPlayer) player).inventory.deleteStack(item);
- }
-
- }
- }
-
- //public void onItemTooltip(ItemTooltipEvent event){
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack item, @Nullable World world, List tooltip, ITooltipFlag flagIn)
- {
- if(item.hasTagCompound())
- {
-
- tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
- if (getEmerald(item) == true) {
- tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
- }
- if (getDiamondLevel(item) > 0) {
- tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
- }
- if (getRedstoneLevel(item) > 0) {
- tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
- }
- if (getLapisLevel(item) > 0) {
- tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
- }
- tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
- }
+ super(name, material, damageDrop);
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
{
if(!player.world.isRemote){
- World world = player.getEntityWorld();
if(itemstack.getItem() instanceof CustomShovel){
if( getEmerald(itemstack)){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
}
if( getDiamondLevel(itemstack) > 0 ){
- //itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
- itemstack.getItem().setHarvestLevel("shovel", 3);
+ itemstack.addEnchantment(Enchantment.getEnchantmentByID(34), getDiamondLevel(itemstack));
+ //itemstack.getItem().setHarvestLevel("shovel", 3);
}
- /*if( getRedstoneLevel(itemstack) > 0 ){
+ if( getRedstoneLevel(itemstack) > 0 ){
itemstack.addEnchantment(Enchantment.getEnchantmentByID(32), getRedstoneLevel(itemstack));
//System.out.println(itemstack.getEnchantmentTagList());
- }*/
+ }
if ( getLapisLevel(itemstack) > 0) {
itemstack.addEnchantment(Enchantment.getEnchantmentByID(35), getLapisLevel(itemstack));
}
@@ -342,82 +42,4 @@ public class CustomShovel extends ItemSpade implements ToolNBT {
return false;
}
- @Override
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.damageItem(1, attacker);
- return true;
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
-
- EntityPlayer player = (EntityPlayer) attacker;
- World world = attacker.getEntityWorld();
- if(!world.isRemote) {
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- attacker.renderBrokenItemStack(stack);
- stack.shrink(1);
- return true;
- }
- return false;
- }
- }
-
- @Override
- public boolean onBlockDestroyed(ItemStack stack, World world, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
- {
- if (!world.isRemote && (double)state.getBlockHardness(world, pos) != 0.0D)
- {
- if(stack.getMaxDamage() - stack.getItemDamage() >1 ) {
- stack.getTagCompound().removeTag("ench");
- if(getDiamondLevel(stack) > 0) {
- if(ThreadLocalRandom.current().nextInt(0, getDiamondLevel(stack)) == 0) {
- stack.damageItem(1, entityLiving);
- }
- } else stack.damageItem(1, entityLiving);
- } else {
- ItemStack dropStack = new ItemStack(drop, 1, stack.getItemDamage());
- NBTTagCompound copyNBT = stack.getTagCompound();
- dropStack.setTagCompound(copyNBT);
- EntityPlayer player = (EntityPlayer) entityLiving;
- PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
- entityLiving.renderBrokenItemStack(stack);
- stack.shrink(1);
- }
- }
-
- return true;
- }
-
- @Override
- public float getDestroySpeed(ItemStack stack, IBlockState state)
- {
- for (String type : getToolClasses(stack))
- {
- if (state.getBlock().isToolEffective(type, state))
- return efficiency;
- }
- return this.EFFECTIVE_ON.contains(state.getBlock()) ? (this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1)) : 1.0F;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public boolean hasEffect(ItemStack stack)
- {
- return false;
- }
-
- @Override
- public boolean isRepairable()
- {
- return false;
- }
-
- public int getItemEnchantability(ItemStack stack)
- {
- return 0;
- }
-
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java
index ad9587b7..9993125f 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java
@@ -1,5 +1,8 @@
package nmd.primal.forgecraft.items.weapons;
+import com.google.common.collect.ImmutableMap;
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -7,105 +10,69 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Enchantments;
import net.minecraft.init.Items;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.IItemPropertyGetter;
-import net.minecraft.item.ItemArrow;
-import net.minecraft.item.ItemStack;
+import net.minecraft.item.*;
import net.minecraft.stats.StatList;
import net.minecraft.util.*;
import net.minecraft.world.World;
+import net.minecraftforge.common.animation.ITimeValue;
+import net.minecraftforge.common.animation.TimeValues;
+import net.minecraftforge.common.capabilities.Capability;
+import net.minecraftforge.common.capabilities.ICapabilityProvider;
+import net.minecraftforge.common.model.animation.CapabilityAnimation;
+import net.minecraftforge.common.model.animation.IAnimationStateMachine;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.items.BaseItem;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import java.util.List;
/**
* Created by mminaie on 7/2/17.
*/
-public class Longbow extends BaseItem {
-
- int mod=15;
- int time=0;
+public class Longbow extends ItemBow {
public Longbow(String name) {
- super(name);
this.setMaxDamage(9000);
this.setMaxStackSize(1);
this.setNoRepair();
+ this.setRegistryName(name);
+ this.setUnlocalizedName(name);
+ this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
- this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
-
+ this.addPropertyOverride(new ResourceLocation("pull"), new IItemPropertyGetter()
+ {
@SideOnly(Side.CLIENT)
- public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase playerin) {
-
- if (time < 1 * mod) {
- return 0.0F;
- }
- if (time >= 1 * mod && time < 2 * mod) {
- return 0.1F;
- }
- if (time >= 2 * mod && time < 3 * mod) {
- return 0.2F;
- }
- if (time >= 3 * mod && time < 4 * mod) {
- return 0.3F;
- }
- if (time >= 4 * mod && time < 5 * mod) {
- return 0.4F;
- }
- if (time >= 5 * mod && time < 6 * mod) {
- return 0.5F;
- }
- if (time >= 6 * mod && time < 7 * mod) {
- return 0.6F;
- }
- if (time >= 7 * mod && time < 8 * mod) {
- return 0.7F;
- }
- if (time >= 8 * mod && time < 72000) {
- return 0.8F;
- }
-
- return 0.0f;
+ public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
+ {
+ if (entityIn == null)
+ {
+ return 0.0F;
+ }
+ else
+ {
+ return entityIn.getActiveItemStack().getItem() != ModItems.longbow? 0.0F : (float)(stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 75.0F;
+ }
}
});
- }
-
- @Override
- public void onUpdate(ItemStack item, World world, Entity playerin, int itemSlot, boolean isSelected) {
-
- EntityPlayer player = (EntityPlayer) playerin;
- if(player.inventory.getCurrentItem().getItem() == ModItems.longbow) {
- time = item.getMaxItemUseDuration() - player.getItemInUseCount();
- }
-
- }
-
- private ItemStack findAmmo(EntityPlayer player)
- {
-
- for (int i = 0; i < player.inventory.getSizeInventory(); ++i)
+ this.addPropertyOverride(new ResourceLocation("pulling"), new IItemPropertyGetter()
{
- ItemStack itemstack = player.inventory.getStackInSlot(i);
-
- if (this.isArrow(itemstack))
+ @SideOnly(Side.CLIENT)
+ public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
{
- return itemstack;
+ return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F;
}
- }
-
- return ItemStack.EMPTY;
+ });
}
- protected boolean isArrow(ItemStack stack)
- {
- return stack.getItem() instanceof ItemArrow;
+ public String getName() {
+ return this.getRegistryName().toString();
}
-
/**
* Called when the player stops using an Item (stops holding the right mouse button).
*/
@@ -140,9 +107,11 @@ public class Longbow extends BaseItem {
{
ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW));
EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer);
- entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 1.0F);
+ System.out.println(f);
+ entityarrow.setDamage(entityarrow.getDamage()+(entityarrow.getDamage()*f));
+ entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 0.5F);
- if (f >= 1.0F)
+ if (f >= 0.5F)
{
entityarrow.setIsCritical(true);
}
@@ -173,47 +142,10 @@ public class Longbow extends BaseItem {
}
}
- /**
- * Gets the velocity of the arrow entity from the bow's charge
- */
-
- public static float getArrowVelocity(int charge)
- {
- float f = (float)charge / 5.0F;
- f = (f * f + f * 2.0F);
-
- if (f > 1.0F)
- {
- f = 1.0F;
- }
-
- return f;
- }
-
- /**
- * How long it takes to use or consume an item
- */
- @Override
- public int getMaxItemUseDuration(ItemStack stack)
- {
- return 72000;
- }
-
-
-
- /**
- * returns the action that specifies what animation to play when the items is being used
- */
- @Override
- public EnumAction getItemUseAction(ItemStack stack)
- {
- return EnumAction.BOW;
- }
-
/**
* Called when the equipped item is right clicked.
*/
- @Override
+ /*@Override
public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn)
{
ItemStack itemstack = playerIn.getHeldItem(handIn);
@@ -231,6 +163,42 @@ public class Longbow extends BaseItem {
playerIn.setActiveHand(handIn);
return new ActionResult(EnumActionResult.SUCCESS, itemstack);
}
+ }*/
+/*
+ private ItemStack findAmmo(EntityPlayer player)
+ {
+
+ for (int i = 0; i < player.inventory.getSizeInventory(); ++i)
+ {
+ ItemStack itemstack = player.inventory.getStackInSlot(i);
+
+ if (this.isArrow(itemstack))
+ {
+ return itemstack;
+ }
+ }
+
+ return ItemStack.EMPTY;
+
+ }
+/*
+ /**
+ * Gets the velocity of the arrow entity from the bow's charge
+ */
+
+ public static float getArrowVelocity(int charge)
+ {
+ float f = (float)charge / 60;
+
+ if (f > 1.0F)
+ {
+ f = 1.0F;
+ }
+ if(f < 0.1){
+ f =0.1f;
+ }
+
+ return f;
}
@Override
@@ -238,4 +206,39 @@ public class Longbow extends BaseItem {
{
return 0;
}
+ private ItemStack findAmmo(EntityPlayer player)
+ {
+ if (this.isArrow(player.getHeldItem(EnumHand.OFF_HAND)))
+ {
+ return player.getHeldItem(EnumHand.OFF_HAND);
+ }
+ else if (this.isArrow(player.getHeldItem(EnumHand.MAIN_HAND)))
+ {
+ return player.getHeldItem(EnumHand.MAIN_HAND);
+ }
+ else
+ {
+ for (int i = 0; i < player.inventory.getSizeInventory(); ++i)
+ {
+ ItemStack itemstack = player.inventory.getStackInSlot(i);
+
+ if (this.isArrow(itemstack))
+ {
+ return itemstack;
+ }
+ }
+
+ return ItemStack.EMPTY;
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flagIn)
+ {
+ if(!stack.isEmpty()) {
+ tooltip.add(ChatFormatting.GRAY + "The longbow will increase the damage and the velocity of the arrow it shoots relative to how far its drawn.");
+ }
+ }
+
}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/RawLongbow.java b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/RawLongbow.java
new file mode 100644
index 00000000..b366406a
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/RawLongbow.java
@@ -0,0 +1,28 @@
+package nmd.primal.forgecraft.items.weapons;
+
+import com.mojang.realmsclient.gui.ChatFormatting;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+import nmd.primal.forgecraft.items.BaseItem;
+
+import javax.annotation.Nullable;
+import java.util.List;
+
+public class RawLongbow extends BaseItem {
+
+ public RawLongbow(String registryName) {
+ super(registryName);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) {
+
+ tooltip.add(ChatFormatting.GRAY + "Stack two Yew Staves in-world and right-click the bottom Yew Stave with a Work Blade");
+
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java b/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java
index 475f82af..c299be76 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/proxy/ClientProxy.java
@@ -2,12 +2,10 @@ package nmd.primal.forgecraft.proxy;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.item.Item;
-import net.minecraftforge.fml.client.registry.ClientRegistry;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
+import nmd.primal.forgecraft.init.ModTileRenders;
import nmd.primal.forgecraft.models.ModelPlateHelmet;
-import nmd.primal.forgecraft.renders.blocks.*;
-import nmd.primal.forgecraft.tiles.*;
import java.util.HashMap;
import java.util.Map;
@@ -38,12 +36,7 @@ public class ClientProxy implements CommonProxy {
//@Override
public void registerTileRendering()
{
- ClientRegistry.bindTileEntitySpecialRenderer(TileForge.class, new TileForgeRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TilePistonBellows.class, new TilePistonBellowsRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileBloomery.class, new TileBloomeryRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileAnvil.class, new TileAnvilRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender());
+ ModTileRenders.init();
}
public void registerModels(){
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java
index eb060f71..3da0f22b 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java
@@ -13,8 +13,8 @@ import net.minecraft.item.Item;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import nmd.primal.core.api.PrimalAPI;
-import nmd.primal.forgecraft.blocks.Anvil.AnvilBase;
-import nmd.primal.forgecraft.blocks.Anvil.AnvilStone;
+import nmd.primal.forgecraft.blocks.AnvilBase;
+import nmd.primal.forgecraft.blocks.AnvilStone;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.BaseMultiItem;
import nmd.primal.forgecraft.tiles.TileAnvil;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java
new file mode 100644
index 00000000..cdd99d51
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileWorkbenchRender.java
@@ -0,0 +1,381 @@
+package nmd.primal.forgecraft.renders.blocks;
+
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderItem;
+import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.math.BlockPos;
+import nmd.primal.forgecraft.blocks.machine.Workbench;
+import nmd.primal.forgecraft.tiles.TileWorkbench;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * Created by kitsu on 12/4/2016.
+ */
+public class TileWorkbenchRender extends TileEntitySpecialRenderer
+{
+ private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
+
+ @Override
+ public void render(TileWorkbench tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
+ {
+ BlockPos pos = tile.getPos();
+ IBlockState state = this.getWorld().getBlockState(pos);
+ if (state.getBlock() instanceof Workbench) {
+
+ GL11.glPushMatrix();
+ GL11.glTranslated(x, y, z);
+ //GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
+ Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
+ float prevLGTX = OpenGlHelper.lastBrightnessX;
+ float prevLGTY = OpenGlHelper.lastBrightnessY;
+
+ int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
+
+ ItemStack stack0 = tile.getSlotStack(0);
+ ItemStack stack1 = tile.getSlotStack(1);
+ ItemStack stack2 = tile.getSlotStack(2);
+ ItemStack stack3 = tile.getSlotStack(3);
+ ItemStack stack4 = tile.getSlotStack(4);
+ ItemStack stack5 = tile.getSlotStack(5);
+ ItemStack stack6 = tile.getSlotStack(6);
+
+
+
+
+ if (state.getValue(Workbench.FACING) == EnumFacing.NORTH) {
+
+ if (!stack0.isEmpty()) {
+ boolean is_block = stack0.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+
+ GL11.glTranslated(trans, yTrans, 0.25D);
+ GL11.glScalef(scale, scale, scale);
+ GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
+ renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if (!stack1.isEmpty()) {
+ boolean is_block = stack1.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(trans+0.375D, yTrans, 0.25D);
+ GL11.glScalef(scale, scale, scale);
+ GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
+ renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if(!stack2.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.4375, 0.71875D, 0.26D);
+ GL11.glScalef(0.7F, 1F, 0.55F);
+ GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack3.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.37D, 0.27D, 0.21D);
+ GL11.glScalef(1F, 1F, 1F);
+ GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ if(!stack4.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.85, 0.71875D, 0.25D);
+ GL11.glScalef(0.3F, 0.3F, 0.3F);
+ GL11.glRotated(45.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack5.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.48D, 0.3D, -0.15D);
+ GL11.glScalef(1F, 1F, 1F);
+ GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+
+ }
+ if (state.getValue(Workbench.FACING) == EnumFacing.SOUTH) {
+
+ if (!stack0.isEmpty()) {
+ boolean is_block = stack0.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(trans+0.375D, yTrans, 0.75D);
+
+ GL11.glScalef(scale, scale, scale);
+ renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if (!stack1.isEmpty()) {
+ boolean is_block = stack1.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(trans, yTrans, 0.75D);
+ GL11.glScalef(scale, scale, scale);
+ renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if(!stack2.isEmpty()){
+ GL11.glPushMatrix();
+
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.5625, 0.71875D, 0.7925D);
+ GL11.glScalef(0.7F, 1F, 0.55F);
+ GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack3.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.55, 0.27D, 0.77D);
+ GL11.glScalef(1F, 1F, 1F);
+ GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ if(!stack4.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.175, 0.71875D, 0.78D);
+ GL11.glScalef(0.3F, 0.3F, 0.3F);
+ GL11.glRotated(45.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack5.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.52D, 0.3D, 1.15D);
+ GL11.glScalef(1F, 1F, 1F);
+ GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ }
+ if (state.getValue(Workbench.FACING) == EnumFacing.EAST) {
+
+ if (!stack0.isEmpty()) {
+ boolean is_block = stack0.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+
+ GL11.glTranslated(0.75D, yTrans, trans);
+ GL11.glScalef(scale, scale, scale);
+ GL11.glRotated(90F, 0.0F, 1.0F, 0.0F);
+ renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if (!stack1.isEmpty()) {
+ boolean is_block = stack1.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.75D, yTrans, trans+0.375D);
+ GL11.glScalef(scale, scale, scale);
+ GL11.glRotated(90F, 0.0F, 1.0F, 0.0F);
+ renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if(!stack2.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.7925D, 0.71875D, 0.4375);
+ GL11.glScalef(0.55F, 1F, 0.7F);
+ GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack3.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.75, 0.27D, 0.4D);
+ GL11.glScalef(1F, 1F, 1F);
+ GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ if(!stack4.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.755, 0.71875D, 0.8D);
+ GL11.glScalef(0.3F, 0.3F, 0.3F);
+ GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack5.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(1.15D, 0.3D, 0.485D);
+ GL11.glScalef(1F, 1F, 1F);
+ GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ }
+ if (state.getValue(Workbench.FACING) == EnumFacing.WEST) {
+
+ if (!stack0.isEmpty()) {
+ boolean is_block = stack0.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+ GL11.glTranslated(0.25D, yTrans, trans+0.375D);
+ GL11.glScalef(scale, scale, scale);
+ GL11.glRotated(-90F, 0.0F, 1.0F, 0.0F);
+ renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+
+ }
+ if (!stack1.isEmpty()) {
+ boolean is_block = stack1.getItem() instanceof ItemBlock;
+ float scale = is_block ? 0.5F : 0.3F;
+ double trans = is_block ? 0.3125D : 0.3125D;
+ double yTrans = is_block ? 0.3D : 0.3D;
+ GL11.glPushMatrix();
+
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.25D, yTrans, trans);
+ GL11.glScalef(scale, scale, scale);
+ GL11.glRotated(-90F, 0.0F, 1.0F, 0.0F);
+ renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack2.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.255D, 0.71875D, 0.565);
+ GL11.glScalef(0.55F, 1F, 0.7F);
+ GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack3.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.235, 0.27D, 0.6D);
+ GL11.glScalef(1F, 1F, 1F);
+ //GL11.glRotated(-180.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ if(!stack4.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(0.2175, 0.71875D, 0.185D);
+ GL11.glScalef(0.3F, 0.3F, 0.3F);
+ GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED);
+ GL11.glPopMatrix();
+ }
+ if(!stack5.isEmpty()){
+ GL11.glPushMatrix();
+ //System.out.println(stack2);
+ //GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslated(-0.138D, 0.3D, 0.52D);
+ GL11.glScalef(1F, 1F, 1F);
+ //GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
+ //GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
+
+ renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
+ GL11.glPopMatrix();
+ }
+ }
+
+
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
+ GL11.glPopMatrix();
+ }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java
index 50e9bbba..f9752b00 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java
@@ -5,6 +5,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
+import nmd.primal.core.api.PrimalAPI;
+import nmd.primal.forgecraft.items.BaseMultiItem;
+import nmd.primal.forgecraft.items.parts.ToolPart;
/**
* Created by mminaie on 3/4/17.
@@ -35,6 +38,7 @@ public class TileAnvil extends TileBaseSlot implements ITickable {
return reverseZ[z];
}
+ private int iterate =0;
public NonNullList slotList = NonNullList.withSize(100, ItemStack.EMPTY);
@@ -44,39 +48,31 @@ public class TileAnvil extends TileBaseSlot implements ITickable {
if (!world.isRemote) {
IBlockState state = world.getBlockState(this.pos);
-
- /***
- Cooling Code
- */
- /*if ( ThreadLocalRandom.current().nextInt(0,10000) == 0 ) {
- for(int i=0; i= recipe.getCookTemp() &&
- !this.getSlotStack(1).getSubCompound("BlockEntityTag").getBoolean("status")) {
- cookCounter++;
- //this.getSlotStack(1).getSubCompound("BlockEntityTag").setBoolean("hot", true);
- //System.out.println("Cooking");
- this.updateBlock();
- this.markDirty();
- }
- if (cookCounter >= (recipe.getCookTime()/4) && !this.getSlotStack(1).getSubCompound("BlockEntityTag").getBoolean("status")) {
- this.getSlotStack(1).getSubCompound("BlockEntityTag").setInteger("hot", 15);
- //System.out.println("hot");
- this.updateBlock();
- this.markDirty();
- }
- if (cookCounter >= recipe.getCookTime() && !this.getSlotStack(1).getSubCompound("BlockEntityTag").getBoolean("status")) {
- this.getSlotStack(1).getSubCompound("BlockEntityTag").setBoolean("status", true);
- this.getSlotStack(1).getSubCompound("BlockEntityTag").setInteger("heat", this.getHeat());
- cookCounter = 0;
- //System.out.println("Cooked");
- this.updateBlock();
- this.markDirty();
- }
- if (this.getSlotStack(1).isEmpty()) {
- this.cookCounter = 0;
+ if(CrucibleCrafting.isRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4))) {
+ CrucibleCrafting recipe = CrucibleCrafting.getRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4));
+ if (recipe != null) {
+ if (!recipe.isDisabled()) {
+ if (this.getHeat() >= recipe.getCookTemp() &&
+ !this.getSlotStack(1).getSubCompound("BlockEntityTag").getBoolean("status")) {
+ cookCounter++;
+ //this.getSlotStack(1).getSubCompound("BlockEntityTag").setBoolean("hot", true);
+ //System.out.println("Cooking");
+ this.updateBlock();
+ this.markDirty();
+ }
+ if (cookCounter >= (recipe.getCookTime() / 4) && !this.getSlotStack(1).getSubCompound("BlockEntityTag").getBoolean("status")) {
+ this.getSlotStack(1).getSubCompound("BlockEntityTag").setInteger("hot", 15);
+ //System.out.println("hot");
+ this.updateBlock();
+ this.markDirty();
+ }
+ if (cookCounter >= recipe.getCookTime() && !this.getSlotStack(1).getSubCompound("BlockEntityTag").getBoolean("status")) {
+ this.getSlotStack(1).getSubCompound("BlockEntityTag").setBoolean("status", true);
+ this.getSlotStack(1).getSubCompound("BlockEntityTag").setInteger("heat", this.getHeat());
+ cookCounter = 0;
+ //System.out.println("Cooked");
+ this.updateBlock();
+ this.markDirty();
+ }
+ if (this.getSlotStack(1).isEmpty()) {
+ this.cookCounter = 0;
+ }
+ }
}
}
}
@@ -281,7 +285,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
}
if(index == 1){
if (stack.getItem() == ModItems.softcrucible) {
- return true;
+ return false;
}
if(Block.getBlockFromItem(stack.getItem()) instanceof NBTCrucible ){
return true;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java
index 392136fa..8bf94a80 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java
@@ -61,23 +61,17 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
Block block = world.getBlockState(abovePos).getBlock();
if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) {
- if (this.iteration == 100) {
- RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
- if(randomCheck(1000)) {
- makeSmoke(world, pos);
- }
- }
if (this.iteration == 200) {
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
- if(randomCheck(1000)) {
+ if(randomCheck(800)) {
makeSmoke(world, pos);
}
}
-
+ if(this.iteration == 250){
+ setHeat(this.getHeat()-25);
+ }
if (this.iteration == 300) {
- this.iteration = 0;
-
-
+ this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
if (this.getSlotStack(0) == ItemStack.EMPTY) {
world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
this.markDirty();
@@ -89,12 +83,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
}
}
- //slotZeroManager(world);
+ if(this.iteration >=301){
+ iteration =0;
+ }
craftingManager();
}
- if(this.iteration == 299){
- this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
- }
+
+
}
}
@@ -144,7 +139,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
if(h > 0) {
this.setHeat(h - 25);
}
- if(h < 10 ){
+ if(h < 50 ){
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
}
}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java
new file mode 100644
index 00000000..9af220fa
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileWorkbench.java
@@ -0,0 +1,57 @@
+package nmd.primal.forgecraft.tiles;
+
+import net.minecraft.item.ItemStack;
+import nmd.primal.core.common.helper.RecipeHelper;
+import nmd.primal.forgecraft.items.parts.ToolPart;
+import nmd.primal.forgecraft.items.tools.CustomAxe;
+import nmd.primal.forgecraft.items.tools.CustomHoe;
+import nmd.primal.forgecraft.items.tools.CustomPickaxe;
+import nmd.primal.forgecraft.items.tools.CustomShovel;
+
+public class TileWorkbench extends TileBaseSlot{
+ public boolean isItemValidForSlot(int index, ItemStack stack) {
+ /*if(index == 0){
+ if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") ||
+ RecipeHelper.isOreName(stack.getItem(), "stickLacquer") ||
+ RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")){
+ return true;
+ }
+ }
+ if(index == 1){
+ if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") ||
+ RecipeHelper.isOreName(stack.getItem(), "stickLacquer") ||
+ RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")){
+ return true;
+ }
+ }*/
+ if(index == 2){
+ if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") || RecipeHelper.isOreName(stack.getItem(), "stickLacquer")){
+ return true;
+ }
+ }
+ /*if(index == 3){
+ if (RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")) {
+ return true;
+ }
+ }*/
+ if(index == 3){
+ if ( (stack.getItem() instanceof ToolPart)) {
+ return true;
+ }
+ }
+ if(index == 4){
+ if (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) {
+ return true;
+ }
+ }
+ if(index == 5){
+ if(stack.getItem() instanceof CustomAxe ||
+ stack.getItem() instanceof CustomHoe ||
+ stack.getItem() instanceof CustomPickaxe ||
+ stack.getItem() instanceof CustomShovel){
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java
index b9aa144a..164237ee 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java
@@ -30,7 +30,7 @@ import static nmd.primal.forgecraft.items.SlottedTongs.ITEM_HANDLER;
/**
* Created by mminaie on 6/10/17.
*/
-public interface AnvilHandler {
+public interface AnvilHandler extends ToolMaterialMap {
double[] normalMin = {0.0625, 0.25, 0.4375, 0.625, 0.8125};
@@ -60,7 +60,7 @@ public interface AnvilHandler {
AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray);
if (recipe != null) {
if (pItem.getItem() instanceof Gallagher) {
- pItem.damageItem(15, player);
+ pItem.damageItem(10, player);
}
if (pItem.getItem() instanceof ForgeHammer) {
pItem.damageItem(1, player);
@@ -87,6 +87,12 @@ public interface AnvilHandler {
tempStack.getSubCompound("tags").setInteger("modifiers", 0);
CommonUtils.spawnItemEntityFromWorld(world, pos, tempStack);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
+ }
+ return true;
}
if (tile.getSlotStack(12).getItem().equals(recipe.getOutput().getItem())) {
@@ -100,21 +106,32 @@ public interface AnvilHandler {
if (recipe.getUpgrade() == "repair") {
CommonUtils.spawnItemEntityFromWorld(world, pos, outputStack);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
+ }
+ return true;
}
-
- if (outputStack.getSubCompound("tags").getInteger("modifiers") < 3) {
+ if (outputStack.getSubCompound("tags").getInteger("modifiers") < ToolMaterialMap.materialModifiers.get(((ToolPart) recipe.getOutput().getItem()).getMaterial()) ) {
//Upgrade emerald
if (recipe.getUpgrade() == "emerald") {
if (outputStack.getSubCompound("tags").getInteger("lapis") == 0) {
- if (outputStack.getSubCompound("tags").getBoolean("emerald") == false) {
+ if (!outputStack.getSubCompound("tags").getBoolean("emerald")) {
outputStack.setItemDamage(tile.getSlotStack(12).getItemDamage());
outputStack.getSubCompound("tags").setInteger("emerald",
(outputStack.getSubCompound("tags").getInteger("emerald") + 1));
outputStack.getSubCompound("tags").setInteger("modifiers",
(outputStack.getSubCompound("tags").getInteger("modifiers") + 1));
CommonUtils.spawnItemEntityFromWorld(world, pos, outputStack);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
+ }
+ return true;
}
}
}
@@ -127,6 +144,12 @@ public interface AnvilHandler {
outputStack.getSubCompound("tags").setInteger("modifiers",
(outputStack.getSubCompound("tags").getInteger("modifiers") + 1));
CommonUtils.spawnItemEntityFromWorld(world, pos, outputStack);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
+ }
+ return true;
}
//Upgrade redstone
@@ -137,31 +160,44 @@ public interface AnvilHandler {
outputStack.getSubCompound("tags").setInteger("modifiers",
(outputStack.getSubCompound("tags").getInteger("modifiers") + 1));
CommonUtils.spawnItemEntityFromWorld(world, pos, outputStack);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
+ }
+ return true;
}
//Upgrade lapis
if (recipe.getUpgrade() == "lapis") {
outputStack.setItemDamage(tile.getSlotStack(12).getItemDamage());
- if (outputStack.getSubCompound("tags").getBoolean("emerald") == false) {
+ if (!outputStack.getSubCompound("tags").getBoolean("emerald")) {
outputStack.getSubCompound("tags").setInteger("lapis",
(outputStack.getSubCompound("tags").getInteger("lapis") + 1));
outputStack.getSubCompound("tags").setInteger("modifiers",
(outputStack.getSubCompound("tags").getInteger("modifiers") + 1));
CommonUtils.spawnItemEntityFromWorld(world, pos, outputStack);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
+ }
+ return true;
}
}
}
+ return false;
}
- } else {
+ }
+ if (!(recipe.getOutput().getItem() instanceof ToolPart)) {
CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput());
- }
- //world.playEvent(1031, pos, 0);
- for (int i = 0; i < tile.getSlotListSize(); i++) {
- if (!tile.getSlotStack(i).isEmpty()) {
- tile.setSlotStack(i, ItemStack.EMPTY);
+ for (int i = 0; i < tile.getSlotListSize(); i++) {
+ if (!tile.getSlotStack(i).isEmpty()) {
+ tile.setSlotStack(i, ItemStack.EMPTY);
+ }
}
+ return true;
}
- return true;
}
}
return false;
@@ -237,128 +273,127 @@ public interface AnvilHandler {
static boolean doWork(ItemStack pItem, Integer counter, TileAnvil tile, World world, BlockPos pos, EntityPlayer player) {
+ if (pItem.getItem().equals(ModItems.slottedtongs)) {
- if (pItem.getItem().equals(ModItems.slottedtongs)) {
+ IItemHandler inventory = pItem.getCapability(ITEM_HANDLER, null);
+ ItemStack tongStack = inventory.getStackInSlot(0).copy();
+ SlottedTongs itemstackItem = (SlottedTongs) pItem.getItem();
- IItemHandler inventory = pItem.getCapability(ITEM_HANDLER, null);
- ItemStack tongStack = inventory.getStackInSlot(0).copy();
- SlottedTongs itemstackItem = (SlottedTongs) pItem.getItem();
-
- if (tongStack.isEmpty()) {
- if (!tile.getSlotStack(counter).isEmpty()) {
- ItemStack tempStack = tile.getSlotStack(counter).copy();
- inventory.insertItem(0,tempStack, false);
- tile.setSlotStack(counter, ItemStack.EMPTY);
- itemstackItem.markDirty(pItem);
- return true;
- }
- }
-
- if (!tongStack.isEmpty()) {
- if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, inventory.extractItem(0, 1, false));
- itemstackItem.markDirty(pItem);
- return true;
- }
- }
- }
-
-
- if (pItem.getItem().equals(Items.AIR) && player.isSneaking()) {
-
- if (tile.getSlotStack(counter).getItem().equals(Items.DIAMOND)) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
- if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
- if (tile.getSlotStack(counter).getItem().equals(Items.EMERALD)) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
- if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.EMERALD_KNAPP)) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
- if (tile.getSlotStack(counter).getItem().equals(Items.REDSTONE)) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
-
- if (tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
-
- if (tile.getSlotStack(counter).getItem() instanceof BaseMultiItem) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
- tile.setSlotStack(counter, ItemStack.EMPTY);
- return true;
- }
- }
- if(tile.getSlotStack(counter).getItem() instanceof ToolPart){
- if (tile.getSlotStack(counter).getSubCompound("tags").getBoolean("hot") == false) {
- CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ if (tongStack.isEmpty()) {
+ if (!tile.getSlotStack(counter).isEmpty()) {
+ ItemStack tempStack = tile.getSlotStack(counter).copy();
+ inventory.insertItem(0,tempStack, false);
tile.setSlotStack(counter, ItemStack.EMPTY);
+ itemstackItem.markDirty(pItem);
return true;
}
}
- if (pItem.getItem().equals(Items.DIAMOND)) {
+ if (!tongStack.isEmpty()) {
if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
- pItem.shrink(1);
+ tile.setSlotStack(counter, inventory.extractItem(0, 1, false));
+ itemstackItem.markDirty(pItem);
return true;
}
}
+ }
+
+
+ if (pItem.getItem().equals(Items.AIR) && player.isSneaking()) {
+
+ if (tile.getSlotStack(counter).getItem().equals(Items.DIAMOND)) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
+ }
+ if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
+ }
+ if (tile.getSlotStack(counter).getItem().equals(Items.EMERALD)) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
+ }
+ if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.EMERALD_KNAPP)) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
+ }
+ if (tile.getSlotStack(counter).getItem().equals(Items.REDSTONE)) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
+ }
- if (pItem.getItem().equals(Items.EMERALD)) {
- if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
- pItem.shrink(1);
- return true;
- }
+ if (tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
}
- if (pItem.getItem().equals(PrimalAPI.Items.EMERALD_KNAPP)) {
- if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
- pItem.shrink(1);
- return true;
- }
+ if (tile.getSlotStack(counter).getItem() instanceof BaseMultiItem) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
}
+ }
+ if(tile.getSlotStack(counter).getItem() instanceof ToolPart){
+ if (tile.getSlotStack(counter).getSubCompound("tags").getBoolean("hot") == false) {
+ CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter));
+ tile.setSlotStack(counter, ItemStack.EMPTY);
+ return true;
+ }
+ }
- if (pItem.getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) {
- if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
- pItem.shrink(1);
- return true;
- }
+ if (pItem.getItem().equals(Items.DIAMOND)) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
+ pItem.shrink(1);
+ return true;
}
+ }
- if (pItem.getItem().equals(Items.REDSTONE)) {
- if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
- pItem.shrink(1);
- return true;
- }
+ if (pItem.getItem().equals(Items.EMERALD)) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
+ pItem.shrink(1);
+ return true;
}
+ }
- if (pItem.getItem().equals(Items.DYE) && pItem.getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) {
- if (tile.getSlotStack(counter).isEmpty()) {
- tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1, pItem.getItemDamage()));
- pItem.shrink(1);
- return true;
- }
+ if (pItem.getItem().equals(PrimalAPI.Items.EMERALD_KNAPP)) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
+ pItem.shrink(1);
+ return true;
}
+ }
+
+ if (pItem.getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
+ pItem.shrink(1);
+ return true;
+ }
+ }
+
+ if (pItem.getItem().equals(Items.REDSTONE)) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
+ pItem.shrink(1);
+ return true;
+ }
+ }
+
+ if (pItem.getItem().equals(Items.DYE) && pItem.getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1, pItem.getItemDamage()));
+ pItem.shrink(1);
+ return true;
+ }
+ }
return false;
}
@@ -373,7 +408,6 @@ public interface AnvilHandler {
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
- System.out.println(stack);
EntityItem itemDrop = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
itemDrop.setDefaultPickupDelay();
world.spawnEntity(itemDrop);
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java
index 707d9c66..50e7b48a 100644
--- a/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java
+++ b/kfc/src/main/java/nmd/primal/forgecraft/util/ForgeHandler.java
@@ -182,6 +182,20 @@ public interface ForgeHandler {
return true;
}
}
+ if (RecipeHelper.isOreName(pItem, "ingotWootz")) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(ModItems.wootzingotball, 1));
+ player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }
+ if (RecipeHelper.isOreName(pItem, "nuggetWootz")) {
+ if (tile.getSlotStack(counter).isEmpty()) {
+ tile.setSlotStack(counter, new ItemStack(ModItems.wootzchunk, 1));
+ player.inventory.getCurrentItem().shrink(1);
+ return true;
+ }
+ }
}
return false;
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/SlotHelper.java b/kfc/src/main/java/nmd/primal/forgecraft/util/SlotHelper.java
new file mode 100644
index 00000000..4bfff90a
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/util/SlotHelper.java
@@ -0,0 +1,27 @@
+package nmd.primal.forgecraft.util;
+
+import net.minecraft.item.ItemStack;
+
+public interface SlotHelper {
+
+ default void doFuelSlotManagement(ItemStack tileSlot, ItemStack playerSlot){
+
+
+
+ /***
+ *
+ * if fuelSlot is empty and playeritem is valid, set fuelSlot playerItem and clear player item
+ *
+ * if fuelSlot isn't empty and player item matches
+ * if fuelSLot + playerItem <= 64 set Fuelslot to fuelSlot.count plus playerItem.count and clear playerItem
+ * if fuelSlot + playeritem > 64
+ * do 64 - fuelSlot
+ * add that to fuel slot
+ * decrment that from playerItem
+ *
+ *
+ */
+
+ }
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/ToolMaterialMap.java b/kfc/src/main/java/nmd/primal/forgecraft/util/ToolMaterialMap.java
new file mode 100644
index 00000000..5fe196d8
--- /dev/null
+++ b/kfc/src/main/java/nmd/primal/forgecraft/util/ToolMaterialMap.java
@@ -0,0 +1,29 @@
+package nmd.primal.forgecraft.util;
+
+import net.minecraft.item.Item;
+import nmd.primal.core.api.PrimalAPI;
+
+import java.util.Hashtable;
+
+
+/**
+ * Created by mminaie on 3/29/17.
+ */
+public interface ToolMaterialMap {
+
+
+ Hashtable materialModifiers = new Hashtable(){{
+
+ put(PrimalAPI.ToolMaterials.TOOL_COPPER, 1);
+ put(PrimalAPI.ToolMaterials.TOOL_BRONZE, 1);
+ put(PrimalAPI.ToolMaterials.TOOL_CRUDE_IRON, 1);
+ put(PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 2);
+ put(PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 3);
+ put(PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 4);
+ put(PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 5);
+
+ }};
+
+
+
+}
diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/ToolMaterials.java b/kfc/src/main/java/nmd/primal/forgecraft/util/ToolMaterials.java
deleted file mode 100644
index e23422df..00000000
--- a/kfc/src/main/java/nmd/primal/forgecraft/util/ToolMaterials.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package nmd.primal.forgecraft.util;
-
-/**
- * Created by mminaie on 3/29/17.
- */
-public interface ToolMaterials {
-
-
-
-}
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/bronzechisel.json b/kfc/src/main/resources/assets/forgecraft/blockstates/bronzechisel.json
new file mode 100644
index 00000000..83b59b01
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/bronzechisel.json
@@ -0,0 +1,28 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "forgecraft:items/bronze/0",
+ "texture": "forgecraft:items/bronze/0"
+ }
+ },
+ "variants": {
+ "active=false,facing=down": { "model": "forgecraft:chisel_model" },
+ "active=false,facing=up": { "model": "forgecraft:chisel_model", "x": 180 },
+ "active=false,facing=east": { "model": "forgecraft:chisel_model", "x": 90, "y": -90 },
+ "active=false,facing=west": { "model": "forgecraft:chisel_model", "x": -90, "y": -90},
+ "active=false,facing=south": { "model": "forgecraft:chisel_model", "x": -90, "y": 180 },
+ "active=false,facing=north": { "model": "forgecraft:chisel_model", "x": 90, "y": 180 },
+
+ "active=true,facing=down": { "model": "forgecraft:chisel_model_active" },
+ "active=true,facing=up": { "model": "forgecraft:chisel_model_active", "x": 180 },
+ "active=true,facing=east": { "model": "forgecraft:chisel_model_active", "x": 90, "y": -90 },
+ "active=true,facing=west": { "model": "forgecraft:chisel_model_active", "x": -90, "y": -90},
+ "active=true,facing=south": { "model": "forgecraft:chisel_model_active", "x": -90, "y": 180 },
+ "active=true,facing=north": { "model": "forgecraft:chisel_model_active", "x": 90, "y": 180 }
+ }
+}
+
+
+
+
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/cleanironchisel.json b/kfc/src/main/resources/assets/forgecraft/blockstates/cleanironchisel.json
new file mode 100644
index 00000000..2601bc36
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/cleanironchisel.json
@@ -0,0 +1,28 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "forgecraft:items/clean_iron/0",
+ "texture": "forgecraft:items/clean_iron/0"
+ }
+ },
+ "variants": {
+ "active=false,facing=down": { "model": "forgecraft:chisel_model" },
+ "active=false,facing=up": { "model": "forgecraft:chisel_model", "x": 180 },
+ "active=false,facing=east": { "model": "forgecraft:chisel_model", "x": 90, "y": -90 },
+ "active=false,facing=west": { "model": "forgecraft:chisel_model", "x": -90, "y": -90},
+ "active=false,facing=south": { "model": "forgecraft:chisel_model", "x": -90, "y": 180 },
+ "active=false,facing=north": { "model": "forgecraft:chisel_model", "x": 90, "y": 180 },
+
+ "active=true,facing=down": { "model": "forgecraft:chisel_model_active" },
+ "active=true,facing=up": { "model": "forgecraft:chisel_model_active", "x": 180 },
+ "active=true,facing=east": { "model": "forgecraft:chisel_model_active", "x": 90, "y": -90 },
+ "active=true,facing=west": { "model": "forgecraft:chisel_model_active", "x": -90, "y": -90},
+ "active=true,facing=south": { "model": "forgecraft:chisel_model_active", "x": -90, "y": 180 },
+ "active=true,facing=north": { "model": "forgecraft:chisel_model_active", "x": 90, "y": 180 }
+ }
+}
+
+
+
+
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/copperchisel.json b/kfc/src/main/resources/assets/forgecraft/blockstates/copperchisel.json
new file mode 100644
index 00000000..5a57dd78
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/copperchisel.json
@@ -0,0 +1,28 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "forgecraft:items/copper/0",
+ "texture": "forgecraft:items/copper/0"
+ }
+ },
+ "variants": {
+ "active=false,facing=down": { "model": "forgecraft:chisel_model" },
+ "active=false,facing=up": { "model": "forgecraft:chisel_model", "x": 180 },
+ "active=false,facing=east": { "model": "forgecraft:chisel_model", "x": 90, "y": -90 },
+ "active=false,facing=west": { "model": "forgecraft:chisel_model", "x": -90, "y": -90},
+ "active=false,facing=south": { "model": "forgecraft:chisel_model", "x": -90, "y": 180 },
+ "active=false,facing=north": { "model": "forgecraft:chisel_model", "x": 90, "y": 180 },
+
+ "active=true,facing=down": { "model": "forgecraft:chisel_model_active" },
+ "active=true,facing=up": { "model": "forgecraft:chisel_model_active", "x": 180 },
+ "active=true,facing=east": { "model": "forgecraft:chisel_model_active", "x": 90, "y": -90 },
+ "active=true,facing=west": { "model": "forgecraft:chisel_model_active", "x": -90, "y": -90},
+ "active=true,facing=south": { "model": "forgecraft:chisel_model_active", "x": -90, "y": 180 },
+ "active=true,facing=north": { "model": "forgecraft:chisel_model_active", "x": 90, "y": 180 }
+ }
+}
+
+
+
+
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/ironchisel.json b/kfc/src/main/resources/assets/forgecraft/blockstates/ironchisel.json
new file mode 100644
index 00000000..6f01f435
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/ironchisel.json
@@ -0,0 +1,28 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "forgecraft:items/iron/0",
+ "texture": "forgecraft:items/iron/0"
+ }
+ },
+ "variants": {
+ "active=false,facing=down": { "model": "forgecraft:chisel_model" },
+ "active=false,facing=up": { "model": "forgecraft:chisel_model", "x": 180 },
+ "active=false,facing=east": { "model": "forgecraft:chisel_model", "x": 90, "y": -90 },
+ "active=false,facing=west": { "model": "forgecraft:chisel_model", "x": -90, "y": -90},
+ "active=false,facing=south": { "model": "forgecraft:chisel_model", "x": -90, "y": 180 },
+ "active=false,facing=north": { "model": "forgecraft:chisel_model", "x": 90, "y": 180 },
+
+ "active=true,facing=down": { "model": "forgecraft:chisel_model_active" },
+ "active=true,facing=up": { "model": "forgecraft:chisel_model_active", "x": 180 },
+ "active=true,facing=east": { "model": "forgecraft:chisel_model_active", "x": 90, "y": -90 },
+ "active=true,facing=west": { "model": "forgecraft:chisel_model_active", "x": -90, "y": -90},
+ "active=true,facing=south": { "model": "forgecraft:chisel_model_active", "x": -90, "y": 180 },
+ "active=true,facing=north": { "model": "forgecraft:chisel_model_active", "x": 90, "y": 180 }
+ }
+}
+
+
+
+
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/nbtcrucible.json b/kfc/src/main/resources/assets/forgecraft/blockstates/nbtcrucible.json
index b1ffc235..79faf2ec 100644
--- a/kfc/src/main/resources/assets/forgecraft/blockstates/nbtcrucible.json
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/nbtcrucible.json
@@ -76,7 +76,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -84,7 +84,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -92,7 +92,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -100,7 +100,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -108,7 +108,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -116,7 +116,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -124,7 +124,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
},
@@ -132,7 +132,7 @@
"textures": {
"particle": "forgecraft:blocks/stone_slab_hot",
"texture": "forgecraft:blocks/stone_slab_hot",
- "texture1": "forgecraft:items/hot_bronze"
+ "texture1": "forgecraft:items/bronze/1"
},
"model": "forgecraft:castingcrucible"
}
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/steelchisel.json b/kfc/src/main/resources/assets/forgecraft/blockstates/steelchisel.json
new file mode 100644
index 00000000..43b802fd
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/steelchisel.json
@@ -0,0 +1,28 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "forgecraft:items/steel/0",
+ "texture": "forgecraft:items/steel/0"
+ }
+ },
+ "variants": {
+ "active=false,facing=down": { "model": "forgecraft:chisel_model" },
+ "active=false,facing=up": { "model": "forgecraft:chisel_model", "x": 180 },
+ "active=false,facing=east": { "model": "forgecraft:chisel_model", "x": 90, "y": -90 },
+ "active=false,facing=west": { "model": "forgecraft:chisel_model", "x": -90, "y": -90},
+ "active=false,facing=south": { "model": "forgecraft:chisel_model", "x": -90, "y": 180 },
+ "active=false,facing=north": { "model": "forgecraft:chisel_model", "x": 90, "y": 180 },
+
+ "active=true,facing=down": { "model": "forgecraft:chisel_model_active" },
+ "active=true,facing=up": { "model": "forgecraft:chisel_model_active", "x": 180 },
+ "active=true,facing=east": { "model": "forgecraft:chisel_model_active", "x": 90, "y": -90 },
+ "active=true,facing=west": { "model": "forgecraft:chisel_model_active", "x": -90, "y": -90},
+ "active=true,facing=south": { "model": "forgecraft:chisel_model_active", "x": -90, "y": 180 },
+ "active=true,facing=north": { "model": "forgecraft:chisel_model_active", "x": 90, "y": 180 }
+ }
+}
+
+
+
+
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json b/kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json
new file mode 100644
index 00000000..f4db7186
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/toolbench.json
@@ -0,0 +1,18 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "blocks/planks_oak",
+ "texture": "blocks/planks_oak",
+ "texture1": "blocks/planks_big_oak",
+ "texture2": "forgecraft:blocks/stone_slab"
+ },
+ "parent": "forgecraft:workbench"
+ },
+ "variants": {
+ "facing=north": { "model": "forgecraft:workbench" },
+ "facing=east": { "model": "forgecraft:workbench", "y": 90 },
+ "facing=south": { "model": "forgecraft:workbench", "y": 180 },
+ "facing=west": { "model": "forgecraft:workbench", "y": 270 }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/blockstates/wootzchisel.json b/kfc/src/main/resources/assets/forgecraft/blockstates/wootzchisel.json
new file mode 100644
index 00000000..bf6285a0
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/blockstates/wootzchisel.json
@@ -0,0 +1,28 @@
+{
+ "forge_marker":1,
+ "defaults": {
+ "textures": {
+ "particle": "forgecraft:items/wootz/0",
+ "texture": "forgecraft:items/wootz/0"
+ }
+ },
+ "variants": {
+ "active=false,facing=down": { "model": "forgecraft:chisel_model" },
+ "active=false,facing=up": { "model": "forgecraft:chisel_model", "x": 180 },
+ "active=false,facing=east": { "model": "forgecraft:chisel_model", "x": 90, "y": -90 },
+ "active=false,facing=west": { "model": "forgecraft:chisel_model", "x": -90, "y": -90},
+ "active=false,facing=south": { "model": "forgecraft:chisel_model", "x": -90, "y": 180 },
+ "active=false,facing=north": { "model": "forgecraft:chisel_model", "x": 90, "y": 180 },
+
+ "active=true,facing=down": { "model": "forgecraft:chisel_model_active" },
+ "active=true,facing=up": { "model": "forgecraft:chisel_model_active", "x": 180 },
+ "active=true,facing=east": { "model": "forgecraft:chisel_model_active", "x": 90, "y": -90 },
+ "active=true,facing=west": { "model": "forgecraft:chisel_model_active", "x": -90, "y": -90},
+ "active=true,facing=south": { "model": "forgecraft:chisel_model_active", "x": -90, "y": 180 },
+ "active=true,facing=north": { "model": "forgecraft:chisel_model_active", "x": 90, "y": 180 }
+ }
+}
+
+
+
+
diff --git a/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang b/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang
new file mode 100644
index 00000000..846a34e1
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/lang/en_US.lang
@@ -0,0 +1,166 @@
+itemGroup.forgecraft=ForgeCraft
+
+
+tile.castingform.name=Casting Form
+tile.castingblock.name=Casting Block
+tile.bloomery_adobe.name=Adobe Bloomery
+tile.bloomery_brick.name=Brick Bloomery
+tile.forge_brick.name=Brick Forge
+tile.forge_adobe.name=Adobe Forge
+tile.blockbreaker.name= Block Breaker
+tile.stoneanvil.name=Stone Anvil
+tile.ironanvil.name=Iron Anvil
+tile.yewstave.name=Yew Stave
+tile.nbtcrucible.name=Crucible
+
+tile.pistonbellowsoak.name=Oak Piston Bellows
+tile.pistonbellowsjungle.name=Jungle Piston Bellows
+tile.pistonbellowsbirch.name=Birch Piston Bellows
+tile.pistonbellowsspruce.name=Spruce Piston Bellows
+tile.pistonbellowsdarkoak.name=Dark Oak Piston Bellows
+tile.pistonbellowsacacia.name=Acacia Piston Bellows
+
+tile.steelchisel.name=Steel Chisel
+tile.wootzchisel.name= Damascus Chisel
+tile.cleanironchisel.name=Clean Iron Chisel
+tile.ironchisel.name=Wrought Iron Chisel
+tile.copperchisel.name=Copper Chisel
+tile.bronzechisel.name=Bronze Chisel
+
+tile.toolbench.name=Tool Bench
+
+item.bronzeingotball.name=Bronze Ingot
+item.bronzechunk.name=Bronze Chunk
+item.ironingotball.name=Wrought Iron Ingot
+item.wroughtironchunk.name=Wrought Iron Chunk
+item.ironcleaningotball.name=Clean Iron Ingot
+item.ironcleanchunk.name=Clean Iron Chunk
+item.steelingotball.name=Steel Ingot
+item.steelchunk.name=Steel Chunk
+item.wootzingotball.name=Damascus Steel Ingot
+item.wootzchunk.name=Damascus Steel Chunk
+
+item.brokenbronzetool.name=Broken Bronze Tool
+item.brokenwroughtirontool.name=Broken Wrought Iron Tool
+item.brokencleanirontool.name=Broken Clean Iron Tool
+item.brokensteeltool.name=Broken Steel Tool
+item.brokenwootztool.name=Broken Damascus Tool
+
+item.unstrunglongbow.name=Unstrung Longbow
+item.longbow.name=Longbow
+item.rawlongbow.name=Raw Longbow
+
+item.bellowshandle.name=Bellows Handle
+item.softcrucible.name=Soft Crucible
+item.slottedtongs.name=Stone Tongs
+item.forgehammer.name=Forge Hammer
+
+item.cast_axe.name=Axe Cast
+item.cast_gladius.name=Gladius Cast
+item.cast_pickaxe.name=Pickaxe Cast
+item.cast_shovel.name=Shovel Cast
+item.cast_hoe.name=Hoe Cast
+item.castingmud.name=Casting Mud
+
+item.bronzegladius.name=Bronze Gladius
+item.wroughtirongladius.name=Wrought Iron Gladius
+item.cleanirongladius.name=Clean Iron Gladius
+item.steelgladius.name=Steel Gladius
+
+item.cleanironlongsword.name=Clean Iron Longsword
+item.steellongsword.name=Steel Longsword
+
+item.wroughtironslayer.name=Wrought Iron Slayer
+item.cleanironslayer.name=Clean Iron Slayer
+item.steelslayer.name=Steel Slayer
+
+item.bronzepickaxehead.name=Bronze Pickaxe Head
+item.bronzeaxehead.name=Bronze Axe Head
+item.bronzeshovelhead.name=Bronze Shovel Head
+item.bronzehoehead.name=Bronze Hoe Head
+item.bronzepickaxe.name=Bronze Pickaxe
+item.bronzeaxe.name=Bronze Axe
+item.bronzeshovel.name=Bronze Shovel
+item.bronzehoe.name=Bronze Hoe
+
+item.ironpickaxehead.name=Iron Pickaxe Head
+item.ironaxehead.name=Iron Axe Head
+item.ironshovelhead.name=Iron Shovel Head
+item.ironhoehead.name=Iron Hoe Head
+item.ironpickaxe.name=Iron Pickaxe
+item.ironaxe.name=Iron Axe
+item.ironshovel.name=Iron Shovel
+item.ironhoe.name=Iron Hoe
+item.ironsword.name=Iron Sword
+
+item.cleanironpickaxehead.name=Clean Iron Pickaxe Head
+item.cleanironaxehead.name=Clean Iron Axe Head
+item.cleanironshovelhead.name=Clean Iron Shovel Head
+item.cleanironhoehead.name=Clean Iron Hoe Head
+item.cleanironpickaxe.name=Clean Iron Pickaxe
+item.cleanironaxe.name=Clean Iron Axe
+item.cleanironshovel.name=Clean Iron Shovel
+item.cleanironhoe.name=Clean Iron Hoe
+#item.cleanironsword.name=Clean Iron Sword
+
+item.steelpickaxehead.name=Steel Pickaxe Head
+item.steelaxehead.name=Steel Axe Head
+item.steelshovelhead.name=Steel Shovel Head
+item.steelhoehead.name=Steel Hoe Head
+item.steelpickaxe.name=Steel Pickaxe
+item.steelaxe.name=Steel Axe
+item.steelshovel.name=Steel Shovel
+item.steelhoe.name=Steel Hoe
+#item.steelsword.name=Steel Sword
+
+item.wootzpickaxehead.name=Damascus Pickaxe Head
+item.wootzaxehead.name=Damascus Axe Head
+item.wootzshovelhead.name=Damascus Shovel Head
+item.wootzhoehead.name=Damascus Hoe Head
+item.wootzpickaxe.name=Damascus Pickaxe
+item.wootzaxe.name=Damascus Axe
+item.wootzshovel.name=Damascus Shovel
+item.wootzhoe.name=Damascus Hoe
+item.wootzgladius.name=Damascus Gladius
+item.wootzlongsword.name=Damascus Longsword
+item.wootzslayer.name=Damascus Slayer
+
+item.copperpickaxehead.name=Copper Pickaxe Head
+item.copperaxehead.name=Copper Axe Head
+item.coppershovelhead.name=Copper Shovel Head
+item.copperhoehead.name=Copper Hoe Head
+item.copperpickaxe.name=Copper Pickaxe
+item.copperaxe.name=Copper Axe
+item.coppershovel.name=Copper Shovel
+item.copperhoe.name=Copper Hoe
+item.coppergladius.name=Copper Gladius
+
+item.leatherhelmet.name=Hardened Leather Helmet
+
+item.wootzsledgehammer.name=Damascus SledgeHammer
+item.steelsledgehammer.name=Steel SledgeHammer
+item.cleanironsledgehammer.name=Clean Iron SledgeHammer
+item.ironsledgehammer.name=Wrough Iron SledgeHammer
+item.bronzesledgehammer.name=Bronze SledgeHammer
+item.coppersledgehammer.name=Copper SledgeHammer
+
+item.wootzworkblade.name=Damascus Work Blade
+
+# -- configuration -- #
+forgecraft.config.title=ForgeCraft Config
+
+forgecraft.compatibility=Compatibility
+forgecraft.compatibility.tooltip=Compatibility Features
+
+jei.category.forgecraft.crucible=Crucible Crafting
+jei.category.forgecraft.anvil=Anvil Crafting
+jei.category.forgecraft.casting=Casting
+jei.category.forgecraft.forging=Forging
+jei.category.forgecraft.workbench=Tool Bench
+jei.category.forgecraft.toolbench=Tool Bench
+
+jei.info.forgecraft.crucible=Crucible Crafting
+jei.info.forgecraft.anvil=Anvil Crafting
+jei.info.forgecraft.casting=Casting
+jei.info.forgecraft.forging=Forging
+jei.info.forgecraft.workbench=Tool Bench
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/lang/en_us.lang b/kfc/src/main/resources/assets/forgecraft/lang/en_us.lang
deleted file mode 100644
index cb1cf2b2..00000000
--- a/kfc/src/main/resources/assets/forgecraft/lang/en_us.lang
+++ /dev/null
@@ -1,136 +0,0 @@
-itemGroup.forgecraft=ForgeCraft
-
-
-tile.castingform.name=Casting Form
-tile.castingblock.name=Casting Block
-tile.bloomery_adobe.name=Adobe Bloomery
-tile.bloomery_brick.name=Brick Bloomery
-tile.forge_brick.name=Brick Forge
-tile.forge_adobe.name=Adobe Forge
-tile.blockbreaker.name= Block Breaker
-tile.stoneanvil.name=Stone Anvil
-tile.ironanvil.name=Iron Anvil
-tile.yewstave.name=Yew Stave
-tile.nbtcrucible.name=Crucible
-
-tile.pistonbellowsoak.name=Oak Piston Bellows
-tile.pistonbellowsjungle.name=Jungle Piston Bellows
-tile.pistonbellowsbirch.name=Birch Piston Bellows
-tile.pistonbellowsspruce.name=Spruce Piston Bellows
-tile.pistonbellowsdarkoak.name=Dark Oak Piston Bellows
-tile.pistonbellowsacacia.name=Acacia Piston Bellows
-
-tile.emptycruciblehot.name=Empty Hot Crucible
-tile.emptycrucible.name=Empty Crucible
-tile.emptycruciblehit.name=Hot Empty Crucible
-tile.emptycruciblecracked.name= Cracked Empty Crucible
-tile.emptycruciblecrackedhot.name=Cracked Hot Empty Crucible
-
-item.bronzeingotball.name=Bronze Ingot
-item.bronzechunk.name=Bronze Chunk
-item.ironingotball.name=Wrought Iron Ingot
-item.wroughtironchunk.name=Wrought Iron Chunk
-item.ironcleaningotball.name=Clean Iron Ingot
-item.ironcleanchunk.name=Clean Iron Chunk
-item.steelingotball.name=Steel Ingot
-item.steelchunk.name=Steel Chunk
-item.wootzingotball.name=Damascus Steel Ingot
-item.wootzchunk.name=Damascus Steel Chunk
-
-item.brokenbronzetool.name=Broken Bronze Tool
-item.brokenwroughtirontool.name=Broken Wrought Iron Tool
-item.brokencleanirontool.name=Broken Clean Iron Tool
-item.brokensteeltool.name=Broken Steel Tool
-item.brokenwootztool.name=Broken Damascus Tool
-
-item.unstrunglongbow.name=Unstrung Longbow
-item.longbow.name=Longbow
-item.rawlongbow.name=Raw Longbow
-
-item.bellowshandle.name=Bellows Handle
-item.softcrucible.name=Soft Crucible
-item.slottedtongs.name=Stone Tongs
-item.forgehammer.name=Forge Hammer
-
-item.cast_axe.name=Axe Cast
-item.cast_gladius.name=Gladius Cast
-item.cast_pickaxe.name=Pickaxe Cast
-item.cast_shovel.name=Shovel Cast
-item.cast_hoe.name=Hoe Cast
-item.castingmud.name=Casting Mud
-
-item.bronzegladius.name=Bronze Gladius
-item.wroughtirongladius.name=Wrought Iron Gladius
-item.cleanirongladius.name=Clean Iron Gladius
-item.steelgladius.name=Steel Gladius
-
-item.cleanironlongsword.name=Clean Iron Longsword
-item.steellongsword.name=Steel Longsword
-
-item.wroughtironslayer.name=Wrought Iron Slayer
-item.cleanironslayer.name=Clean Iron Slayer
-item.steelslayer.name=Steel Slayer
-
-item.bronzepickaxehead.name=Bronze Pickaxe Head
-item.bronzeaxehead.name=Bronze Axe Head
-item.bronzeshovelhead.name=Bronze Shovel Head
-item.bronzehoehead.name=Bronze Hoe Head
-item.bronzepickaxe.name=Bronze Pickaxe
-item.bronzeaxe.name=Bronze Axe
-item.bronzeshovel.name=Bronze Shovel
-item.bronzehoe.name=Bronze Hoe
-
-item.ironpickaxehead.name=Iron Pickaxe Head
-item.ironaxehead.name=Iron Axe Head
-item.ironshovelhead.name=Iron Shovel Head
-item.ironhoehead.name=Iron Hoe Head
-item.ironpickaxe.name=Iron Pickaxe
-item.ironaxe.name=Iron Axe
-item.ironshovel.name=Iron Shovel
-item.ironhoe.name=Iron Hoe
-item.ironsword.name=Iron Sword
-
-item.cleanironpickaxehead.name=Clean Iron Pickaxe Head
-item.cleanironaxehead.name=Clean Iron Axe Head
-item.cleanironshovelhead.name=Clean Iron Shovel Head
-item.cleanironhoehead.name=Clean Iron Hoe Head
-item.cleanironpickaxe.name=Clean Iron Pickaxe
-item.cleanironaxe.name=Clean Iron Axe
-item.cleanironshovel.name=Clean Iron Shovel
-item.cleanironhoe.name=Clean Iron Hoe
-#item.cleanironsword.name=Clean Iron Sword
-
-item.steelpickaxehead.name=Steel Pickaxe Head
-item.steelaxehead.name=Steel Axe Head
-item.steelshovelhead.name=Steel Shovel Head
-item.steelhoehead.name=Steel Hoe Head
-item.steelpickaxe.name=Steel Pickaxe
-item.steelaxe.name=Steel Axe
-item.steelshovel.name=Steel Shovel
-item.steelhoe.name=Steel Hoe
-#item.steelsword.name=Steel Sword
-
-item.wootzpickaxehead.name=Damascus Steel Pickaxe Head
-item.wootzaxehead.name=Damascus Steel Axe Head
-item.wootzshovelhead.name=Damascus Steel Shovel Head
-item.wootzhoehead.name=Damascus Steel Hoe Head
-item.wootzpickaxe.name=Damascus Steel Pickaxe
-item.wootzaxe.name=Damascus Steel Axe
-item.wootzshovel.name=Damascus Steel Shovel
-item.wootzhoe.name=Damascus Steel Hoe
-item.wootzgladius.name=Damascus Gladius
-item.wootzlongsword.name=Damascus Longsword
-item.wootzslayer.name=Damascus Slayer
-
-item.leatherhelmet.name=Hardened Leather Helmet
-
-# -- configuration -- #
-forgecraft.config.title=ForgeCraft Config
-
-forgecraft.compatibility=Compatibility
-forgecraft.compatibility.tooltip=Compatibility Features
-
-jei.category.forgecraft.crucible=Crucible Crafting
-jei.category.forgecraft.anvil=Anvil Crafting
-jei.category.forgecraft.casting=Casting
-jei.category.forgecraft.forging=Forging
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json b/kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json
new file mode 100644
index 00000000..fe9dca28
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/models/block/FryingPan_Model.json
@@ -0,0 +1,371 @@
+{
+ "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
+ "textures": {
+ "particle": "blocks/e_particle",
+ "texture": "blocks/e_texture"
+ },
+ "elements": [
+ {
+ "__comment": "Box21",
+ "from": [ 6, 0, 1 ],
+ "to": [ 10, 1, 2 ],
+ "faces": {
+ "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box22",
+ "from": [ 4, 0, 2 ],
+ "to": [ 12, 1, 3 ],
+ "faces": {
+ "down": { "uv": [ 4, 13, 12, 14 ], "texture": "#texture" },
+ "up": { "uv": [ 4, 2, 12, 3 ], "texture": "#texture" },
+ "north": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 2, 15, 3, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 13, 15, 14, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 2, 0, 5 ],
+ "to": [ 3, 1, 9 ],
+ "faces": {
+ "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture", "rotation": 90 },
+ "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture", "rotation": 270 },
+ "north": { "uv": [ 15, 15, 16, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 0, 15, 1, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box22",
+ "from": [ 3, 0, 3 ],
+ "to": [ 4, 1, 11 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 12, 15 ], "texture": "#texture", "rotation": 90 },
+ "up": { "uv": [ 4, 1, 12, 2 ], "texture": "#texture", "rotation": 270 },
+ "north": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 13, 0, 5 ],
+ "to": [ 14, 1, 9 ],
+ "faces": {
+ "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture", "rotation": 270 },
+ "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture", "rotation": 90 },
+ "north": { "uv": [ 0, 15, 1, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 15, 15, 16, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box22",
+ "from": [ 12, 0, 3 ],
+ "to": [ 13, 1, 11 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 12, 15 ], "texture": "#texture", "rotation": 270 },
+ "up": { "uv": [ 4, 1, 12, 2 ], "texture": "#texture", "rotation": 90 },
+ "north": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 6, 0, 12 ],
+ "to": [ 10, 1, 13 ],
+ "faces": {
+ "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture", "rotation": 180 },
+ "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture", "rotation": 180 },
+ "south": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 15, 15, 16, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 15, 1, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box22",
+ "from": [ 4, 0, 11 ],
+ "to": [ 12, 1, 12 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 12, 15 ], "texture": "#texture", "rotation": 180 },
+ "up": { "uv": [ 4, 1, 12, 2 ], "texture": "#texture", "rotation": 180 },
+ "south": { "uv": [ 4, 15, 12, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box29",
+ "from": [ 4, 0, 3 ],
+ "to": [ 12, 1, 11 ],
+ "faces": {
+ "down": { "uv": [ 4, 5, 12, 13 ], "texture": "#texture" },
+ "up": { "uv": [ 4, 3, 12, 11 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 4, 1, 1 ],
+ "to": [ 6, 2, 2 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 10, 1, 1 ],
+ "to": [ 12, 2, 2 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 6, 1, 0 ],
+ "to": [ 10, 2, 1 ],
+ "faces": {
+ "down": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 0, 10, 1 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 0, 14, 1, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 15, 14, 16, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 1, 1, 5 ],
+ "to": [ 2, 2, 9 ],
+ "faces": {
+ "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture", "rotation": 90 },
+ "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture", "rotation": 270 },
+ "north": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 2, 1, 9 ],
+ "to": [ 3, 2, 11 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 90 },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 270 },
+ "north": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 2, 1, 3 ],
+ "to": [ 3, 2, 5 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 90 },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 270 },
+ "north": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 14, 1, 5 ],
+ "to": [ 15, 2, 9 ],
+ "faces": {
+ "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture", "rotation": 270 },
+ "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture", "rotation": 90 },
+ "north": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 13, 1, 3 ],
+ "to": [ 14, 2, 5 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 270 },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 90 },
+ "north": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 13, 1, 9 ],
+ "to": [ 14, 2, 11 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 270 },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 90 },
+ "north": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 10, 1, 12 ],
+ "to": [ 12, 2, 13 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 180 },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 180 },
+ "north": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 6, 1, 13 ],
+ "to": [ 10, 2, 14 ],
+ "faces": {
+ "down": { "uv": [ 6, 14, 10, 15 ], "texture": "#texture", "rotation": 180 },
+ "up": { "uv": [ 6, 1, 10, 2 ], "texture": "#texture", "rotation": 180 },
+ "north": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 15, 10, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 14, 15, 15, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box35",
+ "from": [ 4, 1, 12 ],
+ "to": [ 6, 2, 13 ],
+ "faces": {
+ "down": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture", "rotation": 180 },
+ "up": { "uv": [ 4, 1, 6, 2 ], "texture": "#texture", "rotation": 180 },
+ "north": { "uv": [ 4, 14, 6, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 10, 14, 12, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 14, 14, 15, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box47",
+ "from": [ 3, 1, 2 ],
+ "to": [ 4, 2, 3 ],
+ "faces": {
+ "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" },
+ "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" },
+ "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box47",
+ "from": [ 3, 1, 11 ],
+ "to": [ 4, 2, 12 ],
+ "faces": {
+ "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" },
+ "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" },
+ "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box47",
+ "from": [ 12, 1, 11 ],
+ "to": [ 13, 2, 12 ],
+ "faces": {
+ "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" },
+ "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" },
+ "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box47",
+ "from": [ 12, 1, 2 ],
+ "to": [ 13, 2, 3 ],
+ "faces": {
+ "down": { "uv": [ 3, 13, 4, 14 ], "texture": "#texture" },
+ "up": { "uv": [ 3, 2, 4, 3 ], "texture": "#texture" },
+ "north": { "uv": [ 12, 14, 13, 15 ], "texture": "#texture" },
+ "south": { "uv": [ 3, 14, 4, 15 ], "texture": "#texture" },
+ "west": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture" },
+ "east": { "uv": [ 13, 14, 14, 15 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box51",
+ "from": [ 7.5, 0, 13 ],
+ "to": [ 8.5, 1, 21.5 ],
+ "rotation": { "origin": [ 7.5, 0, 13 ], "axis": "x", "angle": -22.5 },
+ "faces": {
+ "down": { "uv": [ 7.5, 0, 8.5, 3 ], "texture": "#texture" },
+ "up": { "uv": [ 7.5, 13, 8.5, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 7.5, 15, 8.5, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 13, 15, 16, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 15, 3, 16 ], "texture": "#texture" }
+ }
+ }
+ ],
+ "display": {
+ "thirdperson_righthand": {
+ "rotation": [ 113, 0, 0 ],
+ "translation": [ 0, 8, 9.1437 ]
+ },
+ "thirdperson_lefthand": {
+ "rotation": [ 113, 0, 0 ],
+ "translation": [ 0, 8, 9.1437 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 113, 0, 0 ],
+ "translation": [ 0, 8, 9.143 ]
+ },
+ "firstperson_lefthand": {
+ "rotation": [ 113, 0, 0 ],
+ "translation": [ 0, 8, 9.143 ]
+ },
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 2, 0 ],
+ "scale": [ 0.625, 0.625, 0.625 ]
+ },
+ "head": {
+ "rotation": [ 0, 0, 180 ],
+ "translation": [ 0, 0, 1 ],
+ "scale": [ 1.1, 1.1, 1.1 ]
+ },
+ "ground": {
+ "translation": [ 0, 2, 0 ],
+ "scale": [ 0.25, 0.25, 0.25 ]
+ },
+ "fixed": {
+ "rotation": [ -90, 180, 0 ],
+ "translation": [ 0, 0, -7 ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/chisel_model.json b/kfc/src/main/resources/assets/forgecraft/models/block/chisel_model.json
new file mode 100644
index 00000000..bf1452e6
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/models/block/chisel_model.json
@@ -0,0 +1,216 @@
+{
+ "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
+ "textures": {
+ "particle": "forgecraft:items/iron/0",
+ "texture": "forgecraft:items/iron/0"
+ },
+ "elements": [
+ {
+ "__comment": "Box1",
+ "from": [ 7, 1.5, 7 ],
+ "to": [ 8.72, 13.11, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 7, 7.065, 8.72, 9 ], "texture": "#texture" },
+ "up": { "uv": [ 7, 7, 8.72, 8.934999 ], "texture": "#texture" },
+ "north": { "uv": [ 7.28, 2.889999, 9, 14.5 ], "texture": "#texture" },
+ "south": { "uv": [ 7, 2.889999, 8.72, 14.5 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 2.889999, 8.935, 14.5 ], "texture": "#texture" },
+ "east": { "uv": [ 7.065, 2.889999, 9, 14.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, 0.64, 7.215 ],
+ "to": [ 8.72, 1.5, 8.719999 ],
+ "faces": {
+ "down": { "uv": [ 6, 6, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 2, 10, 4 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 2, 10, 4 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 2, 10, 4 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 2, 9.5, 4 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -0.22, 7.43 ],
+ "to": [ 8.72, 0.64, 8.505 ],
+ "faces": {
+ "down": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -1.08, 7.645 ],
+ "to": [ 8.72, -0.2199999, 8.29 ],
+ "faces": {
+ "down": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -1.94, 7.86 ],
+ "to": [ 8.72, -1.08, 8.075 ],
+ "faces": {
+ "down": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box8",
+ "from": [ 6.785, 13.11, 6.785 ],
+ "to": [ 8.934999, 13.325, 9.15 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 5, 10.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 5.5, 10.5, 11 ], "texture": "#texture" },
+ "north": { "uv": [ 5.5, 6.5, 10.5, 7 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 6.5, 10.5, 7 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 6.5, 11, 7 ], "texture": "#texture" },
+ "east": { "uv": [ 5, 6.5, 10.5, 7 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box9",
+ "from": [ 7, 13.325, 7 ],
+ "to": [ 8.72, 13.54, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 6, 5.5, 10, 10 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6, 10, 10.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 6, 10, 6.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 6, 10, 6.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6, 6, 10.5, 6.5 ], "texture": "#texture" },
+ "east": { "uv": [ 5.5, 6, 10, 6.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 6.785, 13.325, 7.215 ],
+ "to": [ 7, 13.54, 8.719999 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 6, 10.5, 6.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 6, 6, 6.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 6, 10, 6.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 6, 9.5, 6.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 8.719999, 13.325, 7.215 ],
+ "to": [ 8.934999, 13.54, 8.719999 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 8, 10, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 9.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7.215, 13.325, 6.785 ],
+ "to": [ 8.504999, 13.54, 7 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 6, 9.5, 6.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 6, 9.5, 6.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 6, 6, 6.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 6, 10.5, 6.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7.215, 13.325, 8.934999 ],
+ "to": [ 8.504999, 13.54, 9.15 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 6.57, 13.11, 7 ],
+ "to": [ 6.785, 13.325, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 8, 10, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 9.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 8.934999, 13.11, 7 ],
+ "to": [ 9.15, 13.325, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 8, 10, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 9.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7, 13.11, 9.15 ],
+ "to": [ 8.72, 13.325, 9.365 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7, 13.11, 6.57 ],
+ "to": [ 8.72, 13.325, 6.785 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" }
+ }
+ }
+ ],
+ "display": {
+ "gui": {
+ "rotation": [ -90, 135, 90 ]
+ },
+ "ground": {
+ "rotation": [ 90, 0, 0 ],
+ "scale": [ 0.6, 0.6, 0.6 ]
+ },
+ "fixed": {
+ "rotation": [ 90, -45, 90 ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/chisel_model_active.json b/kfc/src/main/resources/assets/forgecraft/models/block/chisel_model_active.json
new file mode 100644
index 00000000..d4b012ac
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/models/block/chisel_model_active.json
@@ -0,0 +1,216 @@
+{
+ "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
+ "textures": {
+ "particle": "forgecraft:items/iron/0",
+ "texture": "forgecraft:items/iron/0"
+ },
+ "elements": [
+ {
+ "__comment": "Box1",
+ "from": [ 7, -6.5, 7 ],
+ "to": [ 8.72, 5.11, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 7, 7.065001, 8.72, 9 ], "texture": "#texture" },
+ "up": { "uv": [ 7, 7, 8.72, 8.934999 ], "texture": "#texture" },
+ "north": { "uv": [ 7.28, 2.889999, 9, 14.5 ], "texture": "#texture" },
+ "south": { "uv": [ 7, 2.889999, 8.72, 14.5 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 2.889999, 8.935, 14.5 ], "texture": "#texture" },
+ "east": { "uv": [ 7.065, 2.889999, 9, 14.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -7.36, 7.215 ],
+ "to": [ 8.72, -6.5, 8.719999 ],
+ "faces": {
+ "down": { "uv": [ 6, 6, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 2, 10, 4 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 2, 10, 4 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 2, 10, 4 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 2, 9.5, 4 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -8.22, 7.43 ],
+ "to": [ 8.72, -7.36, 8.505 ],
+ "faces": {
+ "down": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -9.08, 7.645 ],
+ "to": [ 8.72, -8.219999, 8.29 ],
+ "faces": {
+ "down": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 7, -9.94, 7.86 ],
+ "to": [ 8.72, -9.08, 8.074999 ],
+ "faces": {
+ "down": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6.5, 10, 9.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 11, 10, 11.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6.5, 11, 9.5, 11.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box8",
+ "from": [ 6.785, 5.11, 6.785 ],
+ "to": [ 8.934999, 5.325, 9.15 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 5, 10.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 5.5, 10.5, 11 ], "texture": "#texture" },
+ "north": { "uv": [ 5.5, 6.5, 10.5, 7 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 6.5, 10.5, 7 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 6.5, 11, 7 ], "texture": "#texture" },
+ "east": { "uv": [ 5, 6.5, 10.5, 7 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box9",
+ "from": [ 7, 5.325, 7 ],
+ "to": [ 8.72, 5.54, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 6, 5.5, 10, 10 ], "texture": "#texture" },
+ "up": { "uv": [ 6, 6, 10, 10.5 ], "texture": "#texture" },
+ "north": { "uv": [ 6, 6, 10, 6.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6, 6, 10, 6.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6, 6, 10.5, 6.5 ], "texture": "#texture" },
+ "east": { "uv": [ 5.5, 6, 10, 6.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 6.785, 5.325, 7.215 ],
+ "to": [ 7, 5.54, 8.719999 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 6, 10.5, 6.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 6, 6, 6.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 6, 10, 6.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 6, 9.5, 6.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 8.719999, 5.325, 7.215 ],
+ "to": [ 8.934999, 5.54, 8.719999 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 8, 10, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 9.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7.215, 5.325, 6.785 ],
+ "to": [ 8.504999, 5.54, 7 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 6, 9.5, 6.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 6, 9.5, 6.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 6, 6, 6.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 6, 10.5, 6.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7.215, 5.325, 8.934999 ],
+ "to": [ 8.504999, 5.54, 9.15 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 6.57, 5.11, 7 ],
+ "to": [ 6.784999, 5.325, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 8, 10, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 9.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box16",
+ "from": [ 8.934999, 5.11, 7 ],
+ "to": [ 9.15, 5.325, 8.935 ],
+ "faces": {
+ "down": { "uv": [ 5.5, 6, 6, 9.5 ], "texture": "#texture" },
+ "up": { "uv": [ 5.5, 6.5, 6, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 6.5, 8, 10, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 9.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7, 5.11, 9.15 ],
+ "to": [ 8.72, 5.325, 9.365 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box18",
+ "from": [ 7, 5.11, 6.57 ],
+ "to": [ 8.72, 5.325, 6.784999 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 10, 9.5, 10.5 ], "texture": "#texture" },
+ "up": { "uv": [ 6.5, 5.5, 9.5, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "south": { "uv": [ 6.5, 8, 9.5, 8.5 ], "texture": "#texture" },
+ "west": { "uv": [ 5.5, 8, 6, 8.5 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 8, 10.5, 8.5 ], "texture": "#texture" }
+ }
+ }
+ ],
+ "display": {
+ "gui": {
+ "rotation": [ -90, 135, 90 ]
+ },
+ "ground": {
+ "rotation": [ 90, 0, 0 ],
+ "scale": [ 0.6, 0.6, 0.6 ]
+ },
+ "fixed": {
+ "rotation": [ 90, -45, 90 ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json b/kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json
new file mode 100644
index 00000000..346c9ebc
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/models/block/displayrack.json
@@ -0,0 +1,175 @@
+{
+ "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
+ "textures": {
+ "particle": "blocks/e_particle",
+ "texture": "blocks/stone_slab",
+ "texture1": "blocks/planks_oak"
+ },
+ "elements": [
+ {
+ "__comment": "Box1",
+ "from": [ 0, 0, 0 ],
+ "to": [ 16, 2, 6 ],
+ "faces": {
+ "down": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0, 16, 6 ], "texture": "#texture" },
+ "north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 0, 14, 6, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 10, 14, 16, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box2",
+ "from": [ 2, 2, 0.5 ],
+ "to": [ 3, 13, 1.5 ],
+ "faces": {
+ "down": { "uv": [ 3.5, 15, 4.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 3.5, 0, 4.5, 1 ], "texture": "#texture1" },
+ "north": { "uv": [ 11.5, 3, 12.5, 14 ], "texture": "#texture1" },
+ "south": { "uv": [ 3.5, 3, 4.5, 14 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 1, 14 ], "texture": "#texture1" },
+ "east": { "uv": [ 15, 3, 16, 14 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box2",
+ "from": [ 13, 2, 0.5 ],
+ "to": [ 14, 13, 1.5 ],
+ "faces": {
+ "down": { "uv": [ 3.5, 15, 4.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 3.5, 0, 4.5, 1 ], "texture": "#texture1" },
+ "north": { "uv": [ 11.5, 3, 12.5, 14 ], "texture": "#texture1" },
+ "south": { "uv": [ 3.5, 3, 4.5, 14 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 1, 14 ], "texture": "#texture1" },
+ "east": { "uv": [ 15, 3, 16, 14 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 1, 12, 0.5 ],
+ "to": [ 2, 13, 3.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" },
+ "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" },
+ "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 3, 12, 0.5 ],
+ "to": [ 4, 13, 3.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" },
+ "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" },
+ "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 14, 12, 0.5 ],
+ "to": [ 15, 13, 3.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" },
+ "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" },
+ "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 12, 12, 0.5 ],
+ "to": [ 13, 13, 3.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" },
+ "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" },
+ "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box2",
+ "from": [ 7.5, 2, 0.5 ],
+ "to": [ 8.5, 13, 1.5 ],
+ "faces": {
+ "down": { "uv": [ 3.5, 15, 4.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 3.5, 0, 4.5, 1 ], "texture": "#texture1" },
+ "north": { "uv": [ 11.5, 3, 12.5, 14 ], "texture": "#texture1" },
+ "south": { "uv": [ 3.5, 3, 4.5, 14 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 1, 14 ], "texture": "#texture1" },
+ "east": { "uv": [ 15, 3, 16, 14 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 6.5, 12, 0.5 ],
+ "to": [ 7.5, 13, 3.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" },
+ "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" },
+ "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box4",
+ "from": [ 8.5, 12, 0.5 ],
+ "to": [ 9.5, 13, 3.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 13, 3.5, 16 ], "texture": "#texture1" },
+ "up": { "uv": [ 2.5, 0, 3.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 12.5, 3, 13.5, 4 ], "texture": "#texture1" },
+ "south": { "uv": [ 2.5, 3, 3.5, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 3, 3, 4 ], "texture": "#texture1" },
+ "east": { "uv": [ 13, 3, 16, 4 ], "texture": "#texture1" }
+ }
+ }
+ ],
+ "display": {
+ "thirdperson_righthand": {
+ "rotation": [ 75, 45, 0 ],
+ "translation": [ 2.75, 1.8, 2.75 ],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "thirdperson_lefthand": {
+ "rotation": [ 75, 45, 0 ],
+ "translation": [ 2.75, 1.8, 2.75 ],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 45, 0 ],
+ "translation": [ 0, 1, 0 ],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ },
+ "firstperson_lefthand": {
+ "rotation": [ 0, 45, 0 ],
+ "translation": [ 0, 1, 0 ],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ },
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 2.19, -0.655, 0 ],
+ "scale": [ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "translation": [ 0, 3, 0 ],
+ "scale": [ 0.25, 0.25, 0.25 ]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, -5.6 ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/models/block/workbench.json b/kfc/src/main/resources/assets/forgecraft/models/block/workbench.json
new file mode 100644
index 00000000..41b0458c
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/models/block/workbench.json
@@ -0,0 +1,392 @@
+{
+ "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
+ "textures": {
+ "particle": "blocks/planks_oak",
+ "texture": "blocks/planks_oak",
+ "texture1": "blocks/planks_big_oak",
+ "texture2": "forgecraft:blocks/stone_slab"
+ },
+ "elements": [
+ {
+ "__comment": "Box11",
+ "from": [ 0, 8, 0 ],
+ "to": [ 16, 10, 8 ],
+ "faces": {
+ "down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture2" },
+ "up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture2" },
+ "north": { "uv": [ 0, 6, 16, 8 ], "texture": "#texture2" },
+ "south": { "uv": [ 0, 6, 16, 8 ], "texture": "#texture2" },
+ "west": { "uv": [ 0, 6, 8, 8 ], "texture": "#texture2" },
+ "east": { "uv": [ 8, 6, 16, 8 ], "texture": "#texture2" }
+ }
+ },
+ {
+ "__comment": "Box12",
+ "from": [ 0, 10, 0 ],
+ "to": [ 13.5, 10.5, 8 ],
+ "faces": {
+ "up": { "uv": [ 0, 2, 13.5, 10 ], "texture": "#texture1" },
+ "north": { "uv": [ 2.5, 5.5, 16, 6 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 5.5, 13.5, 6 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 5.5, 8, 6 ], "texture": "#texture1" },
+ "east": { "uv": [ 8, 5.5, 16, 6 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 0, 11, 0 ],
+ "to": [ 11.5, 11.5, 3 ],
+ "faces": {
+ "up": { "uv": [ 0, 8, 11.5, 11 ], "texture": "#texture1" },
+ "north": { "uv": [ 4.5, 4.5, 16, 5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 4.5, 11.5, 5 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 4.5, 3, 5 ], "texture": "#texture1" },
+ "east": { "uv": [ 11, 4.5, 14, 5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 0, 11, 4.5 ],
+ "to": [ 11.5, 11.5, 8 ],
+ "faces": {
+ "up": { "uv": [ 0, 12, 11.5, 15.5 ], "texture": "#texture1" },
+ "north": { "uv": [ 4.5, 4.5, 16, 5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 4.5, 11.5, 5 ], "texture": "#texture1" },
+ "west": { "uv": [ 4.5, 4.5, 8, 5 ], "texture": "#texture1" },
+ "east": { "uv": [ 8, 4.5, 11.5, 5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box19",
+ "from": [ 0, 11, 3 ],
+ "to": [ 1, 12, 4.5 ],
+ "faces": {
+ "up": { "uv": [ 0, 3, 1, 4.5 ], "texture": "#texture1" },
+ "north": { "uv": [ 15, 4, 16, 5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 4, 1, 5 ], "texture": "#texture1" },
+ "west": { "uv": [ 3, 4, 4.5, 5 ], "texture": "#texture1" },
+ "east": { "uv": [ 11.5, 4, 13, 5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box12",
+ "from": [ 0, 10.5, 0 ],
+ "to": [ 12.5, 11, 8 ],
+ "faces": {
+ "up": { "uv": [ 3.5, 6.5, 16, 14.5 ], "texture": "#texture1" },
+ "north": { "uv": [ 3.5, 5, 16, 5.5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 5, 12.5, 5.5 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 5, 8, 5.5 ], "texture": "#texture1" },
+ "east": { "uv": [ 8, 5, 16, 5.5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 0, 11.5, 4.5 ],
+ "to": [ 10.5, 12, 8 ],
+ "faces": {
+ "up": { "uv": [ 0, 0, 3.5, 10.5 ], "texture": "#texture1", "rotation": 90 },
+ "north": { "uv": [ 5.5, 4, 16, 4.5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 4, 10.5, 4.5 ], "texture": "#texture1" },
+ "west": { "uv": [ 4.5, 4, 8, 4.5 ], "texture": "#texture1" },
+ "east": { "uv": [ 8, 4, 11.5, 4.5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 0, 11.5, 0 ],
+ "to": [ 10.5, 12, 3 ],
+ "faces": {
+ "up": { "uv": [ 0, 0, 10.5, 3 ], "texture": "#texture1" },
+ "north": { "uv": [ 5.5, 4, 16, 4.5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0, 4, 10.5, 4.5 ], "texture": "#texture1" },
+ "west": { "uv": [ 0, 4, 3, 4.5 ], "texture": "#texture1" },
+ "east": { "uv": [ 5, 8, 8, 8.5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 0, 0, 0 ],
+ "to": [ 2, 8, 2 ],
+ "faces": {
+ "down": { "uv": [ 0, 14, 2, 16 ], "texture": "#texture" },
+ "north": { "uv": [ 8, 8, 10, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 10, 8, 12, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 12, 8, 14, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 14, 8, 16, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 14, 0, 0 ],
+ "to": [ 16, 8, 2 ],
+ "faces": {
+ "down": { "uv": [ 14, 14, 16, 16 ], "texture": "#texture" },
+ "north": { "uv": [ 0, 8, 2, 16 ], "texture": "#texture" },
+ "south": { "uv": [ 2.5, 8, 4.5, 16 ], "texture": "#texture" },
+ "west": { "uv": [ 4, 8, 6, 16 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 8, 8, 16 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 0, 0, 6 ],
+ "to": [ 2, 8, 8 ],
+ "faces": {
+ "down": { "uv": [ 0, 8, 2, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 14, 0, 16, 8 ], "texture": "#texture" },
+ "south": { "uv": [ 12, 0, 14, 8 ], "texture": "#texture" },
+ "west": { "uv": [ 10, 0, 12, 8 ], "texture": "#texture" },
+ "east": { "uv": [ 8, 0, 10, 8 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box17",
+ "from": [ 14, 0, 6 ],
+ "to": [ 16, 8, 8 ],
+ "faces": {
+ "down": { "uv": [ 14, 8, 16, 10 ], "texture": "#texture" },
+ "north": { "uv": [ 0, 0, 2, 8 ], "texture": "#texture" },
+ "south": { "uv": [ 2, 0, 4, 8 ], "texture": "#texture" },
+ "west": { "uv": [ 4, 0, 6, 8 ], "texture": "#texture" },
+ "east": { "uv": [ 6, 0, 8, 8 ], "texture": "#texture" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 2, 1, 0.5 ],
+ "to": [ 14, 2, 1.5 ],
+ "faces": {
+ "down": { "uv": [ 3, 9, 15, 10 ], "texture": "#texture1" },
+ "up": { "uv": [ 2, 6, 14, 7 ], "texture": "#texture1" },
+ "north": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" },
+ "south": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 2, 1, 6.5 ],
+ "to": [ 14, 2, 7.5 ],
+ "faces": {
+ "down": { "uv": [ 2, 8.5, 14, 9.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 2, 6, 14, 7 ], "texture": "#texture1" },
+ "north": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" },
+ "south": { "uv": [ 2, 14, 14, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 0.5, 1, 2 ],
+ "to": [ 1.5, 2, 6 ],
+ "faces": {
+ "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" },
+ "up": { "uv": [ 0, 0, 1, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 2, 14, 6, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 10, 14, 14, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 14.5, 1, 2 ],
+ "to": [ 15.5, 2, 6 ],
+ "faces": {
+ "down": { "uv": [ 14.5, 10, 15.5, 14 ], "texture": "#texture1" },
+ "up": { "uv": [ 14.5, 6, 15.5, 10 ], "texture": "#texture1" },
+ "west": { "uv": [ 2, 14, 6, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 10, 14, 14, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 2.5, 1, 1.5 ],
+ "to": [ 3.5, 2, 6.5 ],
+ "faces": {
+ "down": { "uv": [ 2.5, 9.5, 3.5, 14.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 0, 4, 1, 9 ], "texture": "#texture1" },
+ "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 4.5, 1, 1.5 ],
+ "to": [ 5.5, 2, 6.5 ],
+ "faces": {
+ "down": { "uv": [ 4.5, 9.5, 5.5, 14.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 0, 9, 1, 14 ], "texture": "#texture1" },
+ "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 6.5, 1, 1.5 ],
+ "to": [ 7.5, 2, 6.5 ],
+ "faces": {
+ "down": { "uv": [ 6.5, 9.5, 7.5, 14.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 1, 0, 2, 5 ], "texture": "#texture1" },
+ "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 8.5, 1, 1.5 ],
+ "to": [ 9.5, 2, 6.5 ],
+ "faces": {
+ "down": { "uv": [ 8.5, 9.5, 9.5, 14.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 1, 5, 2, 10 ], "texture": "#texture1" },
+ "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 10.5, 1, 1.5 ],
+ "to": [ 11.5, 2, 6.5 ],
+ "faces": {
+ "down": { "uv": [ 10.5, 9.5, 11.5, 14.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 1, 10, 2, 15 ], "texture": "#texture1" },
+ "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 12.5, 1, 1.5 ],
+ "to": [ 13.5, 2, 6.5 ],
+ "faces": {
+ "down": { "uv": [ 12.5, 9.5, 13.5, 14.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 2, 0, 3, 5 ], "texture": "#texture1" },
+ "west": { "uv": [ 1.5, 14, 6.5, 15 ], "texture": "#texture1" },
+ "east": { "uv": [ 9.5, 14, 14.5, 15 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 0.5, 3.5, 2 ],
+ "to": [ 1.5, 4.5, 6 ],
+ "faces": {
+ "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" },
+ "up": { "uv": [ 3, 2, 4, 6 ], "texture": "#texture1" },
+ "west": { "uv": [ 2, 11, 6, 12 ], "texture": "#texture1" },
+ "east": { "uv": [ 10, 11, 14, 12 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 0.5, 6, 2 ],
+ "to": [ 1.5, 7, 6 ],
+ "faces": {
+ "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" },
+ "up": { "uv": [ 7, 0, 8, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 2, 10, 6, 11 ], "texture": "#texture1" },
+ "east": { "uv": [ 10, 10, 14, 11 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 14.5, 3.5, 2 ],
+ "to": [ 15.5, 4.5, 6 ],
+ "faces": {
+ "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" },
+ "up": { "uv": [ 7, 0, 8, 4 ], "texture": "#texture1" },
+ "west": { "uv": [ 2, 10, 6, 11 ], "texture": "#texture1" },
+ "east": { "uv": [ 10, 10, 14, 11 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box23",
+ "from": [ 14.5, 6, 2 ],
+ "to": [ 15.5, 7, 6 ],
+ "faces": {
+ "down": { "uv": [ 0.5, 10, 1.5, 14 ], "texture": "#texture1" },
+ "up": { "uv": [ 3, 2, 4, 6 ], "texture": "#texture1" },
+ "west": { "uv": [ 2, 11, 6, 12 ], "texture": "#texture1" },
+ "east": { "uv": [ 10, 11, 14, 12 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 2, 3.5, 0.5 ],
+ "to": [ 14, 4.5, 1.5 ],
+ "faces": {
+ "down": { "uv": [ 2, 14.5, 14, 15.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 2, 1, 14, 2 ], "texture": "#texture1" },
+ "north": { "uv": [ 2, 12, 14, 13 ], "texture": "#texture1" },
+ "south": { "uv": [ 2, 10, 14, 11 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box21",
+ "from": [ 2, 6, 0.5 ],
+ "to": [ 14, 7, 1.5 ],
+ "faces": {
+ "down": { "uv": [ 2, 14.5, 14, 15.5 ], "texture": "#texture1" },
+ "up": { "uv": [ 3, 5, 15, 6 ], "texture": "#texture1" },
+ "north": { "uv": [ 2, 9, 14, 10 ], "texture": "#texture1" },
+ "south": { "uv": [ 2, 9, 14, 10 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box37",
+ "from": [ 0.5, 8.5, 8 ],
+ "to": [ 1, 9.5, 9 ],
+ "faces": {
+ "down": { "uv": [ 0.5, 7, 1, 8 ], "texture": "#texture1" },
+ "up": { "uv": [ 0.5, 8, 1, 9 ], "texture": "#texture1" },
+ "north": { "uv": [ 15, 6.5, 15.5, 7.5 ], "texture": "#texture1" },
+ "south": { "uv": [ 0.5, 6.5, 1, 7.5 ], "texture": "#texture1" },
+ "west": { "uv": [ 8, 6.5, 9, 7.5 ], "texture": "#texture1" },
+ "east": { "uv": [ 7, 6.5, 8, 7.5 ], "texture": "#texture1" }
+ }
+ },
+ {
+ "__comment": "Box37",
+ "from": [ 2, 8.5, 8 ],
+ "to": [ 2.5, 9.5, 9 ],
+ "faces": {
+ "down": { "uv": [ 2, 7, 2.5, 8 ], "texture": "#texture1" },
+ "up": { "uv": [ 2, 8, 2.5, 9 ], "texture": "#texture1" },
+ "north": { "uv": [ 13.5, 6.5, 14, 7.5 ], "texture": "#texture1" },
+ "south": { "uv": [ 2, 6.5, 2.5, 7.5 ], "texture": "#texture1" },
+ "west": { "uv": [ 8, 6.5, 9, 7.5 ], "texture": "#texture1" },
+ "east": { "uv": [ 7, 6.5, 8, 7.5 ], "texture": "#texture1" }
+ }
+ }
+ ],
+ "display": {
+ "thirdperson_righthand": {
+ "rotation": [ 75, 45, 0 ],
+ "translation": [ 2.0869, 1.1086, 0.6956 ],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "thirdperson_lefthand": {
+ "rotation": [ 75, 45, 0 ],
+ "translation": [ 2.0869, 1.1086, 0.6956 ],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, -45, 0 ],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ },
+ "firstperson_lefthand": {
+ "rotation": [ 0, -45, 0 ],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ },
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 1.3916, 0, 0 ],
+ "scale": [ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "translation": [ 0, 3, 0 ],
+ "scale": [ 0.25, 0.25, 0.25 ]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, -2.781 ],
+ "scale": [ 0.5, 0.5, 0.5 ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/axe.json b/kfc/src/main/resources/assets/forgecraft/models/item/axe.json
index c79e657e..dd83aab9 100644
--- a/kfc/src/main/resources/assets/forgecraft/models/item/axe.json
+++ b/kfc/src/main/resources/assets/forgecraft/models/item/axe.json
@@ -1,11 +1,11 @@
{
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
"textures": {
- "particle": "forgecraft:items/iron_ingot",
+ "particle": "items/iron_ingot",
"texture": "blocks/planks_oak",
- "texture1": "forgecraft:items/iron_ingot"
+ "texture1": "items/iron_ingot"
},
- "elements": [
+ "elements": [
{
"__comment": "Cube1",
"from": [ 8, 0, 7.5 ],
@@ -93,6 +93,10 @@
"rotation": [ 0, 0, -45 ],
"translation": [ -0.75, 0, 8 ]
},
+ "head": {
+ "rotation": [ -90, 0, 0 ],
+ "translation": [ 5.69, 7.2, -1.3 ]
+ },
"ground": {
"rotation": [ 90, 0, 0 ],
"translation": [ 0, -3.5, 0 ]
diff --git a/kfc/src/main/resources/assets/forgecraft/models/item/axe/bronze/assets1.sh b/kfc/src/main/resources/assets/forgecraft/models/item/axe/bronze/assets1.sh
new file mode 100644
index 00000000..229d28b3
--- /dev/null
+++ b/kfc/src/main/resources/assets/forgecraft/models/item/axe/bronze/assets1.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+values=(
+0
+0.0001
+0.001
+0.01
+0.1
+1
+)
+
+IFS= read -r -p "Enter Material: " mat
+IFS= read -r -p "Enter Tool: " tool
+
+for i in ${values[@]}; do
+ touch ${mat}${tool}"_"${i}".json"
+ cat >${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <${mat}${tool}_${i}.json <