diff --git a/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_handle.png deleted file mode 100755 index 983ea25eb..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_head.png deleted file mode 100755 index 5b820e241..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_head_broken.png deleted file mode 100755 index 4f5f1b56f..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/axe/alumite_axe_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_back.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_back.png deleted file mode 100755 index 00bc7077b..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_back.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_backhead.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_backhead.png deleted file mode 100755 index c3cfcade0..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_backhead.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_binding.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_binding.png deleted file mode 100755 index 00bc7077b..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_binding.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_front.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_front.png deleted file mode 100755 index a4fafb83d..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_front.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_fronthead.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_fronthead.png deleted file mode 100755 index a4fafb83d..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_fronthead.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_fronthead_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_fronthead_broken.png deleted file mode 100755 index 7eab77041..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_fronthead_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_handle.png deleted file mode 100755 index c0653a954..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_head.png deleted file mode 100755 index c3cfcade0..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_head_broken.png deleted file mode 100755 index 7eab77041..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battleaxe/amethyst_battleaxe_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_handle.png deleted file mode 100755 index 8b43760bf..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_head.png b/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_head.png deleted file mode 100755 index 1380200f6..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_head_broken.png deleted file mode 100755 index 1f120508c..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/battlesign/amethyst_battlesign_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_accessory.png b/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_accessory.png deleted file mode 100755 index 44fc42f72..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_accessory.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_blade.png deleted file mode 100755 index f78c3bb19..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_blade_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_blade_broken.png deleted file mode 100755 index 3e1fdc8f1..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_blade_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_handle.png deleted file mode 100755 index 30efa5c41..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/broadsword/amethyst_sword_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_handle.png deleted file mode 100755 index 7de2e3684..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_head.png b/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_head.png deleted file mode 100755 index 7a7e80028..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_head_broken.png deleted file mode 100755 index 151a0082c..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/chisel/amethyst_chisel_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_guard.png b/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_guard.png deleted file mode 100755 index ebe100461..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_guard.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_handle.png deleted file mode 100755 index 1ad513a05..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_head.png b/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_head.png deleted file mode 100755 index e65ce18dd..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_head_broken.png deleted file mode 100755 index 3c36faf3f..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_shield.png b/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_shield.png deleted file mode 100755 index fdb46f6c0..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cleaver/amethyst_cleaver_shield.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_blade.png deleted file mode 100755 index 2f8801e90..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_blade_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_blade_broken.png deleted file mode 100755 index 1ce29b226..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_blade_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_guard.png b/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_guard.png deleted file mode 100755 index e9d2ec59f..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_guard.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_handle.png deleted file mode 100755 index 4614db03c..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/cutlass/amethyst_cutlass_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_accessory.png b/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_accessory.png deleted file mode 100755 index abdea45ff..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_accessory.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_blade.png deleted file mode 100755 index 71a7902ef..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_blade_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_blade_broken.png deleted file mode 100755 index 745053c60..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_blade_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_handle.png deleted file mode 100755 index 3d73dba7d..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/dagger/amethyst_dagger_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_binding.png b/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_binding.png deleted file mode 100755 index b6ba71392..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_binding.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_grip.png b/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_grip.png deleted file mode 100755 index 192725bbb..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_grip.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_handle.png deleted file mode 100755 index ead7b44cb..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_head.png b/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_head.png deleted file mode 100755 index 1367677d8..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_head_broken.png deleted file mode 100755 index c9ca0b9d8..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/excavator/amethyst_excavator_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_handle.png deleted file mode 100755 index 978e34181..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_head.png b/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_head.png deleted file mode 100755 index 4c625f641..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_head_broken.png deleted file mode 100755 index 733ce65ee..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/frypan/amethyst_frypan_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_back.png b/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_back.png deleted file mode 100755 index 6b0717881..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_back.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_front.png b/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_front.png deleted file mode 100755 index fdb4bfd02..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_front.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_handle.png deleted file mode 100755 index 099a0172e..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_handle_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_handle_broken.png deleted file mode 100755 index 9f5780780..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_handle_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_head.png b/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_head.png deleted file mode 100755 index d716c4744..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/hammer/amethyst_hammer_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_accessory.png b/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_accessory.png deleted file mode 100755 index 62777eeb8..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_accessory.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_blade.png deleted file mode 100755 index 4452b6960..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_blade_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_blade_broken.png deleted file mode 100755 index 25c0f5a09..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_blade_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_handle.png deleted file mode 100755 index a9b2b27f7..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/longsword/amethyst_longsword_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_binding.png b/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_binding.png deleted file mode 100755 index 2ca79fb99..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_binding.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_handle.png deleted file mode 100755 index efe665d09..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_head.png deleted file mode 100755 index 0644091e8..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_head_broken.png deleted file mode 100755 index d9957c271..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_shield.png b/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_shield.png deleted file mode 100755 index c0c1899e4..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/lumberaxe/amethyst_lumberaxe_shield.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_back.png b/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_back.png deleted file mode 100755 index 20155eb5a..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_back.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_handle.png deleted file mode 100755 index e750f7248..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_head.png b/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_head.png deleted file mode 100755 index 91a2c4554..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_head_broken.png deleted file mode 100755 index 4828acd06..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/mattock/amethyst_mattock_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_axe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_axe_head.png deleted file mode 100755 index 1b4674201..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_axe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_battlesign_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_battlesign_head.png deleted file mode 100755 index c7780cbba..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_battlesign_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_binding.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_binding.png deleted file mode 100755 index a3acce5e8..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_binding.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_chisel_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_chisel_head.png deleted file mode 100755 index bbff9ae2c..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_chisel_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_chunk.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_chunk.png deleted file mode 100755 index 59cad63b6..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_chunk.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_crossbar.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_crossbar.png deleted file mode 100755 index 467e4f129..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_crossbar.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_excavator_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_excavator_head.png deleted file mode 100755 index e6950270a..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_excavator_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_frypan_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_frypan_head.png deleted file mode 100755 index ba5c762ae..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_frypan_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_full_guard.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_full_guard.png deleted file mode 100755 index e05fef77d..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_full_guard.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_hammer_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_hammer_head.png deleted file mode 100755 index ad77dc66b..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_hammer_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_knife_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_knife_blade.png deleted file mode 100755 index dca867d0d..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_knife_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_large_guard.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_large_guard.png deleted file mode 100755 index 6fa5f4f68..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_large_guard.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_large_sword_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_large_sword_blade.png deleted file mode 100755 index e2b674f0d..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_large_sword_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_largeplate.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_largeplate.png deleted file mode 100755 index f94f069e6..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_largeplate.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_lumberaxe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_lumberaxe_head.png deleted file mode 100755 index 045210612..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_lumberaxe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_medium_guard.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_medium_guard.png deleted file mode 100755 index bd18f4ea1..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_medium_guard.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_pickaxe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_pickaxe_head.png deleted file mode 100755 index f8b141cc2..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_pickaxe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_rod.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_rod.png deleted file mode 100755 index 09e8e0489..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_rod.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_scythe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_scythe_head.png deleted file mode 100755 index 3b841cd86..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_scythe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_shovel_head.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_shovel_head.png deleted file mode 100755 index 3ae87129c..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_shovel_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_sword_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_sword_blade.png deleted file mode 100755 index 6c7984457..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_sword_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_toughbind.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_toughbind.png deleted file mode 100755 index 4a1c09768..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_toughbind.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_toughrod.png b/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_toughrod.png deleted file mode 100755 index 14af1854c..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/parts/amethyst_toughrod.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_accessory.png b/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_accessory.png deleted file mode 100755 index 555eda0b5..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_accessory.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_handle.png deleted file mode 100755 index 2234e6c32..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_head.png deleted file mode 100755 index afe316de9..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_head_broken.png deleted file mode 100755 index afe6ed610..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/pickaxe/amethyst_pickaxe_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_accessory.png b/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_accessory.png deleted file mode 100755 index e22afe9ed..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_accessory.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_blade.png b/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_blade.png deleted file mode 100755 index 9e43e729b..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_blade.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_blade_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_blade_broken.png deleted file mode 100755 index 06085140b..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_blade_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_handle.png deleted file mode 100755 index 0dfb04c25..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/rapier/alumite_rapier_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_accessory.png b/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_accessory.png deleted file mode 100755 index 4b653ded9..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_accessory.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_binding.png b/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_binding.png deleted file mode 100755 index f7ad4e2c1..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_binding.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_handle.png deleted file mode 100755 index 908797d14..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_head.png b/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_head.png deleted file mode 100755 index 78edf56bf..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_head_broken.png deleted file mode 100755 index 6d8fa4dae..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/scythe/alumite_scythe_head_broken.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_handle.png b/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_handle.png deleted file mode 100755 index 9219fc759..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_handle.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_head.png b/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_head.png deleted file mode 100755 index 918ca7b73..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_head.png and /dev/null differ diff --git a/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_head_broken.png b/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_head_broken.png deleted file mode 100755 index e21f5f243..000000000 Binary files a/src/minecraft/assets/biomesoplenty/textures/items/shovel/alumite_shovel_head_broken.png and /dev/null differ diff --git a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java index e6e128bf7..24b1c6ffa 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java +++ b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java @@ -253,35 +253,6 @@ public class BOPConfiguration { public static int scytheAmethystID; public static int flowerBandID; - - //Tinkers Construct Compat Item IDs - - public static int bindingID; - public static int toughBindingID; - public static int toughRodID; - public static int heavyPlateID; - - public static int toolRodID; - public static int toolShardID; - - public static int pickaxeHeadID; - public static int shovelHeadID; - public static int hatchetHeadID; - public static int frypanHeadID; - public static int signHeadID; - public static int chiselHeadID; - public static int scytheBladeID; - public static int broadAxeHeadID; - public static int excavatorHeadID; - public static int hammerHeadID; - - public static int swordBladeID; - public static int largeSwordBladeID; - public static int knifeBladeID; - - public static int wideGuardID; - public static int handGuardID; - public static int crossbarID; //Liquid IDs public static int springWaterStillID; @@ -853,35 +824,6 @@ public class BOPConfiguration { scytheMudID = config.getItem("Mud Scythe ID", 21086).getInt(); scytheAmethystID = config.getItem("Amethyst Scythe ID", 21087).getInt(); - bindingID = config.get("TC Compat IDs", "Binding ID", 21088).getInt(); - toughBindingID = config.get("TC Compat IDs", "Tough Binding ID", 21089).getInt(); - toughRodID = config.get("TC Compat IDs", "Tough Rod ID", 21090).getInt(); - heavyPlateID = config.get("TC Compat IDs", "Heavy Plate", 21091).getInt(); - - toolRodID = config.get("TC Compat IDs", "Tool Rod ID", 21092).getInt(); - toolShardID = config.get("TC Compat IDs", "Tool Shard ID", 21093).getInt(); - - pickaxeHeadID = config.get("TC Compat IDs", "Pickaxe Head", 21094).getInt(); - shovelHeadID = config.get("TC Compat IDs", "Shovel Head", 21095).getInt(); - hatchetHeadID = config.get("TC Compat IDs", "Hatchet Head", 21906).getInt(); - frypanHeadID = config.get("TC Compat IDs", "Frypan Head", 21097).getInt(); - signHeadID = config.get("TC Compat IDs", "Sign Head", 21098).getInt(); - chiselHeadID = config.get("TC Compat IDs", "Chisel Head", 21099).getInt(); - scytheBladeID = config.get("TC Compat IDs", "Scythe Blade", 21100).getInt(); - broadAxeHeadID = config.get("TC Compat IDs", "Broad Axe Head", 21101).getInt(); - excavatorHeadID = config.get("TC Compat IDs", "Excavator Head", 21102).getInt(); - hammerHeadID = config.get("TC Compat IDs", "Hammer Head", 21103).getInt(); - - swordBladeID = config.get("TC Compat IDs", "Sword Blad", 21104).getInt(); - largeSwordBladeID = config.get("TC Compat IDs", "Large Sword Blade", 21105).getInt(); - knifeBladeID = config.get("TC Compat IDs", "Knife Blade", 21106).getInt(); - - wideGuardID = config.get("TC Compat IDs", "Wide Guard", 21107).getInt(); - handGuardID = config.get("TC Compat IDs", "Hand Guard", 21108).getInt(); - crossbarID = config.get("TC Compat IDs", "Crossbar", 21109).getInt(); - - //Reserve 10 Item IDs for future TC items - //Liquid Ids springWaterStillID = config.get("Liquid IDs", "Spring Water Still ID (ID before this must be free!)", 1971, null).getInt(); liquidPoisonStillID = config.get("Liquid IDs", "Liquid Poison Still ID (ID before this must be free!)", 1973, null).getInt(); diff --git a/src/minecraft/biomesoplenty/integration/BOPCrossIntegration.java b/src/minecraft/biomesoplenty/integration/BOPCrossIntegration.java index 550fe6165..03aeb0e7c 100644 --- a/src/minecraft/biomesoplenty/integration/BOPCrossIntegration.java +++ b/src/minecraft/biomesoplenty/integration/BOPCrossIntegration.java @@ -21,17 +21,6 @@ public class BOPCrossIntegration { } } - if (Loader.isModLoaded("TConstruct")) - { - try { - TConstructIntegration.init(); - } - catch (Exception e) { - System.out.println("[BiomesOPlenty] There was an error while integrating TConstruct with Biomes O' Plenty!"); - e.printStackTrace(System.err); - } - } - if (Loader.isModLoaded("Thaumcraft")) { try { diff --git a/src/minecraft/biomesoplenty/integration/TConstructIntegration.java b/src/minecraft/biomesoplenty/integration/TConstructIntegration.java deleted file mode 100644 index 4ed904db6..000000000 --- a/src/minecraft/biomesoplenty/integration/TConstructIntegration.java +++ /dev/null @@ -1,18 +0,0 @@ -package biomesoplenty.integration; - -import mods.tinker.tconstruct.library.TConstructRegistry; -import biomesoplenty.integration.tinkersconstruct.TCItems; - -public class TConstructIntegration -{ - public static void init() - { - addMaterials(); - TCItems.init(); - } - - private static void addMaterials() - { - TConstructRegistry.addToolMaterial(150, "Amethyst", 4, 750, 800, 3, 1.3F, 2, 0f, "", ""); - } -} diff --git a/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPCraftingItem.java b/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPCraftingItem.java deleted file mode 100644 index b4c8b5ac6..000000000 --- a/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPCraftingItem.java +++ /dev/null @@ -1,64 +0,0 @@ -package biomesoplenty.integration.tinkersconstruct; - -import java.util.List; - -import mods.tinker.tconstruct.library.TConstructRegistry; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class BOPCraftingItem extends Item -{ - public String[] textureNames; - public String[] unlocalizedNames; - public String folder; - public Icon[] icons; - public BOPCraftingItem(int id, String[] names, String[] tex, String folder) - { - super(id); - this.setCreativeTab(TConstructRegistry.materialTab); - this.setMaxDamage(0); - this.setHasSubtypes(true); - this.textureNames = tex; - this.unlocalizedNames = names; - this.folder = folder; - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) - { - return icons[meta]; - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IconRegister iconRegister) - { - this.icons = new Icon[textureNames.length]; - - for (int i = 0; i < this.icons.length; ++i) - { - this.icons[i] = iconRegister.registerIcon("biomesoplenty:"+folder+textureNames[i]); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) - { - int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, unlocalizedNames.length); - return getUnlocalizedName() + "." +unlocalizedNames[arr]; - } - - @Override - public void getSubItems(int id, CreativeTabs tab, List list) - { - for (int i = 0; i < unlocalizedNames.length; i++) - list.add(new ItemStack(id, 1, i)); - } -} diff --git a/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPToolPart.java b/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPToolPart.java deleted file mode 100644 index ad82265ec..000000000 --- a/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPToolPart.java +++ /dev/null @@ -1,32 +0,0 @@ -package biomesoplenty.integration.tinkersconstruct; - -import mods.tinker.tconstruct.library.util.IToolPart; -import net.minecraft.item.ItemStack; - -public class BOPToolPart extends BOPCraftingItem implements IToolPart -{ - public BOPToolPart(int id, String partType, String textureType) - { - super(id, toolMaterialNames, buildTextureNames(textureType), "parts/"); - this.setHasSubtypes(true); - this.setMaxDamage(0); - } - - private static String[] buildTextureNames (String textureType) - { - String[] names = new String[toolMaterialNames.length]; - for (int i = 0; i < toolMaterialNames.length; i++) - names[i] = toolTextureNames[i]+textureType; - return names; - } - - public static final String[] toolMaterialNames = new String[] { "Amethyst" }; - - public static final String[] toolTextureNames = new String[] { "amethyst" }; - - @Override - public int getMaterialID (ItemStack stack) - { - return 150 + stack.getItemDamage(); - } -} diff --git a/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPToolShard.java b/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPToolShard.java deleted file mode 100644 index 6263d384b..000000000 --- a/src/minecraft/biomesoplenty/integration/tinkersconstruct/BOPToolShard.java +++ /dev/null @@ -1,47 +0,0 @@ -package biomesoplenty.integration.tinkersconstruct; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Icon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class BOPToolShard extends BOPToolPart -{ - public BOPToolShard(int id, String part, String tex) - { - super(id, part, tex); - this.setHasSubtypes(true); - this.setMaxDamage(0); - } - - private static String[] buildTextureNames(String textureType) - { - String[] names = new String[toolMaterialNames.length]; - for (int i = 0; i < toolMaterialNames.length; i++) - names[i] = toolTextureNames[i]+textureType; - return names; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister iconRegister) - { - this.icons = new Icon[textureNames.length]; - - for (int i = 0; i < textureNames.length; ++i) - { - this.icons[i] = iconRegister.registerIcon("biomesoplenty:"+folder+textureNames[i]); - } - } - - @Override - public void getSubItems(int id, CreativeTabs tab, List list) - { - for (int i = 0; i < toolMaterialNames.length; i++) - list.add(new ItemStack(id, 1, i)); - } -} diff --git a/src/minecraft/biomesoplenty/integration/tinkersconstruct/TCItems.java b/src/minecraft/biomesoplenty/integration/tinkersconstruct/TCItems.java deleted file mode 100644 index dd32c25dc..000000000 --- a/src/minecraft/biomesoplenty/integration/tinkersconstruct/TCItems.java +++ /dev/null @@ -1,117 +0,0 @@ -package biomesoplenty.integration.tinkersconstruct; - -import mods.tinker.tconstruct.library.TConstructRegistry; -import mods.tinker.tconstruct.library.client.TConstructClientRegistry; -import mods.tinker.tconstruct.library.crafting.PatternBuilder; -import mods.tinker.tconstruct.library.crafting.ToolBuilder; -import mods.tinker.tconstruct.library.tools.ToolCore; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import biomesoplenty.api.Items; -import biomesoplenty.configuration.BOPConfiguration; - -public class TCItems -{ - public static Item binding; - public static Item toughBinding; - public static Item toughRod; - public static Item heavyPlate; - - public static Item toolRod; - public static Item toolShard; - - public static Item pickaxeHead; - public static Item shovelHead; - public static Item hatchetHead; - public static Item frypanHead; - public static Item signHead; - public static Item chiselHead; - public static Item scytheBlade; - public static Item broadAxeHead; - public static Item excavatorHead; - public static Item hammerHead; - - public static Item swordBlade; - public static Item largeSwordBlade; - public static Item knifeBlade; - - public static Item wideGuard; - public static Item handGuard; - public static Item crossbar; - - public static void init() - { - initializeItems(); - addCrafting(); - } - - private static void initializeItems() - { - toolRod = new BOPToolPart(BOPConfiguration.toolRodID, "ToolRod", "_rod").setUnlocalizedName("bop.tc.ToolRod"); - toolShard = new BOPToolShard(BOPConfiguration.toolShardID, "ToolShard", "_chunk").setUnlocalizedName("bop.tc.ToolShard"); - - pickaxeHead = new BOPToolPart(BOPConfiguration.pickaxeHeadID, "PickaxeHead", "_pickaxe_head").setUnlocalizedName("bop.tc.PickaxeHead"); - shovelHead = new BOPToolPart(BOPConfiguration.shovelHeadID, "ShovelHead", "_shovel_head").setUnlocalizedName("bop.tc.ShovelHead"); - hatchetHead = new BOPToolPart(BOPConfiguration.hatchetHeadID, "AxeHead", "_axe_head").setUnlocalizedName("bop.tc.AxeHead"); - binding = new BOPToolPart(BOPConfiguration.bindingID, "Binding", "_binding").setUnlocalizedName("bop.tc.Binding"); - toughBinding = new BOPToolPart(BOPConfiguration.toughBindingID, "ThickBinding", "_toughbind").setUnlocalizedName("bop.tc.ThickBinding"); - toughRod = new BOPToolPart(BOPConfiguration.toughRodID, "ThickRod", "_toughrod").setUnlocalizedName("bop.tc.ThickRod"); - heavyPlate = new BOPToolPart(BOPConfiguration.heavyPlateID, "LargePlate", "_largeplate").setUnlocalizedName("bop.tc.LargePlate"); - - swordBlade = new BOPToolPart(BOPConfiguration.swordBladeID, "SwordBlade", "_sword_blade").setUnlocalizedName("bop.tc.SwordBlade"); - wideGuard = new BOPToolPart(BOPConfiguration.wideGuardID, "LargeGuard", "_large_guard").setUnlocalizedName("bop.tc.LargeGuard"); - handGuard = new BOPToolPart(BOPConfiguration.handGuardID, "MediumGuard", "_medium_guard").setUnlocalizedName("bop.tc.MediumGuard"); - crossbar = new BOPToolPart(BOPConfiguration.crossbarID, "Crossbar", "_crossbar").setUnlocalizedName("bop.tc.Crossbar"); - knifeBlade = new BOPToolPart(BOPConfiguration.knifeBladeID, "KnifeBlade", "_knife_blade").setUnlocalizedName("bop.tc.KnifeBlade"); - - frypanHead = new BOPToolPart(BOPConfiguration.frypanHeadID, "FrypanHead", "_frypan_head").setUnlocalizedName("bop.tc.FrypanHead"); - signHead = new BOPToolPart(BOPConfiguration.signHeadID, "SignHead", "_battlesign_head").setUnlocalizedName("bop.tc.SignHead"); - chiselHead = new BOPToolPart(BOPConfiguration.chiselHeadID, "ChiselHead", "_chisel_head").setUnlocalizedName("bop.tc.ChiselHead"); - - scytheBlade = new BOPToolPart(BOPConfiguration.scytheBladeID, "ScytheBlade", "_scythe_head").setUnlocalizedName("bop.tc.ScytheBlade"); - broadAxeHead = new BOPToolPart(BOPConfiguration.broadAxeHeadID, "LumberHead", "_lumberaxe_head").setUnlocalizedName("bop.tc.LumberHead"); - excavatorHead = new BOPToolPart(BOPConfiguration.excavatorHeadID, "ExcavatorHead", "_excavator_head").setUnlocalizedName("bop.tc.ExcavatorHead"); - largeSwordBlade = new BOPToolPart(BOPConfiguration.largeSwordBladeID, "LargeSwordBlade", "_large_sword_blade").setUnlocalizedName("bop.tc.LargeSwordBlade"); - hammerHead = new BOPToolPart(BOPConfiguration.hammerHeadID, "HammerHead", "_hammer_head").setUnlocalizedName("bop.tc.HammerHead"); - } - - private static void addCrafting() - { - PatternBuilder pb = PatternBuilder.instance; - pb.registerFullMaterial(new ItemStack(Items.miscItems.get(), 1, 2), 2, "Amethyst", new ItemStack(toolShard, 1, 0), new ItemStack(toolRod, 1, 0), 150); - - Item[] patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, hatchetHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead, knifeBlade, chiselHead, toughRod, toughBinding, heavyPlate, broadAxeHead, scytheBlade, excavatorHead, largeSwordBlade, hammerHead }; - String[] partTypes = { "amethyst" }; - - for (int mat = 0; mat < 1; mat++) - { - for (int meta = 0; meta < patternOutputs.length; meta++) - { - TConstructRegistry.addPartMapping(TConstructRegistry.getItem("woodPattern").itemID, meta + 1, 150, new ItemStack(patternOutputs[meta], 1, mat)); - } - } - - for (int partIter = 0; partIter < partTypes.length; partIter++) - { - TConstructClientRegistry.addMaterialRenderMapping(150 + partIter, "BiomesOPlenty", partTypes[partIter], true); - } - - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("pickaxe"), pickaxeHead, toolRod, binding); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("broadsword"), swordBlade, toolRod, wideGuard); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("hatchet"), hatchetHead, toolRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("shovel"), shovelHead, toolRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("longsword"), swordBlade, toolRod, handGuard); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("rapier"), swordBlade, toolRod, crossbar); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("frypan"), frypanHead, toolRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("battlesign"), signHead, toolRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("mattock"), hatchetHead, toolRod, shovelHead); - //ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("dagger"), knifeBlade, crossbar); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("chisel"), chiselHead, toolRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("scythe"), scytheBlade, toughRod, toughBinding, toughRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("lumberaxe"), broadAxeHead, toughRod, heavyPlate, toughBinding); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("cleaver"), largeSwordBlade, toughRod, heavyPlate, toughRod); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("excavator"), excavatorHead, toughRod, heavyPlate, toughBinding); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("hammer"), hammerHead, toughRod, heavyPlate, heavyPlate); - ToolBuilder.addNormalToolRecipe((ToolCore)TConstructRegistry.getItem("battleaxe"), broadAxeHead, toughRod, broadAxeHead, toughBinding); - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/ActiveToolMod.java b/src/minecraft/mods/tinker/tconstruct/library/ActiveToolMod.java deleted file mode 100755 index 760a20a11..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/ActiveToolMod.java +++ /dev/null @@ -1,58 +0,0 @@ -package mods.tinker.tconstruct.library; - -import mods.tinker.tconstruct.library.tools.ToolCore; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class ActiveToolMod -{ - /* Updating */ - public void updateTool (ToolCore tool, ItemStack stack, World world, Entity entity) - { - - } - - /* Harvesting */ - public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, int z, EntityLiving entity) - { - return false; - } - - public boolean afterBlockBreak() //Unfinished, not called - { - return false; - } - - /* Attacking */ - - public int baseAttackDamage(int earlyModDamage, int damage, ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityPlayer player, Entity entity) - { - return 0; - } - - //Calculated after sprinting and enchant bonuses - public float knockback(float modKnockback, float currentKnockback, ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityPlayer player, Entity entity) - { - return 0f; - } - - public int attackDamage(int modDamage, int currentDamage, ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityPlayer player, Entity entity) - { - return 0; - } - - public void lateAttackEntity() //Unfinished, not called - { - - } - - /* Damage tool */ - public boolean damageTool(ItemStack stack, int damage, EntityLiving entity) - { - return false; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/TConstructRegistry.java b/src/minecraft/mods/tinker/tconstruct/library/TConstructRegistry.java deleted file mode 100755 index ffa54cad7..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/TConstructRegistry.java +++ /dev/null @@ -1,355 +0,0 @@ -package mods.tinker.tconstruct.library; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -import mods.tinker.tconstruct.library.crafting.Detailing; -import mods.tinker.tconstruct.library.crafting.ToolBuilder; -import mods.tinker.tconstruct.library.tools.ToolCore; -import mods.tinker.tconstruct.library.tools.ToolMaterial; -import mods.tinker.tconstruct.library.util.TabTools; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** A registry to store any relevant API work - * - * @author mDiyo - */ - -public class TConstructRegistry -{ - public static TConstructRegistry instance = new TConstructRegistry(); - - /* Creative tabs */ - public static TabTools toolTab; - public static TabTools materialTab; - public static TabTools blockTab; - - /* Items */ - - /** A directory of crafting items and tools used by the mod. - * - * Tools: - * pickaxe, shovel, hatchet, broadsword, longsword, rapier, dagger, cutlass - * frypan, battlesign, mattock, chisel - * lumberaxe, cleaver, scythe, excavator, hammer, battleaxe - * - * Patterns: - * blankPattern, woodPattern, metalPattern - * - * Tool crafting parts: - * toolRod, toolShard, binding, toughBinding, toughRod, heavyPlate - * pickaxeHead, shovelhead, hatchetHead, swordBlade, wideguard, handGuard, crossbar, knifeBlade, - * fullGuard, frypanHead, signHead, chiselHead - * scytheBlade, broadAxeHead, excavatorHead, largeSwordBlade, hammerHead - */ - public static HashMap itemDirectory = new HashMap(); - - /** Adds an item to the directory - * - * @param name Associates the name with the stack - * @param itemstack The stack to add to the directory - */ - - public static void addItemToDirectory(String name, Item itemstack) - { - Item add = itemDirectory.get(name); - if (add == null) - System.out.println("[TCon API] "+name+" is already present in the Item directory"); - - itemDirectory.put(name, itemstack); - } - - /** Retrieves an itemstack from the directory - * - * @param name The name of the item to get - * @return Item associated with the name, or null if not present. - */ - - public static Item getItem(String name) - { - Item ret = itemDirectory.get(name); - if (ret == null) - System.out.println("[TCon API] Could not find "+name+" in the Item directory"); - - return ret; - } - - /** A directory of ItemStacks. Contains mostly crafting items - * - * Materials: - * paperStack, greenSlimeCrystal, blueSlimeCrystal, searedBrick, mossBall, lavaCrystal, necroticBone, silkyCloth, silkyJewel - * ingotCobalt, ingotArdite, ingotManyullyn, ingotCopper, ingotTin, ingotAluminum, rawAluminum, - * ingotBronze, ingotAluminumBrass, ingotAlumite, ingotSteel, ingotObsidian - * nuggetIron, nuggetCopper, nuggetTin, nuggetAluminum, nuggetSilver, nuggetAluminumBrass - * oreberryIron, oreberryGold, oreberryCopper, oreberryTin, oreberryTin, oreberrySilver, - * diamondApple, blueSlimeFood, canisterEmpty, miniRedHeart, canisterRedHeart - * - * Patterns - These have a suffix of Pattern or Cast. ex: hatchetHeadPattern - * ingot, toolRod, pickaxeHead, shovelHead, hatchetHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead, - * knifeBlade, chiselHead, toughRod, toughBinding, largePlate, broadAxeHead, scytheHead, excavatorHead, largeBlade, hammerHead, fullGuard - */ - static HashMap itemstackDirectory = new HashMap(); - - /** Adds an itemstack to the directory - * - * @param name Associates the name with the stack - * @param itemstack The stack to add to the directory - */ - - public static void addItemStackToDirectory(String name, ItemStack itemstack) - { - ItemStack add = itemstackDirectory.get(name); - if (add == null) - System.out.println("[TCon API] "+name+" is already present in the ItemStack directory"); - - itemstackDirectory.put(name, itemstack); - } - - /** Retrieves an itemstack from the directory - * - * @param name The name of the item to get - * @return Item associated with the name, or null if not present. - */ - - public static ItemStack getItemStack(String name) - { - ItemStack ret = itemstackDirectory.get(name); - if (ret == null) - System.out.println("[TCon API] Could not find "+name+" in the ItemStack directory"); - - return ret; - } - public static ArrayList tools = new ArrayList(20); - - //Parts - - /** List: Item ID, metadata, material ID - * ItemStack: Output. Ex: Cactus Binding - */ - public static HashMap patternPartMapping = new HashMap(); - - /** Maps an item and a material ID to an output part - * - * @param patternID ID to check against - * @param patternMeta Metadata to check against - * @param materialID Material that goes with the item - * @param output The resulting part - */ - public static void addPartMapping(int patternID, int patternMeta, int materialID, ItemStack output) - { - patternPartMapping.put(Arrays.asList(patternID, patternMeta, materialID), output); - } - - public static ItemStack getPartMapping(int itemID, int metadata, int materialID) - { - return patternPartMapping.get(Arrays.asList(itemID, metadata, materialID)).copy(); - } - - //Tools - - /** Internal tool mapping, used for adding textures - * - * @param tool - */ - - public static void addToolMapping (ToolCore tool) - { - tools.add(tool); - } - - /** Internal tool mapping, used for adding textures - * - * @return List of tools - */ - - public static ArrayList getToolMapping () - { - return tools; - } - - /** Registers a tool to its crafting parts. - * If an output is registered multiple times the parts are added to the recipe's input list - * Valid part amounts are 1, 2, and 4. Part counts of 1 and 2 assume a Tool Rod as a handle. - * Null items are valid as placeholders. ex: Hatchet - * - * @see ToolBuidler - * @param output The ToolCore to craft - * @param parts Pieces to make the tool with - */ - @SuppressWarnings("static-access") - public static void addToolRecipe(ToolCore output, Item... parts) - { - ToolBuilder tb = ToolBuilder.instance; - if (parts.length < 1 || parts.length > 4 || parts.length == 3) - System.out.println("[TCon API] Wrong amount of items to craft into a tool"); - - tb.addToolRecipe(output, parts); - } - - //Materials - public static HashMap toolMaterials = new HashMap(40); - public static HashMap toolMaterialStrings = new HashMap(40); - - /** Adds a tool material to the registry - * - * @param materialID Unique ID, stored for each part - * @exception materialID must be unique - * @param materialName Unique name for data lookup purposes - * @param harvestLevel The materials which the tool can harvest. Pickaxe levels - 0: Wood, 1: Stone, 2: Redstone/Diamond, 3: Obsidian, 4: Cobalt/Ardite, 5: Manyullyn - * @param durability Base durability of the tool, affects tool heads. - * @param miningspeed Base mining speed, divided by 100 in use - * @param attack Base attack - * @param handleModifier Durability multiplier on the tool - * @param reinforced Reinforced level - * @param unbreaking Amount of Stonebound to put on the tool. Negative numbers are Spiny. - */ - - public static void addToolMaterial (int materialID, String materialName, int harvestLevel, int durability, int miningspeed, int attack, float handleModifier, int reinforced, - float unbreaking, String style, String ability) - { - ToolMaterial mat = toolMaterials.get(materialID); - if (mat == null) - { - mat = new ToolMaterial(materialName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, unbreaking, style, ability); - toolMaterials.put(materialID, mat); - toolMaterialStrings.put(materialName, mat); - } - else - throw new IllegalArgumentException("[TCon API] Material ID " + materialID + " is already occupied by " + mat.materialName); - } - - /** Adds a tool material to the registry - * - * @param materialID Unique ID, stored for each part - * @exception materialID must be unique - * @param material Complete tool material to add. Uses the name in the material for lookup purposes. - */ - - public static void addtoolMaterial(int materialID, ToolMaterial material) - { - ToolMaterial mat = toolMaterials.get(materialID); - if (mat == null) - { - toolMaterials.put(materialID, mat); - toolMaterialStrings.put(material.name(), mat); - } - else - throw new IllegalArgumentException("[TCon API] Material ID " + materialID + " is already occupied by " + mat.materialName); - } - - /** Looks up a tool material by ID - * - * @param key The ID to look up - * @return Tool Material - */ - - public static ToolMaterial getMaterial (int key) - { - return (toolMaterials.get(key)); - } - - /** Looks up a tool material by name - * - * @param key the name to look up - * @return Tool Material - */ - - public static ToolMaterial getMaterial (String key) - { - return (toolMaterialStrings.get(key)); - } - - /*public static LiquidCasting getTableCasting () - { - return instance.tableCasting(); - } - - LiquidCasting tableCasting () - { - try - { - Class clazz = Class.forName("mods.tinker.tconstruct.TConstruct"); - Method method = clazz.getMethod("getTableCasting"); - LiquidCasting lc = (LiquidCasting) method.invoke(this); - return lc; - } - catch (Exception e) - { - System.out.println("[TCon API] Could not find casting table recipes."); - return null; - } - } - - public static LiquidCasting getBasinCasting () - { - return instance.basinCasting(); - } - - LiquidCasting basinCasting () - { - try - { - Class clazz = Class.forName("mods.tinker.tconstruct.TConstruct"); - Method method = clazz.getMethod("getBasinCasting"); - LiquidCasting lc = (LiquidCasting) method.invoke(this); - return lc; - } - catch (Exception e) - { - System.out.println("[TCon API] Could not find casting basin recipes."); - return null; - } - }*/ - - public static Detailing getChiselDetailing () - { - return instance.chiselDetailing(); - } - - Detailing chiselDetailing () - { - try - { - Class clazz = Class.forName("mods.tinker.tconstruct.TConstruct"); - Method method = clazz.getMethod("getChiselDetailing"); - Detailing lc = (Detailing) method.invoke(this); - return lc; - } - catch (Exception e) - { - System.out.println("[TCon API] Could not find chisel detailing recipes."); - return null; - } - } - - public static ArrayList activeModifiers = new ArrayList(); - public static void registerActiveToolMod(ActiveToolMod mod) - { - activeModifiers.add(mod); - } - - /** Default Material Index - * 0: Wood - * 1: Stone - * 2: Iron - * 3: Flint - * 4: Cactus - * 5: Bone - * 6: Obsidian - * 7: Netherrack - * 8: Green Slime - * 9: Paper - * 10: Cobalt - * 11: Ardite - * 12: Manyullyn - * 13: Copper - * 14: Bronze - * 15: Alumite - * 16: Steel - * 17: Blue Slime - */ -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/blocks/InventoryBlock.java b/src/minecraft/mods/tinker/tconstruct/library/blocks/InventoryBlock.java deleted file mode 100755 index b152f176c..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/blocks/InventoryBlock.java +++ /dev/null @@ -1,161 +0,0 @@ -package mods.tinker.tconstruct.library.blocks; - -import java.util.Random; - -import mods.tinker.tconstruct.library.util.IActiveLogic; -import mods.tinker.tconstruct.library.util.IFacingLogic; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public abstract class InventoryBlock extends BlockContainer -{ - protected Random rand = new Random(); - - protected InventoryBlock(int id, Material material) - { - super(id, material); - } - - /* Logic backend */ - @Override - public TileEntity createNewTileEntity (World var1) - { return null; } - @Override - public abstract TileEntity createTileEntity(World world, int metadata); - public abstract Integer getGui(World world, int x, int y, int z, EntityPlayer entityplayer); - public abstract Object getModInstance(); - - @Override - public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ) - { - if (player.isSneaking()) - return false; - - Integer integer = getGui(world, x, y, z, player); - if (integer == null || integer == -1) - { - return false; - } - else - { - if (!world.isRemote) - player.openGui(getModInstance(), integer, world, x, y, z); - return true; - } - } - - /* Inventory */ - - @Override - public void breakBlock (World par1World, int x, int y, int z, int par5, int par6) - { - TileEntity te = par1World.getBlockTileEntity(x, y, z); - - if (te != null && te instanceof InventoryLogic) - { - InventoryLogic logic = (InventoryLogic) te; - for (int iter = 0; iter < logic.getSizeInventory(); ++iter) - { - ItemStack stack = logic.getStackInSlot(iter); - - if (stack != null && logic.canDropInventorySlot(iter)) - { - float jumpX = rand.nextFloat() * 0.8F + 0.1F; - float jumpY = rand.nextFloat() * 0.8F + 0.1F; - float jumpZ = rand.nextFloat() * 0.8F + 0.1F; - - while (stack.stackSize > 0) - { - int itemSize = rand.nextInt(21) + 10; - - if (itemSize > stack.stackSize) - { - itemSize = stack.stackSize; - } - - stack.stackSize -= itemSize; - EntityItem entityitem = new EntityItem(par1World, (double) ((float) x + jumpX), (double) ((float) y + jumpY), (double) ((float) z + jumpZ), new ItemStack(stack.itemID, - itemSize, stack.getItemDamage())); - - if (stack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound) stack.getTagCompound().copy()); - } - - float offset = 0.05F; - entityitem.motionX = (double) ((float) rand.nextGaussian() * offset); - entityitem.motionY = (double) ((float) rand.nextGaussian() * offset + 0.2F); - entityitem.motionZ = (double) ((float) rand.nextGaussian() * offset); - par1World.spawnEntityInWorld(entityitem); - } - } - } - } - - super.breakBlock(par1World, x, y, z, par5, par6); - } - - /* Placement */ - - @Override - public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack) - { - TileEntity logic = world.getBlockTileEntity(x, y, z); - if (logic instanceof IFacingLogic) - { - IFacingLogic direction = (IFacingLogic) logic; - if (entityliving == null) - { - direction.setDirection(0F, 0F, null); - } - else - { - direction.setDirection(entityliving.rotationYaw * 4F, entityliving.rotationPitch, (EntityLiving)entityliving); - } - } - } - - public static boolean isActive (IBlockAccess world, int x, int y, int z) - { - TileEntity logic = world.getBlockTileEntity(x, y, z); - if (logic instanceof IActiveLogic) - { - return ((IActiveLogic) logic).getActive(); - } - return false; - } - - @Override - public int damageDropped (int meta) - { - return meta; - } - - /* Textures */ - public Icon[] icons; - - public abstract String[] getTextureNames (); - - @Override - public void registerIcons (IconRegister iconRegister) - { - String[] textureNames = getTextureNames(); - this.icons = new Icon[textureNames.length]; - - for (int i = 0; i < this.icons.length; ++i) - { - this.icons[i] = iconRegister.registerIcon("tinker:" + textureNames[i]); - } - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/blocks/InventoryLogic.java b/src/minecraft/mods/tinker/tconstruct/library/blocks/InventoryLogic.java deleted file mode 100755 index f6a957c78..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/blocks/InventoryLogic.java +++ /dev/null @@ -1,179 +0,0 @@ -package mods.tinker.tconstruct.library.blocks; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -/* - * A simple logic class for storing items - * Abstract to avoid instantiation - */ - -public abstract class InventoryLogic extends TileEntity - implements IInventory -{ - protected ItemStack[] inventory; - protected String invName; - - public InventoryLogic(int invSize) - { - inventory = new ItemStack[invSize]; - } - - /* Inventory management */ - - @Override - public ItemStack getStackInSlot(int slot) - { - return inventory[slot]; - } - - public boolean isStackInSlot(int slot) - { - return inventory[slot] != null; - } - - @Override - public int getSizeInventory() - { - return inventory.length; - } - - @Override - public int getInventoryStackLimit () - { - return 64; - } - - public boolean canDropInventorySlot(int slot) - { - return true; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack itemstack) - { - inventory[slot] = itemstack; - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) - { - itemstack.stackSize = getInventoryStackLimit(); - } - } - - @Override - public ItemStack decrStackSize(int slot, int quantity) - { - if (inventory[slot] != null) - { - if (inventory[slot].stackSize <= quantity) - { - ItemStack stack = inventory[slot]; - inventory[slot] = null; - return stack; - } - ItemStack split = inventory[slot].splitStack(quantity); - if (inventory[slot].stackSize == 0) - { - inventory[slot] = null; - } - return split; - } - else - { - return null; - } - } - - /* Supporting methods */ - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) - { - if (worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this) - return false; - - else - return entityplayer.getDistance((double)xCoord + 0.5D, (double)yCoord + 0.5D, (double)zCoord + 0.5D) <= 64D; - - } - - public abstract Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z); - - /* NBT */ - @Override - public void readFromNBT(NBTTagCompound tags) - { - super.readFromNBT(tags); - this.invName = tags.getString("InvName"); - NBTTagList nbttaglist = tags.getTagList("Items"); - inventory = new ItemStack[getSizeInventory()]; - for (int iter = 0; iter < nbttaglist.tagCount(); iter++) - { - NBTTagCompound tagList = (NBTTagCompound)nbttaglist.tagAt(iter); - byte slotID = tagList.getByte("Slot"); - if (slotID >= 0 && slotID < inventory.length) - { - inventory[slotID] = ItemStack.loadItemStackFromNBT(tagList); - } - } - } - - @Override - public void writeToNBT(NBTTagCompound tags) - { - super.writeToNBT(tags); - if (invName != null) - tags.setString("InvName", invName); - NBTTagList nbttaglist = new NBTTagList(); - for (int iter = 0; iter < inventory.length; iter++) - { - if (inventory[iter] != null) - { - NBTTagCompound tagList = new NBTTagCompound(); - tagList.setByte("Slot", (byte)iter); - inventory[iter].writeToNBT(tagList); - nbttaglist.appendTag(tagList); - } - } - - tags.setTag("Items", nbttaglist); - } - - /* Default implementations of hardly used methods */ - @Override - public ItemStack getStackInSlotOnClosing (int slot) { return null; } - @Override - public void openChest () {} - @Override - public void closeChest () {} - - protected abstract String getDefaultName(); - - @Override - public String getInvName() - { - return this.isInvNameLocalized() ? this.invName : getDefaultName(); - } - - @Override - public boolean isInvNameLocalized() - { - return this.invName != null && this.invName.length() > 0; - } - - /*@Override - public boolean isStackValidForSlot (int slot, ItemStack itemstack) - { - if (slot < getSizeInventory()) - { - if (inventory[slot] == null || itemstack.stackSize + inventory[slot].stackSize <= getInventoryStackLimit()) - return true; - } - return false; - }*/ -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java b/src/minecraft/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java deleted file mode 100755 index 0b143eb3b..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/client/TConstructClientRegistry.java +++ /dev/null @@ -1,148 +0,0 @@ -package mods.tinker.tconstruct.library.client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import mods.tinker.tconstruct.library.TConstructRegistry; -import mods.tinker.tconstruct.library.crafting.ToolBuilder; -import mods.tinker.tconstruct.library.tools.ToolCore; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class TConstructClientRegistry -{ - public static ArrayList toolButtons = new ArrayList(20); - public static ArrayList tierTwoButtons = new ArrayList(); - public static Map manualIcons = new HashMap(); - public static Map recipeIcons = new HashMap(); - public static ItemStack defaultStack = new ItemStack(Item.ingotIron); - - public static void addMaterialRenderMapping (int materialID, String domain, String renderName, boolean useDefaultFolder) - { - for (ToolCore tool : TConstructRegistry.getToolMapping()) - { - String[] toolIcons = new String[tool.getPartAmount() + 1]; - for (int i = 0; i < tool.getPartAmount() + 1; i++) - { - String icon = domain + ":"; - if (useDefaultFolder) - icon += tool.getDefaultFolder() + "/"; - icon += renderName + tool.getIconSuffix(i); - toolIcons[i] = icon; - } - tool.registerPartPaths(materialID, toolIcons); - } - } - public static void addEffectRenderMapping (ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder) - { - String icon = domain + ":"; - if (useDefaultFolder) - icon += tool.getDefaultFolder() + "/"; - icon += renderName + tool.getEffectSuffix(); - tool.registerEffectPath(materialID, icon); - } - - public static void addEffectRenderMapping (int materialID, String domain, String renderName, boolean useDefaultFolder) - { - for (ToolCore tool : TConstructRegistry.getToolMapping()) - { - String icon = domain + ":"; - if (useDefaultFolder) - icon += tool.getDefaultFolder() + "/"; - icon += renderName + tool.getEffectSuffix(); - tool.registerEffectPath(materialID, icon); - } - } - - public static void addSingleEffectRenderMapping (ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder) - { - String icon = domain + ":"; - if (useDefaultFolder) - icon += tool.getDefaultFolder() + "/"; - icon += renderName + tool.getEffectSuffix(); - tool.registerEffectPath(materialID, icon); - } - - public static void registerManualIcon (String name, ItemStack stack) - { - manualIcons.put(name, stack); - } - - public static ItemStack getManualIcon (String textContent) - { - ItemStack stack = manualIcons.get(textContent); - if (stack != null) - return stack; - return defaultStack; - } - - public static void registerManualSmallRecipe (String name, ItemStack output, ItemStack... stacks) - { - ItemStack[] recipe = new ItemStack[5]; - recipe[0] = output; - System.arraycopy(stacks, 0, recipe, 1, 4); - recipeIcons.put(name, recipe); - } - - public static void registerManualLargeRecipe (String name, ItemStack output, ItemStack... stacks) - { - ItemStack[] recipe = new ItemStack[10]; - recipe[0] = output; - System.arraycopy(stacks, 0, recipe, 1, 9); - recipeIcons.put(name, recipe); - } - - public static void registerManualFurnaceRecipe (String name, ItemStack output, ItemStack input) - { - ItemStack[] recipe = new ItemStack[2]; - recipe[0] = output; - recipe[1] = input; - recipeIcons.put(name, recipe); - } - - public static void registerManualModifier (String name, ItemStack output, ItemStack topinput) - { - registerManualModifier(name, output, topinput, null); - } - - public static void registerManualModifier (String name, ItemStack output, ItemStack topinput, ItemStack bottominput) - { - ItemStack[] recipe = new ItemStack[3]; - recipe[0] = ToolBuilder.instance.buildTool(output, topinput, bottominput, ""); - recipe[1] = topinput; - recipe[2] = bottominput; - recipeIcons.put(name, recipe); - } - - public static ItemStack[] getRecipeIcons (String recipeName) - { - return recipeIcons.get(recipeName); - } - - //Gui - public static void addToolButton (ToolGuiElement element) - { - toolButtons.add(element); - } - - public static void addToolButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body, String texture) - { - toolButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, texture)); - } - - public static void addTierTwoButton (ToolGuiElement element) - { - tierTwoButtons.add(element); - } - - public static void addTierTwoButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body, String texture) - { - tierTwoButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, texture)); - } - - public static ArrayList getToolButtons () - { - return toolButtons; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/client/ToolGuiElement.java b/src/minecraft/mods/tinker/tconstruct/library/client/ToolGuiElement.java deleted file mode 100755 index 9066842c2..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/client/ToolGuiElement.java +++ /dev/null @@ -1,25 +0,0 @@ -package mods.tinker.tconstruct.library.client; - -public class ToolGuiElement -{ - public final int slotType; - public final int buttonIconX; - public final int buttonIconY; - public final int[] iconsX; - public final int[] iconsY; - public final String title; - public final String body; - public final String texture; - - public ToolGuiElement(int st, int bx, int by, int[] xi, int[] yi, String t, String b, String tex) - { - slotType = st; - buttonIconX = bx; - buttonIconY = by; - iconsX = xi; - iconsY = yi; - title = t; - body = b; - texture = tex; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/crafting/Detailing.java b/src/minecraft/mods/tinker/tconstruct/library/crafting/Detailing.java deleted file mode 100755 index 821086a48..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/crafting/Detailing.java +++ /dev/null @@ -1,125 +0,0 @@ -package mods.tinker.tconstruct.library.crafting; - -import java.util.ArrayList; -import java.util.List; - -import mods.tinker.tconstruct.library.tools.ToolCore; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import cpw.mods.fml.common.registry.GameRegistry; - -public class Detailing -{ - public List detailing = new ArrayList(); - - public void addDetailing (Object input, int inputMeta, Object output, int outputMeta, ToolCore tool) - { - int iID, iMeta = inputMeta, oID, oMeta = outputMeta; - - if (input instanceof Block) - iID = ((Block) input).blockID; - - else if (input instanceof Item) - iID = ((Item) input).itemID; - - else if (input instanceof Integer) - iID = (Integer) input; - - else - throw new RuntimeException("Invalid detail input!"); - - if (output instanceof Block) - oID = ((Block) output).blockID; - - else if (output instanceof Item) - oID = ((Item) output).itemID; - - else if (output instanceof Integer) - oID = (Integer) output; - - else - throw new RuntimeException("Invalid detail output!"); - - this.addDetailing(new DetailInput(iID, iMeta, oID, oMeta), tool); - } - - public void addDetailing (DetailInput details, ToolCore tool) - { - detailing.add(details); - ItemStack toolstack = new ItemStack(tool, 1, Short.MAX_VALUE); - - NBTTagCompound compound = new NBTTagCompound(); - NBTTagCompound toolTag = new NBTTagCompound(); - toolTag.setInteger("RenderHandle", 0); - toolTag.setInteger("RenderHead", 2); - toolTag.setInteger("RenderAccessory", 2); - toolTag.setInteger("Damage", 0); - toolTag.setInteger("TotalDurability", 100); - compound.setCompoundTag("InfiTool", toolTag); - toolstack.setTagCompound(compound); - addShapelessToolRecipe(new ItemStack(details.outputID, 1, details.outputMeta), toolstack, new ItemStack(details.inputID, 1, details.inputMeta)); - } - - public void addShapelessToolRecipe (ItemStack par1ItemStack, Object... par2ArrayOfObj) - { - ArrayList arraylist = new ArrayList(); - Object[] aobject = par2ArrayOfObj; - int i = par2ArrayOfObj.length; - - for (int j = 0; j < i; ++j) - { - Object object1 = aobject[j]; - - if (object1 instanceof ItemStack) - { - arraylist.add(((ItemStack) object1).copy()); - } - else if (object1 instanceof Item) - { - arraylist.add(new ItemStack((Item) object1)); - } - else - { - if (!(object1 instanceof Block)) - { - throw new RuntimeException("Invalid shapeless tool recipe!"); - } - - arraylist.add(new ItemStack((Block) object1)); - } - } - - GameRegistry.addRecipe(new ShapelessToolRecipe(par1ItemStack, arraylist)); - } - - public DetailInput getDetailing (int inputID, int inputMeta) - { - for (int i = 0; i < detailing.size(); i++) - { - DetailInput detail = (DetailInput) detailing.get(i); - if (inputID == detail.inputID && inputMeta == detail.inputMeta) - { - return detail; - } - } - return null; - } - - public class DetailInput - { - public int inputID; - public int inputMeta; - public int outputID; - public int outputMeta; - - public DetailInput(int inputID, int inputMeta, int outputID, int outputMeta) - { - this.inputID = inputID; - this.inputMeta = inputMeta; - this.outputID = outputID; - this.outputMeta = outputMeta; - } - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/crafting/PatternBuilder.java b/src/minecraft/mods/tinker/tconstruct/library/crafting/PatternBuilder.java deleted file mode 100755 index 3abd2e576..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/crafting/PatternBuilder.java +++ /dev/null @@ -1,227 +0,0 @@ -package mods.tinker.tconstruct.library.crafting; - -/** How to build tool parts? With patterns! */ -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import mods.tinker.tconstruct.library.util.IPattern; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class PatternBuilder -{ - public static PatternBuilder instance = new PatternBuilder(); - //Map items to their parts with a hashmap - public List materials = new ArrayList(); - public HashMap materialSets = new HashMap(); - - //We could use IRecipe if it wasn't tied to InventoryCrafting - public List toolPatterns = new ArrayList(); - - /* Register methods */ - public void registerMaterial (ItemStack material, int value, String key) - { - materials.add(new ItemKey(material.getItem(), material.getItemDamage(), value, key)); - } - - public void registerMaterialSet (String key, ItemStack shard, ItemStack rod, int materialID) - { - materialSets.put(key, new MaterialSet(shard, rod, materialID)); - materials.add(new ItemKey(shard.getItem(), shard.getItemDamage(), 1, key)); - } - - public void registerFullMaterial (ItemStack material, int value, String key, ItemStack shard, ItemStack rod, int materialID) - { - materials.add(new ItemKey(material.getItem(), material.getItemDamage(), value, key)); - materials.add(new ItemKey(shard.getItem(), shard.getItemDamage(), 1, key)); - materialSets.put(key, new MaterialSet(shard, rod, materialID)); - } - - public void addToolPattern (IPattern item) - { - toolPatterns.add(item); - } - - /* Build tool parts from patterns */ - public ItemStack[] getToolPart (ItemStack material, ItemStack pattern, ItemStack otherPattern) - { - if (material != null && pattern != null) - { - ItemKey key = getItemKey(material); - if (key != null) - { - MaterialSet mat = (MaterialSet) materialSets.get(key.key); - ItemStack toolPart = getMatchingPattern(pattern, material, mat); - - if (toolPart != null) - { - int patternValue = ((IPattern) pattern.getItem()).getPatternCost(pattern); - int totalMaterial = key.value * material.stackSize; - - if (totalMaterial < patternValue) // Not enough material - return null; - - else if (patternValue == key.value) //Material only - return new ItemStack[] { toolPart, null }; - - else - { - if (patternValue % 2 == 1) - { - return new ItemStack[] { toolPart, mat.shard.copy() }; //Material + shard - } - else - return new ItemStack[] { toolPart, null }; - } - /*if ( patternValue < totalMaterial ) - { - if (otherPattern != null) - { - int otherValue = ((IPattern)otherPattern.getItem()).getPatternCost(otherPattern.getItemDamage()); - if (patternValue + otherValue <= key.value) - { - ItemStack otherPart = getMatchingPattern(otherPattern, mat); - return new ItemStack[] { toolPart, otherPart }; //Material + Material - } - } - } - - else if ( patternValue == key.value ) - return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), null }; //Material only - - else - return null; //Not a valid match*/ - } - } - } - return null; - } - - public int getPartID (ItemStack material) - { - if (material != null) - { - ItemKey key = getItemKey(material); - if (key != null) - { - MaterialSet set = (MaterialSet) materialSets.get(key.key); - return set.materialID; - } - } - return Short.MAX_VALUE; - } - - public int getPartValue (ItemStack material) - { - if (material != null) - { - ItemKey key = getItemKey(material); - if (key != null) - return key.value; - } - return 0; - } - - public ItemKey getItemKey (ItemStack material) - { - Item mat = material.getItem(); - int damage = material.getItemDamage(); - for (ItemKey ik : materials) - { - if (mat == ik.item && (ik.damage == Short.MAX_VALUE || damage == ik.damage)) - return ik; - } - return null; - } - - public ItemStack getMatchingPattern (ItemStack stack, ItemStack input, MaterialSet set) - { - Item item = stack.getItem(); - for (IPattern pattern : toolPatterns) - { - if (pattern == item) - return pattern.getPatternOutput(stack, input, set); - } - return null; - } - - public ItemStack getShardFromSet(String materialset) - { - MaterialSet set = (MaterialSet) materialSets.get(materialset); - if (set != null) - return set.shard.copy(); - return null; - } - - public ItemStack getRodFromSet(String materialset) - { - MaterialSet set = (MaterialSet) materialSets.get(materialset); - if (set != null) - return set.rod.copy(); - return null; - } - - //Small data classes. I would prefer the struct from C#, but we do what we can. - public class ItemKey - { - public final Item item; - public final int damage; - public final int value; - public final String key; - - public ItemKey(Item i, int d, int v, String s) - { - item = i; - damage = d; - value = v; - key = s; - } - } - - public class MaterialSet - { - public final ItemStack shard; - public final ItemStack rod; - public final int materialID; - - public MaterialSet(ItemStack s, ItemStack r, int id) - { - shard = s; - rod = r; - materialID = id; - } - } - - //Helper Methods - public void registerMaterial (Block material, int value, String key) - { - registerMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key); - } - - public void registerMaterial (Item material, int value, String key) - { - registerMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key); - } - - public void registerFullMaterial (Block material, int value, String key, ItemStack shard, ItemStack rod, int materialID) - { - registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, shard, rod, materialID); - } - - public void registerFullMaterial (Item material, int value, String key, ItemStack shard, ItemStack rod, int materialID) - { - registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, shard, rod, materialID); - } - - /*public void registerFullMaterial (Block material, int value, String key, int materialID) - { - registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, new ItemStack(TContent.toolShard, 1, materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID); - } - - public void registerFullMaterial (Item material, int value, String key, int materialID) - { - registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, new ItemStack(TContent.toolShard, 1, materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID); - }*/ -} \ No newline at end of file diff --git a/src/minecraft/mods/tinker/tconstruct/library/crafting/ShapelessToolRecipe.java b/src/minecraft/mods/tinker/tconstruct/library/crafting/ShapelessToolRecipe.java deleted file mode 100755 index ab45ab302..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/crafting/ShapelessToolRecipe.java +++ /dev/null @@ -1,68 +0,0 @@ -package mods.tinker.tconstruct.library.crafting; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import mods.tinker.tconstruct.library.tools.ToolCore; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class ShapelessToolRecipe extends ShapelessRecipes -{ - - public ShapelessToolRecipe(ItemStack par1ItemStack, List par2List) - { - super(par1ItemStack, par2List); - } - - @Override - public boolean matches(InventoryCrafting par1InventoryCrafting, World par2World) - { - ArrayList arraylist = new ArrayList(this.recipeItems); - - for (int i = 0; i < 3; ++i) - { - for (int j = 0; j < 3; ++j) - { - ItemStack itemstack = par1InventoryCrafting.getStackInRowAndColumn(j, i); - - if (itemstack != null) - { - boolean flag = false; - Iterator iterator = arraylist.iterator(); - - while (iterator.hasNext()) - { - ItemStack itemstack1 = (ItemStack)iterator.next(); - - //System.out.println("Rawr! "+itemstack1.getItemDamage()); - if (itemstack.itemID == itemstack1.itemID && (itemstack1.getItemDamage() == Short.MAX_VALUE || itemstack.getItemDamage() == itemstack1.getItemDamage())) - { - if (itemstack.getItem() instanceof ToolCore) - { - NBTTagCompound tags = itemstack.getTagCompound().getCompoundTag("InfiTool"); - if (tags.getBoolean("Broken")) - return false; - } - flag = true; - arraylist.remove(itemstack1); - break; - } - } - - if (!flag) - { - return false; - } - } - } - } - - return arraylist.isEmpty(); - } - -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/crafting/ToolBuilder.java b/src/minecraft/mods/tinker/tconstruct/library/crafting/ToolBuilder.java deleted file mode 100755 index b289b369d..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/crafting/ToolBuilder.java +++ /dev/null @@ -1,398 +0,0 @@ -package mods.tinker.tconstruct.library.crafting; - -/** Once upon a time, too many tools to count. Let's put them together automatically */ -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import mods.tinker.tconstruct.library.TConstructRegistry; -import mods.tinker.tconstruct.library.event.ToolCraftEvent; -import mods.tinker.tconstruct.library.tools.ToolCore; -import mods.tinker.tconstruct.library.tools.ToolMaterial; -import mods.tinker.tconstruct.library.tools.ToolMod; -import mods.tinker.tconstruct.library.util.IToolPart; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.MinecraftForge; - -public class ToolBuilder -{ - public static ToolBuilder instance = new ToolBuilder(); - - public HashMap recipeList = new HashMap(); - public List combos = new ArrayList(); - public HashMap modifiers = new HashMap(); - public List toolMods = new ArrayList(); - - /* Build tools */ - public static void addNormalToolRecipe (ToolCore output, Item head, Item handle) - { - ToolRecipe recipe = instance.recipeList.get(output.getToolName()); - if (recipe != null) - { - recipe.addHeadItem(head); - recipe.addHandleItem(handle); - } - else - { - recipe = new ToolRecipe(head, handle, output); - instance.combos.add(recipe); - instance.recipeList.put(output.getToolName(), recipe); - } - } - - public static void addNormalToolRecipe (ToolCore output, Item head, Item handle, Item accessory) - { - //instance.combos.add(new ToolRecipe(head, accessory, output)); - ToolRecipe recipe = instance.recipeList.get(output.getToolName()); - if (recipe != null) - { - recipe.addHeadItem(head); - recipe.addHandleItem(handle); - recipe.addAccessoryItem(accessory); - } - else - { - recipe = new ToolRecipe(head, handle, accessory, output); - instance.combos.add(recipe); - instance.recipeList.put(output.getToolName(), recipe); - } - } - - public static void addNormalToolRecipe (ToolCore output, Item head, Item handle, Item accessory, Item extra) - { - ToolRecipe recipe = instance.recipeList.get(output.getToolName()); - if (recipe != null) - { - recipe.addHeadItem(head); - recipe.addHandleItem(handle); - recipe.addAccessoryItem(accessory); - recipe.addExtraItem(accessory); - } - else - { - recipe = new ToolRecipe(head, handle, accessory, extra, output); - instance.combos.add(recipe); - instance.recipeList.put(output.getToolName(), recipe); - } - } - - public static void addCustomToolRecipe(ToolRecipe recipe) - { - instance.combos.add(recipe); - } - - public static void addToolRecipe (ToolCore output, Item... items) - { - if (items.length == 2) - addNormalToolRecipe(output, items[0], items[1]); - if (items.length == 3) - addNormalToolRecipe(output, items[0], items[1], items[2]); - if (items.length == 4) - addNormalToolRecipe(output, items[0], items[1], items[2], items[3]); - } - - public ToolCore getMatchingRecipe (Item head, Item handle, Item accessory, Item extra) - { - for (ToolRecipe recipe : combos) - { - if (recipe.validHead(head) && recipe.validHandle(handle) && recipe.validAccessory(accessory) && recipe.validExtra(extra)) - return recipe.getType(); - } - return null; - } - - //Builds a tool from the parts given - public ItemStack buildTool (ItemStack headStack, ItemStack handleStack, ItemStack accessoryStack, String name) - { - return buildTool(headStack, handleStack, accessoryStack, null, name); - } - - @SuppressWarnings("deprecation") - public ItemStack buildTool (ItemStack headStack, ItemStack handleStack, ItemStack accessoryStack, ItemStack extraStack, String name) - { - if (headStack != null && headStack.getItem() instanceof ToolCore) - return modifyTool(headStack, handleStack, accessoryStack); - - if (headStack == null || handleStack == null) //Nothing to build without these. All tools need at least two parts! - return null; - - ToolCore item; - boolean validMaterials = true; - int head = -1, handle = -1, accessory = -1, extra = -1; - if (headStack.getItem() instanceof IToolPart) - { - head = ((IToolPart) headStack.getItem()).getMaterialID(headStack); - } - else - validMaterials = false; - - Item handleItem = handleStack.getItem(); - - if (handleItem == Item.stick) - handle = 0; - else if (handleItem == Item.bone) - handle = 5; - else if (handleItem instanceof IToolPart) - handle = ((IToolPart) handleItem).getMaterialID(handleStack); - else - validMaterials = false; - - if (!validMaterials) - return null; - - if (accessoryStack == null) - { - item = getMatchingRecipe(headStack.getItem(), handleStack.getItem(), null, null); - } - else - { - if (accessoryStack.getItem() instanceof IToolPart) - accessory = ((IToolPart) accessoryStack.getItem()).getMaterialID(accessoryStack); - else - return null; - - if (extraStack != null) - { - if (extraStack.getItem() instanceof IToolPart) - extra = ((IToolPart) extraStack.getItem()).getMaterialID(extraStack); - else - return null; - - item = getMatchingRecipe(headStack.getItem(), handleStack.getItem(), accessoryStack.getItem(), extraStack.getItem()); - } - else - { - item = getMatchingRecipe(headStack.getItem(), handleStack.getItem(), accessoryStack.getItem(), null); - } - } - - //System.out.println("Valid: "+item); - - if (item == null) - return null; - - ToolMaterial headMat = null, handleMat = null, accessoryMat = null, extraMat = null; - headMat = TConstructRegistry.getMaterial(head); - handleMat = TConstructRegistry.getMaterial(handle); - - if (accessory != -1) - accessoryMat = TConstructRegistry.getMaterial(accessory); - - if (extra != -1) - extraMat = TConstructRegistry.getMaterial(extra); - - int durability = headMat.durability(); - int heads = 1; - int handles = 0; - float modifier = 1f; - int attack = headMat.attack(); - - if (item.durabilityTypeHandle() == 2) - { - heads++; - durability += handleMat.durability(); - attack += handleMat.attack(); - } - else if (item.durabilityTypeHandle() == 1) - { - handles++; - modifier = handleMat.handleDurability(); - } - - if (accessory != -1) - { - if (item.durabilityTypeAccessory() == 2) - { - heads++; - durability += accessoryMat.durability(); - attack += accessoryMat.attack(); - } - else if (item.durabilityTypeAccessory() == 1) - { - handles++; - modifier += accessoryMat.handleDurability(); - } - } - - if (extra != -1) - { - if (item.durabilityTypeExtra() == 2) - { - heads++; - durability += extraMat.durability(); - attack += extraMat.attack(); - } - else if (item.durabilityTypeExtra() == 1) - { - handles++; - modifier += extraMat.handleDurability(); - } - } - - if (handles > 0) - { - modifier *= (0.5+handles*0.5); - modifier /= handles; - } - - durability = (int) (durability / heads * (0.5 + heads * 0.5) * modifier * item.getDurabilityModifier()); - attack = (int) (attack / heads + item.getDamageVsEntity(null, extraStack)); - if (attack % heads != 0) - attack++; - - ItemStack tool = new ItemStack(item); - NBTTagCompound compound = new NBTTagCompound(); - - compound.setCompoundTag("InfiTool", new NBTTagCompound()); - compound.getCompoundTag("InfiTool").setInteger("Head", head); - compound.getCompoundTag("InfiTool").setInteger("RenderHead", head); - - compound.getCompoundTag("InfiTool").setInteger("Handle", handle); - compound.getCompoundTag("InfiTool").setInteger("RenderHandle", handle); - - if (accessory != -1) - { - compound.getCompoundTag("InfiTool").setInteger("Accessory", accessory); - compound.getCompoundTag("InfiTool").setInteger("RenderAccessory", accessory); - } - if (extra != -1) - { - compound.getCompoundTag("InfiTool").setInteger("Extra", extra); - compound.getCompoundTag("InfiTool").setInteger("RenderExtra", extra); - } - - compound.getCompoundTag("InfiTool").setInteger("Damage", 0); //Damage is damage to the tool - compound.getCompoundTag("InfiTool").setInteger("TotalDurability", durability); - compound.getCompoundTag("InfiTool").setInteger("BaseDurability", durability); - compound.getCompoundTag("InfiTool").setInteger("BonusDurability", 0); //Modifier - compound.getCompoundTag("InfiTool").setFloat("ModDurability", 0f); //Modifier - compound.getCompoundTag("InfiTool").setBoolean("Broken", false); - compound.getCompoundTag("InfiTool").setInteger("Attack", attack); - - compound.getCompoundTag("InfiTool").setInteger("MiningSpeed", headMat.toolSpeed()); - compound.getCompoundTag("InfiTool").setInteger("HarvestLevel", headMat.harvestLevel()); - if (item.durabilityTypeHandle() == 2) - { - compound.getCompoundTag("InfiTool").setInteger("MiningSpeedHandle", handleMat.toolSpeed()); - compound.getCompoundTag("InfiTool").setInteger("HarvestLevelHandle", handleMat.harvestLevel()); - } - if (accessory != -1 && item.durabilityTypeAccessory() == 2) - { - compound.getCompoundTag("InfiTool").setInteger("MiningSpeed2", accessoryMat.toolSpeed()); - compound.getCompoundTag("InfiTool").setInteger("HarvestLevel2", accessoryMat.harvestLevel()); - } - - if (extra != -1 && item.durabilityTypeExtra() == 2) - { - compound.getCompoundTag("InfiTool").setInteger("MiningSpeedExtra", extraMat.toolSpeed()); - compound.getCompoundTag("InfiTool").setInteger("HarvestLevelExtra", extraMat.harvestLevel()); - } - - compound.getCompoundTag("InfiTool").setInteger("Unbreaking", buildReinforced(headMat, handleMat, accessoryMat, extraMat)); - compound.getCompoundTag("InfiTool").setFloat("Shoddy", buildShoddy(headMat, handleMat, accessoryMat, extraMat)); - - int modifiers = item.getModifierAmount(); - if (accessory == -1) - modifiers += (head == 9 ? 2 : 0); - else - modifiers += (head == 9 ? 1 : 0) + (accessory == 9 ? 1 : 0); - modifiers += +(handle == 9 ? 1 : 0); - modifiers += +(extra == 9 ? 1 : 0); - - compound.getCompoundTag("InfiTool").setInteger("Modifiers", modifiers); - - if (name != null && !name.equals("")) - { - compound.setCompoundTag("display", new NBTTagCompound()); - compound.getCompoundTag("display").setString("Name", "\u00A7f" + name); - } - - ToolCraftEvent event = new ToolCraftEvent(item, compound, new ToolMaterial[] {headMat, handleMat, accessoryMat, extraMat}); - MinecraftForge.EVENT_BUS.post(event); - - tool.setTagCompound(compound); - - return tool; - } - - public ItemStack modifyTool (ItemStack input, ItemStack topSlot, ItemStack bottomSlot) - { - //if (topSlot == null && bottomSlot == null) - //return input; - - ItemStack tool = input.copy(); - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - tags.removeTag("Built"); - - if (topSlot == null && bottomSlot == null) - return tool; - - boolean built = false; - for (ToolMod mod : toolMods) - { - ItemStack[] slots = new ItemStack[] { topSlot, bottomSlot }; - if (mod.matches(slots, tool)) - { - built = true; - mod.addMatchingEffect(tool); - mod.modify(slots, tool); - } - } - - if (built) - return tool; - else - return null; - } - - int buildReinforced (ToolMaterial headMat, ToolMaterial handleMat, ToolMaterial accessoryMat, ToolMaterial extraMat) - { - int reinforced = 0; - - int dHead = headMat.reinforced(); - int dHandle = handleMat.reinforced(); - int dAccessory = 0; - if (accessoryMat != null) - dAccessory = accessoryMat.reinforced(); - int dExtra = 0; - if (extraMat != null) - dExtra = extraMat.reinforced(); - - if (dHead > reinforced) - reinforced = dHead; - if (dHandle > reinforced) - reinforced = dHandle; - if (dAccessory > reinforced) - reinforced = dAccessory; - if (dExtra > reinforced) - reinforced = dExtra; - - return reinforced; - } - - float buildShoddy (ToolMaterial headMat, ToolMaterial handleMat, ToolMaterial accessoryMat, ToolMaterial extraMat) - { - float sHead = headMat.shoddy(); - float sHandle = handleMat.shoddy(); - if (extraMat != null) - { - float sAccessory = accessoryMat.shoddy(); - float sExtra = extraMat.shoddy(); - return (sHead + sHandle + sAccessory + sExtra) / 4f; - } - - if (accessoryMat != null) - { - float sAccessory = accessoryMat.shoddy(); - return (sHead + sHandle + sAccessory) / 3f; - } - return (sHead + sHandle) / 2f; - } - - public static void registerToolMod (ToolMod mod) - { - instance.toolMods.add(mod); - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/crafting/ToolRecipe.java b/src/minecraft/mods/tinker/tconstruct/library/crafting/ToolRecipe.java deleted file mode 100755 index 649a05660..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/crafting/ToolRecipe.java +++ /dev/null @@ -1,130 +0,0 @@ -package mods.tinker.tconstruct.library.crafting; - -import java.util.LinkedList; - -import mods.tinker.tconstruct.library.TConstructRegistry; -import mods.tinker.tconstruct.library.tools.ToolCore; -import net.minecraft.item.Item; - -/* - * Small class for checking if a particular tool combination is this one - */ - -public class ToolRecipe -{ - LinkedList headList = new LinkedList(); - LinkedList handleList = new LinkedList(); - LinkedList accessoryList = new LinkedList(); - LinkedList extraList = new LinkedList(); - ToolCore result; - Item toolRod = TConstructRegistry.getItem("toolRod"); - - /*public ToolRecipe(Item head, ToolCore tool) - { - this(head, TContent.toolRod, null, null, tool); - }*/ - - public ToolRecipe(Item head, Item handle, ToolCore tool) - { - this(head, handle, null, null, tool); - } - - public ToolRecipe(Item head, Item handle, Item accessory, ToolCore tool) - { - this(head, handle, accessory, null, tool); - } - - public ToolRecipe(Item head, Item handle, Item accessory, Item extra, ToolCore tool) - { - this.headList.add(head); - this.handleList.add(handle); - if (accessory != null) - this.accessoryList.add(accessory); - if (extra != null) - this.extraList.add(extra); - result = tool; - } - - public void addHeadItem(Item head) - { - this.headList.add(head); - } - - public void addHandleItem(Item head) - { - this.handleList.add(head); - } - - public void addAccessoryItem(Item head) - { - this.accessoryList.add(head); - } - - public void addExtraItem(Item head) - { - this.extraList.add(head); - } - - public boolean validHead (Item input) - { - for (Item part : headList) - { - if (part == input) - return true; - } - return false; - } - - public boolean validHandle (Item input) - { - for (Item part : handleList) - { - if (part == input) - return true; - if (toolRod != null && part == toolRod && (input == Item.stick || input == Item.bone)) - return true; - } - return false; - } - - public boolean validAccessory (Item input) - { - if (input == null) - { - if (accessoryList.size() < 1) - return true; - return false; - } - for (Item part : accessoryList) - { - if (part == input) - return true; - if (toolRod != null && part == toolRod && (input == Item.stick || input == Item.bone)) - return true; - } - return false; - } - - public boolean validExtra (Item input) - { - if (input == null) - { - if (extraList.size() < 1) - return true; - return false; - } - for (Item part : extraList) - { - if (part == input) - return true; - if (toolRod != null && part == toolRod && (input == Item.stick || input == Item.bone)) - return true; - } - return false; - } - - public ToolCore getType () - { - return result; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/event/ToolCraftEvent.java b/src/minecraft/mods/tinker/tconstruct/library/event/ToolCraftEvent.java deleted file mode 100755 index fd3e01a6c..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/event/ToolCraftEvent.java +++ /dev/null @@ -1,24 +0,0 @@ -package mods.tinker.tconstruct.library.event; - -import mods.tinker.tconstruct.library.tools.ToolCore; -import mods.tinker.tconstruct.library.tools.ToolMaterial; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.event.Event; - -/* This event fires after all of the other construction. The resulting nbttag is added to the tool - * Note: The tag is the base tag. toolTag.getCompoundTag("InfiTool") will have all of the tool's data. - */ - -public class ToolCraftEvent extends Event -{ - public final ToolCore tool; - public final NBTTagCompound toolTag; - public final ToolMaterial[] materials; - - public ToolCraftEvent(ToolCore tool, NBTTagCompound toolTag, ToolMaterial[] materials) - { - this.tool = tool; - this.toolTag = toolTag; - this.materials = materials; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/AbilityHelper.java b/src/minecraft/mods/tinker/tconstruct/library/tools/AbilityHelper.java deleted file mode 100755 index 88d00375f..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/AbilityHelper.java +++ /dev/null @@ -1,516 +0,0 @@ -package mods.tinker.tconstruct.library.tools; - -import java.util.Random; - -import mods.tinker.tconstruct.library.ActiveToolMod; -import mods.tinker.tconstruct.library.TConstructRegistry; -import mods.tinker.tconstruct.library.util.PiercingEntityDamage; -import net.minecraft.block.Block; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityWolf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.common.FakePlayer; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.UseHoeEvent; - -public class AbilityHelper -{ - static Random random = new Random(); - - /* Normal interactions */ - public static boolean onBlockChanged (ItemStack stack, World world, int bID, int x, int y, int z, EntityLiving player, Random random) - { - if (!stack.hasTagCompound()) - return false; - - int reinforced = 0; - NBTTagCompound tags = stack.getTagCompound(); - - if (tags.getCompoundTag("InfiTool").hasKey("Unbreaking")) - reinforced = tags.getCompoundTag("InfiTool").getInteger("Unbreaking"); - - if (random.nextInt(10) < 10 - reinforced) - { - damageTool(stack, 1, tags, player, false); - } - - return true; - } - - public static boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity, ToolCore tool) - { - if (entity.canAttackWithItem() && stack.hasTagCompound()) - { - if (!entity.func_85031_j(player)) // can't attack this entity - { - NBTTagCompound tags = stack.getTagCompound(); - NBTTagCompound toolTags = stack.getTagCompound().getCompoundTag("InfiTool"); - int damage = toolTags.getInteger("Attack"); - boolean broken = toolTags.getBoolean("Broken"); - - int durability = tags.getCompoundTag("InfiTool").getInteger("Damage"); - float stonebound = tags.getCompoundTag("InfiTool").getFloat("Shoddy"); - - float stoneboundDamage = (float) Math.log(durability / 72f + 1) * -2 * stonebound; - - int earlyModDamage = 0; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - earlyModDamage = mod.baseAttackDamage(earlyModDamage, damage, tool, tags, toolTags, stack, player, entity); - } - damage += earlyModDamage; - - if (player.isPotionActive(Potion.damageBoost)) - { - damage += 3 << player.getActivePotionEffect(Potion.damageBoost).getAmplifier(); - } - - if (player.isPotionActive(Potion.weakness)) - { - damage -= 2 << player.getActivePotionEffect(Potion.weakness).getAmplifier(); - } - - float knockback = 0; - int enchantDamage = 0; - - /*if (entity instanceof EntityLiving) - { - enchantDamage = EnchantmentHelper.getEnchantmentModifierLiving(player, (EntityLiving) entity); - knockback += EnchantmentHelper.getKnockbackModifier(player, (EntityLiving) entity); - } - - damage += stoneboundDamage; - if (damage < 1) - damage = 1; - - if (player.isSprinting()) - { - knockback++; - float lunge = tool.chargeAttack(); - if (lunge > 1f) - { - knockback += lunge - 1.0f; - damage *= lunge; - } - }*/ - - float modKnockback = 0f; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - modKnockback = mod.knockback(modKnockback, knockback, tool, tags, toolTags, stack, player, entity); - } - knockback += modKnockback; - - int modDamage = 0; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - modDamage = mod.attackDamage(modDamage, damage, tool, tags, toolTags, stack, player, entity); - } - damage += modDamage; - - if (damage > 0 || enchantDamage > 0) - { - boolean criticalHit = player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(Potion.blindness) - && player.ridingEntity == null && entity instanceof EntityLiving; - - if (criticalHit) - { - damage += random.nextInt(damage / 2 + 2); - } - - damage += enchantDamage; - - if (tool.getDamageModifier() != 1f) - { - damage *= tool.getDamageModifier(); - } - boolean var6 = false; - int fireAspect = EnchantmentHelper.getFireAspectModifier(player); - - if (entity instanceof EntityLiving && fireAspect > 0 && !entity.isBurning()) - { - var6 = true; - entity.setFire(1); - } - - if (broken) - damage = 1; - /*boolean causedDamage = false; - if (tool.pierceArmor() && !broken) - causedDamage = entity.attackEntityFrom(causePlayerPiercingDamage(player), damage); - else - causedDamage = entity.attackEntityFrom(DamageSource.causePlayerDamage(player), damage); - - if (causedDamage) - { - damageTool(stack, 1, player, false); - tool.onEntityDamaged(player.worldObj, player, entity); - int drain = toolTags.getInteger("Necrotic") * 2; - if (drain > 0) - player.heal(random.nextInt(drain+1)); - - if (knockback > 0) - { - entity.addVelocity((double) (-MathHelper.sin(player.rotationYaw * (float) Math.PI / 180.0F) * (float) knockback * 0.5F), 0.1D, - (double) (MathHelper.cos(player.rotationYaw * (float) Math.PI / 180.0F) * (float) knockback * 0.5F)); - player.motionX *= 0.6D; - player.motionZ *= 0.6D; - player.setSprinting(false); - } - - if (criticalHit) - { - player.onCriticalHit(entity); - } - - if (enchantDamage > 0) - { - player.onEnchantmentCritical(entity); - } - - if (damage >= 18) - { - player.triggerAchievement(AchievementList.overkill); - } - - player.setLastAttackingEntity(entity); - - if (entity instanceof EntityLiving) - { - EnchantmentThorns.func_92096_a(player, (EntityLiving) entity, random); - } - }*/ - - /*if (entity instanceof EntityLiving) - { - stack.hitEntity((EntityLiving) entity, player); - if (entity.isEntityAlive()) - { - alertPlayerWolves(player, (EntityLiving) entity, true); - } - - player.addStat(StatList.damageDealtStat, damage); - - if ((fireAspect > 0 || toolTags.hasKey("Fiery") || toolTags.hasKey("Lava")) && causedDamage) - { - fireAspect *= 4; - if (toolTags.hasKey("Fiery")) - { - fireAspect += toolTags.getInteger("Fiery") / 5 + 1; - } - if (toolTags.getBoolean("Lava")) - { - fireAspect += 3; - } - entity.setFire(fireAspect); - } - else if (var6) - { - entity.extinguish(); - } - } - - player.addExhaustion(0.3F); - if (causedDamage) - return true;*/ - } - } - } - return false; - } - - static void alertPlayerWolves (EntityPlayer player, EntityLiving living, boolean par2) - { - if (!(living instanceof EntityCreeper) && !(living instanceof EntityGhast)) - { - if (living instanceof EntityWolf) - { - EntityWolf var3 = (EntityWolf) living; - - if (var3.isTamed() && player.username.equals(var3.getOwnerName())) - { - return; - } - } - - /*if (!(living instanceof EntityPlayer) || player.func_96122_a((EntityPlayer) living)) - { - List var6 = player.worldObj.getEntitiesWithinAABB(EntityWolf.class, - AxisAlignedBB.getAABBPool().getAABB(player.posX, player.posY, player.posZ, player.posX + 1.0D, player.posY + 1.0D, player.posZ + 1.0D).expand(16.0D, 4.0D, 16.0D)); - Iterator var4 = var6.iterator(); - - while (var4.hasNext()) - { - EntityWolf var5 = (EntityWolf) var4.next(); - - if (var5.isTamed() && var5.getEntityToAttack() == null && player.username.equals(var5.getOwnerName()) && (!par2 || !var5.isSitting())) - { - var5.setSitting(false); - var5.setTarget(living); - } - } - }*/ - } - } - - /* Tool specific */ - public static void damageTool (ItemStack stack, int dam, EntityLiving entity, boolean ignoreCharge) - { - NBTTagCompound tags = stack.getTagCompound(); - damageTool(stack, dam, tags, entity, ignoreCharge); - } - - public static void healTool (ItemStack stack, int dam, EntityLiving entity, boolean ignoreCharge) - { - NBTTagCompound tags = stack.getTagCompound(); - damageTool(stack, -dam, tags, entity, ignoreCharge); - } - - public static void damageTool (ItemStack stack, int dam, NBTTagCompound tags, EntityLiving entity, boolean ignoreCharge) - { - /*if (entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode || tags == null) - return;*/ - - if (ignoreCharge) - { - boolean damagedTool = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.damageTool(stack, dam, entity)) - damagedTool = true; - } - - if (damagedTool) - return; - - int damage = tags.getCompoundTag("InfiTool").getInteger("Damage"); - int damageTrue = damage + dam; - int maxDamage = tags.getCompoundTag("InfiTool").getInteger("TotalDurability"); - if (damageTrue <= 0) - { - tags.getCompoundTag("InfiTool").setInteger("Damage", 0); - stack.setItemDamage(0); - } - - else if (damageTrue > maxDamage) - { - breakTool(stack, tags, entity); - stack.setItemDamage(0); - } - - else - { - tags.getCompoundTag("InfiTool").setInteger("Damage", damage + dam); - int toolDamage = (damage * 100 / maxDamage) + 1; - int stackDamage = stack.getItemDamage(); - if (toolDamage != stackDamage) - { - stack.setItemDamage((damage * 100 / maxDamage) + 1); - } - } - } - } - - public static void breakTool (ItemStack stack, NBTTagCompound tags, Entity entity) - { - tags.getCompoundTag("InfiTool").setBoolean("Broken", true); - if (entity != null) - entity.worldObj.playSound(entity.posX, entity.posY, entity.posZ, "random.break", 1f, 1f, true); - } - - public static void repairTool (ItemStack stack, NBTTagCompound tags) - { - tags.getCompoundTag("InfiTool").setBoolean("Broken", false); - tags.getCompoundTag("InfiTool").setInteger("Damage", 0); - } - - public static DamageSource causePiercingDamage (EntityLiving mob) - { - return new PiercingEntityDamage("mob", mob); - } - - public static DamageSource causePlayerPiercingDamage (EntityPlayer player) - { - return new PiercingEntityDamage("player", player); - } - - public static void knockbackEntity (EntityLiving living, double boost) - { - living.motionX *= boost; - //living.motionY *= boost/2; - living.motionZ *= boost; - } - - public static boolean hoeGround (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, Random random) - { - if (!player.canPlayerEdit(x, y, z, side, stack)) - { - return false; - } - else - { - UseHoeEvent event = new UseHoeEvent(player, stack, world, x, y, z); - if (MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - /*if (event.getResult() == Result.ALLOW) - { - onBlockChanged(stack, world, 0, x, y, z, player, random); - return true; - }*/ - - int bID = world.getBlockId(x, y, z); - int bIDabove = world.getBlockId(x, y + 1, z); - - if ((side == 0 || bIDabove != 0 || bID != Block.grass.blockID) && bID != Block.dirt.blockID) - { - return false; - } - else - { - Block block = Block.tilledField; - world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getStepSound(), - (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); - - if (world.isRemote) - { - return true; - } - /*else - { - world.setBlock(x, y, z, block.blockID); - onBlockChanged(stack, world, 0, x, y, z, player, random); - return true; - }*/ - } - } - return false; - } - - public static void spawnItemAtPlayer (EntityPlayer player, ItemStack stack) - { - EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack); - player.worldObj.spawnEntityInWorld(entityitem); - if (!(player instanceof FakePlayer)) - entityitem.onCollideWithPlayer(player); - /*if (!player.inventory.addItemStackToInventory(stack)) - { - if (!player.worldObj.isRemote) - { - EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack); - player.worldObj.spawnEntityInWorld(entityitem); - entityitem.onCollideWithPlayer(player); - } - } - else - { - player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 2.0F); - }*/ - } - - /* Ranged weapons */ - - public static void forceAddToInv (EntityPlayer entityplayer, ItemStack itemstack, int i, boolean flag) - { - ItemStack itemstack1 = entityplayer.inventory.getStackInSlot(i); - entityplayer.inventory.setInventorySlotContents(i, itemstack); - if (itemstack1 != null) - { - addToInv(entityplayer, itemstack1, flag); - } - } - - public static boolean addToInv (EntityPlayer entityplayer, ItemStack itemstack, boolean flag) - { - return addToInv(entityplayer, itemstack, entityplayer.inventory.currentItem, flag); - } - - public static boolean addToInv (EntityPlayer entityplayer, ItemStack itemstack, int i, boolean flag) - { - ItemStack itemstack1 = entityplayer.inventory.getStackInSlot(i); - boolean flag1; - if (itemstack1 == null) - { - entityplayer.inventory.setInventorySlotContents(i, itemstack); - flag1 = true; - } - else - { - flag1 = entityplayer.inventory.addItemStackToInventory(itemstack); - } - if (flag && !flag1) - { - addItemStackToWorld(entityplayer.worldObj, (float) Math.floor(entityplayer.posX), (float) Math.floor(entityplayer.posY), (float) Math.floor(entityplayer.posZ), itemstack); - return true; - } - else - { - return flag1; - } - } - - public static EntityItem addItemStackToWorld (World world, float f, float f1, float f2, ItemStack itemstack) - { - return addItemStackToWorld(world, f, f1, f2, itemstack, false); - } - - public static EntityItem addItemStackToWorld (World world, float f, float f1, float f2, ItemStack itemstack, boolean flag) - { - EntityItem entityitem; - if (flag) - { - entityitem = new EntityItem(world, f, f1, f2, itemstack); - } - else - { - float f3 = 0.7F; - float f4 = random.nextFloat() * f3 + (1.0F - f3) * 0.5F; - float f5 = 1.2F; - float f6 = random.nextFloat() * f3 + (1.0F - f3) * 0.5F; - entityitem = new EntityItem(world, f + f4, f1 + f5, f2 + f6, itemstack); - } - entityitem.delayBeforeCanPickup = 10; - world.spawnEntityInWorld(entityitem); - return entityitem; - } - - public static MovingObjectPosition raytraceFromEntity (World world, Entity player, boolean par3, double range) - { - float f = 1.0F; - float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f; - float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f; - double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; - double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset; - double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; - Vec3 vec3 = world.getWorldVec3Pool().getVecFromPool(d0, d1, d2); - float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); - float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); - float f5 = -MathHelper.cos(-f1 * 0.017453292F); - float f6 = MathHelper.sin(-f1 * 0.017453292F); - float f7 = f4 * f5; - float f8 = f3 * f5; - double d3 = range; - if (player instanceof EntityPlayerMP) - { - d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); - } - Vec3 vec31 = vec3.addVector((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); - return world.rayTraceBlocks_do_do(vec3, vec31, par3, !par3); - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/DualHarvestTool.java b/src/minecraft/mods/tinker/tconstruct/library/tools/DualHarvestTool.java deleted file mode 100755 index 0062b7459..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/DualHarvestTool.java +++ /dev/null @@ -1,138 +0,0 @@ -package mods.tinker.tconstruct.library.tools; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; - -/* Base class for harvest tools with each head having a different purpose */ - -public abstract class DualHarvestTool extends HarvestTool -{ - public DualHarvestTool(int itemID, int baseDamage) - { - super(itemID, baseDamage); - } - - @SuppressWarnings("deprecation") - @Override - public int getHeadType () - { - return 3; - } - - @Override - public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) - { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - World world = player.worldObj; - int bID = player.worldObj.getBlockId(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - Block block = Block.blocksList[bID]; - if (block == null || bID < 1) - return false; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - int shlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getSecondHarvestType()); - - if (hlvl <= tags.getInteger("HarvestLevel") && shlvl <= tags.getInteger("HarvestLevel2")) - { - boolean cancelHarvest = false; - /*for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, y, z, player)) - cancelHarvest = true; - }*/ - - return cancelHarvest; - } - else - { - if (!player.capabilities.isCreativeMode) - onBlockDestroyed(stack, world, bID, x, y, z, player); - world.setBlockToAir(x, y, z); - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); - return true; - } - } - - @Override - public float getStrVsBlock (ItemStack stack, Block block, int meta) - { - - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - if (tags.getBoolean("Broken")) - return 0.1f; - - Material[] materials = getEffectiveMaterials(); - for (int i = 0; i < materials.length; i++) - { - if (materials[i] == block.blockMaterial) - { - float speed = tags.getInteger("MiningSpeed"); - speed /= 100f; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - int durability = tags.getInteger("Damage"); - - float shoddy = tags.getFloat("Shoddy"); - speed += shoddy * durability / 100f; - - if (hlvl <= tags.getInteger("HarvestLevel")) - return speed; - return 0.1f; - } - } - materials = getEffectiveSecondaryMaterials(); - for (int i = 0; i < materials.length; i++) - { - if (materials[i] == block.blockMaterial) - { - float speed = tags.getInteger("MiningSpeed2"); - speed /= 100f; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - int durability = tags.getInteger("Damage"); - - float shoddy = tags.getFloat("Shoddy"); - speed += shoddy * durability / 100f; - - if (hlvl <= tags.getInteger("HarvestLevel2")) - return speed; - return 0.1f; - } - } - return super.getStrVsBlock(stack, block, meta); - } - - @Override - public boolean canHarvestBlock (Block block) - { - if (block.blockMaterial.isToolNotRequired()) - { - return true; - } - for (Material m : getEffectiveMaterials()) - { - if (m == block.blockMaterial) - return true; - } - for (Material m : getEffectiveSecondaryMaterials()) - { - if (m == block.blockMaterial) - return true; - } - return false; - } - - @Override - public String[] toolCategories () - { - return new String[] { "harvest", "dualharvest" }; - } - - protected abstract Material[] getEffectiveSecondaryMaterials (); - - protected abstract String getSecondHarvestType (); -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/HarvestTool.java b/src/minecraft/mods/tinker/tconstruct/library/tools/HarvestTool.java deleted file mode 100755 index 7f2c38fb5..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/HarvestTool.java +++ /dev/null @@ -1,127 +0,0 @@ -package mods.tinker.tconstruct.library.tools; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; - -/* Base class for tools that should be harvesting blocks */ - -public abstract class HarvestTool extends ToolCore -{ - public HarvestTool(int itemID, int baseDamage) - { - super(itemID, baseDamage); - } - - @Override - public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) - { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - World world = player.worldObj; - int bID = player.worldObj.getBlockId(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - Block block = Block.blocksList[bID]; - if (block == null || bID < 1) - return false; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - - if (hlvl <= tags.getInteger("HarvestLevel")) - { - boolean cancelHarvest = false; - /*for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, y, z, player)) - cancelHarvest = true; - }*/ - return cancelHarvest; - } - else - { - world.setBlockToAir(x, y, z); - if (!player.capabilities.isCreativeMode) - onBlockDestroyed(stack, world, bID, x, y, z, player); - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); - return true; - } - } - - @Override - public float getStrVsBlock (ItemStack stack, Block block, int meta) - { - if (!stack.hasTagCompound()) - return 1.0f; - - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - if (tags.getBoolean("Broken")) - return 0.1f; - - Material[] materials = getEffectiveMaterials(); - for (int i = 0; i < materials.length; i++) - { - if (materials[i] == block.blockMaterial) - { - float mineSpeed = tags.getInteger("MiningSpeed"); - int heads = 1; - if (tags.hasKey("MiningSpeed2")) - { - mineSpeed += tags.getInteger("MiningSpeed2"); - heads++; - } - - if (tags.hasKey("MiningSpeedHandle")) - { - mineSpeed += tags.getInteger("MiningSpeedHandle"); - heads++; - } - - if (tags.hasKey("MiningSpeedExtra")) - { - mineSpeed += tags.getInteger("MiningSpeedExtra"); - heads++; - } - float trueSpeed = mineSpeed / (heads * 100f); - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - int durability = tags.getInteger("Damage"); - - float stonebound = tags.getFloat("Shoddy"); - float bonusLog = (float) Math.log(durability / 72f + 1) * 2 * stonebound; - trueSpeed += bonusLog; - - if (hlvl <= tags.getInteger("HarvestLevel")) - return trueSpeed; - return 0.1f; - } - } - return super.getStrVsBlock(stack, block, meta); - } - - @Override - public boolean canHarvestBlock (Block block) - { - if (block.blockMaterial.isToolNotRequired()) - { - return true; - } - for (Material m : getEffectiveMaterials()) - { - if (m == block.blockMaterial) - return true; - } - return false; - } - - @Override - public String[] toolCategories () - { - return new String[] { "harvest" }; - } - - protected abstract Material[] getEffectiveMaterials (); - - protected abstract String getHarvestType (); -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/ToolCore.java b/src/minecraft/mods/tinker/tconstruct/library/tools/ToolCore.java deleted file mode 100755 index 6507df166..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/ToolCore.java +++ /dev/null @@ -1,768 +0,0 @@ -package mods.tinker.tconstruct.library.tools; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import mods.tinker.tconstruct.library.ActiveToolMod; -import mods.tinker.tconstruct.library.TConstructRegistry; -import mods.tinker.tconstruct.library.crafting.ToolBuilder; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** NBTTags - * Main tag - InfiTool - * @see ToolBuilder - * - * Required: - * Head: Base and render tag, above the handle - * Handle: Base and render tag, bottom layer - * - * Damage: Replacement for metadata - * MaxDamage: ItemStacks only read setMaxDamage() - * Broken: Represents whether the tool is broken (boolean) - * Attack: How much damage a mob will take - * MiningSpeed: The speed at which a tool mines - * - * Others: - * Accessory: Base and tag, above head. Sword guards, binding, etc - * Effects: Render tag, top layer. Fancy effects like moss or diamond edge. - * Render order: Handle > Head > Accessory > Effect1 > Effect2 > Effect3 > etc - * Unbreaking: Reinforced in-game, 10% chance to not use durability per level - * Stonebound: Mines faster as the tool takes damage, but has less attack - * Spiny: Opposite of stonebound - * - * Modifiers have their own tags. - * @see ToolMod - */ - -public abstract class ToolCore extends Item -{ - protected Random random = new Random(); - protected int damageVsEntity; - public static Icon blankSprite; - public static Icon emptyIcon; - - public ToolCore(int id, int baseDamage) - { - super(id); - this.maxStackSize = 1; - this.setMaxDamage(100); - this.setUnlocalizedName("InfiTool"); - this.setCreativeTab(TConstructRegistry.toolTab); - damageVsEntity = baseDamage; - TConstructRegistry.addToolMapping(this); - setNoRepair(); - canRepair = false; - } - - @Deprecated - public int getHeadType () - { - return 0; - } - - /** Determines crafting behavior with regards to durability - * 0: None - * 1: Adds handle modifier - * 2: Averages part with the rest of the tool - * @return type - */ - - public int durabilityTypeHandle () - { - return 1; - } - - public int durabilityTypeAccessory () - { - return 0; - } - - public int durabilityTypeExtra () - { - return 0; - } - - public int getModifierAmount () - { - return 3; - } - - public String getToolName () - { - return this.getClass().getSimpleName(); - } - - /* Rendering */ - - public HashMap headIcons = new HashMap(); - public HashMap brokenIcons = new HashMap(); - public HashMap handleIcons = new HashMap(); - public HashMap accessoryIcons = new HashMap(); - public HashMap effectIcons = new HashMap(); - public HashMap extraIcons = new HashMap(); - - //Not liking this - public HashMap headStrings = new HashMap(); - public HashMap brokenHeadStrings = new HashMap(); - public HashMap handleStrings = new HashMap(); - public HashMap accessoryStrings = new HashMap(); - public HashMap effectStrings = new HashMap(); - public HashMap extraStrings = new HashMap(); - - @SideOnly(Side.CLIENT) - @Override - public boolean requiresMultipleRenderPasses () - { - return true; - } - - @SideOnly(Side.CLIENT) - @Override - public int getRenderPasses (int metadata) - { - return 9; - } - - //Override me please! - public int getPartAmount () - { - return 3; - } - - public abstract String getIconSuffix (int partType); - - public abstract String getEffectSuffix (); - - public abstract String getDefaultFolder (); - - public void registerPartPaths (int index, String[] location) - { - headStrings.put(index, location[0]); - brokenHeadStrings.put(index, location[1]); - handleStrings.put(index, location[2]); - if (location.length > 3) - accessoryStrings.put(index, location[3]); - if (location.length > 4) - extraStrings.put(index, location[4]); - } - - public void registerEffectPath (int index, String location) - { - effectStrings.put(index, location); - } - - @Override - public void registerIcons (IconRegister iconRegister) - { - headIcons.clear(); - brokenIcons.clear(); - handleIcons.clear(); - accessoryIcons.clear(); - effectIcons.clear(); - Iterator iter = headStrings.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry pairs = (Map.Entry) iter.next(); - headIcons.put((Integer) pairs.getKey(), iconRegister.registerIcon((String) pairs.getValue())); - } - - iter = brokenHeadStrings.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry pairs = (Map.Entry) iter.next(); - brokenIcons.put((Integer) pairs.getKey(), iconRegister.registerIcon((String) pairs.getValue())); - } - - iter = handleStrings.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry pairs = (Map.Entry) iter.next(); - handleIcons.put((Integer) pairs.getKey(), iconRegister.registerIcon((String) pairs.getValue())); - } - - if (getPartAmount() > 2) - { - iter = accessoryStrings.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry pairs = (Map.Entry) iter.next(); - accessoryIcons.put((Integer) pairs.getKey(), iconRegister.registerIcon((String) pairs.getValue())); - } - } - - if (getPartAmount() > 3) - { - iter = extraStrings.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry pairs = (Map.Entry) iter.next(); - extraIcons.put((Integer) pairs.getKey(), iconRegister.registerIcon((String) pairs.getValue())); - } - } - - iter = effectStrings.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry pairs = (Map.Entry) iter.next(); - effectIcons.put((Integer) pairs.getKey(), iconRegister.registerIcon((String) pairs.getValue())); - } - - emptyIcon = iconRegister.registerIcon("tinker:blankface"); - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIconFromDamage(int meta) - { - return blankSprite; - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIcon (ItemStack stack, int renderPass) - { - NBTTagCompound tags = stack.getTagCompound(); - - if (tags != null) - { - tags = stack.getTagCompound().getCompoundTag("InfiTool"); - if (renderPass < getPartAmount()) - { - if (renderPass == 0) // Handle - { - return handleIcons.get(tags.getInteger("RenderHandle")); - } - - else if (renderPass == 1) // Head - { - if (tags.getBoolean("Broken")) - return (brokenIcons.get(tags.getInteger("RenderHead"))); - else - return (headIcons.get(tags.getInteger("RenderHead"))); - } - - else if (renderPass == 2) // Accessory - { - return (accessoryIcons.get(tags.getInteger("RenderAccessory"))); - } - - else if (renderPass == 3) // Extra - { - return (extraIcons.get(tags.getInteger("RenderExtra"))); - } - } - - else - { - if (renderPass == getPartAmount()) - { - if (tags.hasKey("Effect1")) - return (effectIcons.get(tags.getInteger("Effect1"))); - } - - else if (renderPass == getPartAmount() + 1) - { - if (tags.hasKey("Effect2")) - return (effectIcons.get(tags.getInteger("Effect2"))); - } - - else if (renderPass == getPartAmount() + 2) - { - if (tags.hasKey("Effect3")) - return (effectIcons.get(tags.getInteger("Effect3"))); - } - - else if (renderPass == getPartAmount() + 3) - { - if (tags.hasKey("Effect4")) - return (effectIcons.get(tags.getInteger("Effect4"))); - } - - else if (renderPass == getPartAmount() + 4) - { - if (tags.hasKey("Effect5")) - return (effectIcons.get(tags.getInteger("Effect5"))); - } - - else if (renderPass == getPartAmount() + 5) - { - if (tags.hasKey("Effect6")) - return (effectIcons.get(tags.getInteger("Effect6"))); - } - } - return blankSprite; - } - return emptyIcon; - } - - /* Tags and information about the tool */ - @Override - @SideOnly(Side.CLIENT) - public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) - { - if (!stack.hasTagCompound()) - return; - - NBTTagCompound tags = stack.getTagCompound(); - if (tags.hasKey("InfiTool")) - { - boolean broken = tags.getCompoundTag("InfiTool").getBoolean("Broken"); - if (broken) - list.add("\u00A7oBroken"); - else - { - int head = tags.getCompoundTag("InfiTool").getInteger("Head"); - int handle = tags.getCompoundTag("InfiTool").getInteger("Handle"); - int binding = tags.getCompoundTag("InfiTool").getInteger("Accessory"); - int extra = tags.getCompoundTag("InfiTool").getInteger("Extra"); - - String headName = getAbilityNameForType(head); - if (!headName.equals("")) - list.add(getStyleForType(head) + headName); - - String handleName = getAbilityNameForType(handle); - if (!handleName.equals("") && handle != head) - list.add(getStyleForType(handle) + handleName); - - if (getPartAmount() >= 3) - { - String bindingName = getAbilityNameForType(binding); - if (!bindingName.equals("") && binding != head && binding != handle) - list.add(getStyleForType(binding) + bindingName); - } - - if (getPartAmount() >= 4) - { - String extraName = getAbilityNameForType(extra); - if (!extraName.equals("") && extra != head && extra != handle && extra != binding) - list.add(getStyleForType(extra) + extraName); - } - - int unbreaking = tags.getCompoundTag("InfiTool").getInteger("Unbreaking"); - String reinforced = getReinforcedName(head, handle, binding, extra, unbreaking); - if (!reinforced.equals("")) - list.add(reinforced); - - boolean displayToolTips = true; - int tipNum = 0; - while (displayToolTips) - { - tipNum++; - String tooltip = "Tooltip" + tipNum; - if (tags.getCompoundTag("InfiTool").hasKey(tooltip)) - { - String tipName = tags.getCompoundTag("InfiTool").getString(tooltip); - if (!tipName.equals("")) - list.add(tipName); - } - else - displayToolTips = false; - } - } - } - } - - public static String getStyleForType (int type) - { - return TConstructRegistry.getMaterial(type).style(); - } - - public String getAbilityNameForType (int type) - { - return TConstructRegistry.getMaterial(type).ability(); - } - - public String getReinforcedName (int head, int handle, int accessory, int extra, int unbreaking) - { - ToolMaterial headMat = TConstructRegistry.getMaterial(head); - ToolMaterial handleMat = TConstructRegistry.getMaterial(handle); - ToolMaterial accessoryMat = TConstructRegistry.getMaterial(accessory); - ToolMaterial extraMat = TConstructRegistry.getMaterial(extra); - - int reinforced = 0; - String style = ""; - int current = headMat.reinforced(); - if (current > 0) - { - style = headMat.style(); - reinforced = current; - } - current = handleMat.reinforced(); - if (current > 0 && current > reinforced) - { - style = handleMat.style(); - reinforced = current; - } - if (getPartAmount() >= 3) - { - current = accessoryMat.reinforced(); - if (current > 0 && current > reinforced) - { - style = accessoryMat.style(); - reinforced = current; - } - } - if (getPartAmount() >= 4) - { - current = extraMat.reinforced(); - if (current > 0 && current > reinforced) - { - style = extraMat.style(); - reinforced = current; - } - } - - reinforced += unbreaking - reinforced; - - if (reinforced > 0) - { - return style + getReinforcedString(reinforced); - } - return ""; - } - - String getReinforcedString (int reinforced) - { - if (reinforced > 9) - return "Unbreakable"; - String ret = "Reinforced "; - switch (reinforced) - { - case 1: - ret += "I"; - break; - case 2: - ret += "II"; - break; - case 3: - ret += "III"; - break; - case 4: - ret += "IV"; - break; - case 5: - ret += "V"; - break; - case 6: - ret += "VI"; - break; - case 7: - ret += "VII"; - break; - case 8: - ret += "VIII"; - break; - case 9: - ret += "IX"; - break; - default: - ret += "X"; - break; - } - return ret; - } - - //Used for sounds and the like - public void onEntityDamaged (World world, EntityPlayer player, Entity entity) - { - - } - - /* Creative mode tools */ - static String[] toolMaterialNames = { "Wooden ", "Stone ", "Iron ", "Flint ", "Cactus ", "Bone ", "Obsidian ", "Netherrack ", "Slime ", "Paper ", "Cobalt ", "Ardite ", "Manyullyn ", "Copper ", - "Bronze ", "Alumite ", "Steel ", "Slime " }; - - @Override - public void getSubItems (int id, CreativeTabs tab, List list) - { - for (int i = 0; i < 18; i++) - { - Item accessory = getAccessoryItem(); - ItemStack accessoryStack = accessory != null ? new ItemStack(getAccessoryItem(), 1, i) : null; - Item extra = getExtraItem(); - ItemStack extraStack = extra != null ? new ItemStack(getExtraItem(), 1, i) : null; - ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, i), new ItemStack(getHandleItem(), 1, i), accessoryStack, extraStack, toolMaterialNames[i] + getToolName()); - if (tool == null) - { - System.out.println("Creative builder failed tool for "+toolMaterialNames[i] + this.getToolName()); - System.out.println("Make sure you do not have item ID conflicts"); - } - else - { - tool.getTagCompound().getCompoundTag("InfiTool").setBoolean("Built", true); - list.add(tool); - } - } - } - - public abstract Item getHeadItem (); - - public abstract Item getAccessoryItem (); - - public Item getExtraItem () - { - return null; - } - - public Item getHandleItem () - { - return TConstructRegistry.getItem("toolRod");//TContent.toolRod; - } - - /* Updating */ - - @Override - public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - mod.updateTool(this, stack, world, entity); - } - } - - /* Tool uses */ - - //Types - public abstract String[] toolCategories (); - - //Mining - /*@Override - public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) - { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, y, z, player)) - cancelHarvest = true; - } - - return cancelHarvest; - } - - @Override - public boolean onBlockDestroyed (ItemStack itemstack, World world, int blockID, int x, int y, int z, EntityLiving player) - { - return AbilityHelper.onBlockChanged(itemstack, world, blockID, x, y, z, player, random); - }*/ - - @Override - public float getStrVsBlock (ItemStack stack, Block block, int meta) - { - NBTTagCompound tags = stack.getTagCompound(); - if (tags.getCompoundTag("InfiTool").getBoolean("Broken")) - return 0.1f; - return 1f; - } - - // Attacking - @Override - public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity) - { - AbilityHelper.onLeftClickEntity(stack, player, entity, this); - return true; - } - - /*@Override - public boolean hitEntity (ItemStack stack, EntityLiving mob, EntityLiving player) - { - return true; - } - - public boolean pierceArmor () - { - return false; - } - - public float chargeAttack () - { - return 1f; - } - - @Override - public int getDamageVsEntity (Entity par1Entity) - { - return this.damageVsEntity; - }*/ - - //Changes how much durability the base tool has - public float getDurabilityModifier () - { - return 1f; - } - - public float getRepairCost () - { - return getDurabilityModifier(); - } - - public float getDamageModifier () - { - return 1.0f; - } - - //Right-click - @Override - public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float clickX, float clickY, float clickZ) - { - /*if (world.isRemote) - return true;*/ - - int posX = x; - int posY = y; - int posZ = z; - int playerPosX = (int) Math.floor(player.posX); - int playerPosY = (int) Math.floor(player.posY); - int playerPosZ = (int) Math.floor(player.posZ); - if (side == 0) - { - --posY; - } - - if (side == 1) - { - ++posY; - } - - if (side == 2) - { - --posZ; - } - - if (side == 3) - { - ++posZ; - } - - if (side == 4) - { - --posX; - } - - if (side == 5) - { - ++posX; - } - if (posX == playerPosX && (posY == playerPosY || posY == playerPosY + 1 || posY == playerPosY - 1) && posZ == playerPosZ) - { - return false; - } - - boolean used = false; - int hotbarSlot = player.inventory.currentItem; - int itemSlot = hotbarSlot == 0 ? 8 : hotbarSlot + 1; - ItemStack nearbyStack = null; - - if (hotbarSlot < 8) - { - nearbyStack = player.inventory.getStackInSlot(itemSlot); - if (nearbyStack != null && nearbyStack.getItem() instanceof ItemBlock) - { - used = nearbyStack.getItem().onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ); - if (nearbyStack.stackSize < 1) - { - nearbyStack = null; - player.inventory.setInventorySlotContents(itemSlot, null); - } - } - } - - /*if (used) //Update client - { - Packet103SetSlot packet = new Packet103SetSlot(player.openContainer.windowId, itemSlot, nearbyStack); - ((EntityPlayerMP)player).playerNetServerHandler.sendPacketToPlayer(packet); - }*/ - return used; - } - - //Vanilla overrides - @Override - public boolean isItemTool (ItemStack par1ItemStack) - { - return false; - } - - @Override - public boolean getIsRepairable (ItemStack par1ItemStack, ItemStack par2ItemStack) - { - return false; - } - - @Override - public boolean isRepairable () - { - return false; - } - - @Override - public int getItemEnchantability () - { - return 0; - } - - @Override - public boolean isFull3D () - { - return true; - } - - /* Proper stack damage */ - /* @Override - public int getItemDamageFromStack (ItemStack stack) - { - NBTTagCompound tags = stack.getTagCompound(); - if (tags == null) - { - //System.out.println("Tool item is uninitalized! This method should never be called with a default item"); - //Exception e = new NullPointerException(); - //e.printStackTrace(); - return 0; - } - - return tags.getCompoundTag("InfiTool").getInteger("Damage"); - } - - @Override - public int getItemDamageFromStackForDisplay (ItemStack stack) - { - NBTTagCompound tags = stack.getTagCompound(); - if (tags == null) - { - //System.out.println("Tool item is uninitalized! This method should never be called with a default item"); - //Exception e = new NullPointerException(); - //e.printStackTrace(); - return 0; - } - - return tags.getCompoundTag("InfiTool").getInteger("Damage"); - } - - @Override - public int getItemMaxDamageFromStack (ItemStack stack) - { - NBTTagCompound tags = stack.getTagCompound(); - if (tags == null) - { - //System.out.println("Tool item is uninitalized! This method should never be called with a default item"); - //Exception e = new NullPointerException(); - //e.printStackTrace(); - return 0; - } - return tags.getCompoundTag("InfiTool").getInteger("TotalDurability"); - }*/ - -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/ToolMaterial.java b/src/minecraft/mods/tinker/tconstruct/library/tools/ToolMaterial.java deleted file mode 100755 index 5e213879b..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/ToolMaterial.java +++ /dev/null @@ -1,83 +0,0 @@ -package mods.tinker.tconstruct.library.tools; -/* - * Dynamic substitute for an enum. It carries a lot of information - */ -public class ToolMaterial -{ - //mining level, durability, mining speed, baseDamage, handle modifier, Reinforced level, shoddy/spiny level, color/style on name - - public final String materialName; - public final int harvestLevel; - public final int durability; - public final int miningspeed; // <-- divided by 100 - public final int attack; - public final float handleModifier; - public final int reinforced; - public final float stonebound; - public final String tipStyle; - public final String ability; - - public ToolMaterial(String name, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style, String ability) - { - this.materialName = name; - this.harvestLevel = level; - this.durability = durability; - this.miningspeed = speed; - this.attack = damage; - this.handleModifier = handle; - this.reinforced = reinforced; - this.stonebound = stonebound; - this.tipStyle = style; - this.ability = ability; - } - - public String name() - { - return materialName; - } - - public int durability() - { - return this.durability; - } - - public int toolSpeed() - { - return this.miningspeed; - } - - public int attack() - { - return this.attack; - } - - public int harvestLevel() - { - return this.harvestLevel; - } - - public float handleDurability() - { - return this.handleModifier; - } - - public int reinforced() - { - return this.reinforced; - } - - public float shoddy() - { - return this.stonebound; - } - - public String style() - { - return this.tipStyle; - } - - public String ability() - { - return this.ability; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/ToolMod.java b/src/minecraft/mods/tinker/tconstruct/library/tools/ToolMod.java deleted file mode 100755 index 172ff2f1b..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/ToolMod.java +++ /dev/null @@ -1,209 +0,0 @@ -package mods.tinker.tconstruct.library.tools; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public abstract class ToolMod -{ - public final String key; - public final List stacks; - public final int effectIndex; - public static Random random = new Random(); - - public ToolMod(ItemStack[] items, int effect, String dataKey) - { - //recipeItems = items; - List itemstacks = new ArrayList(); - for (int iter = 0; iter < items.length; iter++) - itemstacks.add(items[iter]); - stacks = itemstacks; - effectIndex = effect; - key = dataKey; - } - - /** Checks to see if the inputs match the stored items - * Note: Works like ShapelessRecipes - * - * @param input The ItemStacks to compare against - * @param tool Item to modify, used for restrictions - * @return Whether the recipe matches the input - */ - public boolean matches (ItemStack[] input, ItemStack tool) - { - if (!canModify(tool, input)) - return false; - - ArrayList list = new ArrayList(this.stacks); - - for (int iter = 0; iter < input.length; ++iter) - { - ItemStack craftingStack = input[iter]; - - if (craftingStack != null) - { - boolean canCraft = false; - Iterator iterate = list.iterator(); - - while (iterate.hasNext()) - { - ItemStack removeStack = (ItemStack) iterate.next(); - - if (craftingStack.itemID == removeStack.itemID && (removeStack.getItemDamage() == Short.MAX_VALUE || craftingStack.getItemDamage() == removeStack.getItemDamage())) - { - canCraft = true; - list.remove(removeStack); - break; - } - } - - if (!canCraft) - { - return false; - } - } - } - - return list.isEmpty(); - } - - /** - * - * @param tool Tool to compare against - * @return Whether the tool can be modified - */ - - protected boolean canModify (ItemStack tool, ItemStack[] input) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - return tags.getInteger("Modifiers") > 0; - } - - /** Modifies the tool. Adds nbttags, changes existing ones, ticks down modification counter, etc - * - * @param input ItemStacks to pull info from - * @param tool The tool to modify - */ - public abstract void modify (ItemStack[] input, ItemStack tool); - - public void addMatchingEffect (ItemStack tool) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - if (tags.hasKey("Effect6") || tags.hasKey(key)) - return; - - else if (tags.hasKey("Effect5")) - { - tags.setInteger("Effect6", effectIndex); - } - else if (tags.hasKey("Effect4")) - { - tags.setInteger("Effect5", effectIndex); - } - else if (tags.hasKey("Effect3")) - { - tags.setInteger("Effect4", effectIndex); - } - else if (tags.hasKey("Effect2")) - { - tags.setInteger("Effect3", effectIndex); - } - else if (tags.hasKey("Effect1")) - { - tags.setInteger("Effect2", effectIndex); - } - else - { - tags.setInteger("Effect1", effectIndex); - } - } - - protected int addModifierTip (ItemStack tool, String modifierTip) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int tipNum = 0; - while (true) - { - tipNum++; - String tip = "Tooltip" + tipNum; - if (!tags.hasKey(tip)) - { - tags.setString(tip, ""); - String modTip = "ModifierTip" + tipNum; - tags.setString(modTip, modifierTip); - return tipNum; - } - } - } - - protected int addToolTip (ItemStack tool, String tooltip, String modifierTip) - { - NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - int tipNum = 0; - while (true) - { - tipNum++; - String tip = "Tooltip" + tipNum; - if (!tags.hasKey(tip)) - { - tags.setString(tip, tooltip); - String modTip = "ModifierTip" + tipNum; - tags.setString(modTip, modifierTip); - return tipNum; - } - else - { - String tag = tags.getString(tip); - if (tag.contains(tooltip)) - { - tags.setString(tip, getProperName(tooltip, tag)); - String modTip = "ModifierTip" + tipNum; - tag = tags.getString(modTip); - tags.setString(modTip, getProperName(modifierTip, tag)); - return tipNum; - } - } - } - } - - protected String getProperName(String tooltip, String tag) - { - if (tag.equals(tooltip)) - return tooltip + " II"; - - if (tag.equals(tooltip + " II")) - return tooltip + " III"; - - if (tag.equals(tooltip + " III")) - return tooltip + " IV"; - - if (tag.equals(tooltip + " IV")) - return tooltip + " V"; - - if (tag.equals(tooltip + " V")) - return tooltip + " VI"; - - if (tag.equals(tooltip + " VI")) - return tooltip + " VII"; - - if (tag.equals(tooltip + " VII")) - return tooltip + " VIII"; - - if (tag.equals(tooltip + " VIII")) - return tooltip + " IX"; - - if (tag.equals(tooltip + " IX")) - return tooltip + " X"; - - return tooltip + " X+"; - } - - public boolean validType(ToolCore tool) - { - return true; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/tools/Weapon.java b/src/minecraft/mods/tinker/tconstruct/library/tools/Weapon.java deleted file mode 100755 index fad776f0a..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/tools/Weapon.java +++ /dev/null @@ -1,119 +0,0 @@ -package mods.tinker.tconstruct.library.tools; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public abstract class Weapon extends ToolCore -{ - - public Weapon(int itemID, int baseDamage) - { - super(itemID, baseDamage); - } - - protected float baseSpeed() - { - return 1.5f; - } - - protected float effectiveSpeed() - { - return 15f; - } - - @Override - public float getStrVsBlock(ItemStack stack, Block block, int meta) - { - if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Broken")) - return 0.1f; - - for (int i = 0; i < web.length; i++) - { - if (web[i] == block.blockMaterial ) - { - return effectiveSpeed(); - } - } - return baseSpeed(); - } - - /** - * returns the action that specifies what animation to play when the items is being used - */ - @Override - public EnumAction getItemUseAction(ItemStack par1ItemStack) - { - return EnumAction.block; - } - - /** - * How long it takes to use or consume an item - */ - @Override - public int getMaxItemUseDuration(ItemStack par1ItemStack) - { - return 72000; - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - return stack; - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float clickX, float clickY, float clickZ) - { - return false; - } - - /** - * Returns if the item (tool) can harvest results from the block type. - */ - @Override - public boolean canHarvestBlock(Block block) - { - for (int i = 0; i < web.length; i++) - { - if (block.blockMaterial == web[i]) - return true; - } - return super.canHarvestBlock(block); - } - - protected Material[] getEffectiveMaterials() - { - return web; - } - - @SuppressWarnings("deprecation") - @Override - public int getHeadType () - { - return 1; - } - - /*@Override - public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity) - { - TContent.modL.midStreamModify(stack); - return super.onLeftClickEntity(stack, player, entity); - }*/ - - @Override - public String[] toolCategories() - { - return new String[] { "weapon", "melee" }; - } - - public static Material[] web = new Material[] { Material.web }; - public static Material[] none = new Material[0]; -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/CoordTuple.java b/src/minecraft/mods/tinker/tconstruct/library/util/CoordTuple.java deleted file mode 100755 index 25fc867f6..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/CoordTuple.java +++ /dev/null @@ -1,55 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -public class CoordTuple -{ - public final int x; - public final int y; - public final int z; - - public CoordTuple(int posX, int posY, int posZ) - { - x = posX; - y = posY; - z = posZ; - } - - public boolean equalCoords (int posX, int posY, int posZ) - { - if (this.x == posX && this.y == posY && this.z == posZ) - return true; - else - return false; - } - - @Override - public boolean equals(Object obj) - { - if (obj == null) - return false; - - if(getClass() == obj.getClass()) - { - CoordTuple coord = (CoordTuple)obj; - if(this.x == coord.x && this.y == coord.y && this.z == coord.z) - return true; - } - return false; - } - - @Override - public int hashCode () - { - final int prime = 31; - int result = 1; - result = prime * result + x; - result = prime * result + y; - result = prime * result + z; - return result; - } - - @Override - public String toString () - { - return "X: " + x + ", Y: " + y + ", Z: " + z; - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/IActiveLogic.java b/src/minecraft/mods/tinker/tconstruct/library/util/IActiveLogic.java deleted file mode 100755 index 29b190527..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/IActiveLogic.java +++ /dev/null @@ -1,7 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -public interface IActiveLogic -{ - public boolean getActive(); - public void setActive(boolean flag); -} \ No newline at end of file diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/IFacingLogic.java b/src/minecraft/mods/tinker/tconstruct/library/util/IFacingLogic.java deleted file mode 100755 index 62d921fc5..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/IFacingLogic.java +++ /dev/null @@ -1,11 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -import net.minecraft.entity.EntityLiving; -import net.minecraftforge.common.ForgeDirection; - -public interface IFacingLogic -{ - public byte getRenderDirection(); - public ForgeDirection getForgeDirection(); - public void setDirection(float yaw, float pitch, EntityLiving player); -} \ No newline at end of file diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/IMasterLogic.java b/src/minecraft/mods/tinker/tconstruct/library/util/IMasterLogic.java deleted file mode 100755 index e6a553c8a..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/IMasterLogic.java +++ /dev/null @@ -1,6 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -public interface IMasterLogic -{ - public void notifyChange(int x, int y, int z); -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/IPattern.java b/src/minecraft/mods/tinker/tconstruct/library/util/IPattern.java deleted file mode 100755 index 5540984f4..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/IPattern.java +++ /dev/null @@ -1,10 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -import mods.tinker.tconstruct.library.crafting.PatternBuilder.MaterialSet; -import net.minecraft.item.ItemStack; - -public interface IPattern -{ - public int getPatternCost (ItemStack pattern); - public ItemStack getPatternOutput(ItemStack pattern, ItemStack input, MaterialSet set); -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/IServantLogic.java b/src/minecraft/mods/tinker/tconstruct/library/util/IServantLogic.java deleted file mode 100755 index 2d353c1ec..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/IServantLogic.java +++ /dev/null @@ -1,9 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -public interface IServantLogic -{ - public CoordTuple getMasterPosition (); - public void notifyMasterOfChange(); - public boolean verifyMaster(int x, int y, int z); - public boolean setMaster(int x, int y, int z); -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/IToolPart.java b/src/minecraft/mods/tinker/tconstruct/library/util/IToolPart.java deleted file mode 100755 index 1c13f93d6..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/IToolPart.java +++ /dev/null @@ -1,13 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -import net.minecraft.item.ItemStack; - -public interface IToolPart -{ - /** Parts to build tools from. ex: Pickaxe Head - * - * @param stack This item - * @return Proper material ID. -1 for invalid - */ - public int getMaterialID(ItemStack stack); -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/PiercingEntityDamage.java b/src/minecraft/mods/tinker/tconstruct/library/util/PiercingEntityDamage.java deleted file mode 100755 index 5c03e7696..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/PiercingEntityDamage.java +++ /dev/null @@ -1,13 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -import net.minecraft.entity.Entity; -import net.minecraft.util.EntityDamageSource; - -public class PiercingEntityDamage extends EntityDamageSource -{ - public PiercingEntityDamage(String str, Entity entity) - { - super(str, entity); - this.setDamageBypassesArmor(); - } -} diff --git a/src/minecraft/mods/tinker/tconstruct/library/util/TabTools.java b/src/minecraft/mods/tinker/tconstruct/library/util/TabTools.java deleted file mode 100755 index c711551b9..000000000 --- a/src/minecraft/mods/tinker/tconstruct/library/util/TabTools.java +++ /dev/null @@ -1,25 +0,0 @@ -package mods.tinker.tconstruct.library.util; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; - -public class TabTools extends CreativeTabs -{ - ItemStack display; - - public TabTools(String label) - { - super(label); - } - - public void init(ItemStack stack) - { - display = stack; - } - - @Override - public ItemStack getIconItemStack() - { - return display; - } -} \ No newline at end of file