diff --git a/assets/tinker/lang/en_US.xml b/assets/tinker/lang/en_US.xml
index a339446f..c8d6bfd7 100644
--- a/assets/tinker/lang/en_US.xml
+++ b/assets/tinker/lang/en_US.xml
@@ -21,7 +21,6 @@
Casting Table
Tool Forge
- Crafting Station
Drying Rack
Slimy Mud
Grout
@@ -42,7 +41,7 @@
Copper Oreberry Bush
Tin Oreberry Bush
Aluminum Oreberry Bush
- Essence Oreberry Bush
+ Essence Berry Bush
Iron Gravel Ore
Gold Gravel Ore
@@ -132,8 +131,10 @@
Copper Nugget
Tin Nugget
Aluminum Nugget
- Essence Crystal
+ Fake Essence Crystal
Aluminum Brass Nugget
+ Silky Cloth
+ Silky Jewel
Obsidian Nugget
Cobalt Nugget
Ardite Nugget
@@ -142,6 +143,8 @@
Alumite Nugget
Steel Nugget
+ Essence Crystal
+
Smeltery Controller
Smeltery Drain
Seared Bricks
@@ -166,6 +169,7 @@
Spruce Barricade
Birch Barricade
Jungle Barricade
+ Essence Extractor
Block of Cobalt
Block of Ardite
@@ -177,8 +181,10 @@
Block of Aluminum Brass
Block of Alumite
Block of Steel
+ Block of Solid Ender
Torch
+ Crafting Station
Clear Glass
Soul Glass
@@ -239,6 +245,15 @@
Graveyard Soil Slab
Consecrated Soil Slab
+ Blue Slimedirt
+ Slimy Leaves
+ Slimy Sapling
+ Slimy Grass
+ Slimy Grass
+ Slimy Grass
+ Congealed Blue Slime
+ Congealed Green Slime
+
Knapsack
Blank Pattern
Blank Cast
@@ -271,33 +286,41 @@
Seared Stone Bucket
Liquified Emerald Bucket
Bucket o' Blood
+ Molten Nickel Bucket
+ Molten Lead Bucket
+ Molten Silver Bucket
+ Molten Shiny Bucket
+ Molten Invar Bucket
+ Molten Electrum Bucket
+ Liquified Ender Bucket
Bowstring
- Enchanted Bowstring
+ Enchanted Bowstring
- Molten Iron
- Molten Gold
- Molten Copper
- Molten Tin
- Molten Aluminum
- Molten Cobalt
- Molten Ardite
- Molten Bronze
- Molten Aluminum Brass
- Molten Manyullyn
- Molten Alumite
- Molten Obsidian
- Molten Steel
- Molten Glass
- Seared Stone
- Liquified Emerald
- Blood
- Molten Nickel
- Molten Lead
- Molten Silver
- Molten Shiny
- Molten Invar
- Molten Electrum
+ Molten Iron
+ Molten Gold
+ Molten Copper
+ Liquid Tin
+ Molten Aluminum
+ Molten Cobalt
+ Molten Ardite
+ Molten Bronze
+ Molten Aluminum Brass
+ Molten Manyullyn
+ Molten Alumite
+ Molten Obsidian
+ Molten Steel
+ Molten Glass
+ Seared Stone
+ Liquified Emerald
+ Blood
+ Molten Nickel
+ Molten Silver
+ Molten Lead
+ Molten Shiny
+ Molten Invar
+ Molten Electrum
+ Liquified Ender
Jeweled Apple
Gelatinous Slime
@@ -312,7 +335,7 @@
Blue Slime
King Slime
- Gardeslime
+ Gardeslime
Armor Gui
@@ -321,10 +344,6 @@
%1$s will be a stepping stone for our revolution!
%1$s thought swimming in hot liquids was a good idea
- %1$s watched their legs get blown off
- %1$s was doomed to fall by Landmine
- %1$s took a ride on a firework
-
Wooden
Stone
Iron
@@ -366,5 +385,6 @@
Molten Platinum
Molten Invar
Molten Shiny
+ Liquid Ender
\ No newline at end of file
diff --git a/assets/tinker/textures/blocks/coal_block.png b/assets/tinker/textures/blocks/coal_block.png
new file mode 100644
index 00000000..024404bc
Binary files /dev/null and b/assets/tinker/textures/blocks/coal_block.png differ
diff --git a/assets/tinker/textures/blocks/compressed_ender.png b/assets/tinker/textures/blocks/compressed_ender.png
new file mode 100644
index 00000000..b7e9bbbc
Binary files /dev/null and b/assets/tinker/textures/blocks/compressed_ender.png differ
diff --git a/assets/tinker/textures/blocks/extractor_bottom.png b/assets/tinker/textures/blocks/extractor_bottom.png
new file mode 100644
index 00000000..a7755c87
Binary files /dev/null and b/assets/tinker/textures/blocks/extractor_bottom.png differ
diff --git a/assets/tinker/textures/blocks/extractor_side.png b/assets/tinker/textures/blocks/extractor_side.png
new file mode 100644
index 00000000..b9f52414
Binary files /dev/null and b/assets/tinker/textures/blocks/extractor_side.png differ
diff --git a/assets/tinker/textures/blocks/extractor_top.png b/assets/tinker/textures/blocks/extractor_top.png
new file mode 100644
index 00000000..1eaf2fa1
Binary files /dev/null and b/assets/tinker/textures/blocks/extractor_top.png differ
diff --git a/assets/tinker/textures/blocks/liquid_alubrass.txt b/assets/tinker/textures/blocks/liquid_alubrass.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_alubrass.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_alubrass_flow.txt b/assets/tinker/textures/blocks/liquid_alubrass_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_alubrass_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_aluminum.txt b/assets/tinker/textures/blocks/liquid_aluminum.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_aluminum.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_aluminum_flow.txt b/assets/tinker/textures/blocks/liquid_aluminum_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_aluminum_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_alumite.txt b/assets/tinker/textures/blocks/liquid_alumite.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_alumite.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_alumite_flow.txt b/assets/tinker/textures/blocks/liquid_alumite_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_alumite_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_ardite.txt b/assets/tinker/textures/blocks/liquid_ardite.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_ardite.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_ardite_flow.txt b/assets/tinker/textures/blocks/liquid_ardite_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_ardite_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_bronze.txt b/assets/tinker/textures/blocks/liquid_bronze.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_bronze.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_bronze_flow.txt b/assets/tinker/textures/blocks/liquid_bronze_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_bronze_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_cobalt.txt b/assets/tinker/textures/blocks/liquid_cobalt.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_cobalt.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_cobalt_flow.txt b/assets/tinker/textures/blocks/liquid_cobalt_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_cobalt_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_copper.txt b/assets/tinker/textures/blocks/liquid_copper.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_copper.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_copper_flow.txt b/assets/tinker/textures/blocks/liquid_copper_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_copper_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_cow.txt b/assets/tinker/textures/blocks/liquid_cow.txt
deleted file mode 100644
index d8fe765a..00000000
--- a/assets/tinker/textures/blocks/liquid_cow.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-20*2
-21*2
-22*2
-23*2
-24*2
-25*2
-26*2
-27*2
-28*2
-29*2
-30*2
-31*2
diff --git a/assets/tinker/textures/blocks/liquid_cow_flow.txt b/assets/tinker/textures/blocks/liquid_cow_flow.txt
deleted file mode 100644
index e69de29b..00000000
diff --git a/assets/tinker/textures/blocks/liquid_electrum_flow.mcmeta b/assets/tinker/textures/blocks/liquid_electrum_flow.png.mcmeta
similarity index 100%
rename from assets/tinker/textures/blocks/liquid_electrum_flow.mcmeta
rename to assets/tinker/textures/blocks/liquid_electrum_flow.png.mcmeta
diff --git a/assets/tinker/textures/blocks/liquid_ender.png b/assets/tinker/textures/blocks/liquid_ender.png
new file mode 100644
index 00000000..bbc90b39
Binary files /dev/null and b/assets/tinker/textures/blocks/liquid_ender.png differ
diff --git a/assets/tinker/textures/blocks/liquid_ender.png.mcmeta b/assets/tinker/textures/blocks/liquid_ender.png.mcmeta
new file mode 100644
index 00000000..4f0718ac
--- /dev/null
+++ b/assets/tinker/textures/blocks/liquid_ender.png.mcmeta
@@ -0,0 +1,3 @@
+{
+ "animation": {}
+}
\ No newline at end of file
diff --git a/assets/tinker/textures/blocks/liquid_ender_flow.png b/assets/tinker/textures/blocks/liquid_ender_flow.png
new file mode 100644
index 00000000..2612655c
Binary files /dev/null and b/assets/tinker/textures/blocks/liquid_ender_flow.png differ
diff --git a/assets/tinker/textures/blocks/liquid_ender_flow.png.mcmeta b/assets/tinker/textures/blocks/liquid_ender_flow.png.mcmeta
new file mode 100644
index 00000000..0645f48c
--- /dev/null
+++ b/assets/tinker/textures/blocks/liquid_ender_flow.png.mcmeta
@@ -0,0 +1,5 @@
+{
+ "animation": {
+ "frametime": 2
+ }
+}
diff --git a/assets/tinker/textures/blocks/liquid_glass.txt b/assets/tinker/textures/blocks/liquid_glass.txt
deleted file mode 100644
index d8fe765a..00000000
--- a/assets/tinker/textures/blocks/liquid_glass.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-20*2
-21*2
-22*2
-23*2
-24*2
-25*2
-26*2
-27*2
-28*2
-29*2
-30*2
-31*2
diff --git a/assets/tinker/textures/blocks/liquid_glass_flow.txt b/assets/tinker/textures/blocks/liquid_glass_flow.txt
deleted file mode 100644
index e69de29b..00000000
diff --git a/assets/tinker/textures/blocks/liquid_gold.txt b/assets/tinker/textures/blocks/liquid_gold.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_gold.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_gold_flow.txt b/assets/tinker/textures/blocks/liquid_gold_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_gold_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_iron.txt b/assets/tinker/textures/blocks/liquid_iron.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_iron.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_iron_flow.txt b/assets/tinker/textures/blocks/liquid_iron_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_iron_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_manyullyn.txt b/assets/tinker/textures/blocks/liquid_manyullyn.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_manyullyn.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_manyullyn_flow.txt b/assets/tinker/textures/blocks/liquid_manyullyn_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_manyullyn_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_obsidian.txt b/assets/tinker/textures/blocks/liquid_obsidian.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_obsidian.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_obsidian_flow.txt b/assets/tinker/textures/blocks/liquid_obsidian_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_obsidian_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_steel.txt b/assets/tinker/textures/blocks/liquid_steel.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_steel.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_steel_flow.txt b/assets/tinker/textures/blocks/liquid_steel_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_steel_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_stone.txt b/assets/tinker/textures/blocks/liquid_stone.txt
deleted file mode 100644
index d8fe765a..00000000
--- a/assets/tinker/textures/blocks/liquid_stone.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-20*2
-21*2
-22*2
-23*2
-24*2
-25*2
-26*2
-27*2
-28*2
-29*2
-30*2
-31*2
diff --git a/assets/tinker/textures/blocks/liquid_stone_flow.txt b/assets/tinker/textures/blocks/liquid_stone_flow.txt
deleted file mode 100644
index e69de29b..00000000
diff --git a/assets/tinker/textures/blocks/liquid_tin.txt b/assets/tinker/textures/blocks/liquid_tin.txt
deleted file mode 100644
index b0a7c084..00000000
--- a/assets/tinker/textures/blocks/liquid_tin.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-18*2
-17*2
-16*2
-15*2
-14*2
-13*2
-12*2
-11*2
-10*2
-9*2
-8*2
-7*2
-6*2
-5*2
-4*2
-3*2
-2*2
-1*2
diff --git a/assets/tinker/textures/blocks/liquid_tin_flow.txt b/assets/tinker/textures/blocks/liquid_tin_flow.txt
deleted file mode 100644
index 2e6ca4fc..00000000
--- a/assets/tinker/textures/blocks/liquid_tin_flow.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-0*3
-1*3
-2*3
-3*3
-4*3
-5*3
-6*3
-7*3
-8*3
-9*3
-10*3
-11*3
-12*3
-13*3
-14*3
-15*3
diff --git a/assets/tinker/textures/blocks/liquid_villager.txt b/assets/tinker/textures/blocks/liquid_villager.txt
deleted file mode 100644
index d8fe765a..00000000
--- a/assets/tinker/textures/blocks/liquid_villager.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-0*2
-1*2
-2*2
-3*2
-4*2
-5*2
-6*2
-7*2
-8*2
-9*2
-10*2
-11*2
-12*2
-13*2
-14*2
-15*2
-16*2
-17*2
-18*2
-19*2
-20*2
-21*2
-22*2
-23*2
-24*2
-25*2
-26*2
-27*2
-28*2
-29*2
-30*2
-31*2
diff --git a/assets/tinker/textures/blocks/liquid_villager_flow.txt b/assets/tinker/textures/blocks/liquid_villager_flow.txt
deleted file mode 100644
index e69de29b..00000000
diff --git a/assets/tinker/textures/blocks/slime_blue.png b/assets/tinker/textures/blocks/slime_blue.png
new file mode 100644
index 00000000..4fc22c5d
Binary files /dev/null and b/assets/tinker/textures/blocks/slime_blue.png differ
diff --git a/assets/tinker/textures/blocks/slime_blue.png.mcmeta b/assets/tinker/textures/blocks/slime_blue.png.mcmeta
new file mode 100644
index 00000000..4f0718ac
--- /dev/null
+++ b/assets/tinker/textures/blocks/slime_blue.png.mcmeta
@@ -0,0 +1,3 @@
+{
+ "animation": {}
+}
\ No newline at end of file
diff --git a/assets/tinker/textures/blocks/slime_blue_flow.png b/assets/tinker/textures/blocks/slime_blue_flow.png
new file mode 100644
index 00000000..929420e0
Binary files /dev/null and b/assets/tinker/textures/blocks/slime_blue_flow.png differ
diff --git a/assets/tinker/textures/blocks/slime_blue_flow.png.mcmeta b/assets/tinker/textures/blocks/slime_blue_flow.png.mcmeta
new file mode 100644
index 00000000..0645f48c
--- /dev/null
+++ b/assets/tinker/textures/blocks/slime_blue_flow.png.mcmeta
@@ -0,0 +1,5 @@
+{
+ "animation": {
+ "frametime": 2
+ }
+}
diff --git a/assets/tinker/textures/blocks/slimeblock_blue.png b/assets/tinker/textures/blocks/slimeblock_blue.png
new file mode 100644
index 00000000..cc2a161b
Binary files /dev/null and b/assets/tinker/textures/blocks/slimeblock_blue.png differ
diff --git a/assets/tinker/textures/blocks/slimeblock_green.png b/assets/tinker/textures/blocks/slimeblock_green.png
new file mode 100644
index 00000000..e0d9f10d
Binary files /dev/null and b/assets/tinker/textures/blocks/slimeblock_green.png differ
diff --git a/assets/tinker/textures/blocks/slimeblock_purple.png b/assets/tinker/textures/blocks/slimeblock_purple.png
new file mode 100644
index 00000000..4c63c537
Binary files /dev/null and b/assets/tinker/textures/blocks/slimeblock_purple.png differ
diff --git a/assets/tinker/textures/blocks/slimedirt_blue.png b/assets/tinker/textures/blocks/slimedirt_blue.png
new file mode 100644
index 00000000..133b401b
Binary files /dev/null and b/assets/tinker/textures/blocks/slimedirt_blue.png differ
diff --git a/assets/tinker/textures/blocks/slimedirt_green.png b/assets/tinker/textures/blocks/slimedirt_green.png
new file mode 100644
index 00000000..d4992452
Binary files /dev/null and b/assets/tinker/textures/blocks/slimedirt_green.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_blue_fern.png b/assets/tinker/textures/blocks/slimegrass_blue_fern.png
new file mode 100644
index 00000000..e50c38a7
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_blue_fern.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_blue_side.png b/assets/tinker/textures/blocks/slimegrass_blue_side.png
new file mode 100644
index 00000000..988c5281
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_blue_side.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_blue_tall.png b/assets/tinker/textures/blocks/slimegrass_blue_tall.png
new file mode 100644
index 00000000..bb10912e
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_blue_tall.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_blue_top.png b/assets/tinker/textures/blocks/slimegrass_blue_top.png
new file mode 100644
index 00000000..5d9ad68e
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_blue_top.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_green_blue_side.png b/assets/tinker/textures/blocks/slimegrass_green_blue_side.png
new file mode 100644
index 00000000..d8a186cb
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_green_blue_side.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_green_dirt_side.png b/assets/tinker/textures/blocks/slimegrass_green_dirt_side.png
new file mode 100644
index 00000000..3d057239
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_green_dirt_side.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_green_green_side.png b/assets/tinker/textures/blocks/slimegrass_green_green_side.png
new file mode 100644
index 00000000..1b5b9b22
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_green_green_side.png differ
diff --git a/assets/tinker/textures/blocks/slimegrass_green_top.png b/assets/tinker/textures/blocks/slimegrass_green_top.png
new file mode 100644
index 00000000..cf7ff8b4
Binary files /dev/null and b/assets/tinker/textures/blocks/slimegrass_green_top.png differ
diff --git a/assets/tinker/textures/blocks/slimeleaves_blue_fancy.png b/assets/tinker/textures/blocks/slimeleaves_blue_fancy.png
new file mode 100644
index 00000000..deb17e7a
Binary files /dev/null and b/assets/tinker/textures/blocks/slimeleaves_blue_fancy.png differ
diff --git a/assets/tinker/textures/blocks/slimeleaves_blue_fast.png b/assets/tinker/textures/blocks/slimeleaves_blue_fast.png
new file mode 100644
index 00000000..6c91818b
Binary files /dev/null and b/assets/tinker/textures/blocks/slimeleaves_blue_fast.png differ
diff --git a/assets/tinker/textures/blocks/slimesapling_blue.png b/assets/tinker/textures/blocks/slimesapling_blue.png
new file mode 100644
index 00000000..c48bc13d
Binary files /dev/null and b/assets/tinker/textures/blocks/slimesapling_blue.png differ
diff --git a/assets/tinker/textures/blocks/slimesnow_blue.png b/assets/tinker/textures/blocks/slimesnow_blue.png
new file mode 100644
index 00000000..9a81f243
Binary files /dev/null and b/assets/tinker/textures/blocks/slimesnow_blue.png differ
diff --git a/assets/tinker/textures/items/arrow/thaumium_arrow_head.png b/assets/tinker/textures/items/arrow/thaumium_arrow_head.png
new file mode 100644
index 00000000..b5effc73
Binary files /dev/null and b/assets/tinker/textures/items/arrow/thaumium_arrow_head.png differ
diff --git a/assets/tinker/textures/items/arrow/thaumium_arrow_shaft.png b/assets/tinker/textures/items/arrow/thaumium_arrow_shaft.png
new file mode 100644
index 00000000..50070b32
Binary files /dev/null and b/assets/tinker/textures/items/arrow/thaumium_arrow_shaft.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_electrum.png b/assets/tinker/textures/items/materials/bucket_electrum.png
new file mode 100644
index 00000000..00d1819d
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_electrum.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_ender.png b/assets/tinker/textures/items/materials/bucket_ender.png
new file mode 100644
index 00000000..d957a2c2
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_ender.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_invar.png b/assets/tinker/textures/items/materials/bucket_invar.png
new file mode 100644
index 00000000..c8e0f24b
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_invar.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_lead.png b/assets/tinker/textures/items/materials/bucket_lead.png
new file mode 100644
index 00000000..164cc3ba
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_lead.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_nickel.png b/assets/tinker/textures/items/materials/bucket_nickel.png
new file mode 100644
index 00000000..ff248756
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_nickel.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_shiny.png b/assets/tinker/textures/items/materials/bucket_shiny.png
new file mode 100644
index 00000000..b2082441
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_shiny.png differ
diff --git a/assets/tinker/textures/items/materials/bucket_silver.png b/assets/tinker/textures/items/materials/bucket_silver.png
new file mode 100644
index 00000000..c8e81d96
Binary files /dev/null and b/assets/tinker/textures/items/materials/bucket_silver.png differ
diff --git a/assets/tinker/textures/items/materials/cast_bowstring.png b/assets/tinker/textures/items/materials/cast_bowstring.png
new file mode 100644
index 00000000..3b0fc0a9
Binary files /dev/null and b/assets/tinker/textures/items/materials/cast_bowstring.png differ
diff --git a/assets/tinker/textures/items/materials/cast_fletching.png b/assets/tinker/textures/items/materials/cast_fletching.png
new file mode 100644
index 00000000..3b0fc0a9
Binary files /dev/null and b/assets/tinker/textures/items/materials/cast_fletching.png differ
diff --git a/assets/tinker/textures/items/parts/thaumium_arrowhead.png b/assets/tinker/textures/items/parts/thaumium_arrowhead.png
new file mode 100644
index 00000000..06f155f5
Binary files /dev/null and b/assets/tinker/textures/items/parts/thaumium_arrowhead.png differ
diff --git a/tconstruct/TConstruct.java b/tconstruct/TConstruct.java
index 2e6abe59..b204eeb3 100644
--- a/tconstruct/TConstruct.java
+++ b/tconstruct/TConstruct.java
@@ -13,6 +13,7 @@ import tconstruct.util.PHConstruct;
import tconstruct.util.TCraftingHandler;
import tconstruct.util.TEventHandler;
import tconstruct.util.player.TPlayerHandler;
+import tconstruct.worldgen.SlimeIslandGen;
import tconstruct.worldgen.TBaseWorldGenerator;
import tconstruct.worldgen.TerrainGenEventHandler;
import tconstruct.worldgen.village.TVillageTrades;
@@ -37,7 +38,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
* @dependencies: IC2 API, MFR API
*/
-@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.2_1.4.dev.26", dependencies = "required-after:Forge@[7.7.1.687,)")
+@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.2_1.4.dev.27", dependencies = "required-after:Forge@[7.7.1.687,)")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tconstruct.util.network.TPacketHandler.class)
public class TConstruct
{
@@ -116,6 +117,7 @@ public class TConstruct
public void init (FMLInitializationEvent event)
{
content.intermodCommunication();
+ GameRegistry.registerWorldGenerator(new SlimeIslandGen(TContent.slimePool.blockID, 0));
}
@EventHandler
diff --git a/tconstruct/blocks/EssenceExtractor.java b/tconstruct/blocks/EssenceExtractor.java
new file mode 100644
index 00000000..a277bbf9
--- /dev/null
+++ b/tconstruct/blocks/EssenceExtractor.java
@@ -0,0 +1,182 @@
+package tconstruct.blocks;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+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.World;
+import net.minecraftforge.common.FakePlayer;
+import tconstruct.blocks.logic.EssenceExtractorLogic;
+import tconstruct.common.TContent;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class EssenceExtractor extends BlockContainer
+{
+ @SideOnly(Side.CLIENT)
+ private Icon field_94461_a;
+ @SideOnly(Side.CLIENT)
+ private Icon field_94460_b;
+
+ public EssenceExtractor(int par1)
+ {
+ super(par1, Material.rock);
+ this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);
+ this.setLightOpacity(0);
+ this.setCreativeTab(CreativeTabs.tabDecorations);
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
+ {
+ super.randomDisplayTick(par1World, par2, par3, par4, par5Random);
+
+ for (int l = par2 - 2; l <= par2 + 2; ++l)
+ {
+ for (int i1 = par4 - 2; i1 <= par4 + 2; ++i1)
+ {
+ if (l > par2 - 2 && l < par2 + 2 && i1 == par4 - 1)
+ {
+ i1 = par4 + 2;
+ }
+
+ if (par5Random.nextInt(16) == 0)
+ {
+ for (int j1 = par3; j1 <= par3 + 1; ++j1)
+ {
+ if (par1World.getBlockId(l, j1, i1) == Block.bookShelf.blockID)
+ {
+ if (!par1World.isAirBlock((l - par2) / 2 + par2, j1, (i1 - par4) / 2 + par4))
+ {
+ break;
+ }
+
+ par1World.spawnParticle("enchantmenttable", (double)par2 + 0.5D, (double)par3 + 2.0D, (double)par4 + 0.5D, (double)((float)(l - par2) + par5Random.nextFloat()) - 0.5D, (double)((float)(j1 - par3) - par5Random.nextFloat() - 1.0F), (double)((float)(i1 - par4) + par5Random.nextFloat()) - 0.5D);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int par1, int par2)
+ {
+ return par1 == 0 ? this.field_94460_b : (par1 == 1 ? this.field_94461_a : this.blockIcon);
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World par1World)
+ {
+ return new EssenceExtractorLogic();
+ }
+
+ /* Right-click to form a crystal */
+
+ @Override
+ public void onBlockClicked (World world, int x, int y, int z, EntityPlayer player)
+ {
+ if (world.isRemote)
+ {
+ return;
+ }
+ else
+ {
+ EssenceExtractorLogic logic = (EssenceExtractorLogic)world.getBlockTileEntity(x, y, z);
+ int amount = logic.removeEssence();
+ if (amount > 0)
+ {
+ ItemStack crystal = new ItemStack(TContent.essenceCrystal, 1);
+ NBTTagCompound tags = new NBTTagCompound();
+ tags.setInteger("Essence", amount);
+ crystal.setTagCompound(tags);
+
+ EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, crystal);
+ world.spawnEntityInWorld(entityitem);
+ if (!(player instanceof FakePlayer))
+ entityitem.onCollideWithPlayer(player);
+ }
+ }
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
+ {
+ if (par1World.isRemote)
+ {
+ return true;
+ }
+ else
+ {
+ EssenceExtractorLogic logic = (EssenceExtractorLogic)par1World.getBlockTileEntity(x, y, z);
+ logic.addEssence(player);
+ logic.getEssenceMessage(player);
+ return true;
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack)
+ {
+ super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLiving, par6ItemStack);
+
+ if (par6ItemStack.hasDisplayName())
+ {
+ ((EssenceExtractorLogic)par1World.getBlockTileEntity(par2, par3, par4)).func_94134_a(par6ItemStack.getDisplayName());
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister par1IconRegister)
+ {
+ this.blockIcon = par1IconRegister.registerIcon("tinker:extractor_side");
+ this.field_94461_a = par1IconRegister.registerIcon("tinker:extractor_top");
+ this.field_94460_b = par1IconRegister.registerIcon("tinker:extractor_bottom");
+ }
+}
diff --git a/tconstruct/blocks/SoilBlock.java b/tconstruct/blocks/SoilBlock.java
index 0504c999..2b38c8fa 100644
--- a/tconstruct/blocks/SoilBlock.java
+++ b/tconstruct/blocks/SoilBlock.java
@@ -9,7 +9,7 @@ import net.minecraft.world.World;
public class SoilBlock extends TConstructBlock
{
- static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil" };
+ static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue" };
public SoilBlock(int id)
{
diff --git a/tconstruct/blocks/TMetalBlock.java b/tconstruct/blocks/TMetalBlock.java
index 95d5c332..33c5443b 100644
--- a/tconstruct/blocks/TMetalBlock.java
+++ b/tconstruct/blocks/TMetalBlock.java
@@ -8,7 +8,7 @@ public class TMetalBlock extends TConstructBlock
{
static String[] metalTypes = new String[] { "compressed_cobalt", "compressed_ardite", "compressed_manyullyn", "compressed_copper", "compressed_bronze", "compressed_tin", "compressed_aluminum",
- "compressed_alubrass", "compressed_alumite", "compressed_steel" };
+ "compressed_alubrass", "compressed_alumite", "compressed_steel", "compressed_ender" };
public TMetalBlock(int id, Material material, float hardness)
{
diff --git a/tconstruct/blocks/logic/EssenceExtractorLogic.java b/tconstruct/blocks/logic/EssenceExtractorLogic.java
new file mode 100644
index 00000000..7a95a406
--- /dev/null
+++ b/tconstruct/blocks/logic/EssenceExtractorLogic.java
@@ -0,0 +1,245 @@
+package tconstruct.blocks.logic;
+
+import java.text.DecimalFormat;
+import java.util.Random;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntityEnchantmentTable;
+
+public class EssenceExtractorLogic extends TileEntityEnchantmentTable
+{
+ /** Used by the render to make the book 'bounce' */
+ public int tickCount;
+
+ /** Value used for determining how the page flip should look. */
+ public float pageFlip;
+
+ /** The last tick's pageFlip value. */
+ public float pageFlipPrev;
+ public float field_70373_d;
+ public float field_70374_e;
+
+ /** The amount that the book is open. */
+ public float bookSpread;
+
+ /** The amount that the book is open. */
+ public float bookSpreadPrev;
+ public float bookRotation2;
+ public float bookRotationPrev;
+ public float bookRotation;
+ private static Random rand = new Random();
+ private String field_94136_s;
+
+ private int essenceAmount;
+ static DecimalFormat df = new DecimalFormat("##.##");
+
+ /*public EssenceExtractorLogic()
+ {
+ df.setRoundingMode(RoundingMode.DOWN);
+ }*/
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT (NBTTagCompound tags)
+ {
+ super.writeToNBT(tags);
+
+ if (this.func_94135_b())
+ {
+ tags.setString("CustomName", this.field_94136_s);
+ }
+ tags.setInteger("Essence", essenceAmount);
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT (NBTTagCompound tags)
+ {
+ super.readFromNBT(tags);
+
+ if (tags.hasKey("CustomName"))
+ {
+ this.field_94136_s = tags.getString("CustomName");
+ }
+
+ essenceAmount = tags.getInteger("Essence");
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity ()
+ {
+ super.updateEntity();
+ this.bookSpreadPrev = this.bookSpread;
+ this.bookRotationPrev = this.bookRotation2;
+ EntityPlayer entityplayer = this.worldObj.getClosestPlayer((double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 0.5F), (double) ((float) this.zCoord + 0.5F), 3.0D);
+
+ if (entityplayer != null)
+ {
+ double d0 = entityplayer.posX - (double) ((float) this.xCoord + 0.5F);
+ double d1 = entityplayer.posZ - (double) ((float) this.zCoord + 0.5F);
+ this.bookRotation = (float) Math.atan2(d1, d0);
+ this.bookSpread += 0.1F;
+
+ if (this.bookSpread < 0.5F || rand.nextInt(40) == 0)
+ {
+ float f = this.field_70373_d;
+
+ do
+ {
+ this.field_70373_d += (float) (rand.nextInt(4) - rand.nextInt(4));
+ } while (f == this.field_70373_d);
+ }
+ }
+ else
+ {
+ this.bookRotation += 0.02F;
+ this.bookSpread -= 0.1F;
+ }
+
+ while (this.bookRotation2 >= (float) Math.PI)
+ {
+ this.bookRotation2 -= ((float) Math.PI * 2F);
+ }
+
+ while (this.bookRotation2 < -(float) Math.PI)
+ {
+ this.bookRotation2 += ((float) Math.PI * 2F);
+ }
+
+ while (this.bookRotation >= (float) Math.PI)
+ {
+ this.bookRotation -= ((float) Math.PI * 2F);
+ }
+
+ while (this.bookRotation < -(float) Math.PI)
+ {
+ this.bookRotation += ((float) Math.PI * 2F);
+ }
+
+ float f1;
+
+ for (f1 = this.bookRotation - this.bookRotation2; f1 >= (float) Math.PI; f1 -= ((float) Math.PI * 2F))
+ {
+ ;
+ }
+
+ while (f1 < -(float) Math.PI)
+ {
+ f1 += ((float) Math.PI * 2F);
+ }
+
+ this.bookRotation2 += f1 * 0.4F;
+
+ if (this.bookSpread < 0.0F)
+ {
+ this.bookSpread = 0.0F;
+ }
+
+ if (this.bookSpread > 1.0F)
+ {
+ this.bookSpread = 1.0F;
+ }
+
+ ++this.tickCount;
+ this.pageFlipPrev = this.pageFlip;
+ float f2 = (this.field_70373_d - this.pageFlip) * 0.4F;
+ float f3 = 0.2F;
+
+ if (f2 < -f3)
+ {
+ f2 = -f3;
+ }
+
+ if (f2 > f3)
+ {
+ f2 = f3;
+ }
+
+ this.field_70374_e += (f2 - this.field_70374_e) * 0.9F;
+ this.pageFlip += this.field_70374_e;
+ }
+
+ public String func_94133_a ()
+ {
+ return this.func_94135_b() ? this.field_94136_s : "container.enchant";
+ }
+
+ public boolean func_94135_b ()
+ {
+ return this.field_94136_s != null && this.field_94136_s.length() > 0;
+ }
+
+ public void func_94134_a (String par1Str)
+ {
+ this.field_94136_s = par1Str;
+ }
+
+ public void addEssence (EntityPlayer player)
+ {
+ int amount = player.experienceTotal;
+ essenceAmount += amount;
+ player.addExperienceLevel(-player.experienceLevel - 1);
+ }
+
+ public int removeEssence()
+ {
+ int amount = this.essenceAmount;
+ this.essenceAmount = 0;
+ return amount;
+ }
+
+ public void getEssenceMessage (EntityPlayer player)
+ {
+ player.addChatMessage("Total Essence: " + this.essenceAmount);
+ player.addChatMessage("Stored Levels: " + getEssencelevels(this.essenceAmount));
+ }
+
+ public static String getEssencelevels (int essence)
+ {
+ if (essence < 255) //0-14
+ {
+ float ret = essence / 17f;
+ return String.valueOf(df.format(ret));
+ }
+ else if (essence < 825)
+ {
+ int amount = essence - 255;
+ int levels = 15;
+ int offset = 3;
+
+ int sub = 17 + offset;
+ while (amount - sub >= 0)
+ {
+ amount -= sub;
+ sub += offset;
+ levels++;
+ }
+
+ float ret = levels + amount / (float) sub;
+ return String.valueOf(df.format(ret));
+ }
+ else
+ {
+ int amount = essence - 825;
+ int levels = 30;
+ int offset = 7;
+
+ int sub = 62 + offset;
+ while (amount - sub >= 0)
+ {
+ amount -= sub;
+ sub += offset;
+ levels++;
+ }
+
+ float ret = levels + amount / (float) sub;
+ return String.valueOf(df.format(ret));
+ }
+ }
+}
diff --git a/tconstruct/blocks/slime/SlimeFluid.java b/tconstruct/blocks/slime/SlimeFluid.java
new file mode 100644
index 00000000..831e75ab
--- /dev/null
+++ b/tconstruct/blocks/slime/SlimeFluid.java
@@ -0,0 +1,59 @@
+package tconstruct.blocks.slime;
+
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.BlockFluidClassic;
+import net.minecraftforge.fluids.Fluid;
+import tconstruct.entity.BlueSlime;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeFluid extends BlockFluidClassic
+{
+ Icon stillIcon;
+ Icon flowIcon;
+ public SlimeFluid(int id, Fluid fluid, Material material)
+ {
+ super(id, fluid, material);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons (IconRegister iconRegister)
+ {
+ stillIcon = iconRegister.registerIcon("tinker:slime_blue");
+ flowIcon = iconRegister.registerIcon("tinker:slime_blue_flow");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public Icon getIcon (int side, int meta)
+ {
+ if (side == 0 || side == 1)
+ return stillIcon;
+ return flowIcon;
+ }
+
+ public void updateTick(World world, int x, int y, int z, Random rand)
+ {
+ super.updateTick(world, x, y, z, rand);
+ if (rand.nextInt(100) == 0 && world.checkNoEntityCollision(AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 2, y + 2, z + 2)) )
+ {
+ BlueSlime entityslime = new BlueSlime(world);
+ entityslime.setPosition((double)x + 0.5D, (double)y + 1.5D, (double)z + 0.5D);
+ world.spawnEntityInWorld(entityslime);
+ }
+ }
+
+ public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
+ {
+
+ }
+}
diff --git a/tconstruct/blocks/slime/SlimeGel.java b/tconstruct/blocks/slime/SlimeGel.java
new file mode 100644
index 00000000..25fa7dd4
--- /dev/null
+++ b/tconstruct/blocks/slime/SlimeGel.java
@@ -0,0 +1,76 @@
+package tconstruct.blocks.slime;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+import tconstruct.blocks.TConstructBlock;
+import tconstruct.library.TConstructRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeGel extends TConstructBlock
+{
+ public SlimeGel(int id)
+ {
+ super(id, Material.sponge, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" });
+ setCreativeTab(TConstructRegistry.blockTab);
+ }
+
+ public boolean getEnableStats ()
+ {
+ return false;
+ }
+
+ public int getMobilityFlag ()
+ {
+ return 0;
+ }
+
+ public int damageDropped (int meta)
+ {
+ return meta;
+ }
+
+ @Override
+ public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
+ {
+ if (entity.motionY < 0)
+ {
+ if (entity.motionY < -0.08F)
+ {
+ Block var9 = Block.blocksList[this.blockID];
+ world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume()) / 2.0F, var9.stepSound.getPitch() * 0.65F);
+ }
+ entity.motionY *= -1.2F;
+ }
+ entity.fallDistance = 0;
+ }
+
+ @Override
+ public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
+ {
+ return AxisAlignedBB.getBoundingBox(x, y, z, (double) x + 1.0D, (double) y + 0.625D, (double) z + 1.0D);
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
+ {
+ par3List.add(new ItemStack(par1, 1, 0));
+ par3List.add(new ItemStack(par1, 1, 1));
+ //par3List.add(new ItemStack(par1, 1, 2));
+ }
+
+ public boolean canSustainLeaves (World world, int x, int y, int z)
+ {
+ return true;
+ }
+}
diff --git a/tconstruct/blocks/slime/SlimeGrass.java b/tconstruct/blocks/slime/SlimeGrass.java
new file mode 100644
index 00000000..f491b031
--- /dev/null
+++ b/tconstruct/blocks/slime/SlimeGrass.java
@@ -0,0 +1,127 @@
+package tconstruct.blocks.slime;
+
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.IPlantable;
+import tconstruct.common.TContent;
+import tconstruct.library.TConstructRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeGrass extends Block
+{
+ public String[] textureNames = { "slimegrass_green_top", "slimedirt_blue", "slimegrass_green_blue_side", "slimegrass_green_dirt_side" };//green, purple
+ public Icon[] icons;
+
+ public SlimeGrass(int id)
+ {
+ super(id, Material.grass);
+ setHardness(0.6f);
+ this.setTickRandomly(true);
+ this.setCreativeTab(TConstructRegistry.blockTab);
+ }
+
+ @Override
+ public int damageDropped (int meta)
+ {
+ return meta;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ 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("tinker:" + textureNames[i]);
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public Icon getIcon (int side, int meta)
+ {
+ if (side == 0)
+ {
+ return meta % 2 == 1 ? Block.dirt.getIcon(0, 0) : icons[1];
+ }
+ else if (side == 1)
+ {
+ return icons[0];
+ }
+ else
+ {
+ return icons[meta + 2];
+ }
+ }
+
+ @Override
+ public void getSubBlocks (int id, CreativeTabs tab, List list)
+ {
+ for (int iter = 0; iter < 1; iter++)
+ {
+ list.add(new ItemStack(id, 1, iter));
+ }
+ }
+
+ @Override
+ public boolean canSustainPlant (World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
+ {
+ EnumPlantType plantType = plant.getPlantType(world, x, y + 1, z);
+ return plantType == EnumPlantType.Plains && plant.getPlantID(world, x, y+1, z) != Block.tallGrass.blockID;
+ }
+
+ public void onPlantGrow(World world, int x, int y, int z, int sourceX, int sourceY, int sourceZ)
+ {
+ world.setBlock(x, y, z, TContent.craftedSoil.blockID, 5, 3);
+ }
+
+ public void updateTick (World par1World, int par2, int par3, int par4, Random par5Random)
+ {
+ if (!par1World.isRemote)
+ {
+ if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2)
+ {
+ par1World.setBlock(par2, par3, par4, TContent.craftedSoil.blockID, 5, 3);
+ }
+ else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
+ {
+ for (int l = 0; l < 4; ++l)
+ {
+ int posX = par2 + par5Random.nextInt(3) - 1;
+ int posY = par3 + par5Random.nextInt(5) - 3;
+ int posZ = par4 + par5Random.nextInt(3) - 1;
+ int l1 = par1World.getBlockId(posX, posY + 1, posZ);
+
+ if (par1World.getBlockLightValue(posX, posY + 1, posZ) >= 4 && par1World.getBlockLightOpacity(posX, posY + 1, posZ) <= 2)
+ {
+ int blockID = par1World.getBlockId(posX, posY, posZ);
+ if (blockID == Block.dirt.blockID)
+ {
+ par1World.setBlock(posX, posY, posZ, this.blockID, 1, 3);
+ return;
+ }
+ int blockMeta = par1World.getBlockMetadata(posX, posY, posZ);
+ if (blockID == TContent.craftedSoil.blockID)
+ {
+ if (blockMeta == 5)
+ par1World.setBlock(posX, posY, posZ, this.blockID, 0, 3);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tconstruct/blocks/slime/SlimeLeaves.java b/tconstruct/blocks/slime/SlimeLeaves.java
new file mode 100644
index 00000000..4ad70295
--- /dev/null
+++ b/tconstruct/blocks/slime/SlimeLeaves.java
@@ -0,0 +1,144 @@
+package tconstruct.blocks.slime;
+
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.BlockLeaves;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import tconstruct.common.TContent;
+import tconstruct.library.TConstructRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeLeaves extends BlockLeaves
+{
+ private static final String[] fastLeaves = new String[] { "slimeleaves_blue_fast" };
+ private static final String[] fancyLeaves = new String[] { "slimeleaves_blue_fancy" };
+ @SideOnly(Side.CLIENT)
+ private Icon[] fastIcons;
+ @SideOnly(Side.CLIENT)
+ private Icon[] fancyIcons;
+
+ public SlimeLeaves(int id)
+ {
+ super(id);
+ setCreativeTab(TConstructRegistry.blockTab);
+ setLightOpacity(1);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBlockColor ()
+ {
+ return 0xffffff;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getRenderColor (int par1)
+ {
+ return 0xffffff;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int colorMultiplier (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ return 0xffffff;
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void registerIcons (IconRegister iconRegister)
+ {
+ this.fastIcons = new Icon[fastLeaves.length];
+ this.fancyIcons = new Icon[fancyLeaves.length];
+
+ for (int i = 0; i < this.fastIcons.length; i++)
+ {
+ this.fastIcons[i] = iconRegister.registerIcon("tinker:" + fastLeaves[i] );
+ this.fancyIcons[i] = iconRegister.registerIcon("tinker:" + fancyLeaves[i]);
+ }
+ }
+
+ public Icon getIcon (int side, int meta)
+ {
+ int tex = meta % 4;
+
+ if (this.graphicsLevel)
+ return fancyIcons[tex];
+ else
+ return fastIcons[tex];
+ }
+
+ @Override
+ public void getSubBlocks (int id, CreativeTabs tab, List list)
+ {
+ for (int iter = 0; iter < fastIcons.length; iter++)
+ {
+ list.add(new ItemStack(id, 1, iter));
+ }
+ }
+
+ /* Drops */
+
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int par1, Random par2Random, int par3)
+ {
+ return TContent.slimeSapling.blockID;
+ }
+
+ /**
+ * Drops the block items with a specified chance of dropping the specified items
+ */
+ public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int fortune)
+ {
+ if (!world.isRemote)
+ {
+ int dropChance = 35;
+
+ /*if ((meta & 3) == 3)
+ {
+ j1 = 40;
+ }*/
+
+ if (fortune > 0)
+ {
+ dropChance -= 2 << fortune;
+
+ if (dropChance < 15)
+ {
+ dropChance = 15;
+ }
+ }
+
+ if (world.rand.nextInt(dropChance) == 0)
+ {
+ int k1 = this.idDropped(meta, world.rand, fortune);
+ this.dropBlockAsItem_do(world, x, y, z, new ItemStack(k1, 1, this.damageDropped(meta)));
+ }
+
+ dropChance = 80;
+
+ if (fortune > 0)
+ {
+ dropChance -= 10 << fortune;
+
+ if (dropChance < 20)
+ {
+ dropChance = 20;
+ }
+ }
+
+ if ((meta & 3) == 0 && world.rand.nextInt(dropChance) == 0)
+ {
+ this.dropBlockAsItem_do(world, x, y, z, new ItemStack(TContent.strangeFood, 1, 0));
+ }
+ }
+ }
+}
diff --git a/tconstruct/blocks/slime/SlimeSapling.java b/tconstruct/blocks/slime/SlimeSapling.java
new file mode 100644
index 00000000..8cb0b859
--- /dev/null
+++ b/tconstruct/blocks/slime/SlimeSapling.java
@@ -0,0 +1,127 @@
+package tconstruct.blocks.slime;
+
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockSapling;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+import tconstruct.common.TContent;
+import tconstruct.library.TConstructRegistry;
+import tconstruct.worldgen.SlimeTreeGen;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeSapling extends BlockSapling
+{
+ public Icon[] icons;
+ public String[] textureNames = new String[] { "blue" };
+
+ public SlimeSapling(int id)
+ {
+ super(id);
+ float f = 0.4F;
+ setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
+ this.setHardness(0.0F);
+ this.setStepSound(Block.soundGrassFootstep);
+ this.setCreativeTab(TConstructRegistry.blockTab);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ 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("tinker:slimesapling_" + textureNames[i]);
+ }
+ }
+
+ public boolean canThisPlantGrowOnThisBlockID (int id)
+ {
+ return id == Block.grass.blockID || id == Block.dirt.blockID || id == TContent.slimeGrass.blockID || id == TContent.craftedSoil.blockID;
+ }
+
+ public void updateTick (World world, int x, int y, int z, Random random)
+ {
+ if (world.isRemote)
+ {
+ return;
+ }
+ super.updateTick(world, x, y, z, random);
+ int md = world.getBlockMetadata(x, y, z);
+ if (random.nextInt(10) == 0 && world.getBlockLightValue(x, y + 1, z) >= 9)
+ {
+ if ((md & 8) == 0)
+ world.setBlockMetadataWithNotify(x, y, z, md | 8, 4);
+
+ else
+ growTree(world, x, y, z, random);
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public Icon getIcon (int side, int meta)
+ {
+ return icons[meta % 8];
+ }
+
+ @Override
+ public void markOrGrowMarked (World world, int x, int y, int z, Random random)
+ {
+ boneFertilize(world, x, y, z, random, null);
+ }
+
+ public boolean boneFertilize (World world, int x, int y, int z, Random random, EntityPlayer player)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+
+ if (meta % 8 == 0 && (player == null || !player.capabilities.isCreativeMode))
+ return false;
+
+ if ((meta & 8) == 0)
+ {
+ world.setBlockMetadataWithNotify(x, y, z, meta | 8, 4);
+ }
+ else
+ {
+ this.growTree(world, x, y, z, random);
+ }
+
+ return true;
+ }
+
+ public void growTree (World world, int x, int y, int z, Random random)
+ {
+ int md = world.getBlockMetadata(x, y, z) % 8;
+ world.setBlock(x, y, z, 0);
+ WorldGenerator obj = null;
+
+ obj = new SlimeTreeGen(true, 5, 4, 1, 0);
+
+ if (!(obj.generate(world, random, x, y, z)))
+ world.setBlock(x, y, z, blockID, md + 8, 3);
+ }
+
+ public int damageDropped (int i)
+ {
+ return i % 8;
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
+ {
+ for (int i = 0; i < 1; i++)
+ par3List.add(new ItemStack(par1, 1, i));
+ }
+}
diff --git a/tconstruct/blocks/slime/SlimeTallGrass.java b/tconstruct/blocks/slime/SlimeTallGrass.java
new file mode 100644
index 00000000..f76a7bb2
--- /dev/null
+++ b/tconstruct/blocks/slime/SlimeTallGrass.java
@@ -0,0 +1,131 @@
+package tconstruct.blocks.slime;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.block.BlockFlower;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.IShearable;
+import tconstruct.library.TConstructRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeTallGrass extends BlockFlower implements IShearable
+{
+ private static final String[] grassTypes = new String[] {"slimegrass_blue_tall"};
+ @SideOnly(Side.CLIENT)
+ private Icon[] iconArray;
+
+ public SlimeTallGrass(int par1)
+ {
+ super(par1, Material.vine);
+ float f = 0.4F;
+ this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
+ setCreativeTab(TConstructRegistry.blockTab);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int side, int meta)
+ {
+ /*if (meta >= this.iconArray.length)
+ {
+ meta = 0;
+ }*/
+
+ return this.iconArray[meta];
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int par1, Random par2Random, int par3)
+ {
+ return -1;
+ }
+
+ /**
+ * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).
+ */
+ public int quantityDroppedWithBonus(int par1, Random par2Random)
+ {
+ return 1 + par2Random.nextInt(par1 * 2 + 1);
+ }
+ /**
+ * Get the block's damage value (for use with pick block).
+ */
+ public int getDamageValue(World par1World, int par2, int par3, int par4)
+ {
+ return par1World.getBlockMetadata(par2, par3, par4);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
+ {
+ for (int j = 0; j < 1; ++j)
+ {
+ par3List.add(new ItemStack(par1, 1, j));
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister par1IconRegister)
+ {
+ this.iconArray = new Icon[grassTypes.length];
+
+ for (int i = 0; i < this.iconArray.length; ++i)
+ {
+ this.iconArray[i] = par1IconRegister.registerIcon("tinker:"+grassTypes[i]);
+ }
+ }
+
+ @Override
+ public ArrayList getBlockDropped(World world, int x, int y, int z, int meta, int fortune)
+ {
+ ArrayList ret = new ArrayList();
+ if (world.rand.nextInt(8) != 0)
+ {
+ return ret;
+ }
+
+ ItemStack item = ForgeHooks.getGrassSeed(world);
+ if (item != null)
+ {
+ ret.add(item);
+ }
+ return ret;
+ }
+
+ @Override
+ public boolean isShearable(ItemStack item, World world, int x, int y, int z)
+ {
+ return true;
+ }
+
+ @Override
+ public ArrayList onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
+ {
+ ArrayList ret = new ArrayList();
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z)));
+ return ret;
+ }
+}
diff --git a/tconstruct/client/StepSoundSlime.java b/tconstruct/client/StepSoundSlime.java
new file mode 100644
index 00000000..54d83c45
--- /dev/null
+++ b/tconstruct/client/StepSoundSlime.java
@@ -0,0 +1,30 @@
+package tconstruct.client;
+
+import net.minecraft.block.StepSound;
+
+public class StepSoundSlime extends StepSound
+{
+
+ public StepSoundSlime(String par1Str, float par2, float par3)
+ {
+ super(par1Str, par2, par3);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Used when a block breaks, EXA: Player break, Shep eating grass, etc..
+ */
+ public String getBreakSound()
+ {
+ return this.stepSoundName + ".big";
+ }
+
+ /**
+ * Used when a entity walks over, or otherwise interacts with the block.
+ */
+ public String getStepSound()
+ {
+ return this.stepSoundName + ".small";
+ }
+
+}
diff --git a/tconstruct/common/TContent.java b/tconstruct/common/TContent.java
index 38b6f0ea..28579640 100644
--- a/tconstruct/common/TContent.java
+++ b/tconstruct/common/TContent.java
@@ -8,6 +8,7 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDispenser;
+import net.minecraft.block.StepSound;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialLiquid;
@@ -15,10 +16,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
-import net.minecraft.item.crafting.RecipesTools;
-import net.minecraft.item.crafting.RecipesWeapons;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
@@ -40,6 +38,7 @@ import tconstruct.blocks.Aggregator;
import tconstruct.blocks.CraftingStationBlock;
import tconstruct.blocks.DryingRack;
import tconstruct.blocks.EquipBlock;
+import tconstruct.blocks.EssenceExtractor;
import tconstruct.blocks.GlassBlockConnected;
import tconstruct.blocks.GlassBlockConnectedMeta;
import tconstruct.blocks.GlassPane;
@@ -69,6 +68,7 @@ import tconstruct.blocks.logic.CastingTableLogic;
import tconstruct.blocks.logic.CraftingStationLogic;
import tconstruct.blocks.logic.DrawbridgeLogic;
import tconstruct.blocks.logic.DryingRackLogic;
+import tconstruct.blocks.logic.EssenceExtractorLogic;
import tconstruct.blocks.logic.FaucetLogic;
import tconstruct.blocks.logic.FirestarterLogic;
import tconstruct.blocks.logic.FrypanLogic;
@@ -82,8 +82,15 @@ import tconstruct.blocks.logic.SmelteryLogic;
import tconstruct.blocks.logic.StencilTableLogic;
import tconstruct.blocks.logic.ToolForgeLogic;
import tconstruct.blocks.logic.ToolStationLogic;
+import tconstruct.blocks.slime.SlimeFluid;
+import tconstruct.blocks.slime.SlimeGel;
+import tconstruct.blocks.slime.SlimeGrass;
+import tconstruct.blocks.slime.SlimeLeaves;
+import tconstruct.blocks.slime.SlimeSapling;
+import tconstruct.blocks.slime.SlimeTallGrass;
import tconstruct.blocks.traps.BarricadeBlock;
import tconstruct.blocks.traps.Punji;
+import tconstruct.client.StepSoundSlime;
import tconstruct.entity.Automaton;
import tconstruct.entity.BlueSlime;
import tconstruct.entity.Crystal;
@@ -96,6 +103,7 @@ import tconstruct.entity.projectile.LaunchedPotion;
import tconstruct.items.Bowstring;
import tconstruct.items.CraftingItem;
import tconstruct.items.DiamondApple;
+import tconstruct.items.EssenceCrystal;
import tconstruct.items.FilledBucket;
import tconstruct.items.Fletching;
import tconstruct.items.GoldenHead;
@@ -129,6 +137,11 @@ import tconstruct.items.blocks.OreberryBushSecondItem;
import tconstruct.items.blocks.RedstoneMachineItem;
import tconstruct.items.blocks.SearedSlabItem;
import tconstruct.items.blocks.SearedTableItemBlock;
+import tconstruct.items.blocks.SlimeGelItemBlock;
+import tconstruct.items.blocks.SlimeGrassItemBlock;
+import tconstruct.items.blocks.SlimeLeavesItemBlock;
+import tconstruct.items.blocks.SlimeSaplingItemBlock;
+import tconstruct.items.blocks.SlimeTallGrassItem;
import tconstruct.items.blocks.SmelteryItemBlock;
import tconstruct.items.blocks.SpeedBlockItem;
import tconstruct.items.blocks.SpeedSlabItem;
@@ -319,6 +332,8 @@ public class TContent implements IFuelHandler
//Crystalline
public static Block aggregator;
public static Block lightCrystalBase;
+ public static Block essenceExtractor;
+ public static Item essenceCrystal;
//Liquids
public static Material liquidMetal;
@@ -346,6 +361,8 @@ public class TContent implements IFuelHandler
public static Fluid moltenShinyFluid;
public static Fluid moltenInvarFluid;
public static Fluid moltenElectrumFluid;
+ public static Fluid moltenEnderFluid;
+ public static Fluid blueSlimeFluid;
public static Block moltenIron;
public static Block moltenGold;
@@ -370,6 +387,16 @@ public class TContent implements IFuelHandler
public static Block moltenShiny;
public static Block moltenInvar;
public static Block moltenElectrum;
+ public static Block moltenEnder;
+
+ //Slime
+ public static StepSound slimeStep;
+ public static Block slimePool;
+ public static Block slimeGel;
+ public static Block slimeGrass;
+ public static Block slimeTallGrass;
+ public static SlimeLeaves slimeLeaves;
+ public static SlimeSapling slimeSapling;
//Ores
public static Block oreSlag;
@@ -448,7 +475,7 @@ public class TContent implements IFuelHandler
BiomeGenBase[] nether = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.NETHER);
- if (PHConstruct.blueSlime)
+ /*if (PHConstruct.blueSlime)
{
EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, plains);
EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, mountain);
@@ -470,11 +497,11 @@ public class TContent implements IFuelHandler
catch (Exception e)
{
- }
+ }*/
}
- public static Fluid[] fluids = new Fluid[23];
- public static Block[] fluidBlocks = new Block[23];
+ public static Fluid[] fluids = new Fluid[25];
+ public static Block[] fluidBlocks = new Block[25];
void registerBlocks ()
{
@@ -537,6 +564,10 @@ public class TContent implements IFuelHandler
GameRegistry.registerBlock(redstoneMachine, RedstoneMachineItem.class, "Redstone.Machine");
GameRegistry.registerTileEntity(DrawbridgeLogic.class, "Drawbridge");
GameRegistry.registerTileEntity(FirestarterLogic.class, "Firestarter");
+
+ essenceExtractor = new EssenceExtractor(PHConstruct.essenceExtractor).setHardness(12f).setUnlocalizedName("extractor.essence");
+ GameRegistry.registerBlock(essenceExtractor, "extractor.essence");
+ GameRegistry.registerTileEntity(EssenceExtractorLogic.class, "extractor.essence");
//Traps
landmine = new BlockLandmine(PHConstruct.landmine).setHardness(0.5F).setResistance(0F).setStepSound(Block.soundMetalFootstep).setCreativeTab(CreativeTabs.tabRedstone)
@@ -567,211 +598,247 @@ public class TContent implements IFuelHandler
liquidMetal = new MaterialLiquid(MapColor.tntColor);
moltenIronFluid = new Fluid("Molten Iron");
+ FluidRegistry.registerFluid(moltenIronFluid);
moltenIron = new LiquidMetalFinite(PHConstruct.moltenIron, moltenIronFluid, "liquid_iron").setUnlocalizedName("metal.molten.iron");
GameRegistry.registerBlock(moltenIron, "metal.molten.iron");
moltenIronFluid.setBlockID(moltenIron).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[0] = moltenIronFluid;
fluidBlocks[0] = moltenIron;
- FluidRegistry.registerFluid(moltenIronFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenIronFluid, 1), new ItemStack(buckets, 1, 0), new ItemStack(Item.bucketEmpty)));
moltenGoldFluid = new Fluid("Molten Gold");
+ FluidRegistry.registerFluid(moltenGoldFluid);
moltenGold = new LiquidMetalFinite(PHConstruct.moltenGold, moltenGoldFluid, "liquid_gold").setUnlocalizedName("metal.molten.gold");
GameRegistry.registerBlock(moltenGold, "metal.molten.gold");
moltenGoldFluid.setBlockID(moltenGold).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[1] = moltenGoldFluid;
fluidBlocks[1] = moltenGold;
- FluidRegistry.registerFluid(moltenGoldFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenGoldFluid, 1), new ItemStack(buckets, 1, 1), new ItemStack(Item.bucketEmpty)));
moltenCopperFluid = new Fluid("Molten Copper");
+ FluidRegistry.registerFluid(moltenCopperFluid);
moltenCopper = new LiquidMetalFinite(PHConstruct.moltenCopper, moltenCopperFluid, "liquid_copper").setUnlocalizedName("metal.molten.copper");
GameRegistry.registerBlock(moltenCopper, "metal.molten.copper");
moltenCopperFluid.setBlockID(moltenCopper).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[2] = moltenCopperFluid;
fluidBlocks[2] = moltenCopper;
- FluidRegistry.registerFluid(moltenCopperFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenCopperFluid, 1), new ItemStack(buckets, 1, 2), new ItemStack(Item.bucketEmpty)));
moltenTinFluid = new Fluid("Molten Tin");
+ FluidRegistry.registerFluid(moltenTinFluid);
moltenTin = new LiquidMetalFinite(PHConstruct.moltenTin, moltenTinFluid, "liquid_tin").setUnlocalizedName("metal.molten.tin");
GameRegistry.registerBlock(moltenTin, "metal.molten.tin");
moltenTinFluid.setBlockID(moltenTin).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[3] = moltenTinFluid;
fluidBlocks[3] = moltenTin;
- FluidRegistry.registerFluid(moltenTinFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenTinFluid, 1), new ItemStack(buckets, 1, 3), new ItemStack(Item.bucketEmpty)));
moltenAluminumFluid = new Fluid("Molten Aluminum");
+ FluidRegistry.registerFluid(moltenAluminumFluid);
moltenAluminum = new LiquidMetalFinite(PHConstruct.moltenAluminum, moltenAluminumFluid, "liquid_aluminum").setUnlocalizedName("metal.molten.aluminum");
GameRegistry.registerBlock(moltenAluminum, "metal.molten.aluminum");
moltenAluminumFluid.setBlockID(moltenAluminum).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[4] = moltenAluminumFluid;
fluidBlocks[4] = moltenAluminum;
- FluidRegistry.registerFluid(moltenAluminumFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenAluminumFluid, 1), new ItemStack(buckets, 1, 4), new ItemStack(Item.bucketEmpty)));
moltenCobaltFluid = new Fluid("Molten Cobalt");
+ FluidRegistry.registerFluid(moltenCobaltFluid);
moltenCobalt = new LiquidMetalFinite(PHConstruct.moltenCobalt, moltenCobaltFluid, "liquid_cobalt").setUnlocalizedName("metal.molten.cobalt");
GameRegistry.registerBlock(moltenCobalt, "metal.molten.cobalt");
moltenCobaltFluid.setBlockID(moltenCobalt).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[5] = moltenCobaltFluid;
fluidBlocks[5] = moltenCobalt;
- FluidRegistry.registerFluid(moltenCobaltFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenCobaltFluid, 1), new ItemStack(buckets, 1, 5), new ItemStack(Item.bucketEmpty)));
moltenArditeFluid = new Fluid("Molten Ardite");
+ FluidRegistry.registerFluid(moltenArditeFluid);
moltenArdite = new LiquidMetalFinite(PHConstruct.moltenArdite, moltenArditeFluid, "liquid_ardite").setUnlocalizedName("metal.molten.ardite");
GameRegistry.registerBlock(moltenArdite, "metal.molten.ardite");
moltenArditeFluid.setBlockID(moltenArdite).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[6] = moltenArditeFluid;
fluidBlocks[6] = moltenArdite;
- FluidRegistry.registerFluid(moltenArditeFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenArditeFluid, 1), new ItemStack(buckets, 1, 6), new ItemStack(Item.bucketEmpty)));
moltenBronzeFluid = new Fluid("Molten Bronze");
+ FluidRegistry.registerFluid(moltenBronzeFluid);
moltenBronze = new LiquidMetalFinite(PHConstruct.moltenBronze, moltenBronzeFluid, "liquid_bronze").setUnlocalizedName("metal.molten.bronze");
GameRegistry.registerBlock(moltenBronze, "metal.molten.bronze");
moltenBronzeFluid.setBlockID(moltenBronze).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[7] = moltenBronzeFluid;
fluidBlocks[7] = moltenBronze;
- FluidRegistry.registerFluid(moltenBronzeFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenBronzeFluid, 1), new ItemStack(buckets, 1, 7), new ItemStack(Item.bucketEmpty)));
moltenAlubrassFluid = new Fluid("Molten Aluminum Brass");
+ FluidRegistry.registerFluid(moltenAlubrassFluid);
moltenAlubrass = new LiquidMetalFinite(PHConstruct.moltenAlubrass, moltenAlubrassFluid, "liquid_alubrass").setUnlocalizedName("metal.molten.alubrass");
GameRegistry.registerBlock(moltenAlubrass, "metal.molten.alubrass");
moltenAlubrassFluid.setBlockID(moltenAlubrass).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[8] = moltenAlubrassFluid;
fluidBlocks[8] = moltenAlubrass;
- FluidRegistry.registerFluid(moltenAlubrassFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenAlubrassFluid, 1), new ItemStack(buckets, 1, 8), new ItemStack(Item.bucketEmpty)));
moltenManyullynFluid = new Fluid("Molten Manyullyn");
+ FluidRegistry.registerFluid(moltenManyullynFluid);
moltenManyullyn = new LiquidMetalFinite(PHConstruct.moltenManyullyn, moltenManyullynFluid, "liquid_manyullyn").setUnlocalizedName("metal.molten.manyullyn");
GameRegistry.registerBlock(moltenManyullyn, "metal.molten.manyullyn");
moltenManyullynFluid.setBlockID(moltenManyullyn).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[9] = moltenManyullynFluid;
fluidBlocks[9] = moltenManyullyn;
- FluidRegistry.registerFluid(moltenManyullynFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenManyullynFluid, 1), new ItemStack(buckets, 1, 9), new ItemStack(Item.bucketEmpty)));
moltenAlumiteFluid = new Fluid("Molten Alumite");
+ FluidRegistry.registerFluid(moltenAlumiteFluid);
moltenAlumite = new LiquidMetalFinite(PHConstruct.moltenAlumite, moltenAlumiteFluid, "liquid_alumite").setUnlocalizedName("metal.molten.alumite");
GameRegistry.registerBlock(moltenAlumite, "metal.molten.alumite");
moltenAlumiteFluid.setBlockID(moltenAlumite).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[10] = moltenAlumiteFluid;
fluidBlocks[10] = moltenAlumite;
- FluidRegistry.registerFluid(moltenAlumiteFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenAlumiteFluid, 1), new ItemStack(buckets, 1, 10), new ItemStack(Item.bucketEmpty)));
moltenObsidianFluid = new Fluid("Molten Obsidian");
+ FluidRegistry.registerFluid(moltenObsidianFluid);
moltenObsidian = new LiquidMetalFinite(PHConstruct.moltenObsidian, moltenObsidianFluid, "liquid_obsidian").setUnlocalizedName("metal.molten.obsidian");
GameRegistry.registerBlock(moltenObsidian, "metal.molten.obsidian");
moltenObsidianFluid.setBlockID(moltenObsidian).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[11] = moltenObsidianFluid;
fluidBlocks[11] = moltenObsidian;
- FluidRegistry.registerFluid(moltenObsidianFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenObsidianFluid, 1), new ItemStack(buckets, 1, 11), new ItemStack(Item.bucketEmpty)));
moltenSteelFluid = new Fluid("Molten Steel");
+ FluidRegistry.registerFluid(moltenSteelFluid);
moltenSteel = new LiquidMetalFinite(PHConstruct.moltenSteel, moltenSteelFluid, "liquid_steel").setUnlocalizedName("metal.molten.steel");
GameRegistry.registerBlock(moltenSteel, "metal.molten.steel");
moltenSteelFluid.setBlockID(moltenSteel).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[12] = moltenSteelFluid;
fluidBlocks[12] = moltenSteel;
- FluidRegistry.registerFluid(moltenSteelFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenSteelFluid, 1), new ItemStack(buckets, 1, 12), new ItemStack(Item.bucketEmpty)));
moltenGlassFluid = new Fluid("Molten Glass");
+ FluidRegistry.registerFluid(moltenGlassFluid);
moltenGlass = new LiquidMetalFinite(PHConstruct.moltenGlass, moltenGlassFluid, "liquid_glass").setUnlocalizedName("metal.molten.glass");
GameRegistry.registerBlock(moltenGlass, "metal.molten.glass");
moltenGlassFluid.setBlockID(moltenGlass).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[13] = moltenGlassFluid;
fluidBlocks[13] = moltenGlass;
- FluidRegistry.registerFluid(moltenGlassFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenGlassFluid, 1), new ItemStack(buckets, 1, 13), new ItemStack(Item.bucketEmpty)));
moltenStoneFluid = new Fluid("Seared Stone");
+ FluidRegistry.registerFluid(moltenStoneFluid);
moltenStone = new LiquidMetalFinite(PHConstruct.moltenStone, moltenStoneFluid, "liquid_stone").setUnlocalizedName("molten.stone");
GameRegistry.registerBlock(moltenStone, "molten.stone");
moltenStoneFluid.setBlockID(moltenStone).setLuminosity(12).setDensity(3000).setViscosity(6000);
fluids[14] = moltenStoneFluid;
fluidBlocks[14] = moltenStone;
- FluidRegistry.registerFluid(moltenStoneFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenStoneFluid, 1), new ItemStack(buckets, 1, 14), new ItemStack(Item.bucketEmpty)));
moltenEmeraldFluid = new Fluid("Liquified Emerald");
+ FluidRegistry.registerFluid(moltenEmeraldFluid);
moltenEmerald = new LiquidMetalFinite(PHConstruct.moltenEmerald, moltenEmeraldFluid, "liquid_villager").setUnlocalizedName("molten.emerald");
GameRegistry.registerBlock(moltenEmerald, "molten.emerald");
moltenEmeraldFluid.setBlockID(moltenEmerald).setDensity(3000).setViscosity(6000);
fluids[15] = moltenEmeraldFluid;
fluidBlocks[15] = moltenEmerald;
- FluidRegistry.registerFluid(moltenEmeraldFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenEmeraldFluid, 1), new ItemStack(buckets, 1, 15), new ItemStack(Item.bucketEmpty)));
bloodFluid = new Fluid("Blood");
+ FluidRegistry.registerFluid(bloodFluid);
blood = new LiquidMetalFinite(PHConstruct.blood, bloodFluid, "liquid_cow").setUnlocalizedName("liquid.blood");
GameRegistry.registerBlock(blood, "liquid.blood");
bloodFluid.setBlockID(blood).setDensity(3000).setViscosity(6000);
fluids[16] = bloodFluid;
fluidBlocks[16] = blood;
- FluidRegistry.registerFluid(bloodFluid);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(bloodFluid, 1), new ItemStack(buckets, 1, 16), new ItemStack(Item.bucketEmpty)));
- moltenNickelFluid = new Fluid("Molten Nickel");
+ moltenNickelFluid = new Fluid("nickel.molten");
+ FluidRegistry.registerFluid(moltenNickelFluid);
moltenNickel = new LiquidMetalFinite(PHConstruct.moltenNickel, moltenNickelFluid, "liquid_ferrous").setUnlocalizedName("metal.molten.nickel");
GameRegistry.registerBlock(moltenNickel, "metal.molten.nickel");
moltenNickelFluid.setBlockID(moltenNickel).setDensity(3000).setViscosity(6000);
fluids[17] = moltenNickelFluid;
fluidBlocks[17] = moltenNickel;
- FluidRegistry.registerFluid(moltenNickelFluid);
- //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenNickelFluid, 1), new ItemStack(buckets, 1, 17), new ItemStack(Item.bucketEmpty)));
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenNickelFluid, 1), new ItemStack(buckets, 1, 17), new ItemStack(Item.bucketEmpty)));
- moltenLeadFluid = new Fluid("Molten Lead");
+ moltenLeadFluid = new Fluid("lead.molten");
+ FluidRegistry.registerFluid(moltenLeadFluid);
moltenLead = new LiquidMetalFinite(PHConstruct.moltenLead, moltenLeadFluid, "liquid_lead").setUnlocalizedName("metal.molten.lead");
GameRegistry.registerBlock(moltenLead, "metal.molten.lead");
moltenLeadFluid.setBlockID(moltenLead).setDensity(3000).setViscosity(6000);
fluids[18] = moltenLeadFluid;
fluidBlocks[18] = moltenLead;
- FluidRegistry.registerFluid(moltenLeadFluid);
- //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenLeadFluid, 1), new ItemStack(buckets, 1, 18), new ItemStack(Item.bucketEmpty)));
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenLeadFluid, 1), new ItemStack(buckets, 1, 18), new ItemStack(Item.bucketEmpty)));
- moltenSilverFluid = new Fluid("Molten Silver");
+ moltenSilverFluid = new Fluid("silver.molten");
+ FluidRegistry.registerFluid(moltenSilverFluid);
moltenSilver = new LiquidMetalFinite(PHConstruct.moltenSilver, moltenSilverFluid, "liquid_silver").setUnlocalizedName("metal.molten.silver");
GameRegistry.registerBlock(moltenSilver, "metal.molten.silver");
moltenSilverFluid.setBlockID(moltenSilver).setDensity(3000).setViscosity(6000);
fluids[19] = moltenSilverFluid;
fluidBlocks[19] = moltenSilver;
- FluidRegistry.registerFluid(moltenSilverFluid);
- //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenSilverFluid, 1), new ItemStack(buckets, 1, 19), new ItemStack(Item.bucketEmpty)));
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenSilverFluid, 1), new ItemStack(buckets, 1, 19), new ItemStack(Item.bucketEmpty)));
- moltenShinyFluid = new Fluid("Molten Platinum");
+ moltenShinyFluid = new Fluid("platinum.molten");
+ FluidRegistry.registerFluid(moltenShinyFluid);
moltenShiny = new LiquidMetalFinite(PHConstruct.moltenShiny, moltenShinyFluid, "liquid_shiny").setUnlocalizedName("metal.molten.shiny");
GameRegistry.registerBlock(moltenShiny, "metal.molten.shiny");
moltenShinyFluid.setBlockID(moltenShiny).setDensity(3000).setViscosity(6000);
fluids[20] = moltenLeadFluid;
fluidBlocks[20] = moltenShiny;
- FluidRegistry.registerFluid(moltenShinyFluid);
- //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenShinyFluid, 1), new ItemStack(buckets, 1, 20), new ItemStack(Item.bucketEmpty)));
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenShinyFluid, 1), new ItemStack(buckets, 1, 20), new ItemStack(Item.bucketEmpty)));
- moltenInvarFluid = new Fluid("Molten Invar");
+ moltenInvarFluid = new Fluid("invar.molten");
+ FluidRegistry.registerFluid(moltenInvarFluid);
moltenInvar = new LiquidMetalFinite(PHConstruct.moltenInvar, moltenInvarFluid, "liquid_invar").setUnlocalizedName("metal.molten.invar");
GameRegistry.registerBlock(moltenInvar, "metal.molten.invar");
moltenInvarFluid.setBlockID(moltenInvar).setDensity(3000).setViscosity(6000);
fluids[21] = moltenInvarFluid;
fluidBlocks[21] = moltenInvar;
- FluidRegistry.registerFluid(moltenInvarFluid);
- //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenInvarFluid, 1), new ItemStack(buckets, 1, 21), new ItemStack(Item.bucketEmpty)));
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenInvarFluid, 1), new ItemStack(buckets, 1, 21), new ItemStack(Item.bucketEmpty)));
- moltenElectrumFluid = new Fluid("Molten Electrum");
+ moltenElectrumFluid = new Fluid("electrum.molten");
+ FluidRegistry.registerFluid(moltenElectrumFluid);
moltenElectrum = new LiquidMetalFinite(PHConstruct.moltenElectrum, moltenElectrumFluid, "liquid_electrum").setUnlocalizedName("metal.molten.electrum");
GameRegistry.registerBlock(moltenElectrum, "metal.molten.electrum");
moltenElectrumFluid.setBlockID(moltenElectrum).setDensity(3000).setViscosity(6000);
fluids[22] = moltenElectrumFluid;
fluidBlocks[22] = moltenElectrum;
- FluidRegistry.registerFluid(moltenElectrumFluid);
- //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenElectrumFluid, 1), new ItemStack(buckets, 1, 22), new ItemStack(Item.bucketEmpty)));
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenElectrumFluid, 1), new ItemStack(buckets, 1, 22), new ItemStack(Item.bucketEmpty)));
+
+ moltenEnderFluid = new Fluid("ender");
+ FluidRegistry.registerFluid(moltenEnderFluid);
+ moltenEnder = new LiquidMetalFinite(PHConstruct.moltenEnder, moltenEnderFluid, "liquid_ender").setUnlocalizedName("liquid.ender");
+ GameRegistry.registerBlock(moltenEnder, "liquid.ender");
+ moltenEnderFluid.setBlockID(moltenEnder).setDensity(3000).setViscosity(6000);
+ fluids[23] = moltenEnderFluid;
+ fluidBlocks[23] = moltenEnder;
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(moltenEnderFluid, 1), new ItemStack(buckets, 1, 23), new ItemStack(Item.bucketEmpty)));
+
+ //Slime
+ slimeStep = new StepSoundSlime("mob.slime", 1.0f, 1.0f);
+
+ blueSlimeFluid = new Fluid("slime.blue");
+ FluidRegistry.registerFluid(blueSlimeFluid);
+ slimePool = new SlimeFluid(PHConstruct.slimePoolBlue, blueSlimeFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(slimeStep).setUnlocalizedName("liquid.slime");
+ GameRegistry.registerBlock(slimePool, "liquid.slime");
+ blueSlimeFluid.setBlockID(slimePool);
+ fluids[24] = blueSlimeFluid;
+ fluidBlocks[24] = slimePool;
+ //FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(blueSlimeFluid, 1), new ItemStack(buckets, 1, 24), new ItemStack(Item.bucketEmpty)));
+
+ slimeGel = new SlimeGel(PHConstruct.slimeGel).setStepSound(slimeStep).setUnlocalizedName("slime.gel");
+ GameRegistry.registerBlock(slimeGel, SlimeGelItemBlock.class, "slime.gel");
+
+ slimeGrass = new SlimeGrass(PHConstruct.slimeGrass).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("slime.grass");
+ GameRegistry.registerBlock(slimeGrass, SlimeGrassItemBlock.class, "slime.grass");
+
+ slimeTallGrass = new SlimeTallGrass(PHConstruct.slimeTallGrass).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("slime.grass.tall");
+ GameRegistry.registerBlock(slimeTallGrass, SlimeTallGrassItem.class, "slime.grass.tall");
+
+ slimeLeaves = (SlimeLeaves) new SlimeLeaves(PHConstruct.slimeLeaves).setStepSound(slimeStep).setUnlocalizedName("slime.leaves");
+ GameRegistry.registerBlock(slimeLeaves, SlimeLeavesItemBlock.class, "slime.leaves");
+
+ slimeSapling = (SlimeSapling) new SlimeSapling(PHConstruct.slimeSapling).setStepSound(slimeStep).setUnlocalizedName("slime.sapling");
+ GameRegistry.registerBlock(slimeSapling, SlimeSaplingItemBlock.class, "slime.sapling");
//Decoration
stoneTorch = new StoneTorch(PHConstruct.stoneTorch).setUnlocalizedName("decoration.stonetorch");
@@ -955,6 +1022,8 @@ public class TContent implements IFuelHandler
glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove");
knapsack = new Knapsack(PHConstruct.knapsack).setUnlocalizedName("tconstruct.storage");
goldHead = new GoldenHead(PHConstruct.goldHead, 4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
+
+ essenceCrystal = new EssenceCrystal(PHConstruct.essenceCrystal).setUnlocalizedName("tconstruct.crystal.essence");
String[] materialStrings = { "paperStack", "greenSlimeCrystal", "searedBrick", "ingotCobalt", "ingotArdite", "ingotManyullyn", "mossBall", "lavaCrystal", "necroticBone", "ingotCopper",
"ingotTin", "ingotAluminum", "rawAluminum", "ingotBronze", "ingotAluminumBrass", "ingotAlumite", "ingotSteel", "blueSlimeCrystal", "ingotObsidian", "nuggetIron", "nuggetCopper",
@@ -1332,6 +1401,8 @@ public class TContent implements IFuelHandler
basinCasting.addCastingRecipe(new ItemStack(smeltery, 1, 4), new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); //seared stone
basinCasting.addCastingRecipe(new ItemStack(speedBlock, 1, 0), new FluidStack(moltenTinFluid, TConstruct.ingotLiquidValue / 9), new ItemStack(Block.gravel), true, 100); //brownstone
+ basinCasting.addCastingRecipe(new ItemStack(Block.whiteStone), new FluidStack(moltenEnderFluid, 25), new ItemStack(Block.obsidian), true, 100); //endstone
+ basinCasting.addCastingRecipe(new ItemStack(metalBlock.blockID, 1, 10), new FluidStack(moltenEnderFluid, 1000), null, true, 100); //ender
//Ore
Smeltery.addMelting(Block.oreIron, 0, 600, new FluidStack(moltenIronFluid, TConstruct.ingotLiquidValue * 2));
@@ -1348,6 +1419,8 @@ public class TContent implements IFuelHandler
Smeltery.addMelting(new ItemStack(blankPattern, 4, 1), metalBlock.blockID, 7, 150, new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue));
Smeltery.addMelting(new ItemStack(blankPattern, 4, 2), metalBlock.blockID, 7, 150, new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 2));
+
+ Smeltery.addMelting(new ItemStack(Item.enderPearl, 4), metalBlock.blockID, 10, 500, new FluidStack(moltenEnderFluid, 250));
//Blocks
Smeltery.addMelting(Block.blockIron, 0, 600, new FluidStack(moltenIronFluid, TConstruct.ingotLiquidValue * 9));
diff --git a/tconstruct/items/EssenceCrystal.java b/tconstruct/items/EssenceCrystal.java
new file mode 100644
index 00000000..c34ae4fd
--- /dev/null
+++ b/tconstruct/items/EssenceCrystal.java
@@ -0,0 +1,102 @@
+package tconstruct.items;
+
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityXPOrb;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumAction;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import tconstruct.blocks.logic.EssenceExtractorLogic;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class EssenceCrystal extends Item
+{
+ public EssenceCrystal(int id)
+ {
+ super(id);
+ this.setCreativeTab(CreativeTabs.tabMisc);
+ }
+
+ @Override
+ public int getMaxItemUseDuration (ItemStack par1ItemStack)
+ {
+ return 32;
+ }
+
+ @Override
+ public EnumAction getItemUseAction (ItemStack par1ItemStack)
+ {
+ return EnumAction.eat;
+ }
+
+ @Override
+ public ItemStack onItemRightClick (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
+ {
+ par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
+ return par1ItemStack;
+ }
+
+ @Override
+ public ItemStack onEaten (ItemStack stack, World world, EntityPlayer player)
+ {
+ if (stack.hasTagCompound())
+ {
+ EntityXPOrb entity = new EntityXPOrb(world, player.posX, player.posY + 1, player.posZ, stack.getTagCompound().getInteger("Essence"));
+ spawnEntity(player.posX, player.posY + 1, player.posZ, entity, world, player);
+ if (!player.capabilities.isCreativeMode)
+ stack.stackSize--;
+ }
+ return stack;
+ }
+
+ public static void spawnEntity (double x, double y, double z, Entity entity, World world, EntityPlayer player)
+ {
+ if (!world.isRemote)
+ {
+ world.spawnEntityInWorld(entity);
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons (IconRegister iconRegister)
+ {
+ this.itemIcon = iconRegister.registerIcon("tinker:materials/material_essencecrystal");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
+ {
+ if (stack.hasTagCompound())
+ {
+ int amount = stack.getTagCompound().getInteger("Essence");
+ list.add("Stored Levels: " + EssenceExtractorLogic.getEssencelevels(amount));
+ }
+ else
+ {
+ list.add("Stored Levels: 0");
+ }
+ }
+
+ @Override
+ public void getSubItems (int id, CreativeTabs tab, List list)
+ {
+ int[] amount = new int[] { 17, 85, 170, 255, 385, 590, 825 };
+ for (int i = 0; i < amount.length; i++)
+ {
+ ItemStack crystal = new ItemStack(id, 1, 0);
+ NBTTagCompound tags = new NBTTagCompound();
+ tags.setInteger("Essence", amount[i]);
+ crystal.setTagCompound(tags);
+ list.add(crystal);
+ }
+ }
+}
diff --git a/tconstruct/items/FilledBucket.java b/tconstruct/items/FilledBucket.java
index 66f971db..5454790b 100644
--- a/tconstruct/items/FilledBucket.java
+++ b/tconstruct/items/FilledBucket.java
@@ -177,8 +177,8 @@ public class FilledBucket extends ItemBucket
}
public static final String[] materialNames = new String[] { "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "AluBrass", "Manyullyn", "Alumite", "Obsidian", "Steel",
- "Glass", "Stone", "Villager", "Cow" };
+ "Glass", "Stone", "Villager", "Cow", "Nickel", "Lead", "Silver", "Shiny", "Invar", "Electrum", "Ender" };
public static final String[] textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel",
- "glass", "stone", "emerald", "blood" };
+ "glass", "stone", "emerald", "blood", "nickel", "lead", "silver", "shiny", "invar", "electrum", "ender" };
}
diff --git a/tconstruct/items/blocks/CraftedSoilItemBlock.java b/tconstruct/items/blocks/CraftedSoilItemBlock.java
index eec72a9d..72bc83b0 100644
--- a/tconstruct/items/blocks/CraftedSoilItemBlock.java
+++ b/tconstruct/items/blocks/CraftedSoilItemBlock.java
@@ -2,16 +2,16 @@ package tconstruct.items.blocks;
import java.util.List;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
public class CraftedSoilItemBlock extends ItemBlock
{
- public static final String blockType[] = { "Slime", "Grout", "BlueSlime", "GraveyardSoil", "ConsecratedSoil" };
+ public static final String blockType[] = { "Slime", "Grout", "BlueSlime", "GraveyardSoil", "ConsecratedSoil", "blue", "dirt" };
public CraftedSoilItemBlock(int id)
{
@@ -28,7 +28,9 @@ public class CraftedSoilItemBlock extends ItemBlock
public String getUnlocalizedName (ItemStack itemstack)
{
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
- return (new StringBuilder()).append("CraftedSoil.").append(blockType[pos]).toString();
+ if (pos <= 4)
+ return (new StringBuilder()).append("CraftedSoil.").append(blockType[pos]).toString();
+ return (new StringBuilder()).append("block.slime.soil.").append(blockType[pos]).toString();
}
@Override
diff --git a/tconstruct/items/blocks/SlimeGelItemBlock.java b/tconstruct/items/blocks/SlimeGelItemBlock.java
new file mode 100644
index 00000000..9434b93f
--- /dev/null
+++ b/tconstruct/items/blocks/SlimeGelItemBlock.java
@@ -0,0 +1,33 @@
+package tconstruct.items.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class SlimeGelItemBlock extends ItemBlock
+{
+ public static final String blockType[] = { "blue", "green", "purple", "magma", "yellow", "red", "metal" };
+
+ public SlimeGelItemBlock(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata (int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName (ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
+ return (new StringBuilder()).append("block.slime.congealed.").append(blockType[pos]).toString();
+ }
+}
diff --git a/tconstruct/items/blocks/SlimeGrassItemBlock.java b/tconstruct/items/blocks/SlimeGrassItemBlock.java
new file mode 100644
index 00000000..79285889
--- /dev/null
+++ b/tconstruct/items/blocks/SlimeGrassItemBlock.java
@@ -0,0 +1,33 @@
+package tconstruct.items.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class SlimeGrassItemBlock extends ItemBlock
+{
+ public static final String blockType[] = { "blue", "dirt" };
+
+ public SlimeGrassItemBlock(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata (int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName (ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
+ return (new StringBuilder()).append("block.slime.grass.").append(blockType[pos]).toString();
+ }
+}
diff --git a/tconstruct/items/blocks/SlimeLeavesItemBlock.java b/tconstruct/items/blocks/SlimeLeavesItemBlock.java
new file mode 100644
index 00000000..296124c0
--- /dev/null
+++ b/tconstruct/items/blocks/SlimeLeavesItemBlock.java
@@ -0,0 +1,33 @@
+package tconstruct.items.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class SlimeLeavesItemBlock extends ItemBlock
+{
+ public static final String blockType[] = { "blue" };
+
+ public SlimeLeavesItemBlock(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata (int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName (ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
+ return (new StringBuilder()).append("block.slime.leaves.").append(blockType[pos]).toString();
+ }
+}
diff --git a/tconstruct/items/blocks/SlimeSaplingItemBlock.java b/tconstruct/items/blocks/SlimeSaplingItemBlock.java
new file mode 100644
index 00000000..484b0c09
--- /dev/null
+++ b/tconstruct/items/blocks/SlimeSaplingItemBlock.java
@@ -0,0 +1,33 @@
+package tconstruct.items.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class SlimeSaplingItemBlock extends ItemBlock
+{
+ public static final String blockType[] = { "bluegreen" };
+
+ public SlimeSaplingItemBlock(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata (int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName (ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
+ return (new StringBuilder()).append("block.slime.sapling.").append(blockType[pos]).toString();
+ }
+}
diff --git a/tconstruct/items/blocks/SlimeTallGrassItem.java b/tconstruct/items/blocks/SlimeTallGrassItem.java
new file mode 100644
index 00000000..f0c36293
--- /dev/null
+++ b/tconstruct/items/blocks/SlimeTallGrassItem.java
@@ -0,0 +1,39 @@
+package tconstruct.items.blocks;
+
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import tconstruct.common.TContent;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class SlimeTallGrassItem extends ItemBlock
+{
+ public static final String blockType[] = { "tallgrass", "tallgrass.fern" };
+
+ public SlimeTallGrassItem(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata (int meta)
+ {
+ return meta;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public Icon getIconFromDamage (int meta)
+ {
+ int arr = MathHelper.clamp_int(meta, 0, blockType.length);
+ return TContent.slimeTallGrass.getIcon(0, arr);
+ }
+
+ public String getUnlocalizedName (ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
+ return (new StringBuilder()).append("block.slime.").append(blockType[pos]).toString();
+ }
+}
diff --git a/tconstruct/util/PHConstruct.java b/tconstruct/util/PHConstruct.java
index a5aaa2e1..50033006 100644
--- a/tconstruct/util/PHConstruct.java
+++ b/tconstruct/util/PHConstruct.java
@@ -68,7 +68,6 @@ public class PHConstruct
vanillaMetalBlocks = config.get("Difficulty Changes", "Craft vanilla metal blocks", true).getBoolean(true);
lavaFortuneInteraction = config.get("Difficulty Changes", "Enable Auto-Smelt and Fortune interaction", true).getBoolean(true);
removeVanillaToolRecipes = config.get("Difficulty Changes", "Remove Vanilla Tool Recipes", false).getBoolean(false);
- deGreg = config.get("Difficulty Changes", "Remove Vanilla GregTech Nerfs", true).getBoolean(true);
harderBronze = config.get("Difficulty Changes", "Lower bronze output to 2 ingots", false).getBoolean(false);
stencilTableCrafting = config.get("Difficulty Changes", "Craft Stencil Tables", true).getBoolean(true);
miningLevelIncrease = config.get("Difficulty Changes", "Modifiers increase Mining Level", true).getBoolean(true);
@@ -130,6 +129,7 @@ public class PHConstruct
moltenStone = config.getBlock("Molten Stone", 3215).getInt(3215);
moltenEmerald = config.getBlock("Molten Emerald", 3216).getInt(3216);
blood = config.getBlock("Liquid Cow", 3217).getInt(3217);
+ moltenEnder = config.getBlock("Molten Ender", 3218).getInt(3218);
aggregator = config.getBlock("Aggregator", 3221).getInt(3221);
lightCrystalBase = config.getBlock("Light Crystal", 3222).getInt(3222);
@@ -147,6 +147,14 @@ public class PHConstruct
punji = config.getBlock("Punji", 3232).getInt(3232);
woodCrafter = config.getBlock("Crafting Station", 3233).getInt(3233);
+ essenceExtractor = config.getBlock("Essence Extractor", 3234).getInt(3234);
+
+ slimePoolBlue = config.getBlock("Liquid Blue Slime", 3235).getInt(3235);
+ slimeGel = config.getBlock("Congealed Slime", 3237).getInt(3237);
+ slimeGrass = config.getBlock("Slime Grass", 3238).getInt(3238);
+ slimeTallGrass = config.getBlock("Slime Tall Grass", 3239).getInt(3239);
+ slimeLeaves = config.getBlock("Slime Grass Leaves", 3240).getInt(3240);
+ slimeSapling = config.getBlock("Slime Tree Sapling", 3241).getInt(3241);
/*golemCore = config.getBlock("Golem Core", 1481).getInt(1481);
golemHead = config.getBlock("Golem Head", 1482).getInt(1482);*/
@@ -233,6 +241,7 @@ public class PHConstruct
glove = config.getItem("Equipables", "Gloves", 14111).getInt(14111);
knapsack = config.getItem("Equipables", "Knapsack", 14112).getInt(14112);
goldHead = config.getItem("Patterns and Misc", "Golden Head", 14113).getInt(14113);
+ essenceCrystal = config.getItem("Patterns and Misc", "Essence Crystal", 14114).getInt(14114);
boolean ic2 = true;
boolean xycraft = true;
@@ -321,6 +330,9 @@ public class PHConstruct
worldBorder = config.get("Ultra Hardcore Changes", "Add World Border", false).getBoolean(false);
worldBorderSize = config.get("Ultra Hardcore Changes", "World Border Radius", 1000).getInt(1000);
freePatterns = config.get("Ultra Hardcore Changes", "Add Patterns to Pattern Chests", false).getBoolean(false); //Check
+
+ //Slime pools
+ islandRarity = config.get("Worldgen", "Slime Island Rarity", 450).getInt(450);
/* Save the configuration file */
config.save();
@@ -381,6 +393,8 @@ public class PHConstruct
//Crystalline
public static int aggregator;
public static int lightCrystalBase;
+ public static int essenceExtractor;
+ public static int essenceCrystal;
//Liquids
public static int metalFlowing;
@@ -403,12 +417,21 @@ public class PHConstruct
public static int moltenStone;
public static int moltenEmerald;
public static int blood;
+ public static int moltenEnder;
public static int moltenSilver; //Thermal Expansion
public static int moltenLead;
public static int moltenNickel;
public static int moltenShiny;
public static int moltenInvar;
public static int moltenElectrum;
+
+ //Slime
+ public static int slimePoolBlue;
+ public static int slimeGel;
+ public static int slimeGrass;
+ public static int slimeTallGrass;
+ public static int slimeLeaves;
+ public static int slimeSapling;
//Decoration
public static int stoneTorch;
@@ -620,5 +643,6 @@ public class PHConstruct
public static boolean gregtech;
public static boolean lavaFortuneInteraction;
- public static boolean deGreg;
+
+ public static int islandRarity;
}
diff --git a/tconstruct/worldgen/PlantGen.java b/tconstruct/worldgen/PlantGen.java
new file mode 100644
index 00000000..b4d4359d
--- /dev/null
+++ b/tconstruct/worldgen/PlantGen.java
@@ -0,0 +1,53 @@
+package tconstruct.worldgen;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class PlantGen extends WorldGenerator
+{
+ /** The ID of the plant block used in this plant generator. */
+ public final int plantID;
+ public final int metadata;
+ public int chances = 64;
+ int xSize = 8;
+ int ySize = 4;
+ int zSize = 8;
+ boolean clumped = true;
+
+ public PlantGen(int id, int meta)
+ {
+ this.plantID = id;
+ this.metadata = meta;
+ }
+
+ public PlantGen(int id, int meta, int count, int range, int height, int width, boolean clumped)
+ {
+ this.plantID = id;
+ this.metadata = meta;
+ this.chances = count;
+ this.xSize = range;
+ this.ySize = height;
+ this.zSize = width;
+ this.clumped = clumped;
+ }
+
+ public boolean generate (World world, Random random, int x, int y, int z)
+ {
+ for (int iter = 0; iter < chances; ++iter)
+ {
+ int posX = clumped ? x + random.nextInt(xSize) - random.nextInt(xSize) : x + random.nextInt(xSize);
+ int posY = clumped ? y + random.nextInt(ySize) - random.nextInt(ySize) : y + random.nextInt(ySize);
+ int posZ = clumped ? z + random.nextInt(zSize) - random.nextInt(zSize) : z + random.nextInt(zSize);
+
+ if (world.isAirBlock(posX, posY, posZ) && (!world.provider.hasNoSky || posY < 127) && Block.blocksList[this.plantID].canBlockStay(world, posX, posY, posZ))
+ {
+ world.setBlock(posX, posY, posZ, this.plantID, this.metadata, 2);
+ }
+ }
+
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/tconstruct/worldgen/SlimeIslandGen.java b/tconstruct/worldgen/SlimeIslandGen.java
new file mode 100644
index 00000000..36c65183
--- /dev/null
+++ b/tconstruct/worldgen/SlimeIslandGen.java
@@ -0,0 +1,288 @@
+package tconstruct.worldgen;
+
+import java.awt.geom.Ellipse2D;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.EnumSkyBlock;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.IChunkProvider;
+import net.minecraft.world.gen.feature.WorldGenerator;
+import tconstruct.common.TContent;
+import tconstruct.util.PHConstruct;
+import cpw.mods.fml.common.IWorldGenerator;
+
+public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator
+{
+ private int liquidBlock;
+ private int gelMeta;
+ int randomness = 2;
+ Random random = new Random();
+ int baseID = TContent.craftedSoil.blockID;//Block.dirt.blockID;
+ int topID = TContent.slimeGrass.blockID;
+ SlimeTreeGen trees = new SlimeTreeGen(false, 5, 4, 1, 0);
+
+ public SlimeIslandGen(int id, int meta)
+ {
+ this.liquidBlock = id;
+ this.gelMeta = meta;
+ }
+
+ @Override
+ public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) //IWorldGenerator version
+ {
+ if (world.provider.dimensionId == 0 || world.provider.dimensionId >= 2)
+ {
+ if (random.nextInt(PHConstruct.islandRarity) == 0)
+ generateIsland(world, random, chunkX * 16, chunkZ * 16);
+ }
+ }
+
+ //Island is biased towards one direction. Quadrants would be more useful
+ public void generateIsland (World world, Random rand, int xChunk, int zChunk)
+ {
+ int xRange = random.nextInt(13) + 20;
+ int yCenter = 100 + random.nextInt(41);
+ int zRange = random.nextInt(13) + 20;
+ int height = 12;
+ int initialHeight = height;
+ Ellipse2D.Double ellipse = new Ellipse2D.Double(0, 0, xRange, zRange);
+
+ //Basic shape
+ for (int x = 0; x <= xRange; x++)
+ {
+ for (int z = 0; z <= zRange; z++)
+ {
+ for (int y = 0; y <= height; y++)
+ {
+ if (ellipse.contains(x, z))
+ world.setBlock(x + xChunk, y + yCenter, z + zChunk, baseID, 5, 0);
+ }
+ }
+ }
+
+ //Erode bottom
+ height = 8;
+ for (int x = 0; x <= xRange; x++)
+ {
+ for (int z = 0; z <= zRange; z++)
+ {
+ for (int y = 0; y >= -height; y--)
+ {
+ int xPos = x + xChunk;
+ int yPos = y + yCenter + height;
+ int zPos = z + zChunk;
+ if (world.getBlockId(xPos - 1, yPos + 1, zPos) == baseID && world.getBlockId(xPos + 1, yPos + 1, zPos) == baseID && world.getBlockId(xPos, yPos + 1, zPos - 1) == baseID
+ && world.getBlockId(xPos - 1, yPos + 1, zPos + 1) == baseID && random.nextInt(100) > randomness)
+ {
+ ;
+ }
+ else
+ {
+ world.setBlock(xPos, yPos, zPos, 0, 0, 0);
+
+ }
+ }
+ }
+ }
+
+ //Erode top
+ height = 3;
+ for (int x = 0; x <= xRange; x++)
+ {
+ for (int z = 0; z <= zRange; z++)
+ {
+ for (int y = 1; y <= height; y++)
+ {
+ int xPos = x + xChunk;
+ int yPos = y + yCenter + initialHeight - height + 1;
+ int zPos = z + zChunk;
+ if (world.getBlockId(xPos - 1, yPos - 1, zPos) == baseID && world.getBlockId(xPos + 1, yPos - 1, zPos) == baseID && world.getBlockId(xPos, yPos - 1, zPos - 1) == baseID
+ && world.getBlockId(xPos - 1, yPos - 1, zPos + 1) == baseID)
+ {
+ ;
+ }
+ else
+ {
+ world.setBlock(xPos, yPos, zPos, 0, 0, 0);
+ }
+ }
+ }
+ }
+
+ //Replace blocks
+ for (int x = 0; x <= xRange; x++)
+ {
+ for (int z = 0; z <= zRange; z++)
+ {
+ for (int y = 0; y <= height; y++)
+ {
+ int xPos = x + xChunk;
+ int yPos = y + yCenter + initialHeight - height;
+ int zPos = z + zChunk;
+ if (world.getBlockId(xPos, yPos, zPos) == baseID)
+ {
+ Block block = Block.blocksList[world.getBlockId(xPos, yPos + 1, zPos)];
+ if (block == null || block.isAirBlock(world, xPos, yPos + 1, zPos))
+ world.setBlock(xPos, yPos, zPos, topID, 0, 0);
+ }
+ }
+ }
+ }
+
+ //Decorate
+ generateSlimePool(world, rand, xChunk + xRange / 2, yCenter + initialHeight, zChunk + zRange / 2);
+
+ PlantGen tallGrass = new PlantGen(TContent.slimeTallGrass.blockID, 0, 128, xRange, 1, zRange, false);
+ tallGrass.generate(world, rand, xChunk, yCenter + initialHeight + 1, zChunk);
+ for (int i = 0; i < 3; i++)
+ {
+ trees.generate(world, random, xChunk + random.nextInt(xRange), yCenter + initialHeight + 3, zChunk + random.nextInt(zRange));
+ }
+ }
+
+ public void generateSlimePool (World world, Random rand, int x, int y, int z)
+ {
+ this.generate(world, rand, x, y, z);
+ }
+
+ public boolean generate (World world, Random rand, int x, int y, int z) //WorldGenerator version
+ {
+ x -= 8;
+ z -= 8;
+ /*for (z -= 8; y > 5 && world.isAirBlock(x, y, z); --y)
+ {
+ ;
+ }
+
+ if (y <= 4)
+ {
+ return false;
+ }
+ else
+ {*/
+ y -= 4;
+ boolean[] validLocations = new boolean[2048];
+ int var7 = rand.nextInt(4) + 4;
+ int xPos;
+
+ for (xPos = 0; xPos < var7; ++xPos)
+ {
+ double noise1 = rand.nextDouble() * 6.0D + 3.0D;
+ double noise2 = rand.nextDouble() * 4.0D + 2.0D;
+ double noise3 = rand.nextDouble() * 6.0D + 3.0D;
+ double noise4 = rand.nextDouble() * (16.0D - noise1 - 2.0D) + 1.0D + noise1 / 2.0D;
+ double noise5 = rand.nextDouble() * (8.0D - noise2 - 4.0D) + 2.0D + noise2 / 2.0D;
+ double noise6 = rand.nextDouble() * (16.0D - noise3 - 2.0D) + 1.0D + noise3 / 2.0D;
+
+ for (int xIter = 1; xIter < 15; ++xIter)
+ {
+ for (int zIter = 1; zIter < 15; ++zIter)
+ {
+ for (int yIter = 1; yIter < 7; ++yIter)
+ {
+ double var24 = ((double) xIter - noise4) / (noise1 / 2.0D);
+ double var26 = ((double) yIter - noise5) / (noise2 / 2.0D);
+ double var28 = ((double) zIter - noise6) / (noise3 / 2.0D);
+ double validSpot = var24 * var24 + var26 * var26 + var28 * var28;
+
+ if (validSpot < 1.0D)
+ {
+ validLocations[(xIter * 16 + zIter) * 8 + yIter] = true;
+ }
+ }
+ }
+ }
+ }
+
+ int yPos;
+ int zPos;
+ boolean var33;
+
+ for (xPos = 0; xPos < 16; ++xPos)
+ {
+ for (zPos = 0; zPos < 16; ++zPos)
+ {
+ for (yPos = 0; yPos < 8; ++yPos)
+ {
+ var33 = !validLocations[(xPos * 16 + zPos) * 8 + yPos]
+ && (xPos < 15 && validLocations[((xPos + 1) * 16 + zPos) * 8 + yPos] || xPos > 0 && validLocations[((xPos - 1) * 16 + zPos) * 8 + yPos] || zPos < 15
+ && validLocations[(xPos * 16 + zPos + 1) * 8 + yPos] || zPos > 0 && validLocations[(xPos * 16 + (zPos - 1)) * 8 + yPos] || yPos < 7
+ && validLocations[(xPos * 16 + zPos) * 8 + yPos + 1] || yPos > 0 && validLocations[(xPos * 16 + zPos) * 8 + (yPos - 1)]);
+
+ if (var33)
+ {
+ Material var12 = world.getBlockMaterial(x + xPos, y + yPos, z + zPos);
+
+ if (yPos >= 4 && var12.isLiquid())
+ {
+ return false;
+ }
+
+ if (yPos < 4 && !var12.isSolid() && world.getBlockId(x + xPos, y + yPos, z + zPos) != this.liquidBlock)
+ {
+ return false;
+ }
+ }
+ }
+ }
+ }
+
+ for (xPos = 0; xPos < 16; ++xPos)
+ {
+ for (zPos = 0; zPos < 16; ++zPos)
+ {
+ for (yPos = 0; yPos < 8; ++yPos)
+ {
+ if (validLocations[(xPos * 16 + zPos) * 8 + yPos])
+ {
+ world.setBlock(x + xPos, y + yPos, z + zPos, yPos >= 4 ? 0 : this.liquidBlock);
+ }
+ }
+ }
+ }
+
+ for (xPos = 0; xPos < 16; ++xPos)
+ {
+ for (zPos = 0; zPos < 16; ++zPos)
+ {
+ for (yPos = 4; yPos < 8; ++yPos)
+ {
+ if (validLocations[(xPos * 16 + zPos) * 8 + yPos] && world.getBlockId(x + xPos, y + yPos - 1, z + zPos) == baseID
+ && world.getSavedLightValue(EnumSkyBlock.Sky, x + xPos, y + yPos, z + zPos) > 0)
+ {
+ world.setBlock(x + xPos, y + yPos - 1, z + zPos, topID, 2, 0);
+ }
+ }
+ }
+ }
+
+ //Generate blocks around
+ if (Block.blocksList[this.liquidBlock].blockMaterial == Material.water)
+ {
+ for (xPos = 0; xPos < 16; ++xPos)
+ {
+ for (zPos = 0; zPos < 16; ++zPos)
+ {
+ for (yPos = 0; yPos < 8; ++yPos)
+ {
+ var33 = !validLocations[(xPos * 16 + zPos) * 8 + yPos]
+ && (xPos < 15 && validLocations[((xPos + 1) * 16 + zPos) * 8 + yPos] || xPos > 0 && validLocations[((xPos - 1) * 16 + zPos) * 8 + yPos] || zPos < 15
+ && validLocations[(xPos * 16 + zPos + 1) * 8 + yPos] || zPos > 0 && validLocations[(xPos * 16 + (zPos - 1)) * 8 + yPos] || yPos < 7
+ && validLocations[(xPos * 16 + zPos) * 8 + yPos + 1] || yPos > 0 && validLocations[(xPos * 16 + zPos) * 8 + (yPos - 1)]);
+
+ if (var33 && (yPos < 4 || rand.nextInt(2) != 0) && world.getBlockMaterial(x + xPos, y + yPos, z + zPos).isSolid()
+ && world.getBlockMaterial(x + xPos, y + yPos + 1, z + zPos) != Material.water)
+ {
+ world.setBlock(x + xPos, y + yPos, z + zPos, TContent.slimeGel.blockID, gelMeta, 2);
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+ //}
+ }
+}
diff --git a/tconstruct/worldgen/SlimeTreeGen.java b/tconstruct/worldgen/SlimeTreeGen.java
new file mode 100644
index 00000000..ac2b1923
--- /dev/null
+++ b/tconstruct/worldgen/SlimeTreeGen.java
@@ -0,0 +1,166 @@
+package tconstruct.worldgen;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+import net.minecraftforge.common.ForgeDirection;
+import tconstruct.common.TContent;
+
+public class SlimeTreeGen extends WorldGenerator
+{
+ public final int minTreeHeight;
+ public final int treeHeightRange;
+ public final int metaWood;
+ public final int metaLeaves;
+ public final boolean seekHeight;
+
+ public SlimeTreeGen(boolean notify, int treeHeight, int treeRange, int woodMeta, int leavesMeta)
+ {
+ super(notify);
+ this.minTreeHeight = treeHeight;
+ this.treeHeightRange = treeRange;
+ this.metaWood = woodMeta;
+ this.metaLeaves = leavesMeta;
+ this.seekHeight = !notify;
+ }
+
+ public boolean generate (World world, Random random, int xPos, int yPos, int zPos)
+ {
+ int height = random.nextInt(this.treeHeightRange) + this.minTreeHeight;
+ boolean flag = true;
+ if (seekHeight)
+ {
+ yPos = findGround(world, xPos, yPos, zPos);
+ if (yPos == -1)
+ return false;
+ }
+
+ if (yPos >= 1 && yPos + height + 1 <= 256)
+ {
+ Block soil = Block.blocksList[world.getBlockId(xPos, yPos - 1, zPos)];
+ boolean isSoil = (soil != null && soil.canSustainPlant(world, xPos, yPos - 1, zPos, ForgeDirection.UP, TContent.slimeSapling));
+
+ if (isSoil)
+ {
+ if (!checkClear(world, xPos, yPos, zPos, height))
+ return false;
+
+ soil.onPlantGrow(world, xPos, yPos - 1, zPos, xPos, yPos, zPos);
+ placeCanopy(world, random, xPos, yPos, zPos, height);
+ placeTrunk(world, xPos, yPos, zPos, height);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ boolean checkClear (World world, int x, int y, int z, int treeHeight)
+ {
+ for (int yPos = 0; yPos < treeHeight + 1; yPos++)
+ {
+ int range = 1;
+
+ if (yPos == 0)
+ range = 0;
+ else if (yPos >= treeHeight - 1)
+ range = 2;
+
+ for (int xPos = range; xPos <= range; xPos++)
+ {
+ for (int zPos = range; zPos <= range; zPos++)
+ {
+ int blockID = world.getBlockId(x + xPos, y + yPos, z + zPos);
+ Block block = Block.blocksList[blockID];
+ if (block != null && blockID != TContent.slimeSapling.blockID && !block.isLeaves(world, x + xPos, y + yPos, z + zPos))
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ int findGround (World world, int x, int y, int z)
+ {
+ int ret = -1;
+ int height = y;
+ do
+ {
+ int heightID = world.getBlockId(x, height, z);
+ if ((heightID == TContent.craftedSoil.blockID || heightID == TContent.slimeGrass.blockID) && !Block.opaqueCubeLookup[world.getBlockId(x, height + 1, z)])
+ {
+ ret = height + 1;
+ break;
+ }
+ height--;
+ } while (height > 0);
+ return ret;
+ }
+
+ void placeCanopy (World world, Random random, int xPos, int yPos, int zPos, int height)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ placeDiamondLayer(world, xPos, yPos + height - i, zPos, i + 1);
+ }
+
+ this.setBlockAndMetadata(world, xPos+4, yPos + height - 3, zPos, 0, 0);
+ this.setBlockAndMetadata(world, xPos-4, yPos + height - 3, zPos, 0, 0);
+ this.setBlockAndMetadata(world, xPos, yPos + height - 3, zPos+4, 0, 0);
+ this.setBlockAndMetadata(world, xPos, yPos + height - 3, zPos-4, 0, 0);
+ this.setBlockAndMetadata(world, xPos+1, yPos + height - 3, zPos+1, 0, 0);
+ this.setBlockAndMetadata(world, xPos+1, yPos + height - 3, zPos-1, 0, 0);
+ this.setBlockAndMetadata(world, xPos-1, yPos + height - 3, zPos+1, 0, 0);
+ this.setBlockAndMetadata(world, xPos-1, yPos + height - 3, zPos-1, 0, 0);
+
+ //Drippers
+ this.setBlockAndMetadata(world, xPos+3, yPos + height - 4, zPos, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos-3, yPos + height - 4, zPos, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos-3, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos+3, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos+2, yPos + height - 4, zPos+2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos+2, yPos + height - 4, zPos-2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos-2, yPos + height - 4, zPos+2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos-2, yPos + height - 4, zPos-2, TContent.slimeLeaves.blockID, this.metaLeaves);
+
+ this.setBlockAndMetadata(world, xPos+3, yPos + height - 5, zPos, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos-3, yPos + height - 5, zPos, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos, yPos + height - 5, zPos-3, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos, yPos + height - 5, zPos+3, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos+2, yPos + height - 5, zPos+2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos+2, yPos + height - 5, zPos-2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos-2, yPos + height - 5, zPos+2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ this.setBlockAndMetadata(world, xPos-2, yPos + height - 5, zPos-2, TContent.slimeLeaves.blockID, this.metaLeaves);
+ }
+
+ void placeDiamondLayer(World world, int xPos, int yPos, int zPos, int range )
+ {
+ for (int x = -range; x <= range; x++)
+ {
+ for (int z = -range; z <= range; z++)
+ {
+ if (Math.abs(x) + Math.abs(z) <= range)
+ {
+ this.setBlockAndMetadata(world, x+xPos, yPos, z+zPos, TContent.slimeLeaves.blockID, this.metaLeaves);
+ }
+ }
+ }
+ }
+
+ void placeTrunk (World world, int xPos, int yPos, int zPos, int height)
+ {
+ for (int localHeight = 0; localHeight < height; ++localHeight)
+ {
+ int blockID = world.getBlockId(xPos, yPos + localHeight, zPos);
+
+ Block block = Block.blocksList[blockID];
+
+ if (blockID == 0 || block == null || block.isLeaves(world, xPos, yPos + localHeight, zPos))
+ {
+ this.setBlockAndMetadata(world, xPos, yPos + localHeight, zPos, TContent.slimeGel.blockID, this.metaWood);
+ }
+ }
+ }
+
+}