diff --git a/.gitignore b/.gitignore
index b9d6bd9..d9841bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,215 +1,16 @@
-#################
-## Eclipse
-#################
-
-*.pydevproject
-.project
-.metadata
-bin/
-tmp/
-*.tmp
-*.bak
-*.swp
-*~.nib
-local.properties
-.classpath
-.settings/
-.loadpath
-
-# External tool builders
-.externalToolBuilders/
-
-# Locally stored "Eclipse launch configurations"
-*.launch
-
-# CDT-specific
-.cproject
-
-# PDT-specific
-.buildpath
-
-
-#################
-## Visual Studio
-#################
-
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-
-# User-specific files
-*.suo
-*.user
-*.sln.docstates
-
-# Build results
-
-[Dd]ebug/
-[Rr]elease/
-x64/
-build/
-[Bb]in/
-[Oo]bj/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-*_i.c
-*_p.c
-*.ilk
-*.meta
-*.obj
-*.pch
-*.pdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.log
-*.scc
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opensdf
-*.sdf
-*.cachefile
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# NCrunch
-*.ncrunch*
-.*crunch*.local.xml
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.Publish.xml
-*.pubxml
-
-# NuGet Packages Directory
-## TODO: If you have NuGet Package Restore enabled, uncomment the next line
-#packages/
-
-# Windows Azure Build Output
-csx
-*.build.csdef
-
-# Windows Store app package directory
-AppPackages/
-
-# Others
-sql/
-*.Cache
-ClientBin/
-[Ss]tyle[Cc]op.*
-~$*
-*~
-*.dbmdl
-*.[Pp]ublish.xml
-*.pfx
-*.publishsettings
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file to a newer
-# Visual Studio version. Backup files are not needed, because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-
-# SQL Server files
-App_Data/*.mdf
-App_Data/*.ldf
-
-#############
-## Windows detritus
-#############
-
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
-
-# Folder config file
-Desktop.ini
-
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
-
-# Mac crap
-.DS_Store
-
-
-#############
-## Python
-#############
-
-*.py[co]
-
-# Packages
-*.egg
-*.egg-info
-dist/
-build/
-eggs/
-parts/
-var/
-sdist/
-develop-eggs/
-.installed.cfg
-
-# Installer logs
-pip-log.txt
-
-# Unit test / coverage reports
-.coverage
-.tox
-
-#Translations
-*.mo
-
-#Mr Developer
-.mr.developer.cfg
+#Ignore EVERYTHING
+/*
+/*/
+
+#Except
+!.gitignore
+!build.gradle
+!gradle*
+!LICENSE.md
+!README.md
+!mcmod.info
+!/assets/
+!/wildCaves/
+!WildCaves3.png
+!update.xml
+!changelog.md
diff --git a/WildCaves3.png b/WildCaves3.png
new file mode 100644
index 0000000..f1a5933
Binary files /dev/null and b/WildCaves3.png differ
diff --git a/assets/wildcaves3/blockstates/Decorations.json b/assets/wildcaves3/blockstates/Decorations.json
new file mode 100644
index 0000000..adb4410
--- /dev/null
+++ b/assets/wildcaves3/blockstates/Decorations.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "type=0": { "model": "wildcaves3:decor_0" },
+ "type=1": { "model": "wildcaves3:decor_1" },
+ "type=2": { "model": "wildcaves3:decor_2" }
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/blockstates/Flora.json b/assets/wildcaves3/blockstates/Flora.json
new file mode 100644
index 0000000..4edb33f
--- /dev/null
+++ b/assets/wildcaves3/blockstates/Flora.json
@@ -0,0 +1,14 @@
+{
+ "variants": {
+ "type=0": { "model": "wildcaves3:flora_0" },
+ "type=1": { "model": "wildcaves3:flora_1" },
+ "type=2": { "model": "wildcaves3:flora_2" },
+ "type=3": { "model": "wildcaves3:flora_3" },
+ "type=4": { "model": "wildcaves3:flora_4" },
+ "type=5": { "model": "wildcaves3:flora_5" },
+ "type=6": { "model": "wildcaves3:flora_6" },
+ "type=7": { "model": "wildcaves3:flora_7" },
+ "type=8": { "model": "wildcaves3:flora_8" },
+ "type=9": { "model": "wildcaves3:flora_9" }
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/blockstates/FossilBlock.json b/assets/wildcaves3/blockstates/FossilBlock.json
new file mode 100644
index 0000000..2d8b8fe
--- /dev/null
+++ b/assets/wildcaves3/blockstates/FossilBlock.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "normal": { "model": "wildcaves3:fossil" }
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/blockstates/SandstoneSalactite.json b/assets/wildcaves3/blockstates/SandstoneSalactite.json
new file mode 100644
index 0000000..45f49f3
--- /dev/null
+++ b/assets/wildcaves3/blockstates/SandstoneSalactite.json
@@ -0,0 +1,17 @@
+{
+ "variants": {
+ "type=0": { "model": "wildcaves3:sandstone_0" },
+ "type=1": { "model": "wildcaves3:sandstone_1" },
+ "type=2": { "model": "wildcaves3:sandstone_2" },
+ "type=3": { "model": "wildcaves3:sandstone_3" },
+ "type=4": { "model": "wildcaves3:sandstone_4" },
+ "type=5": { "model": "wildcaves3:sandstone_5" },
+ "type=6": { "model": "wildcaves3:sandstone_6" },
+ "type=7": { "model": "wildcaves3:sandstone_7" },
+ "type=8": { "model": "wildcaves3:sandstone_8" },
+ "type=9": { "model": "wildcaves3:sandstone_9" },
+ "type=10": { "model": "wildcaves3:sandstone_10" },
+ "type=11": { "model": "wildcaves3:sandstone_11" },
+ "type=12": { "model": "wildcaves3:sandstone_12" }
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/blockstates/StoneStalactite.json b/assets/wildcaves3/blockstates/StoneStalactite.json
new file mode 100644
index 0000000..28ad065
--- /dev/null
+++ b/assets/wildcaves3/blockstates/StoneStalactite.json
@@ -0,0 +1,17 @@
+{
+ "variants": {
+ "type=0": { "model": "wildcaves3:stone_0" },
+ "type=1": { "model": "wildcaves3:stone_1" },
+ "type=2": { "model": "wildcaves3:stone_2" },
+ "type=3": { "model": "wildcaves3:stone_3" },
+ "type=4": { "model": "wildcaves3:stone_4" },
+ "type=5": { "model": "wildcaves3:stone_5" },
+ "type=6": { "model": "wildcaves3:stone_6" },
+ "type=7": { "model": "wildcaves3:stone_7" },
+ "type=8": { "model": "wildcaves3:stone_8" },
+ "type=9": { "model": "wildcaves3:stone_9" },
+ "type=10": { "model": "wildcaves3:stone_10" },
+ "type=11": { "model": "wildcaves3:stone_11" },
+ "type=12": { "model": "wildcaves3:stone_12" }
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/lang/en_US.lang b/assets/wildcaves3/lang/en_US.lang
new file mode 100644
index 0000000..8324ffb
--- /dev/null
+++ b/assets/wildcaves3/lang/en_US.lang
@@ -0,0 +1,49 @@
+
+itemGroup.WildCaves3=Wild Caves 3
+
+fossil1.name=Bone pile
+
+stalactite1.name=Stalactite
+stalactite2.name=Stalactite
+stalactite3.name=Stalactite
+stalactite4.name=Stalactite
+stalactiteConnection1.name=Stalactite
+stalactiteConnection2.name=Stalactite
+stalactiteConnection3.name=Stalactite
+stalactiteConnection4.name=Stalactite
+stalactiteEnd.name=Stalactite
+stalacmiteEnd.name=Stalagmite
+stalacmite1.name=Stalagmite
+stalacmite2.name=Stalagmite
+stalacmite3.name=Stalagmite
+
+sandstoneStalactite1.name=Sandstone Stalactite
+sandstoneStalactite2.name=Sandstone Stalactite
+sandstoneStalactite3.name=Sandstone Stalactite
+sandstoneStalactite4.name=Sandstone Stalactite
+sandstoneStalactiteConnection1.name=Sandstone Stalactite
+sandstoneStalactiteConnection2.name=Sandstone Stalactite
+sandstoneStalactiteConnection3.name=Sandstone Stalactite
+sandstoneStalactiteConnection4.name=Sandstone Stalactite
+sandstoneStalactiteEnd.name=Sandstone Stalactite
+sandstoneStalacmiteEnd.name=Sandstone Stalagmite
+sandstoneStalacmite1.name=Sandstone stalagmite
+sandstoneStalacmite2.name=Sandstone stalagmite
+sandstoneStalacmite3.name=Sandstone stalagmite
+
+glowcap1.name=Glowcap
+glowcap2.name=Glowcap
+glowcap3.name=Glowcap
+gloweed1.name=Glow weed
+glowcap4top.name=Glowcap
+glowcap4bottom.name=Glowcap
+
+bluecap1.name=Iceshroom
+bluecap2.name=Iceshroom
+bluecap3.name=Iceshroom
+bluecap4.name=Iceshroom
+
+icicle.name=Icicle
+icicle1.name=Icicle
+icicle2.name=Icicle
+icicle3.name=Icicle
\ No newline at end of file
diff --git a/assets/wildcaves3/lang/es_ES.lang b/assets/wildcaves3/lang/es_ES.lang
new file mode 100644
index 0000000..0c03528
--- /dev/null
+++ b/assets/wildcaves3/lang/es_ES.lang
@@ -0,0 +1,49 @@
+
+itemGroup.WildCaves3=Wild Caves 3
+
+fossil1.name=Montón de Huesos
+
+stalactite1.name=Estalactita
+stalactite2.name=Estalactita
+stalactite3.name=Estalactita
+stalactite4.name=Estalactita
+stalactiteConnection1.name=Estalactita
+stalactiteConnection2.name=Estalactita
+stalactiteConnection3.name=Estalactita
+stalactiteConnection4.name=Estalactita
+stalactiteEnd.name=Estalagmita
+stalacmiteEnd.name=Estalagmita
+stalacmite1.name=Estalagmita
+stalacmite2.name=Estalagmita
+stalacmite3.name=Estalagmita
+
+sandstoneStalactite1.name=Estalactita de Arenisca
+sandstoneStalactite2.name=Estalactita de Arenisca
+sandstoneStalactite3.name=Estalactita de Arenisca
+sandstoneStalactite4.name=Estalactita de Arenisca
+sandstoneStalactiteConnection1.name=Estalactita de Arenisca
+sandstoneStalactiteConnection2.name=Estalactita de Arenisca
+sandstoneStalactiteConnection3.name=Estalactita de Arenisca
+sandstoneStalactiteConnection4.name=Estalactita de Arenisca
+sandstoneStalactiteEnd.name=Estalagmita de Arenisca
+sandstoneStalacmiteEnd.name=Estalagmita de Arenisca
+sandstoneStalacmite1.name=Estalagmita de Arenisca
+sandstoneStalacmite2.name=Estalagmita de Arenisca
+sandstoneStalacmite3.name=Estalagmita de Arenisca
+
+glowcap1.name=Seta Brillante
+glowcap2.name=Seta Brillante
+glowcap3.name=Seta Brillante
+gloweed1.name=Hierba Brillante
+glowcap4top.name=Seta Brillante
+glowcap4bottom.name=Seta Brillante
+
+bluecap1.name=Seta de Hielo
+bluecap2.name=Seta de Hielo
+bluecap3.name=Seta de Hielo
+bluecap4.name=Seta de Hielo
+
+icicle.name=Carámbano
+icicle1.name=Carámbano
+icicle2.name=Carámbano
+icicle3.name=Carámbano
\ No newline at end of file
diff --git a/assets/wildcaves3/lang/pt_BR.lang b/assets/wildcaves3/lang/pt_BR.lang
new file mode 100644
index 0000000..15d5d10
--- /dev/null
+++ b/assets/wildcaves3/lang/pt_BR.lang
@@ -0,0 +1,49 @@
+
+itemGroup.WildCaves3=Wild Caves 3
+
+fossil1.name=Pilha de Ossos
+
+stalactite1.name=Estalactite
+stalactite2.name=Estalactite
+stalactite3.name=Estalactite
+stalactite4.name=Estalactite
+stalactiteConnection1.name=Estalactite
+stalactiteConnection2.name=Estalactite
+stalactiteConnection3.name=Estalactite
+stalactiteConnection4.name=Estalactite
+stalactiteEnd.name=Estalactite
+stalacmiteEnd.name=Estalagmite
+stalacmite1.name=Estalagmite
+stalacmite2.name=Estalagmite
+stalacmite3.name=Estalagmite
+
+sandstoneStalactite1.name=Estalactite de Arenito
+sandstoneStalactite2.name=Estalactite de Arenito
+sandstoneStalactite3.name=Estalactite de Arenito
+sandstoneStalactite4.name=Estalactite de Arenito
+sandstoneStalactiteConnection1.name=Estalactite de Arenito
+sandstoneStalactiteConnection2.name=Estalactite de Arenito
+sandstoneStalactiteConnection3.name=Estalactite de Arenito
+sandstoneStalactiteConnection4.name=Estalactite de Arenito
+sandstoneStalactiteEnd.name=Estalactite de Arenito
+sandstoneStalacmiteEnd.name=Estalagmite de Arenito
+sandstoneStalacmite1.name=Estalagmite de Arenito
+sandstoneStalacmite2.name=Estalagmite de Arenito
+sandstoneStalacmite3.name=Estalagmite de Arenito
+
+glowcap1.name=Chlorophos
+glowcap2.name=Chlorophos
+glowcap3.name=Chlorophos
+gloweed1.name=Erva do Brilho
+glowcap4top.name=Chlorophos
+glowcap4bottom.name=Chlorophos
+
+bluecap1.name=Cogumelo Anil
+bluecap2.name=Cogumelo Anil
+bluecap3.name=Cogumelo Anil
+bluecap4.name=Cogumelo Anil
+
+icicle.name=Cogumelo Picolé
+icicle1.name=Cogumelo Picolé
+icicle2.name=Cogumelo Picolé
+icicle3.name=Cogumelo Picolé
diff --git a/assets/wildcaves3/lang/ru_RU.lang b/assets/wildcaves3/lang/ru_RU.lang
new file mode 100644
index 0000000..1e53bb0
--- /dev/null
+++ b/assets/wildcaves3/lang/ru_RU.lang
@@ -0,0 +1,49 @@
+
+itemGroup.WildCaves3=Wild Caves 3
+
+fossil1.name=Окаменелость
+
+stalactite1.name=Сталактит
+stalactite2.name=Сталактит
+stalactite3.name=Сталактит
+stalactite4.name=Сталактит
+stalactiteConnection1.name=Сталактит
+stalactiteConnection2.name=Сталактит
+stalactiteConnection3.name=Сталактит
+stalactiteConnection4.name=Сталактит
+stalactiteEnd.name=Сталактит
+stalacmiteEnd.name=Сталагмит
+stalacmite1.name=Сталагмит
+stalacmite2.name=Сталагмит
+stalacmite3.name=Сталагмит
+
+sandstoneStalactite1.name=Песчаный сталактит
+sandstoneStalactite2.name=Песчаный сталактит
+sandstoneStalactite3.name=Песчаный сталактит
+sandstoneStalactite4.name=Песчаный сталактит
+sandstoneStalactiteConnection1.name=Песчаный сталактит
+sandstoneStalactiteConnection2.name=Песчаный сталактит
+sandstoneStalactiteConnection3.name=Песчаный сталактит
+sandstoneStalactiteConnection4.name=Песчаный сталактит
+sandstoneStalactiteEnd.name=Песчаный сталактит
+sandstoneStalacmiteEnd.name=Песчаный сталактит
+sandstoneStalacmite1.name=Песчаный сталагмит
+sandstoneStalacmite2.name=Песчаный сталагмит
+sandstoneStalacmite3.name=Песчаный сталагмит
+
+glowcap1.name=Огнешляпка
+glowcap2.name=Огнешляпка
+glowcap3.name=Огнешляпка
+gloweed1.name=Огнесорняк
+glowcap4top.name=Огнешляпка
+glowcap4bottom.name=Огнешляпка
+
+bluecap1.name=Ледогриб
+bluecap2.name=Ледогриб
+bluecap3.name=Ледогриб
+bluecap4.name=Ледогриб
+
+icicle.name=Сосулька
+icicle1.name=Сосулька
+icicle2.name=Сосулька
+icicle3.name=Сосулька
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/decor_0.json b/assets/wildcaves3/models/block/decor_0.json
new file mode 100644
index 0000000..83f8a91
--- /dev/null
+++ b/assets/wildcaves3/models/block/decor_0.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/decorations0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/decor_1.json b/assets/wildcaves3/models/block/decor_1.json
new file mode 100644
index 0000000..ec315de
--- /dev/null
+++ b/assets/wildcaves3/models/block/decor_1.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/decorations1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/decor_2.json b/assets/wildcaves3/models/block/decor_2.json
new file mode 100644
index 0000000..c697c35
--- /dev/null
+++ b/assets/wildcaves3/models/block/decor_2.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/decorations2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_0.json b/assets/wildcaves3/models/block/flora_0.json
new file mode 100644
index 0000000..a4a1de8
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_0.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/tinted_cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_1.json b/assets/wildcaves3/models/block/flora_1.json
new file mode 100644
index 0000000..8d88b1f
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_1.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/tinted_cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_2.json b/assets/wildcaves3/models/block/flora_2.json
new file mode 100644
index 0000000..be74720
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_2.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/tinted_cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_3.json b/assets/wildcaves3/models/block/flora_3.json
new file mode 100644
index 0000000..74318f7
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_3.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/tinted_cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora3"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_4.json b/assets/wildcaves3/models/block/flora_4.json
new file mode 100644
index 0000000..f17d4db
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_4.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/tinted_cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora4"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_5.json b/assets/wildcaves3/models/block/flora_5.json
new file mode 100644
index 0000000..9d1e110
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_5.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/tinted_cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora5"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_6.json b/assets/wildcaves3/models/block/flora_6.json
new file mode 100644
index 0000000..dd5cb2e
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_6.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora6"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_7.json b/assets/wildcaves3/models/block/flora_7.json
new file mode 100644
index 0000000..fb3ea72
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_7.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora7"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_8.json b/assets/wildcaves3/models/block/flora_8.json
new file mode 100644
index 0000000..0aa6e9e
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_8.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora8"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/flora_9.json b/assets/wildcaves3/models/block/flora_9.json
new file mode 100644
index 0000000..d571c53
--- /dev/null
+++ b/assets/wildcaves3/models/block/flora_9.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cross",
+ "textures":{
+ "cross": "wildcaves3:blocks/flora9"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/fossil.json b/assets/wildcaves3/models/block/fossil.json
new file mode 100644
index 0000000..3f293c5
--- /dev/null
+++ b/assets/wildcaves3/models/block/fossil.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cube_all",
+ "textures": {
+ "all": "wildcaves3:blocks/fossils0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_0.json b/assets/wildcaves3/models/block/sandstone_0.json
new file mode 100644
index 0000000..135c776
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_0.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_1.json b/assets/wildcaves3/models/block/sandstone_1.json
new file mode 100644
index 0000000..87e4fc3
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_1.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_10.json b/assets/wildcaves3/models/block/sandstone_10.json
new file mode 100644
index 0000000..eace93a
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_10.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure10"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_11.json b/assets/wildcaves3/models/block/sandstone_11.json
new file mode 100644
index 0000000..222c858
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_11.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure11"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_12.json b/assets/wildcaves3/models/block/sandstone_12.json
new file mode 100644
index 0000000..02ff5cc
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_12.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure12"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_2.json b/assets/wildcaves3/models/block/sandstone_2.json
new file mode 100644
index 0000000..d551394
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_2.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_3.json b/assets/wildcaves3/models/block/sandstone_3.json
new file mode 100644
index 0000000..7f0f0b2
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_3.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure3"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_4.json b/assets/wildcaves3/models/block/sandstone_4.json
new file mode 100644
index 0000000..d1bf7a3
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_4.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure4"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_5.json b/assets/wildcaves3/models/block/sandstone_5.json
new file mode 100644
index 0000000..9797808
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_5.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure5"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_6.json b/assets/wildcaves3/models/block/sandstone_6.json
new file mode 100644
index 0000000..f3a0df4
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_6.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure6"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_7.json b/assets/wildcaves3/models/block/sandstone_7.json
new file mode 100644
index 0000000..9250134
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_7.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure7"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_8.json b/assets/wildcaves3/models/block/sandstone_8.json
new file mode 100644
index 0000000..6dd3b44
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_8.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure8"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/sandstone_9.json b/assets/wildcaves3/models/block/sandstone_9.json
new file mode 100644
index 0000000..5fbab24
--- /dev/null
+++ b/assets/wildcaves3/models/block/sandstone_9.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/sandstoneStructure9"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_0.json b/assets/wildcaves3/models/block/stone_0.json
new file mode 100644
index 0000000..34d0810
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_0.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_1.json b/assets/wildcaves3/models/block/stone_1.json
new file mode 100644
index 0000000..c240445
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_1.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_10.json b/assets/wildcaves3/models/block/stone_10.json
new file mode 100644
index 0000000..9bf6cf0
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_10.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure10"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_11.json b/assets/wildcaves3/models/block/stone_11.json
new file mode 100644
index 0000000..93f3fb1
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_11.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure11"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_12.json b/assets/wildcaves3/models/block/stone_12.json
new file mode 100644
index 0000000..f1dadcd
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_12.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure12"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_2.json b/assets/wildcaves3/models/block/stone_2.json
new file mode 100644
index 0000000..5ae84a9
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_2.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_3.json b/assets/wildcaves3/models/block/stone_3.json
new file mode 100644
index 0000000..bb18f0d
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_3.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure3"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_4.json b/assets/wildcaves3/models/block/stone_4.json
new file mode 100644
index 0000000..a43f97e
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_4.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure4"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_5.json b/assets/wildcaves3/models/block/stone_5.json
new file mode 100644
index 0000000..c40b582
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_5.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure5"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_6.json b/assets/wildcaves3/models/block/stone_6.json
new file mode 100644
index 0000000..31b559a
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_6.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure6"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_7.json b/assets/wildcaves3/models/block/stone_7.json
new file mode 100644
index 0000000..6b2ef7b
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_7.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure7"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_8.json b/assets/wildcaves3/models/block/stone_8.json
new file mode 100644
index 0000000..46d134d
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_8.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure8"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/block/stone_9.json b/assets/wildcaves3/models/block/stone_9.json
new file mode 100644
index 0000000..b73d041
--- /dev/null
+++ b/assets/wildcaves3/models/block/stone_9.json
@@ -0,0 +1,6 @@
+{
+ "parent":"block/cross",
+ "textures": {
+ "cross": "wildcaves3:blocks/stoneStructure9"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_0.json b/assets/wildcaves3/models/item/flora_0.json
new file mode 100644
index 0000000..577fb0f
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_0.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_1.json b/assets/wildcaves3/models/item/flora_1.json
new file mode 100644
index 0000000..1a73187
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_1.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_2.json b/assets/wildcaves3/models/item/flora_2.json
new file mode 100644
index 0000000..0ee5c5f
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_2.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_3.json b/assets/wildcaves3/models/item/flora_3.json
new file mode 100644
index 0000000..e64fb54
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_3.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora3"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_4.json b/assets/wildcaves3/models/item/flora_4.json
new file mode 100644
index 0000000..2428f71
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_4.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora4"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_5.json b/assets/wildcaves3/models/item/flora_5.json
new file mode 100644
index 0000000..13f4ac9
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_5.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora5"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_6.json b/assets/wildcaves3/models/item/flora_6.json
new file mode 100644
index 0000000..993907e
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_6.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora6"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_7.json b/assets/wildcaves3/models/item/flora_7.json
new file mode 100644
index 0000000..886f38a
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_7.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora7"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_8.json b/assets/wildcaves3/models/item/flora_8.json
new file mode 100644
index 0000000..383b19f
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_8.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora8"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/flora_9.json b/assets/wildcaves3/models/item/flora_9.json
new file mode 100644
index 0000000..42cb8ea
--- /dev/null
+++ b/assets/wildcaves3/models/item/flora_9.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/flora9"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/fossil_0.json b/assets/wildcaves3/models/item/fossil_0.json
new file mode 100644
index 0000000..c095c77
--- /dev/null
+++ b/assets/wildcaves3/models/item/fossil_0.json
@@ -0,0 +1,3 @@
+{
+ "parent": "wildcaves3:block/fossil"
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/icicle_0.json b/assets/wildcaves3/models/item/icicle_0.json
new file mode 100644
index 0000000..4d5e0f4
--- /dev/null
+++ b/assets/wildcaves3/models/item/icicle_0.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/decorations0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/icicle_1.json b/assets/wildcaves3/models/item/icicle_1.json
new file mode 100644
index 0000000..95bdf8d
--- /dev/null
+++ b/assets/wildcaves3/models/item/icicle_1.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/decorations1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/icicle_2.json b/assets/wildcaves3/models/item/icicle_2.json
new file mode 100644
index 0000000..6ef1638
--- /dev/null
+++ b/assets/wildcaves3/models/item/icicle_2.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/decorations2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_0.json b/assets/wildcaves3/models/item/sandstone_0.json
new file mode 100644
index 0000000..58206ac
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_0.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_1.json b/assets/wildcaves3/models/item/sandstone_1.json
new file mode 100644
index 0000000..742b371
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_1.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_10.json b/assets/wildcaves3/models/item/sandstone_10.json
new file mode 100644
index 0000000..d619e0d
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_10.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure10"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_11.json b/assets/wildcaves3/models/item/sandstone_11.json
new file mode 100644
index 0000000..4ed0022
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_11.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure11"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_12.json b/assets/wildcaves3/models/item/sandstone_12.json
new file mode 100644
index 0000000..f4ad57a
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_12.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure12"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_2.json b/assets/wildcaves3/models/item/sandstone_2.json
new file mode 100644
index 0000000..d9ab503
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_2.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_3.json b/assets/wildcaves3/models/item/sandstone_3.json
new file mode 100644
index 0000000..8f08030
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_3.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure3"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_4.json b/assets/wildcaves3/models/item/sandstone_4.json
new file mode 100644
index 0000000..db30168
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_4.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure4"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_5.json b/assets/wildcaves3/models/item/sandstone_5.json
new file mode 100644
index 0000000..1e9b250
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_5.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure5"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_6.json b/assets/wildcaves3/models/item/sandstone_6.json
new file mode 100644
index 0000000..3819698
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_6.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure6"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_7.json b/assets/wildcaves3/models/item/sandstone_7.json
new file mode 100644
index 0000000..3d8439a
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_7.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure7"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_8.json b/assets/wildcaves3/models/item/sandstone_8.json
new file mode 100644
index 0000000..7caef34
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_8.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure8"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/sandstone_9.json b/assets/wildcaves3/models/item/sandstone_9.json
new file mode 100644
index 0000000..ab06dba
--- /dev/null
+++ b/assets/wildcaves3/models/item/sandstone_9.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/sandstoneStructure9"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_0.json b/assets/wildcaves3/models/item/stone_0.json
new file mode 100644
index 0000000..1bd409b
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_0.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure0"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_1.json b/assets/wildcaves3/models/item/stone_1.json
new file mode 100644
index 0000000..58f986b
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_1.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure1"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_10.json b/assets/wildcaves3/models/item/stone_10.json
new file mode 100644
index 0000000..2b3b93d
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_10.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure10"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_11.json b/assets/wildcaves3/models/item/stone_11.json
new file mode 100644
index 0000000..93b5e54
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_11.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure11"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_12.json b/assets/wildcaves3/models/item/stone_12.json
new file mode 100644
index 0000000..9e0bbaf
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_12.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure12"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_2.json b/assets/wildcaves3/models/item/stone_2.json
new file mode 100644
index 0000000..07c52e5
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_2.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure2"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_3.json b/assets/wildcaves3/models/item/stone_3.json
new file mode 100644
index 0000000..339a77d
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_3.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure3"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_4.json b/assets/wildcaves3/models/item/stone_4.json
new file mode 100644
index 0000000..c6b9b0f
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_4.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure4"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_5.json b/assets/wildcaves3/models/item/stone_5.json
new file mode 100644
index 0000000..835daea
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_5.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure5"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_6.json b/assets/wildcaves3/models/item/stone_6.json
new file mode 100644
index 0000000..12f5cb6
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_6.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure6"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_7.json b/assets/wildcaves3/models/item/stone_7.json
new file mode 100644
index 0000000..bf1c0ef
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_7.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure7"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_8.json b/assets/wildcaves3/models/item/stone_8.json
new file mode 100644
index 0000000..3aadb54
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_8.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure8"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/models/item/stone_9.json b/assets/wildcaves3/models/item/stone_9.json
new file mode 100644
index 0000000..9dc1c8b
--- /dev/null
+++ b/assets/wildcaves3/models/item/stone_9.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "wildcaves3:blocks/stoneStructure9"
+ }
+}
\ No newline at end of file
diff --git a/assets/wildcaves3/textures/blocks/flora0.png b/assets/wildcaves3/textures/blocks/flora0.png
index b2e4f16..f63235b 100644
Binary files a/assets/wildcaves3/textures/blocks/flora0.png and b/assets/wildcaves3/textures/blocks/flora0.png differ
diff --git a/assets/wildcaves3/textures/blocks/flora1.png b/assets/wildcaves3/textures/blocks/flora1.png
index 3fa3d96..5ef5247 100644
Binary files a/assets/wildcaves3/textures/blocks/flora1.png and b/assets/wildcaves3/textures/blocks/flora1.png differ
diff --git a/assets/wildcaves3/textures/blocks/flora2.png b/assets/wildcaves3/textures/blocks/flora2.png
index 58b9393..3d3eefd 100644
Binary files a/assets/wildcaves3/textures/blocks/flora2.png and b/assets/wildcaves3/textures/blocks/flora2.png differ
diff --git a/assets/wildcaves3/textures/blocks/flora3.png b/assets/wildcaves3/textures/blocks/flora3.png
index 5e1add2..da11950 100644
Binary files a/assets/wildcaves3/textures/blocks/flora3.png and b/assets/wildcaves3/textures/blocks/flora3.png differ
diff --git a/assets/wildcaves3/textures/blocks/flora4.png b/assets/wildcaves3/textures/blocks/flora4.png
index 4fd4c00..bced7a0 100644
Binary files a/assets/wildcaves3/textures/blocks/flora4.png and b/assets/wildcaves3/textures/blocks/flora4.png differ
diff --git a/assets/wildcaves3/textures/blocks/flora5.png b/assets/wildcaves3/textures/blocks/flora5.png
index 32da7ec..246b189 100644
Binary files a/assets/wildcaves3/textures/blocks/flora5.png and b/assets/wildcaves3/textures/blocks/flora5.png differ
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..c33c39e
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,52 @@
+buildscript {
+ repositories {
+ jcenter()
+ maven {
+ name = "forge"
+ url = "http://files.minecraftforge.net/maven"
+ }
+ }
+ dependencies {
+ classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
+ }
+}
+apply plugin: 'net.minecraftforge.gradle.forge'
+
+/*plugins {
+ id "net.minecraftforge.gradle.forge" version "2.0.2"
+}*/
+sourceCompatibility = 1.6
+targetCompatibility = 1.6
+version = "0.4.3.7"
+minecraft {
+ version = "1.9-12.16.1.1904"
+ runDir = "eclipse"
+ mappings = "snapshot_20160312"
+ replace '${version}', version
+ makeObfSourceJar = false
+}
+archivesBaseName = project.projectDir.name
+sourceSets.main.java{srcDirs project.projectDir.getPath() include("wildCaves/**")}
+sourceSets.main.resources{srcDirs project.projectDir.getPath() include("assets/**" , "WildCaves3.png", "*.info", "*.mcmeta", "*.md")}
+processResources {
+ // this will ensure that this task is redone when the versions change.
+ inputs.property "version", project.version
+ inputs.property "mcversion", project.minecraft.version
+ // replace stuff in mcmod.info, nothing else
+ from(project.sourceSets.main.resources.srcDirs) {
+ include "mcmod.info"
+ // replace version and mcversion
+ expand([version:project.version, mcversion:project.minecraft.version])
+ }
+ // copy images and lang files
+ from(project.sourceSets.main.resources.srcDirs) {
+ include "assets/**", "*.png", "*.mcmeta", "*.md"
+ }
+}
+jar {
+ //Keep the jar as clean as possible
+ includeEmptyDirs = false
+ //Append with minecraft version
+ classifier = "("+minecraft.version+")"
+ archiveName = archivesBaseName + "-" + version + classifier+"."+extension
+}
\ No newline at end of file
diff --git a/changelog.md b/changelog.md
new file mode 100644
index 0000000..80127b9
--- /dev/null
+++ b/changelog.md
@@ -0,0 +1,17 @@
+== WildCaves3 0.4.3.7 (1.8) ==
+* Updated for 1.8 (block states and models)
+* Made flooded caves bigger
+
+== WildCaves3 0.4.3.6 (1.7.2) ==
+* Updated for 1.7.2
+* Added "simple" flooded cave generation
+* Fixed a few config options
+* Changed block whitelist to use block names instead of id
+* Added M.U.D support
+
+== WildCaves3 0.4.3.5 (1.6.X) ==
+* Added multiple language support
+* Fixed and improved config file
+* Fixed stalactite generation in air
+* Fixed mushroom lighting
+* Added dripping particles
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..30d399d
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..9397848
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Sep 14 12:28:28 PDT 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/mcmod.info b/mcmod.info
new file mode 100644
index 0000000..ef3eef7
--- /dev/null
+++ b/mcmod.info
@@ -0,0 +1,21 @@
+[
+{
+ "modid": "wildcaves3",
+ "name": "Wild Caves 3",
+ "description": "This mod gives some much needed love to vanilla caves, adds stalactites, stalagmites, vines, glowing mushrooms, icicles and there's more to come.",
+ "mcversion": $mcversion,
+ "version" : $version,
+ "url": "http://www.minecraftforum.net/topic/1554854-146forge-wildcaves-3-v032/",
+ "updateUrl": "",
+ "authorList": [
+ "Alexmania"
+ ],
+ "logoFile": "WildCaves3.png",
+ "screenshots": [
+ ],
+ "parent":"",
+ "dependencies": [
+ "MinecraftForge"
+ ]
+}
+]
\ No newline at end of file
diff --git a/mcpmod.info b/mcpmod.info
deleted file mode 100644
index 9415410..0000000
--- a/mcpmod.info
+++ /dev/null
@@ -1,17 +0,0 @@
-[
-{
- "modid": "mcp",
- "name": "Minecraft Coder Pack",
- "description": "Modding toolkit to decompile and deobfuscate the Minecraft client and server files.",
- "version": "8.04",
- "mcversion": "1.6.2",
- "logoFile": "/mcplogo.png",
- "url": "http://mcp.ocean-labs.de/",
- "updateUrl": "",
- "authors": ["Searge", "ProfMobius", "IngisKahn", "Fesh0r", "ZeuX", "R4wk", "Others"],
- "credits": "Made by the MCP team",
- "parent": "",
- "screenshots": [],
- "dependencies": []
-}
-]
diff --git a/update.xml b/update.xml
new file mode 100644
index 0000000..a6084b3
--- /dev/null
+++ b/update.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wildCaves/BlockDecorations.java b/wildCaves/BlockDecorations.java
index 19f3f4d..a9503c4 100644
--- a/wildCaves/BlockDecorations.java
+++ b/wildCaves/BlockDecorations.java
@@ -1,191 +1,161 @@
package wildCaves;
-import java.util.List;
-import java.util.Random;
-
import net.minecraft.block.Block;
+import net.minecraft.block.SoundType;
+import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.block.properties.PropertyInteger;
+import net.minecraft.block.state.BlockStateContainer;
+import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.Entity;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.Icon;
+import net.minecraft.util.BlockRenderLayer;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
-public class BlockDecorations extends Block
-{
- @SideOnly(Side.CLIENT)
- private Icon[] iconArray;
- private int numOfStructures=3;
-
- public BlockDecorations(int id)
+import java.util.List;
+import java.util.Random;
+
+public class BlockDecorations extends Block {
+ private PropertyInteger ALL_TYPE;
+
+ public BlockDecorations() {
+ super(Material.packedIce);
+ this.setResistance(0.6F);
+ this.setUnlocalizedName("decorationsBlock");
+ this.setStepSound(SoundType.GLASS);
+ this.setDefaultState(this.blockState.getBaseState().withProperty(ALL_TYPE, 0));
+ }
+
+ public int getNumOfStructures(){
+ return WildCaves.icicles.size();
+ }
+
+ @Override
+ protected BlockStateContainer createBlockState()
{
- super(id, Material.rock);
- float f = 0.25F;
- this.setCreativeTab(WildCaves.tabWildCaves);
- setResistance(0.6F);
- setUnlocalizedName("decorationsBlock");
- this.setStepSound(soundGlassFootstep);
- }
-
- @Override
- public int idDropped(int metadata, Random random, int par3)
- {
- return Block.ice.blockID;
- }
-
- @Override
- public int quantityDropped(Random rand)
- {
- return rand.nextInt(3)-1;
- }
-
- @Override
- public int damageDropped (int metadata)
- {
- return 0;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public Icon getIcon(int side, int metadata)
- {
- if(metadata >= numOfStructures)
- metadata = numOfStructures-1;
- return this.iconArray[metadata];
- }
-
- /**
- * Get the block's damage value (for use with pick block).
- */
- @Override
- public int getDamageValue(World world, int x, int y, int z)
- {
- return world.getBlockMetadata(x, y, z);
- }
-
- @Override
- public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata)
- {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
- {
- for (int i = 0; i < numOfStructures; ++i)
- {
- par3List.add(new ItemStack(par1, 1, i));
- }
- }
-
- @Override
- public boolean canPlaceBlockAt(World world, int x, int y, int z)
- {
- return super.canPlaceBlockAt(world, x, y, z) && canBlockStay(world, x, y, z);
- }
-
- @Override
- public boolean canBlockStay(World world, int x, int y, int z)
- {
- return world.isBlockNormalCube(x, y+1, z) || world.getBlockId(x, y+1, z)==Block.ice.blockID;
- }
-
- @Override
- public void onNeighborBlockChange(World world, int x, int y, int z, int blockID)
- {
- if( !world.isRemote && !this.canBlockStay(world, x, y, z))
- {
- this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
- world.setBlockToAir(x, y, z);
- }
- }
-
- /**
- * The type of render function that is called for this block
- */
- @Override
- public int getRenderType()
- {
- return 1;
- }
-
- /**
- * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
- */
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
-
- /**
- * 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.
- */
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- /**
- * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
- * cleared to be reused)
- */
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
- {
- return null;
- }
-
- @Override
- //Updates the blocks bounds based on its current state. Args: world, x, y, z
- public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- int metadata = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
-
- switch(metadata)
- {
- case 1:
- this.setBlockBounds(0.25F, 0.2F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- case 2:
- this.setBlockBounds(0.25F, 0.5F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- case 9:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F,0.8F, 0.75F);
- break;
- case 10:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F,0.4F, 0.75F);
- break;
- default:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side)
- {
- return this.iconArray[blockAccess.getBlockMetadata(x, y, z)];
- }
+ if(ALL_TYPE == null){
+ ALL_TYPE = PropertyInteger.create("type", 0, getNumOfStructures() - 1);
+ }
+ return new BlockStateContainer(this, ALL_TYPE);
+ }
+
+ @Override
+ public int getMetaFromState(IBlockState state){
+ return state.getValue(ALL_TYPE);
+ }
+
+ @Override
+ public IBlockState getStateFromMeta(int meta){
+ return this.getDefaultState().withProperty(ALL_TYPE, meta);
+ }
+
+ public boolean canBlockStay(World world, BlockPos pos) {
+ return world.getBlockState(pos.up()).isNormalCube() || world.getBlockState(pos.up()).getMapColor() == MapColor.iceColor;
+ }
+
+ @Override
+ public boolean canPlaceBlockAt(World world, BlockPos pos) {
+ return canBlockStay(world, pos) && super.canPlaceBlockAt(world, pos);
+ }
+
+ @Override
+ protected boolean canSilkHarvest() {
+ return true;
+ }
+
+ @Override
+ public int damageDropped(IBlockState state) {
+ return getMetaFromState(state);
+ }
@Override
@SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister iconRegister)
+ public BlockRenderLayer getBlockLayer()
{
- this.iconArray = new Icon[numOfStructures];
+ return BlockRenderLayer.CUTOUT;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
+ for (int i = 0; i < getNumOfStructures(); ++i) {
+ par3List.add(new ItemStack(par1, 1, i));
+ }
+ }
+
+ @Override
+ public Item getItemDropped(IBlockState metadata, Random random, int par3) {
+ return Item.getItemFromBlock(Blocks.ice);
+ }
+
+ @Override
+ public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block block) {
+ if (!this.canBlockStay(world, pos)){
+ world.setBlockToAir(pos);
+ }
+ }
+
+ @Override
+ public int quantityDropped(Random rand) {
+ return rand.nextInt(3) - 1;
+ }
+
+ @Override
+ public boolean isFullBlock(IBlockState state) {
+ return false;
+ }
+
+ @Override
+ public boolean isOpaqueCube(IBlockState state) {
+ return false;
+ }
+
+ @Override
+ public boolean isBlockNormalCube(IBlockState state) {
+ return false;
+ }
+
+ @Override
+ public boolean isNormalCube(IBlockState state) {
+ return false;
+ }
+
+ @Override
+ public boolean isVisuallyOpaque() {
+ return false;
+ }
+
+ @Override
+ public boolean isFullCube(IBlockState state) {
+ return false;
+ }
+
+ @Override
+ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess par1IBlockAccess, BlockPos pos) {
+ return Utils.getBox(getMetaFromState(state));
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean isTranslucent(IBlockState state) {
+ return true;
+ }
+
+ @Override
+ public boolean isPassable(IBlockAccess access, BlockPos pos) {
+ return true;
+ }
+
+ @Override
+ public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB alignedBB, List list, Entity entity) {
- for (int i = 0; i < this.iconArray.length; ++i)
- {
- this.iconArray[i] = iconRegister.registerIcon(WildCaves.modid + ":decorations"+ i);
- }
}
}
diff --git a/wildCaves/BlockFlora.java b/wildCaves/BlockFlora.java
index 0047b15..e7db463 100644
--- a/wildCaves/BlockFlora.java
+++ b/wildCaves/BlockFlora.java
@@ -1,174 +1,150 @@
package wildCaves;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
import net.minecraft.block.Block;
-import net.minecraft.block.BlockFlower;
+import net.minecraft.block.BlockBush;
+import net.minecraft.block.SoundType;
+import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.block.properties.IProperty;
+import net.minecraft.block.properties.PropertyInteger;
+import net.minecraft.block.state.BlockStateContainer;
+import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.Icon;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.util.Vec3;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.IShearable;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
-public class BlockFlora extends BlockFlower implements IShearable
-{
-
- @SideOnly(Side.CLIENT)
- private Icon[] iconArray;
- private int numOfStructures=10;
-
- public BlockFlora(int id, int floraLightLevel)
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+public class BlockFlora extends BlockBush implements IShearable {
+ private PropertyInteger ALL_TYPE;
+ private static AxisAlignedBB LOW_AABB = new AxisAlignedBB(0.25F, 0F, 0.25F, 0.6F, 0.75F, 0.75F);
+ private static AxisAlignedBB DEFAULT_AABB = new AxisAlignedBB(0.25F, 0F, 0.25F, 0.75F, 1F, 0.75F);
+
+ public BlockFlora() {
+ super(Material.plants);
+ this.setLightOpacity(0);
+ this.setStepSound(SoundType.PLANT);
+ this.setResistance(0.6F);
+ this.setUnlocalizedName("floraBlock");
+ this.setDefaultState(this.blockState.getBaseState().withProperty(ALL_TYPE, 0));
+ }
+
+ public int getNumOfStructures(){
+ return WildCaves.caps.size();
+ }
+
+ @Override
+ protected BlockStateContainer createBlockState()
{
- super(id, Material.plants);
- float f = 0.25F;
- this.setCreativeTab(WildCaves.tabWildCaves);
- this.setTickRandomly(false);
- this.setLightOpacity(0);
- this.setStepSound(soundGrassFootstep);
- setResistance(0.6F);
- setLightValue(floraLightLevel);
- setUnlocalizedName("floraBlock");
+ if(ALL_TYPE == null) {
+ ALL_TYPE = PropertyInteger.create("type", 0, getNumOfStructures() - 1);
+ }
+ return new BlockStateContainer(this, ALL_TYPE);
}
-
-
+
@Override
- //Updates the blocks bounds based on its current state. Args: world, x, y, z
- public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- int metadata = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
-
-
- //setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ)
- switch(metadata)
- {
- case 1:
- this.setBlockBounds(0.25F, 0F, 0.25F, 0.60F, 0.75F, 0.75F);
- break;
- case 2:
- this.setBlockBounds(0.25F, 0F, 0.25F, 0.75F, 0.4F, 0.75F);
- break;
- default:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- }
- }
-
+ public int getMetaFromState(IBlockState state){
+ return state.getValue(ALL_TYPE);
+ }
+
@Override
- public int idDropped(int par1, Random par2Random, int par3)
- {
- return Item.glowstone.itemID;
- }
-
- @Override
- public int quantityDropped(Random rand)
- {
- return rand.nextInt(2);
- }
-
- @Override
- public int damageDropped (int metadata)
- {
- return 0;
+ public IBlockState getStateFromMeta(int meta){
+ return this.getDefaultState().withProperty(ALL_TYPE, meta);
+ }
+
+ @Override
+ public boolean canBlockStay(World world, BlockPos pos, IBlockState state) {
+ if(world.isBlockNormalCube(pos.down(), true))
+ return true;
+ IBlockState bellowId = world.getBlockState(pos.down());
+ return bellowId.getMapColor() == MapColor.iceColor || (bellowId.getBlock() == this && getMetaFromState(bellowId) == 4);
}
@Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
- {
- for (int i = 0; i < numOfStructures; ++i)
- {
- par3List.add(new ItemStack(par1, 1, i));
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public Icon getIcon(int side, int metadata)
- {
- if(metadata >=numOfStructures)
- metadata=numOfStructures-1;
- return this.iconArray[metadata];
- }
-
- @Override
- protected boolean canThisPlantGrowOnThisBlockID(int par1)
- {
- return true;
- }
-
- @Override
- public void onNeighborBlockChange(World world, int x, int y, int z, int blockID)
- {
- if(!this.canPlaceBlockAt(world, x, y, z))
- world.setBlock(x, y, z, 0);
- }
-
- @Override
- public boolean canPlaceBlockAt(World world, int x, int y, int z)
- {
- boolean result = false;
- int metadata = world.getBlockMetadata(x, y, z);
- int bellowId = world.getBlockId(x, y-1, z);
- int metadataBellow = world.getBlockMetadata(x, y-1, z);
- boolean solidBellow = world.isBlockNormalCube(x, y-1, z);
-
- if(solidBellow || bellowId == Block.ice.blockID || (bellowId==this.blockID && metadataBellow==4))
- {
- result = true;
- }
-
- return result;
- }
-
- @Override
- public void onBlockAdded(World world, int x, int y, int z)
- {
- if(!this.canPlaceBlockAt(world, x, y, z))
- world.setBlock(x, y, z, 0);
+ public int damageDropped(IBlockState meta){
+ return 0;
}
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
+ for (int i = 0; i < getNumOfStructures(); ++i) {
+ par3List.add(new ItemStack(par1, 1, i));
+ }
+ }
+
+ @Override
+ public Item getItemDropped(IBlockState par1, Random par2Random, int par3) {
+ return Items.glowstone_dust;
+ }
+
+ @Override
+ public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos) {
+ return true;
+ }
+
+ @Override
+ protected void checkAndDropBlock(World world, BlockPos pos, IBlockState state) {
+ if (!this.canBlockStay(world, pos, state))
+ world.setBlockToAir(pos);
+ }
+
+ @Override
+ public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block blockID) {
+ checkAndDropBlock(world, pos, state);
+ }
+
+ @Override
+ public ArrayList onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) {
+ ArrayList ret = new ArrayList();
+ ret.add(new ItemStack(this, 1, getMetaFromState(world.getBlockState(pos))));
+ ((World)world).setBlockToAir(pos);
+ return ret;
+ }
+
+ @Override
+ public int quantityDropped(Random rand) {
+ return rand.nextInt(2);
+ }
+
+ @Override
+ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess par1IBlockAccess, BlockPos pos) {
+ int metadata = getMetaFromState(state);
+ switch (metadata) {
+ case 1:
+ return LOW_AABB;
+ case 2:
+ return DEFAULT_AABB.setMaxY(0.4F);
+ default:
+ return DEFAULT_AABB;
+ }
+ }
+
+ @Override//Can Place Block On
+ protected boolean func_185514_i(IBlockState par1) {
+ return true;
+ }
+
@Override
- public boolean isShearable(ItemStack item, World world, int x, int y, int z)
- {
+ public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable){
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)));
- world.setBlockToAir(x, y, z);
- return ret;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side)
- {
- return this.iconArray[blockAccess.getBlockMetadata(x, y, z)];
+ public Block setLightLevel(float val){
+ this.lightValue = (int)val;
+ return this;
}
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister iconRegister)
- {
- this.iconArray = new Icon[numOfStructures];
-
- for (int i = 0; i < this.iconArray.length; ++i)
- {
- this.iconArray[i] = iconRegister.registerIcon(WildCaves.modid + ":flora"+ i);
- }
- }
}
diff --git a/wildCaves/BlockFossils.java b/wildCaves/BlockFossils.java
index f3b03bf..72415c9 100644
--- a/wildCaves/BlockFossils.java
+++ b/wildCaves/BlockFossils.java
@@ -1,119 +1,41 @@
package wildCaves;
-import java.util.List;
-import java.util.Random;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
+import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.Icon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-public class BlockFossils extends Block
-{
- @SideOnly(Side.CLIENT)
- private Icon[] iconArray;
- private int numOfStructures=1;
+import java.util.Random;
- public BlockFossils(int id)
- {
- super(id, Material.rock);
+public class BlockFossils extends Block {
+ public BlockFossils() {
+ super(Material.rock);
this.setHardness(1F);
- this.setCreativeTab(WildCaves.tabWildCaves);
setUnlocalizedName("fossilsBlock");
- this.setStepSound(soundStoneFootstep);
+ this.setStepSound(SoundType.STONE);
}
-
+
@Override
- public int idDropped(int metadata, Random random, int par3)
- {
+ public Item getItemDropped(IBlockState metadata, Random random, int par3) {
int choise = Utils.weightedChoise(0.5f, 0.15f, 0.05f, 0.5f, 0, 0);
- int result = 0;
- switch(choise)
- {
- case 1:
- result=Item.bone.itemID;
- break;
- case 2:
- result=Item.arrow.itemID;
- break;
- case 3:
- result=Item.skull.itemID;
- break;
- case 4:
- result=Block.cobblestone.blockID;
- }
+ Item result = null;
+ switch (choise) {
+ case 1:
+ result = Items.bone;
+ break;
+ case 2:
+ result = Items.arrow;
+ break;
+ case 3:
+ result = Items.skull;
+ break;
+ case 4:
+ result = Item.getItemFromBlock(Blocks.cobblestone);
+ }
return result;
- }
-
- @Override
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- @Override
- public int damageDropped (int metadata)
- {
- return 0;
}
-
- @Override
- @SideOnly(Side.CLIENT)
- public Icon getIcon(int side, int metadata)
- {
- if(metadata >= numOfStructures)
- metadata = numOfStructures-1;
- return this.iconArray[metadata];
- }
-
- /**
- * Get the block's damage value (for use with pick block).
- */
- @Override
- public int getDamageValue(World world, int x, int y, int z)
- {
- return world.getBlockMetadata(x, y, z);
- }
-
- @Override
- public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata)
- {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
- {
- for (int i = 0; i < numOfStructures; ++i)
- {
- par3List.add(new ItemStack(par1, 1, i));
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side)
- {
- return this.iconArray[blockAccess.getBlockMetadata(x, y, z)];
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister iconRegister)
- {
- this.iconArray = new Icon[numOfStructures];
- for (int i = 0; i < this.iconArray.length; ++i)
- {
- this.iconArray[i] = iconRegister.registerIcon(WildCaves.modid + ":fossils"+ i);
- }
- }
}
diff --git a/wildCaves/BlockSandstoneStalactite.java b/wildCaves/BlockSandstoneStalactite.java
deleted file mode 100644
index 8ff5d90..0000000
--- a/wildCaves/BlockSandstoneStalactite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package wildCaves;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-
-public class BlockSandstoneStalactite extends BlockStalactite {
- public BlockSandstoneStalactite(int id, boolean solidStalactites, boolean damageWhenFallenOn) {
- super(id, solidStalactites, damageWhenFallenOn);
- setUnlocalizedName("sandstoneStalactiteBlock");
- setTextureName(":sandstoneStructure");
- }
-
- @Override
- public int idDropped(int par1, Random par2Random, int par3) {
- return Block.sandStone.blockID;
- }
-
- @Override
- public int quantityDropped(Random rand) {
- return rand.nextInt(3) - 1;
- }
-}
diff --git a/wildCaves/BlockStalactite.java b/wildCaves/BlockStalactite.java
index 10a6003..d4e31b7 100644
--- a/wildCaves/BlockStalactite.java
+++ b/wildCaves/BlockStalactite.java
@@ -1,59 +1,94 @@
package wildCaves;
-import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.block.properties.PropertyInteger;
+import net.minecraft.block.state.BlockStateContainer;
+import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.DamageSource;
-import net.minecraft.util.Icon;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
-public abstract class BlockStalactite extends Block {
- private int numOfStructures = 13;
- private boolean solidStalactites;
- private boolean damageWhenFallenOn;
- @SideOnly(Side.CLIENT)
- private Icon[] iconArray;
+import java.util.List;
+import java.util.Random;
+
+public class BlockStalactite extends Block {
+ private final Item droppedItem;
+ private PropertyInteger ALL_TYPE;
- public BlockStalactite(int id, boolean solidStalactites, boolean damageWhenFallenOn) {
- super(id, Material.rock);
+ public BlockStalactite(Item drop) {
+ super(Material.rock);
+ this.droppedItem = drop;
this.setHardness(0.8F);
- this.setCreativeTab(WildCaves.tabWildCaves);
- this.solidStalactites = solidStalactites;
- this.damageWhenFallenOn = damageWhenFallenOn;
+ this.setDefaultState(this.blockState.getBaseState().withProperty(ALL_TYPE, 0));
+ }
+
+ public int getNumOfStructures(){
+ return WildCaves.sandStalacs.size();
+ }
+
+ public boolean isUp(IBlockState state){
+ return getMetaFromState(state) < 4;
+ }
+
+ @Override
+ protected BlockStateContainer createBlockState(){
+ if(ALL_TYPE == null) {
+ ALL_TYPE = PropertyInteger.create("type", 0, getNumOfStructures() - 1);
+ }
+ return new BlockStateContainer(this, ALL_TYPE);
+ }
+
+ @Override
+ public int getMetaFromState(IBlockState state){
+ return state.getValue(ALL_TYPE);
}
@Override
- public boolean canBlockStay(World world, int x, int y, int z) {
+ public IBlockState getStateFromMeta(int meta){
+ return this.getDefaultState().withProperty(ALL_TYPE, meta);
+ }
+
+ @Override
+ public Item getItemDropped(IBlockState metadata, Random random, int par3) {
+ return droppedItem;
+ }
+
+ @Override
+ public int quantityDropped(Random rand) {
+ return rand.nextInt(3) - 1;
+ }
+
+ public boolean canBlockStay(World world, BlockPos pos, IBlockState state) {
boolean result = false;
- int metadata = world.getBlockMetadata(x, y, z);
+ int metadata = getMetaFromState(state);
if ((metadata != 0 && metadata < 4) || metadata == 7 || metadata == 11)
- result = connected(world, x, y, z, true);
+ result = connected(world, pos, true);
else if (metadata == 6 || (metadata > 7 && metadata < 11) || metadata == 12)
- result = connected(world, x, y, z, false);
+ result = connected(world, pos, false);
else if (metadata == 0 || metadata == 4 || metadata == 5)
- result = connected(world, x, y, z, true) || connected(world, x, y, z, false);
- ;
+ result = connected(world, pos, true) || connected(world, pos, false);
return result;
}
@Override
- public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata) {
+ protected boolean canSilkHarvest() {
return true;
}
//aux funtion for canblockStay
- public boolean connected(World world, int x, int y, int z, boolean searchUp) {
+ public boolean connected(World world, BlockPos pos, boolean searchUp) {
int increment;
int i;
if (searchUp)
@@ -61,121 +96,122 @@ public boolean connected(World world, int x, int y, int z, boolean searchUp) {
else
increment = -1;
i = increment;
- while (world.getBlockId(x, y + i, z) == WildCaves.blockStoneStalactiteID || world.getBlockId(x, y + i, z) == WildCaves.blockSandStalactiteID)
+ while (world.getBlockState(pos.up(i)).getBlock() == WildCaves.blockStoneStalactite || world.getBlockState(pos.up(i)).getBlock() == WildCaves.blockSandStalactite)
i = i + increment;
- return world.isBlockNormalCube(x, y + i, z);
+ return world.getBlockState(pos.up(i)).isNormalCube();
+ }
+
+ @Override
+ public int damageDropped(IBlockState state) {
+ return getMetaFromState(state);
}
@Override
@SideOnly(Side.CLIENT)
- public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side) {
- return this.iconArray[blockAccess.getBlockMetadata(x, y, z)];
+ public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
+ for (int i = 0; i < getNumOfStructures(); ++i) {
+ par3List.add(new ItemStack(par1, 1, i));
+ }
}
@Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
- if (solidStalactites)
- return super.getCollisionBoundingBoxFromPool(par1World, par2, par3, par4);
- else
- return null;
+ @SideOnly(Side.CLIENT)
+ public BlockRenderLayer getBlockLayer()
+ {
+ return BlockRenderLayer.CUTOUT;
}
@Override
- public int getDamageValue(World world, int x, int y, int z) {
- return world.getBlockMetadata(x, y, z);
+ public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
+ this.updateTick(world, pos, state, null);
}
+ @Override
+ public void updateTick(World world, BlockPos pos, IBlockState state, Random random) {
+ if (!this.canBlockStay(world, pos, state)){
+ this.dropBlockAsItem(world, pos, state, 0);
+ world.setBlockToAir(pos);
+ }
+ }
+
@Override
- @SideOnly(Side.CLIENT)
- public Icon getIcon(int side, int metadata) {
- if (metadata >= getNumOfStructures())
- metadata = getNumOfStructures() - 1;
- return this.iconArray[metadata];
+ public void onEntityCollidedWithBlock(World world, BlockPos pos, Entity entity) {
+ if(entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode && ((EntityPlayer) entity).capabilities.isFlying){
+ return;
+ }
+ entity.motionX *= 0.7D;
+ entity.motionZ *= 0.7D;
}
- public int getNumOfStructures() {
- return numOfStructures;
+ @Override
+ public void onFallenUpon(World world, BlockPos pos, Entity entity, float par6) {
+ if (WildCaves.damageWhenFallenOn && entity.isEntityAlive()) {
+ entity.attackEntityFrom(DamageSource.generic, 5);
+ }
}
@Override
- public int getRenderType() {
- return 1;
+ public void onLanded(World world, Entity entity) {
+ if(WildCaves.solidStalactites)
+ super.onLanded(world, entity);
}
@Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) {
- for (int i = 0; i < numOfStructures; ++i) {
- par3List.add(new ItemStack(par1, 1, i));
+ public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighbor) {
+ if (!world.isRemote && !this.canBlockStay(world, pos, state)) {
+ world.destroyBlock(pos, true);
}
}
@Override
- public boolean isOpaqueCube() {
+ public boolean isFullBlock(IBlockState state) {
return false;
}
@Override
- public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
- if (!world.isRemote && !this.canBlockStay(world, x, y, z)) {
- this.dropBlockAsItem_do(world, x, y, z, new ItemStack(this.blockID, 1, world.getBlockMetadata(x, y, z)));
- world.setBlockToAir(x, y, z);
- }
+ public boolean isOpaqueCube(IBlockState state) {
+ return false;
}
@Override
- public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
- entity.motionX *= 0.7D;
- entity.motionZ *= 0.7D;
+ public boolean isBlockNormalCube(IBlockState state) {
+ return false;
}
@Override
- public void onFallenUpon(World world, int par2, int par3, int par4, Entity entity, float par6) {
- if (entity.isEntityAlive() && damageWhenFallenOn) {
- ((EntityLiving) entity).attackEntityFrom(DamageSource.generic, 5);
- }
+ public boolean isNormalCube(IBlockState state) {
+ return false;
}
@Override
- public void onNeighborBlockChange(World world, int x, int y, int z, int blockID) {
- if (!world.isRemote && !this.canBlockStay(world, x, y, z)) {
- world.destroyBlock(x, y, z, true);
- }
+ public boolean isVisuallyOpaque() {
+ return false;
}
@Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister iconRegister) {
- this.iconArray = new Icon[getNumOfStructures()];
- for (int i = 0; i < this.iconArray.length; ++i) {
- this.iconArray[i] = iconRegister.registerIcon(WildCaves.modid + getTextureName() + i);
- }
+ public boolean isFullCube(IBlockState state) {
+ return false;
}
@Override
- public boolean renderAsNormalBlock() {
- return false;
+ public boolean isPassable(IBlockAccess access, BlockPos pos) {
+ return !WildCaves.solidStalactites || super.isPassable(access, pos);
}
@Override
- public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
- int metadata = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
- switch (metadata) {
- case 1:
- this.setBlockBounds(0.25F, 0.2F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- case 2:
- this.setBlockBounds(0.25F, 0.5F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- case 9:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.8F, 0.75F);
- break;
- case 10:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.4F, 0.75F);
- break;
- default:
- this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 1F, 0.75F);
- break;
- }
+ public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB alignedBB, List list, Entity entity) {
+ if(WildCaves.solidStalactites)
+ super.addCollisionBoxToList(state, world, pos, alignedBB, list, entity);
+ }
+
+ @Override
+ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess par1IBlockAccess, BlockPos pos) {
+ return Utils.getBox(getMetaFromState(state));
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean isTranslucent(IBlockState state) {
+ return true;
}
}
diff --git a/wildCaves/BlockStoneStalactite.java b/wildCaves/BlockStoneStalactite.java
index 562e29b..f38a5e1 100644
--- a/wildCaves/BlockStoneStalactite.java
+++ b/wildCaves/BlockStoneStalactite.java
@@ -1,23 +1,41 @@
package wildCaves;
-import java.util.Random;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.util.EnumParticleTypes;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
-import net.minecraft.block.Block;
+import java.util.Random;
public class BlockStoneStalactite extends BlockStalactite {
- public BlockStoneStalactite(int id, boolean solidStalactites, boolean damageWhenFallenOn) {
- super(id, solidStalactites, damageWhenFallenOn);
- setUnlocalizedName("stoneStalactiteBlock");
- setTextureName(":stoneStructure");
+ public BlockStoneStalactite() {
+ super(Item.getItemFromBlock(Blocks.cobblestone));
+ setUnlocalizedName("stoneStalactiteBlock");
}
@Override
- public int idDropped(int metadata, Random random, int par3) {
- return Block.cobblestone.blockID;
+ public int getNumOfStructures(){
+ return WildCaves.stalacs.size();
}
@Override
- public int quantityDropped(Random rand) {
- return rand.nextInt(3) - 1;
+ @SideOnly(Side.CLIENT)
+ public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random random) {
+ if (isUp(state)) {
+ boolean isWatered = world.getBlockState(pos.up(2)).getMaterial().isLiquid();
+ while (world.getBlockState(pos).getBlock() == this) {
+ if (random.nextInt(5 + (isWatered ? 0 : 10)) == 0) {
+ double d0 = pos.getX() + random.nextFloat();
+ double d2 = pos.getZ() + random.nextFloat();
+ double d1 = pos.getY() + 0.05D + (d0 - pos.getX()) * (d2 - pos.getZ());
+ world.spawnParticle(EnumParticleTypes.DRIP_WATER, d0, d1, d2, 0.0D, 0.0D, 0.0D);
+ }
+ pos = pos.down();
+ }
+ }
}
}
diff --git a/wildCaves/ClientProxy.java b/wildCaves/ClientProxy.java
new file mode 100644
index 0000000..0959ddd
--- /dev/null
+++ b/wildCaves/ClientProxy.java
@@ -0,0 +1,86 @@
+package wildCaves;
+
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.ItemModelMesher;
+import net.minecraft.client.renderer.block.model.ModelResourceLocation;
+import net.minecraft.client.renderer.color.IBlockColor;
+import net.minecraft.client.renderer.color.IItemColor;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.ColorizerFoliage;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.biome.BiomeColorHelper;
+import net.minecraftforge.client.model.ModelLoader;
+import net.minecraftforge.fml.common.FMLCommonHandler;
+import net.minecraftforge.fml.common.ModContainer;
+
+public class ClientProxy extends ServerProxy{
+ private static final String PREFIX = "wildcaves3:";
+
+ @Override
+ public void registerRenders() {
+ Item item = Item.getItemFromBlock(WildCaves.blockStoneStalactite);
+ ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
+ for(int i = 0; i < WildCaves.stalacs.size(); i++) {
+ ModelLoader.registerItemVariants(item, new ResourceLocation(PREFIX + "stone_" + i));
+ mesher.register(item, i, defaultModel("stone_" + i));
+ }
+ item = Item.getItemFromBlock(WildCaves.blockSandStalactite);
+ for(int i = 0; i < WildCaves.sandStalacs.size(); i++) {
+ ModelLoader.registerItemVariants(item, new ResourceLocation(PREFIX + "sandstone_" + i));
+ mesher.register(item, i, defaultModel("sandstone_" + i));
+ }
+ item = Item.getItemFromBlock(WildCaves.blockDecorations);
+ for(int i = 0; i < WildCaves.icicles.size(); i++) {
+ ModelLoader.registerItemVariants(item, new ResourceLocation(PREFIX + "icicle_" + i));
+ mesher.register(item, i, defaultModel("icicle_" + i));
+ }
+ item = Item.getItemFromBlock(WildCaves.blockFlora);
+ for(int i = 0; i < WildCaves.caps.size(); i++) {
+ ModelLoader.registerItemVariants(item, new ResourceLocation(PREFIX + "flora_" + i));
+ mesher.register(item, i, defaultModel("flora_" + i));
+ }
+ item = Item.getItemFromBlock(WildCaves.blockFossils);
+ for(int i = 0; i < WildCaves.fossils.size(); i++) {
+ ModelLoader.registerItemVariants(item, new ResourceLocation(PREFIX + "fossil_" + i));
+ mesher.register(item, i, defaultModel("fossil_" + i));
+ }
+ Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new IBlockColor() {
+ @Override
+ public int colorMultiplier(IBlockState iBlockState, IBlockAccess iBlockAccess, BlockPos blockPos, int i) {
+ if(iBlockState != null){
+ if(WildCaves.blockFlora.getMetaFromState(iBlockState) < 6)
+ return iBlockAccess != null ? BiomeColorHelper.getFoliageColorAtPos(iBlockAccess, blockPos) : ColorizerFoliage.getFoliageColorBasic();
+ }
+ return -1;
+ }
+ }, WildCaves.blockFlora);
+ Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() {
+ @Override
+ public int getColorFromItemstack(ItemStack itemStack, int i) {
+ if(itemStack.getMetadata() < 6)
+ return ColorizerFoliage.getFoliageColorBasic();
+ return -1;
+ }
+ }, WildCaves.blockFlora);
+ }
+
+ private ModelResourceLocation defaultModel(String type){
+ return new ModelResourceLocation(PREFIX + type, "inventory");
+ }
+
+ @Override
+ public void MUD(){
+ try {
+ Class.forName("mods.mud.ModUpdateDetector").getDeclaredMethod("registerMod", ModContainer.class, String.class, String.class).invoke(null,
+ FMLCommonHandler.instance().findContainerFor(this),
+ "https://raw.github.com/GotoLink/WildCaves3/master/update.xml",
+ "https://raw.github.com/GotoLink/WildCaves3/master/changelog.md"
+ );
+ } catch (Throwable e) {
+ }
+ }
+}
diff --git a/wildCaves/EventManager.java b/wildCaves/EventManager.java
index b4d4db3..079cfdf 100644
--- a/wildCaves/EventManager.java
+++ b/wildCaves/EventManager.java
@@ -1,65 +1,41 @@
package wildCaves;
-import java.util.Random;
-
-import net.minecraft.block.Block;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
-import cpw.mods.fml.common.IWorldGenerator;
+import net.minecraftforge.event.terraingen.OreGenEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+
+import java.util.Random;
-public class EventManager implements IWorldGenerator
+public final class EventManager
{
- private int chanceForNodeToSpawn;
+ private final WorldGenMinable[] mines = {new WorldGenMinable(WildCaves.blockFossils.getDefaultState(), 4), new WorldGenMinable(WildCaves.blockFossils.getDefaultState(), 5), new WorldGenMinable(WildCaves.blockFossils.getDefaultState(), 6)};
+ private final int chanceForNodeToSpawn;
public EventManager(int chanceForNodeToSpawn)
{
this.chanceForNodeToSpawn = chanceForNodeToSpawn;
}
-
- public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
- {
- switch(world.provider.dimensionId)
- {
- case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16);
- }
- }
- private void generateSurface(World world, Random random, int x, int z)
- {
- this.addOreSpawn(WildCaves.blockFossils, world, random, x, z, 16, 16, 4 + random.nextInt(3), chanceForNodeToSpawn, 1, 90);
+ @SubscribeEvent
+ public void generate(OreGenEvent.Post oreGen){
+ if (!WorldGenWildCaves.dimensionBlacklist.contains(oreGen.getWorld().provider.getDimension())) {
+ this.addOreSpawn(oreGen.getRand().nextInt(mines.length), oreGen.getWorld(), oreGen.getRand(), oreGen.getPos());
+ }
}
/**
- * Adds an Ore Spawn to Minecraft. Simply register all Ores to spawn with this method in your Generation method in your IWorldGeneration extending Class
- *
- * @param The Block to spawn
- * @param The World to spawn in
- * @param A Random object for retrieving random positions within the world to spawn the Block
- * @param An int for passing the X-Coordinate for the Generation method
- * @param An int for passing the Z-Coordinate for the Generation method
- * @param An int for setting the maximum X-Coordinate values for spawning on the X-Axis on a Per-Chunk basis
- * @param An int for setting the maximum Z-Coordinate values for spawning on the Z-Axis on a Per-Chunk basis
- * @param An int for setting the maximum size of a vein
- * @param An int for the Number of chances available for the Block to spawn per-chunk
- * @param An int for the minimum Y-Coordinate height at which this block may spawn
- * @param An int for the maximum Y-Coordinate height at which this block may spawn
+ * Adds an Ore Spawn to Minecraft
+ * @param mine the type of ore generator
+ * @param world to spawn in
+ * @param pos to spawn around
+ * @param random object for retrieving random positions within the world to spawn the Block
**/
- public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY)
+ private void addOreSpawn(int mine, World world, Random random, BlockPos pos)
{
- int maxPossY = minY + (maxY - 1);
- assert maxY > minY: "The maximum Y must be greater than the Minimum Y";
- assert maxX > 0 && maxX <= 16: "addOreSpawn: The Maximum X must be greater than 0 and less than 16";
- assert minY > 0: "addOreSpawn: The Minimum Y must be greater than 0";
- assert maxY < 256 && maxY > 0: "addOreSpawn: The Maximum Y must be less than 256 but greater than 0";
- assert maxZ > 0 && maxZ <= 16: "addOreSpawn: The Maximum Z must be greater than 0 and less than 16";
-
- int diffBtwnMinMaxY = maxY - minY;
- for(int x = 0; x < chancesToSpawn; x++)
- {
- int posX = blockXPos + random.nextInt(maxX);
- int posY = minY + random.nextInt(diffBtwnMinMaxY);
- int posZ = blockZPos + random.nextInt(maxZ);
- (new WorldGenMinable(block.blockID, maxVeinSize)).generate(world, random, posX, posY, posZ);
- }
+ for(int x = 0; x < chanceForNodeToSpawn; x++)
+ {
+ mines[mine].generate(world, random, pos.add(random.nextInt(16), 1 + random.nextInt(89), random.nextInt(16)));
+ }
}
}
diff --git a/wildCaves/ItemDecoration.java b/wildCaves/ItemDecoration.java
deleted file mode 100644
index 2355268..0000000
--- a/wildCaves/ItemDecoration.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package wildCaves;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.util.Icon;
-
-public class ItemDecoration extends MultiItemBlock {
- public ItemDecoration(int par1) {
- super(par1, "icicle1", "icicle2", "icicle3");
- setUnlocalizedName("decorationsBlock");
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public Icon getIconFromDamage(int damage) {
- if (damage > 13)
- damage = 13;
- return WildCaves.blockDecorations.getIcon(0, damage);
- }
-}
diff --git a/wildCaves/ItemFlora.java b/wildCaves/ItemFlora.java
deleted file mode 100644
index c1bf43c..0000000
--- a/wildCaves/ItemFlora.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package wildCaves;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.util.Icon;
-
-public class ItemFlora extends MultiItemBlock {
- public ItemFlora(int par1) {
- super(par1, "glowcap1", "glowcap2", "glowcap3", "gloweed1", "glowcap4top", "glowcap4bottom", "bluecap1", "bluecap2", "bluecap3", "bluecap4");
- setUnlocalizedName("floraBlock");
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public Icon getIconFromDamage(int damage) {
- if (damage > 13)
- damage = 13;
- return WildCaves.blockFlora.getIcon(0, damage);
- }
-}
diff --git a/wildCaves/ItemSandstoneStalactite.java b/wildCaves/ItemSandstoneStalactite.java
deleted file mode 100644
index 8ac7092..0000000
--- a/wildCaves/ItemSandstoneStalactite.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package wildCaves;
-
-public class ItemSandstoneStalactite extends ItemStalactite {
- public ItemSandstoneStalactite(int par1) {
- super(par1, WildCaves.blockSandStalactite, "sandstoneStalactite1", "sandstoneStalactite2", "sandstoneStalactite3", "sandstoneStalactite4", "sandstoneStalactiteConnection1",
- "sandstoneStalactiteConnection2", "sandstoneStalactiteConnection3", "sandstoneStalactiteConnection4", "sandstoneStalactiteEnd", "sandstoneStalacmiteEnd", "sandstoneStalacmite1",
- "sandstoneStalacmite2", "sandstoneStalacmite3", "-", "--", "---");
- setUnlocalizedName("sandstoneStalactiteBlock");
- }
-}
diff --git a/wildCaves/ItemStalactite.java b/wildCaves/ItemStalactite.java
index 2ddfac9..d5a0d61 100644
--- a/wildCaves/ItemStalactite.java
+++ b/wildCaves/ItemStalactite.java
@@ -1,93 +1,55 @@
package wildCaves;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
+import net.minecraft.block.BlockSnow;
+import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.Icon;
+import net.minecraft.util.EnumActionResult;
+import net.minecraft.util.EnumHand;
+import net.minecraft.util.SoundCategory;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
-public abstract class ItemStalactite extends MultiItemBlock {
- private BlockStalactite block;
+import java.util.ArrayList;
- public ItemStalactite(int par1, BlockStalactite block, String... names) {
- super(par1, names);
- this.block = block;
+public class ItemStalactite extends MultiItemBlock {
+ public ItemStalactite(Block block, ArrayList names) {
+ super(block, names);
}
- @SideOnly(Side.CLIENT)
@Override
- public Icon getIconFromDamage(int damage) {
- if (damage >= block.getNumOfStructures())
- damage = block.getNumOfStructures() - 1;
- return block.getIcon(0, damage);
- }
-
- @Override
- public int getMetadata(int damageValue) {
- if (damageValue > 13)
- damageValue = 13;
- return damageValue;
- }
-
- @Override
- public boolean onItemUse(ItemStack itemStack, EntityPlayer par2EntityPlayer, World world, int x, int y, int z, int side, float par8, float par9, float par10) {
- int blockId = world.getBlockId(x, y, z);
- if (blockId == Block.snow.blockID && (world.getBlockMetadata(x, y, z) & 7) < 1) {
- side = 1;
- } else if (blockId != Block.vine.blockID && blockId != Block.tallGrass.blockID && blockId != Block.deadBush.blockID
- && (Block.blocksList[blockId] == null || !Block.blocksList[blockId].isBlockReplaceable(world, x, y, z))) {
- if (side == 0) {
- --y;
- }
- if (side == 1) {
- ++y;
- }
- if (side == 2) {
- --z;
- }
- if (side == 3) {
- ++z;
- }
- if (side == 4) {
- --x;
- }
- if (side == 5) {
- ++x;
- }
+ public EnumActionResult onItemUse(ItemStack itemStack, EntityPlayer par2EntityPlayer, World world, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10) {
+ IBlockState state = world.getBlockState(pos);
+ Block blockId = state.getBlock();
+ if (blockId == Blocks.snow && (state.getValue(BlockSnow.LAYERS)) < 1) {
+ side = EnumFacing.UP;
+ } else if (blockId != Blocks.tallgrass && blockId != Blocks.deadbush && (blockId == Blocks.air || !blockId.isReplaceable(world, pos))) {
+ pos = pos.offset(side);
}
- if (itemStack.stackSize == 0) {
- return false;
- } else if (!par2EntityPlayer.canPlayerEdit(x, y, z, side, itemStack)) {
- return false;
- } else if (y == 255) {
- return false;
- } else if (world.canPlaceEntityOnSide(WildCaves.blockStoneStalactiteID, x, y, z, false, side, par2EntityPlayer, itemStack)
- || world.canPlaceEntityOnSide(WildCaves.blockSandStalactiteID, x, y, z, false, side, par2EntityPlayer, itemStack)) {
- if (canPlace(itemStack, world, x, y, z)) {
- Block block = Block.blocksList[WildCaves.blockStoneStalactiteID];
- int j1 = this.getMetadata(itemStack.getItemDamage());
- int k1 = Block.blocksList[WildCaves.blockStoneStalactiteID].onBlockPlaced(world, x, y, z, side, par8, par9, par10, j1);
- if (placeBlockAt(itemStack, par2EntityPlayer, world, x, y, z, side, par8, par9, par10, k1)) {
- world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
+ if (itemStack.stackSize > 0 && par2EntityPlayer.canPlayerEdit(pos, side, itemStack) && world.canBlockBePlaced(block, pos, false, side, par2EntityPlayer, itemStack)) {
+ if (canPlace(itemStack, world, pos)) {
+ int j1 = this.getMetadata(itemStack.getMetadata());
+ IBlockState k1 = block.onBlockPlaced(world, pos, side, par8, par9, par10, j1, par2EntityPlayer);
+ if (placeBlockAt(itemStack, par2EntityPlayer, world, pos, side, par8, par9, par10, k1)) {
+ world.playSound(par2EntityPlayer, pos, block.getStepSound().getPlaceSound(), SoundCategory.BLOCKS, (block.getStepSound().getVolume() + 1.0F) / 2.0F, block.getStepSound().getPitch() * 0.8F);
--itemStack.stackSize;
}
- return true;
- } else
- return false;
- } else {
- return false;
+ return EnumActionResult.SUCCESS;
+ }
}
+ return EnumActionResult.FAIL;
}
- private boolean canPlace(ItemStack itemStack, World world, int x, int y, int z) {
+ private boolean canPlace(ItemStack itemStack, World world, BlockPos pos) {
boolean result = false;
- int metadata = getMetadata(itemStack.getItemDamage());
- boolean upNormal = world.isBlockNormalCube(x, y + 1, z);
- boolean downNormal = world.isBlockNormalCube(x, y - 1, z);
- boolean upStalactite = world.getBlockId(x, y + 1, z) == WildCaves.blockStoneStalactiteID || world.getBlockId(x, y + 1, z) == WildCaves.blockSandStalactiteID;
- boolean downStalactite = world.getBlockId(x, y - 1, z) == WildCaves.blockStoneStalactiteID || world.getBlockId(x, y - 1, z) == WildCaves.blockSandStalactiteID;
+ int metadata = getMetadata(itemStack.getMetadata());
+ boolean upNormal = world.isBlockNormalCube(pos.up(), false);
+ boolean downNormal = world.isBlockNormalCube(pos.down(), false);
+ boolean upStalactite = isStalactite(world.getBlockState(pos.up()));
+ boolean downStalactite = isStalactite(world.getBlockState(pos.down()));
if ((metadata == 0 || metadata == 4 || metadata == 5) && (upNormal || downNormal || upStalactite || downStalactite))
result = true;
else if ((metadata < 4 || metadata == 7 || metadata == 11) && (upNormal || upStalactite))
@@ -96,4 +58,8 @@ else if ((metadata == 6 || (metadata > 7 && metadata < 11) || metadata == 12) &&
result = true;
return result;
}
+
+ private boolean isStalactite(IBlockState state){
+ return state.getBlock() == WildCaves.blockStoneStalactite || state.getBlock() == WildCaves.blockSandStalactite;
+ }
}
\ No newline at end of file
diff --git a/wildCaves/ItemStoneStalactite.java b/wildCaves/ItemStoneStalactite.java
deleted file mode 100644
index b0dc273..0000000
--- a/wildCaves/ItemStoneStalactite.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package wildCaves;
-
-public class ItemStoneStalactite extends ItemStalactite {
- public ItemStoneStalactite(int par1) {
- super(par1, WildCaves.blockStoneStalactite, "stalactite1", "stalactite2", "stalactite3", "stalactite4", "stalactiteConnection1", "stalactiteConnection2", "stalactiteConnection3",
- "stalactiteConnection4", "stalactiteEnd", "stalacmiteEnd", "stalacmite1", "stalacmite2", "stalacmite3", "", "", "icicle");
- setUnlocalizedName("stoneStalactiteBlock");
- }
-}
diff --git a/wildCaves/MultiItemBlock.java b/wildCaves/MultiItemBlock.java
index c152bd8..23d281d 100644
--- a/wildCaves/MultiItemBlock.java
+++ b/wildCaves/MultiItemBlock.java
@@ -1,24 +1,29 @@
package wildCaves;
+import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
+import java.util.ArrayList;
+
public class MultiItemBlock extends ItemBlock {
- private final String[] subNames;
+ private final ArrayList subNames;
- public MultiItemBlock(int par1, String... names) {
- super(par1);
+ public MultiItemBlock(Block block, ArrayList names) {
+ super(block);
this.subNames = names;
setHasSubtypes(true);
}
@Override
- public int getMetadata(int damageValue) {
- return damageValue;
+ public int getMetadata(int damage) {
+ if (damage >= subNames.size())
+ damage = 0;
+ return damage;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
- return subNames[itemstack.getItemDamage()];
+ return subNames.get(itemstack.getMetadata());
}
}
diff --git a/wildCaves/ServerProxy.java b/wildCaves/ServerProxy.java
new file mode 100644
index 0000000..047ba51
--- /dev/null
+++ b/wildCaves/ServerProxy.java
@@ -0,0 +1,8 @@
+package wildCaves;
+
+public class ServerProxy {
+
+ public void registerRenders(){}
+
+ public void MUD(){}
+}
diff --git a/wildCaves/Utils.java b/wildCaves/Utils.java
index add40fe..4ae48b5 100644
--- a/wildCaves/Utils.java
+++ b/wildCaves/Utils.java
@@ -1,65 +1,64 @@
package wildCaves;
-import java.util.Random;
+import java.util.*;
import net.minecraft.block.Block;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
-public class Utils {
- //checks if a given int is in the given array
- public static boolean arrayContainsInt(int[] array, int a) {
- boolean result = false;
- int i = 0;
- while (i < array.length && !result) {
- if (array[i] == a)
- result = true;
- i++;
- }
- return result;
- }
-
+public final class Utils {
+ public static Block frozen = Blocks.ice;
+ public static List freezable = Arrays.asList(Blocks.stone, Blocks.dirt, Blocks.gravel, Blocks.grass);
// transforms an area into snow and ice
- public static void convertToFrozenType(World world, Random random, int x, int y, int z) {
+ public static void convertToFrozenType(World world, Random random, BlockPos pos) {
int height = random.nextInt(5) + 3;
int length = random.nextInt(5) + 3;
int width = random.nextInt(5) + 3;
- int newX = x - length / 2;
- int newY = y + height / 2;
- int newZ = z - width / 2;
- int aux;
+ int newX = pos.getX() - length / 2;
+ int newY = pos.getY() + height / 2;
+ int newZ = pos.getZ() - width / 2;
+ Block aux;
for (int i = 0; i < height; i++) {
for (int j = 0; j < length; j++) {
for (int k = 0; k < width; k++) {
// basically transform or not
if (weightedChoise(0.8f, 0.2f, 0, 0, 0, 0) == 1) {
- aux = world.getBlockId(newX + j, newY - i, newZ + k);
- if (aux == Block.stone.blockID || aux == Block.dirt.blockID || aux == Block.gravel.blockID || aux == Block.grass.blockID)// stone -> Ice
- world.setBlock(newX + j, newY - i, newZ + k, Block.ice.blockID);
+ BlockPos newPos = new BlockPos(newX + j, newY - i, newZ + k);
+ aux = world.getBlockState(newPos).getBlock();
+ if (freezable.contains(aux))// stone -> Ice
+ world.setBlockState(newPos, frozen.getDefaultState(), 2);
}
}
}
}
}
-
+ private static IdentityHashMap sandEquivalent = new IdentityHashMap(8);
+ static{
+ sandEquivalent.put(Blocks.stone, Blocks.sandstone);
+ sandEquivalent.put(Blocks.dirt, Blocks.sand);
+ sandEquivalent.put(Blocks.gravel, Blocks.sand);
+ }
//transform an area in to sand and sandstone
- public static void convertToSandType(World world, Random random, int x, int y, int z) {
+ public static void convertToSandType(World world, Random random, BlockPos pos) {
int height = random.nextInt(5) + 3;
int length = random.nextInt(5) + 3;
int width = random.nextInt(5) + 3;
- int newX = x - length / 2;
- int newY = y + height / 2;
- int newZ = z - width / 2;
- int aux;
+ int newX = pos.getX() - length / 2;
+ int newY = pos.getY() + height / 2;
+ int newZ = pos.getZ() - width / 2;
+ Block aux;
for (int i = 0; i < height; i++) {
for (int j = 0; j < length; j++) {
for (int k = 0; k < width; k++) {
// basically transform or not
if (weightedChoise(0.7f, 0.3f, 0, 0, 0, 0) == 1) {
- aux = world.getBlockId(newX + j, newY - i, newZ + k);
- if (aux == Block.stone.blockID)// stone -> sandstone
- world.setBlock(newX + j, newY - i, newZ + k, Block.sandStone.blockID, 0, 2);
- else if (aux == Block.dirt.blockID || aux == Block.gravel.blockID) // dirt/gravel -> sand
- world.setBlock(newX + j, newY - i, newZ + k, Block.sand.blockID, 0, 2);
+ BlockPos newPos = new BlockPos(newX + j, newY - i, newZ + k);
+ aux = sandEquivalent.get(world.getBlockState(newPos).getBlock());
+ if (aux != null)// stone -> sandstone // dirt/gravel -> sand
+ world.setBlockState(newPos, aux.getDefaultState(), 2);
}
}
}
@@ -67,10 +66,10 @@ else if (aux == Block.dirt.blockID || aux == Block.gravel.blockID) // dirt/grave
}
// gets the number of empty blocks between the current one and the closest one bellow
- public static int getNumEmptyBlocks(World world, int x, int y, int z) {
+ public static int getNumEmptyBlocks(World world, BlockPos pos) {
int dist = 0;
- while (!world.isBlockNormalCube(x, y, z) && y > 5 && world.getBlockTileEntity(x, y, z) == null) {
- y--;
+ while (pos.getY() > 5 && !world.isBlockNormalCube(pos, true) && world.isAirBlock(pos)) {
+ pos = pos.down();
dist++;
}
return dist;
@@ -88,7 +87,7 @@ public static int randomChoise(int... val) {
public static int weightedChoise(float par1, float par2, float par3, float par4, float par5, float par6) {
float total = par1 + par2 + par3 + par4 + par5 + par6;
float val = new Random().nextFloat();
- float previous = 0.0f;
+ float previous;
par1 = par1 / total;
par2 = par2 / total;
par3 = par3 / total;
@@ -116,4 +115,21 @@ public static int weightedChoise(float par1, float par2, float par3, float par4,
else
return 6;
}
+
+ private static AxisAlignedBB HIGH_AABB = new AxisAlignedBB(0.25F, 0.5F, 0.25F, 0.75F, 1F, 0.75F);
+ private static AxisAlignedBB DEFAULT_AABB = new AxisAlignedBB(0.25F, 0.0F, 0.25F, 0.75F, 1F, 0.75F);
+ public static AxisAlignedBB getBox(int state){
+ switch (state) {
+ case 1:
+ return HIGH_AABB.addCoord(0, -0.3F, 0);
+ case 2:
+ return HIGH_AABB;
+ case 9:
+ return DEFAULT_AABB.setMaxY(0.8F);
+ case 10:
+ return DEFAULT_AABB.setMaxY(0.4F);
+ default:
+ return DEFAULT_AABB;
+ }
+ }
}
diff --git a/wildCaves/WildCaves.java b/wildCaves/WildCaves.java
index 9bd8ee3..06026f6 100644
--- a/wildCaves/WildCaves.java
+++ b/wildCaves/WildCaves.java
@@ -1,155 +1,93 @@
package wildCaves;
-import java.util.logging.Level;
-
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.WeightedRandomChestContent;
-import net.minecraftforge.common.ChestGenHooks;
-import net.minecraftforge.common.Configuration;
-import cpw.mods.fml.common.FMLLog;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.network.NetworkMod;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.common.registry.LanguageRegistry;
+import net.minecraft.world.storage.loot.*;
+import net.minecraft.world.storage.loot.conditions.LootCondition;
+import net.minecraft.world.storage.loot.conditions.RandomChance;
+import net.minecraft.world.storage.loot.functions.LootFunction;
+import net.minecraft.world.storage.loot.functions.SetMetadata;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.common.config.Configuration;
+import net.minecraftforge.event.LootTableLoadEvent;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.Mod.EventHandler;
+import net.minecraftforge.fml.common.SidedProxy;
+import net.minecraftforge.fml.common.event.FMLInitializationEvent;
+import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.registry.GameRegistry;
-@Mod(modid = WildCaves.modid, name = "Wild Caves 3", version = "0.4.3.4")
-@NetworkMod(clientSideRequired = true)
-public class WildCaves {
- public static final String modid = "wildcaves3";
- public static Block blockFlora, blockDecorations, blockFossils;
- public static BlockStoneStalactite blockStoneStalactite;
- public static BlockSandstoneStalactite blockSandStalactite;
- public static int floraLightLevel;
- public static int blockStoneStalactiteID, blockSandStalactiteID, blockFloraID;
- public static int timesPerChunck;
- public static int blockDecorationsID, blockFossilsID;
- public static int chanceForNodeToSpawn;
- private boolean solidStalactites, damageWhenFallenOn;
- public static Configuration config;
- private EventManager eventmanager;
- public static CreativeTabs tabWildCaves = new CreativeTabs("WildCaves3") {
- @Override
- public ItemStack getIconItemStack() {
- return new ItemStack(Item.eyeOfEnder, 1, 0);
- }
- };
+import java.util.ArrayList;
+import java.util.Arrays;
- public void initBlocks() {
- if (blockStoneStalactiteID != 0) {
- blockStoneStalactite = new BlockStoneStalactite(blockStoneStalactiteID, solidStalactites, damageWhenFallenOn);
- Item.itemsList[blockStoneStalactiteID] = new ItemStoneStalactite(blockStoneStalactiteID - 256);
- LanguageRegistry.instance().addStringLocalization("stalactite1.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactite2.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactite3.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactite4.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactiteConnection1.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactiteConnection2.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactiteConnection3.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactiteConnection4.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalactiteEnd.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalacmiteEnd.name", "Stalactite");
- LanguageRegistry.instance().addStringLocalization("stalacmite1.name", "Stalagmite");
- LanguageRegistry.instance().addStringLocalization("stalacmite2.name", "Stalagmite");
- LanguageRegistry.instance().addStringLocalization("stalacmite3.name", "Stalagmite");
- }
- if (blockSandStalactiteID != 0) {
- blockSandStalactite = new BlockSandstoneStalactite(blockSandStalactiteID, solidStalactites, damageWhenFallenOn);
- Item.itemsList[blockSandStalactiteID] = new ItemSandstoneStalactite(blockSandStalactiteID - 256);
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactite1.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactite2.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactite3.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactite4.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactiteConnection1.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactiteConnection2.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactiteConnection3.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactiteConnection4.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalactiteEnd.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalacmiteEnd.name", "Sandstone Stalactite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalacmite1.name", "Sandstone stalagmite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalacmite2.name", "Sandstone stalagmite");
- LanguageRegistry.instance().addStringLocalization("sandstoneStalacmite3.name", "Sandstone stalagmite");
- }
- if (blockDecorationsID != 0) {
- blockDecorations = new BlockDecorations(blockDecorationsID);
- Item.itemsList[blockDecorationsID] = new ItemDecoration(blockDecorationsID - 256);
- LanguageRegistry.instance().addStringLocalization("icicle1.name", "Icicle");
- LanguageRegistry.instance().addStringLocalization("icicle2.name", "Icicle");
- LanguageRegistry.instance().addStringLocalization("icicle3.name", "Icicle");
- }
- if (blockFloraID != 0) {
- blockFlora = new BlockFlora(blockFloraID, floraLightLevel);
- Item.itemsList[blockFloraID] = new ItemFlora(blockFloraID - 256);
- LanguageRegistry.instance().addStringLocalization("glowcap1.name", "Glowcap");
- LanguageRegistry.instance().addStringLocalization("glowcap2.name", "Glowcap");
- LanguageRegistry.instance().addStringLocalization("glowcap3.name", "Glowcap");
- LanguageRegistry.instance().addStringLocalization("gloweed1.name", "Glow weed");
- LanguageRegistry.instance().addStringLocalization("glowcap4top.name", "Glowcap");
- LanguageRegistry.instance().addStringLocalization("glowcap4bottom.name", "Glowcap");
- LanguageRegistry.instance().addStringLocalization("bluecap1.name", "Iceshroom");
- LanguageRegistry.instance().addStringLocalization("bluecap2.name", "Iceshroom");
- LanguageRegistry.instance().addStringLocalization("bluecap3.name", "Iceshroom");
- LanguageRegistry.instance().addStringLocalization("bluecap4.name", "Iceshroom");
- }
- if (blockFossilsID != 0) {
- blockFossils = new BlockFossils(blockFossilsID);
- Item.itemsList[blockFossilsID] = new MultiItemBlock(blockFossilsID - 256, "fossil1").setUnlocalizedName("fossilBlock");
- LanguageRegistry.instance().addStringLocalization("fossil1.name", "Bone pile");
- }
- LanguageRegistry.instance().addStringLocalization("itemGroup.WildCaves3", "en_US", "Wild Caves 3");
- }
+@Mod(modid = "wildcaves3", name = "Wild Caves 3", version = "${version}")
+public final class WildCaves {
+ @SidedProxy(clientSide = "wildCaves.ClientProxy", serverSide = "wildCaves.ServerProxy")
+ public static ServerProxy proxy;
+
+ public static final ArrayList stalacs = new ArrayList(Arrays.asList("stalactite1", "stalactite2", "stalactite3", "stalactite4", "stalactiteConnection1", "stalactiteConnection2", "stalactiteConnection3",
+ "stalactiteConnection4", "stalactiteEnd", "stalacmiteEnd", "stalacmite1", "stalacmite2", "stalacmite3"));
+ public static final ArrayList sandStalacs = new ArrayList(Arrays.asList("sandstoneStalactite1", "sandstoneStalactite2", "sandstoneStalactite3", "sandstoneStalactite4", "sandstoneStalactiteConnection1",
+ "sandstoneStalactiteConnection2", "sandstoneStalactiteConnection3", "sandstoneStalactiteConnection4", "sandstoneStalactiteEnd", "sandstoneStalacmiteEnd", "sandstoneStalacmite1",
+ "sandstoneStalacmite2", "sandstoneStalacmite3"));
+ public static final ArrayList icicles = new ArrayList(Arrays.asList("icicle1", "icicle2", "icicle3"));
+ public static final ArrayList caps = new ArrayList(Arrays.asList("glowcap1", "glowcap2", "glowcap3", "gloweed1", "glowcap4top", "glowcap4bottom", "bluecap1", "bluecap2", "bluecap3", "bluecap4"));
+ public static final ArrayList fossils = new ArrayList(Arrays.asList("fossil1"));
+ public static Block blockFlora, blockDecorations, blockFossils;
+ public static Block blockStoneStalactite, blockSandStalactite;
+ public static boolean solidStalactites, damageWhenFallenOn;
+ private static Configuration config;
+ private static int chestSkull = 50;
@EventHandler
public void load(FMLInitializationEvent event) {
- initBlocks();
WorldGenWildCaves gen = new WorldGenWildCaves(config);
- GameRegistry.registerWorldGenerator(gen);
- //new itemstack(itemID, stackSize, damage)
- ChestGenHooks.getInfo("DUNGEON_CHEST").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 0), 1, 2, 50));//skeleton
- ChestGenHooks.getInfo("DUNGEON_CHEST").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 2), 1, 2, 50));//zombie
- ChestGenHooks.getInfo("DUNGEON_CHEST").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 3), 1, 2, 50));//steve
- ChestGenHooks.getInfo("DUNGEON_CHEST").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 4), 1, 2, 50));//creeper
- ChestGenHooks.getInfo("MINESHAFT_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 0), 1, 2, 50));//skeleton
- ChestGenHooks.getInfo("MINESHAFT_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 2), 1, 2, 50));//zombie
- ChestGenHooks.getInfo("MINESHAFT_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 3), 1, 2, 50));//steve
- ChestGenHooks.getInfo("MINESHAFT_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 4), 1, 2, 50));//creeper
- ChestGenHooks.getInfo("STRONGHOLD_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 0), 1, 2, 50));//skeleton
- ChestGenHooks.getInfo("STRONGHOLD_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 2), 1, 2, 50));//zombie
- ChestGenHooks.getInfo("STRONGHOLD_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 3), 1, 2, 50));//steve
- ChestGenHooks.getInfo("STRONGHOLD_CORRIDOR").addItem(new WeightedRandomChestContent(new ItemStack(Item.skull.itemID, 1, 4), 1, 2, 50));//creeper
- if (blockFossilsID != 0) {
- eventmanager = new EventManager(chanceForNodeToSpawn);
- GameRegistry.registerWorldGenerator(eventmanager);
- }
+ if (gen.maxLength > 0)
+ MinecraftForge.EVENT_BUS.register(gen);
+ if(chestSkull > 0)
+ MinecraftForge.EVENT_BUS.register(this);
+ proxy.registerRenders();
}
- @EventHandler
+ @EventHandler
public void preInit(FMLPreInitializationEvent event) {
config = new Configuration(event.getSuggestedConfigurationFile());
- try {
- config.load();
- //--block IDs--------
- blockStoneStalactiteID = config.get(Configuration.CATEGORY_BLOCK, "Stalactite ID", 600).getInt(600);
- blockSandStalactiteID = config.get(Configuration.CATEGORY_BLOCK, "Sandstone Stalactite ID", 601).getInt(601);
- blockFloraID = config.get(Configuration.CATEGORY_BLOCK, "Flora ID", 602).getInt(602);
- blockDecorationsID = config.get(Configuration.CATEGORY_BLOCK, "Decorations ID", 603).getInt(603);
- blockFossilsID = config.get(Configuration.CATEGORY_BLOCK, "Fossils ID", 604).getInt(604);
- solidStalactites = config.get(Configuration.CATEGORY_GENERAL, "Solid stalactites/stalgmites", false).getBoolean(false);
- damageWhenFallenOn = config.get(Configuration.CATEGORY_GENERAL, "Stalgmites damage entities when fallen on", false).getBoolean(false);
- floraLightLevel = config.get(Configuration.CATEGORY_GENERAL, "Flora light level", 5).getInt(5);
- if (floraLightLevel > 15)
- floraLightLevel = 5;
- floraLightLevel = 15 - floraLightLevel; //light level 5 in-game is level 10 in the code for some reason :V
- chanceForNodeToSpawn = config.get(Configuration.CATEGORY_GENERAL, "Chance for a fossil node to generate", 5).getInt(5);
- } catch (Exception e) {
- FMLLog.log(Level.SEVERE, e, "WildCaves3 had a problem loading it's configuration");
- } finally {
- config.save();
- }
+ solidStalactites = config.getBoolean("Solid stalactites/stalgmites", Configuration.CATEGORY_GENERAL, false, "Whether stalactites can be collided with.");
+ damageWhenFallenOn = config.getBoolean("Stalgmites damage entities when fallen on", Configuration.CATEGORY_GENERAL, false, "Whether living beings would be damaged when falling on the block.");
+ int floraLightLevel = config.getInt("Flora light level", Configuration.CATEGORY_GENERAL, 5, 0, 15, "How much light is emitted by the mushrooms.");
+
+ CreativeTabs tabWildCaves = new CreativeTabs("WildCaves3") {
+ @Override
+ public Item getTabIconItem() {
+ return Items.ender_eye;
+ }
+ };
+ blockStoneStalactite = GameRegistry.registerBlock(new BlockStoneStalactite().setCreativeTab(tabWildCaves), ItemStalactite.class, "StoneStalactite", stalacs);
+ blockSandStalactite = GameRegistry.registerBlock(new BlockStalactite(Item.getItemFromBlock(Blocks.sandstone)).
+ setUnlocalizedName("sandstoneStalactiteBlock").setCreativeTab(tabWildCaves), ItemStalactite.class, "SandstoneSalactite", sandStalacs);
+ blockDecorations = GameRegistry.registerBlock(new BlockDecorations().setCreativeTab(tabWildCaves), MultiItemBlock.class, "Decorations", icicles);
+ blockFlora = GameRegistry.registerBlock(new BlockFlora().setLightLevel(floraLightLevel).setCreativeTab(tabWildCaves), MultiItemBlock.class, "Flora", caps);
+ blockFossils = GameRegistry.registerBlock(new BlockFossils().setCreativeTab(tabWildCaves), MultiItemBlock.class, "FossilBlock", fossils);
+
+ int chanceForNodeToSpawn = config.get(Configuration.CATEGORY_GENERAL, "Chance for a fossil node to generate", 5).getInt();
+ if(chanceForNodeToSpawn > 0) {
+ MinecraftForge.ORE_GEN_BUS.register(new EventManager(chanceForNodeToSpawn));
+ }
+ chestSkull = config.get(Configuration.CATEGORY_GENERAL, "Chance for a skull to be added in chests", chestSkull).getInt();
+
+ if(event.getSourceFile().getName().endsWith(".jar")){
+ proxy.MUD();
+ }
}
+
+ @SubscribeEvent
+ public void onLootLoad(LootTableLoadEvent loading){
+ if(loading.getName() == LootTableList.CHESTS_SIMPLE_DUNGEON || loading.getName() == LootTableList.CHESTS_ABANDONED_MINESHAFT || loading.getName() == LootTableList.CHESTS_STRONGHOLD_CORRIDOR) {
+ loading.getTable().addPool(new LootPool(new LootEntry[]{new LootEntryItem(Items.skull, 1, 0, new LootFunction[]{new SetMetadata(null, new RandomValueRange(0, 4))}, new LootCondition[0], "skull")}, new LootCondition[]{new RandomChance(1 / (float)chestSkull)}, new RandomValueRange(1, 1), new RandomValueRange(0, 0), "skulls"));
+ }
+ }
}
diff --git a/wildCaves/WorldGenWildCaves.java b/wildCaves/WorldGenWildCaves.java
index b2a5c19..718494b 100644
--- a/wildCaves/WorldGenWildCaves.java
+++ b/wildCaves/WorldGenWildCaves.java
@@ -1,168 +1,187 @@
package wildCaves;
-import java.util.Arrays;
-import java.util.Random;
-import java.util.logging.Level;
-
-import wildCaves.generation.biomeGen.GenerationArid;
-import wildCaves.generation.biomeGen.GenerationFrozen;
-import wildCaves.generation.biomeGen.GenerationHumid;
-import wildCaves.generation.biomeGen.GenerationJungle;
-import wildCaves.generation.biomeGen.GenerationNormal;
-import wildCaves.generation.structureGen.GenerateFloodedCaves;
-import wildCaves.generation.structureGen.GenerateStoneStalactite;
-
+import net.minecraft.block.Block;
+import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.chunk.IChunkProvider;
-import net.minecraftforge.common.Configuration;
-import cpw.mods.fml.common.FMLLog;
-import cpw.mods.fml.common.IWorldGenerator;
-
-public class WorldGenWildCaves implements IWorldGenerator
-{
- private static boolean stalactites;
- private static boolean sandstoneStalactites;
- private static boolean Flora;
+import net.minecraftforge.common.BiomeDictionary;
+import net.minecraftforge.common.config.Configuration;
+import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.registry.GameData;
+import wildCaves.generation.biomeGen.*;
- private static float probabilityVinesJungle;
- private static float probabilityVines;
- private static float probabilityIcicle;
- private static float probabilityWet;
- private static float probabilityDry;
- private static float probabilityGlowcapsHumid;
- private static float probabilityGlowcaps;
- private static float probabilityIceshrooms;
- private static float probabilityStalactite;
- private static float probabilitySpiderWeb;
- private static float probabilitySandStalactites;
- private static float probabilitySkulls;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
- private static int maxGenHeight;
- private static int maxLength;
+public final class WorldGenWildCaves {
+ public static float probabilityVinesJungle;
+ public static float probabilityVines;
+ public static float probabilityIcicle;
+ public static float probabilityWet;
+ public static float probabilityDry;
+ public static float probabilityGlowcapsHumid;
+ public static float probabilityGlowcaps;
+ public static float probabilityIceshrooms;
+ public static float probabilityStalactite;
+ public static float probabilitySpiderWeb;
+ public static float probabilitySandStalactites;
+ public static float probabilitySkulls;
+ public static int maxGenHeight;
+ public static int maxLength;
private static int timesPerChunck = 50;
- private static int maxGenHeightGlowcapNormal;
- private static int[] dimensionBlacklist;
- private static int[] blockWhiteList;
-
- private World world;
- private Random random;
- private Configuration config;
-
- private GenerateStoneStalactite stalactiteGen;
- private GenerationJungle jungleGen;
- private GenerationHumid wetGen;
- private GenerationArid aridGen;
- private GenerationNormal normalGen;
- private GenerationFrozen frozenGen;
- private GenerateFloodedCaves floodCave;
-
+ public static int maxGenHeightGlowcapNormal;
+ public static List dimensionBlacklist = new ArrayList();
+ private static List blockWhiteList = new ArrayList();
+ private static final GenerationJungle jungleGen = new GenerationJungle();
+ private static final GenerationHumid wetGen = new GenerationHumid();
+ private static final GenerationArid aridGen = new GenerationArid();
+ private static final GenerationNormal normalGen = new GenerationNormal();
+ private static final GenerationFrozen frozenGen = new GenerationFrozen();
- public WorldGenWildCaves(Configuration config)
- {
- setConfig(config);
+ public WorldGenWildCaves(Configuration config) {
+ setConfig(config);
}
-
- @Override
- public void generate(Random random, int chunkX, int chunkZ, World w, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
- {
- Boolean genStalactiteNow;
- jungleGen = new GenerationJungle(probabilityStalactite, maxLength, probabilityVinesJungle, probabilityGlowcapsHumid, probabilitySpiderWeb, probabilitySkulls);
- wetGen = new GenerationHumid(probabilityStalactite, maxLength, probabilityWet, probabilityGlowcapsHumid, probabilityVines, probabilitySpiderWeb, probabilitySkulls);
- aridGen = new GenerationArid(probabilityStalactite, maxLength, probabilitySandStalactites, probabilitySpiderWeb, probabilityDry, probabilitySkulls);
- normalGen = new GenerationNormal(probabilityStalactite, maxLength, probabilityVines, probabilityGlowcaps, probabilitySpiderWeb, probabilitySkulls, maxGenHeightGlowcapNormal);
- frozenGen = new GenerationFrozen(probabilityStalactite, maxLength, probabilityIceshrooms, probabilitySpiderWeb, probabilityIcicle, probabilitySkulls);
-
- this.world = w;
- int blockX = chunkX * 16;
- int blockZ = chunkZ * 16;
- int Xcoord;
- int Ycoord;
- int Zcoord;
-
- int dist;// distance
- this.random = random;
- BiomeGenBase biome;
- //if( world.provider.dimensionId != 1 && world.provider.dimensionId != -1) // !world.provider.isHellWorld)
- if(!Utils.arrayContainsInt(dimensionBlacklist, world.provider.dimensionId))
- {
- for (int i = 0; i < timesPerChunck; i++)
- {
- genStalactiteNow = true;
- Xcoord = blockX + random.nextInt(16);
- Ycoord = random.nextInt(maxGenHeight);
- Zcoord = blockZ + random.nextInt(16);
-
+ public static boolean isWhiteListed(Block block){
+ return blockWhiteList.contains(block);
+ }
+
+ @SubscribeEvent
+ public void decorate(DecorateBiomeEvent.Post decorationEvent){
+ generate(decorationEvent.getRand(), decorationEvent.getPos().add(8, 0, 8), decorationEvent.getWorld());
+ }
+
+ public void generate(Random random, BlockPos pos, World world) {
+ if (!dimensionBlacklist.contains(world.provider.getDimension())) {
+ BlockPos coord;
+ //int dist;// distance
+ BiomeGenBase biome;
+ for (int i = 0; i < timesPerChunck; i++) {
+ coord = pos.add(random.nextInt(16), 0, random.nextInt(16));
+ coord = new BlockPos(pos.getX(), Math.min(world.getHeight(coord).getY()-1, random.nextInt(maxGenHeight)), pos.getZ());
// search for the first available spot
- while (!(Utils.arrayContainsInt(blockWhiteList, world.getBlockId(Xcoord, Ycoord + 1, Zcoord)) && world.isAirBlock(Xcoord, Ycoord, Zcoord)) && Ycoord > 10)
- {
- Ycoord--;
+ while (coord.getY() > 10 && (!blockWhiteList.contains(world.getBlockState(coord.up()).getBlock()) || !world.isAirBlock(coord))) {
+ coord = coord.down();
}
-
// found a spot
- if (Ycoord > 10)
- {
+ if (coord.getY() > 10) {
// getting the biome
- biome = world.getBiomeGenForCoords(blockX, blockZ);
- dist = Utils.getNumEmptyBlocks(world, Xcoord, Ycoord, Zcoord);
-
- if(biome.temperature <= 0.1f)
- frozenGen.generate(w, random, Xcoord, Ycoord, Zcoord);
- else if(biome.temperature > 1.5f && biome.rainfall < 0.1f)
- aridGen.generate(w, random, Xcoord, Ycoord, Zcoord);
- else if(biome.isHighHumidity() && biome.temperature > 1)
- jungleGen.generate(w, random, Xcoord, Ycoord, Zcoord);
- else if(biome.isHighHumidity() || biome == BiomeGenBase.ocean || biome == BiomeGenBase.river)
- wetGen.generate(w, random, Xcoord, Ycoord, Zcoord);
+ biome = world.getBiomeGenForCoords(coord);
+ //dist = Utils.getNumEmptyBlocks(world, Xcoord, Ycoord, Zcoord);
+ if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.COLD))
+ frozenGen.generate(world, random, coord);
+ else if (biome.getTemperature() > 1.5f && biome.getRainfall() < 0.1f)
+ aridGen.generate(world, random, coord);
+ else if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.JUNGLE))
+ jungleGen.generate(world, random, coord);
+ else if (biome.isHighHumidity() || BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.WATER))
+ wetGen.generate(world, random, coord);
else
- normalGen.generate(w, random, Xcoord, Ycoord, Zcoord);
+ normalGen.generate(world, random, coord);
}
}
- }
+ }
}
- private void setConfig(Configuration config)
- {
- try
- {
- config.load();
-
- // --generation permissions------
- sandstoneStalactites = config.get("Permissions", "Generate Sandstone stalactites on arid biomes", true).getBoolean(true);
- Flora = config.get("Permissions", "Generate flora on caves", true).getBoolean(true);
- stalactites = config.get("Permissions", "Generate stalactites on caves", true).getBoolean(true);
- dimensionBlacklist = config.get("Permissions", "Dimension Blacklist", new int[]{-1,1}).getIntList();
- blockWhiteList = config.get("Permissions", "Block white list", new int[]{1,2,3,4,13,14,15,16,21,24,56,73,74,79,80,82,97,129}).getIntList();
- // --Biome specific ratios------
- probabilityVinesJungle = (float) config.get("Biome specific", "Probability of vines on jungle caves", 0.5).getDouble(0.5);
- probabilityIcicle = (float)config.get("Biome specific", "Probability of iciles on frozen caves", 0.6).getDouble(0.6);
- probabilityWet = (float)config.get("Biome specific", "Probability of more water fountains on wet caves", 0.1).getDouble(0.1);
- probabilityDry = (float)config.get("Biome specific", "Probability of less generation arid caves", 0.5).getDouble(0.5);
- probabilityGlowcapsHumid = (float)config.get("Biome specific", "Probability of Glowing mushrooms on humid/jungle caves", 0.3).getDouble(0.3);
- probabilityIceshrooms = (float)config.get("Biome specific", "Probability of Glowing Ice mushrooms on frozen caves", 0.3).getDouble(0.3);
- probabilitySandStalactites = (float)config.get("Biome specific", "Probability of sandstone stalactites on arid caves", 0.5).getDouble(0.5);
- // --General ratios------
- probabilityVines = (float)config.get("Non biome specific", "Probability of vines on caves", 0.1).getDouble(0.1);
- probabilityGlowcaps = (float)config.get("Non biome specific", "Probability of glowing mushrooms on caves", 0.1).getDouble(0.1);
- probabilityStalactite = (float)config.get("Non biome specific", "Probability of Stalactites/stalagmites", 0.5).getDouble(0.5);
- probabilitySpiderWeb = (float)config.get("Non biome specific", "Probability of spider webs", 0.15).getDouble(0.15);
- maxGenHeightGlowcapNormal = config.get("Non biome specific", "Max height at wich to generate glowcaps on normal biomes", 30).getInt();
- probabilitySkulls = (float)config.get("Non biome specific", "Probability of skulls", 0.0001).getDouble(0.0001);
- // --other------
- timesPerChunck = config.get(Configuration.CATEGORY_GENERAL, "times to attemp generating per chunk", 40).getInt();
- maxGenHeight = config.get(Configuration.CATEGORY_GENERAL, "Max height at wich to generate", 80).getInt();
- maxLength = config.get(Configuration.CATEGORY_GENERAL, "Max length of structure generation", 8).getInt();
- }
- catch (Exception e)
- {
- FMLLog.log(Level.SEVERE, e, "WildCaves3 has a problem loading it's configuration");
+ private static void setConfig(Configuration config) {
+ // --generation permissions------
+ String category = "Permissions";
+ boolean sandstoneStalactites = config.get(category, "Generate Sandstone stalactites on arid biomes", true).getBoolean(true);
+ boolean flora = config.get(category, "Generate flora on caves", true).getBoolean(true);
+ boolean stalactites = config.get(category, "Generate stalactites on caves", true).getBoolean(true);
+ String[] list = config.get(category, "Dimension Blacklist", "-1,1", "Worlds where generation won't occur, by dimension ids. Use [id1;id2] to add a range of id, prefix with - to exclude.").getString().split(",");
+ for(String text:list){
+ if(text!=null && !text.isEmpty()){
+ boolean done = false;
+ if(text.contains("[") && text.contains("]")){
+ String[] results = text.substring(text.indexOf("[")+1, text.indexOf("]")).split(";");
+ if(results.length==2){
+ try {
+ int a = Integer.parseInt(results[0]);
+ int b = Integer.parseInt(results[1]);
+ boolean remove = text.startsWith("-");
+ for(int x = a; x <=b; x++){
+ if(remove)
+ dimensionBlacklist.remove(x);
+ else
+ dimensionBlacklist.add(x);
+ }
+ done = true;
+ }catch (Exception ignored){
+
+ }
+ }
+ }
+ if(!done) {
+ try {
+ dimensionBlacklist.add(Integer.parseInt(text.trim()));
+ } catch (Exception ignored) {
+ }
+ }
+ }
+ }
+ list = config.get(category, "Block white list", "stone,grass,dirt,cobblestone,gravel,gold_ore,iron_ore,coal_ore,lapis_ore,sandstone,diamond_ore,redstone_ore,lit_redstone_ore,ice,snow,clay,monster_egg,emerald_ore").getString().split(",");
+ Block block;
+ for (String txt : list) {
+ try {
+ block = GameData.getBlockRegistry().getObject(new ResourceLocation(txt.trim()));
+ if(block != null && block.getMaterial(null) != Material.air){
+ blockWhiteList.add(block);
+ }
+ } catch (Throwable n) {
+ }
+ }
+ // --Biome specific ratios------
+ category = "Biome specific";
+ probabilityVinesJungle = (float) config.get(category, "Probability of vines on jungle caves", 0.5).getDouble(0.5);
+ probabilityIcicle = (float) config.get(category, "Probability of icicles on frozen caves", 0.6).getDouble(0.6);
+ try{
+ block = GameData.getBlockRegistry().getObject(new ResourceLocation(config.get(category, "Block to generate in frozen caves", "ice").getString().trim()));
+ if(block!=null && block.getMapColor(null) == MapColor.iceColor){
+ Utils.frozen = block;
+ }
+ }catch (Throwable n){
+ }
+ probabilityWet = (float) config.get(category, "Probability of more water fountains on wet caves", 0.1).getDouble(0.1);
+ probabilityDry = (float) config.get(category, "Probability of less generation arid caves", 0.5).getDouble(0.5);
+ probabilityGlowcapsHumid = (float) config.get(category, "Probability of Glowing mushrooms on humid/jungle caves", 0.3).getDouble(0.3);
+ probabilityIceshrooms = (float) config.get(category, "Probability of Glowing Ice mushrooms on frozen caves", 0.3).getDouble(0.3);
+ probabilitySandStalactites = (float) config.get(category, "Probability of sandstone stalactites on arid caves", 0.5).getDouble(0.5);
+ // --General ratios------
+ category = "Non biome specific";
+ probabilityVines = (float) config.get(category, "Probability of vines on caves", 0.1).getDouble(0.1);
+ probabilityGlowcaps = (float) config.get(category, "Probability of glowing mushrooms on caves", 0.1).getDouble(0.1);
+ probabilityStalactite = (float) config.get(category, "Probability of Stalactites/stalagmites", 0.5).getDouble(0.5);
+ probabilitySpiderWeb = (float) config.get(category, "Probability of spider webs", 0.15).getDouble(0.15);
+ maxGenHeightGlowcapNormal = config.get(category, "Max height at which to generate glowcaps on normal biomes", 30).getInt();
+ probabilitySkulls = (float) config.get(category, "Probability of skulls", 0.0001).getDouble(0.0001);
+ if(!sandstoneStalactites){
+ probabilitySandStalactites = 0;
+ }
+ if(!flora){
+ probabilityGlowcaps = 0;
+ probabilityVinesJungle = 0;
+ probabilityGlowcapsHumid = 0;
+ probabilityIceshrooms = 0;
+ probabilityVines = 0;
+ probabilityGlowcaps = 0;
+ }
+ if(!stalactites){
+ probabilityStalactite = 0;
+ probabilitySandStalactites = 0;
}
- finally
- {
+ // --other------
+ category = Configuration.CATEGORY_GENERAL;
+ timesPerChunck = config.get(category, "times to attempt generating per chunk", 40).getInt();
+ maxGenHeight = config.get(category, "Max height at which to generate", 80).getInt();
+ maxLength = config.get(category, "Max length of structure generation", 8).getInt();
+ if(config.hasChanged()){
config.save();
}
}
-
}
diff --git a/wildCaves/generation/biomeGen/GenerationArid.java b/wildCaves/generation/biomeGen/GenerationArid.java
index 5426b5f..05d24c0 100644
--- a/wildCaves/generation/biomeGen/GenerationArid.java
+++ b/wildCaves/generation/biomeGen/GenerationArid.java
@@ -1,63 +1,39 @@
package wildCaves.generation.biomeGen;
-import java.util.Random;
-
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
import wildCaves.Utils;
+import wildCaves.WorldGenWildCaves;
+import wildCaves.generation.structureGen.DecorationHelper;
import wildCaves.generation.structureGen.GenerateSandstoneStalactites;
-import wildCaves.generation.structureGen.GenerateSkulls;
import wildCaves.generation.structureGen.GenerateStoneStalactite;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
-
-public class GenerationArid extends WorldGenerator
-{
- private static float probabilityStalactite;
- private static float probabilitySandStalactites;
- private static float probabilitySpiderWeb;
- private static float probabilityDry;
- private static float probabilitySkulls;
- private static int maxLength;
+import java.util.Random;
- public GenerationArid(float probabilityStalactite, int maxLength, float probabilitySandStalactites, float probabilitySpiderWeb, float probabilityDry, float probabilitySkulls)
- {
- this.probabilityStalactite = probabilityStalactite;
- this.maxLength = maxLength;
- this.probabilitySandStalactites = probabilitySandStalactites;
- this.probabilitySpiderWeb = probabilitySpiderWeb;
- this.probabilityDry = probabilityDry;
- this.probabilitySkulls = probabilitySkulls;
+public final class GenerationArid extends WorldGenerator {
+ public GenerationArid() {
}
-
+
@Override
- public boolean generate(World world, Random random, int x, int y, int z)
- {
- boolean success = false;
-
- switch(Utils.weightedChoise(probabilitySandStalactites, probabilitySpiderWeb, probabilityDry, probabilitySkulls, probabilityStalactite, 0))
- {
- case 1:
- GenerateSandstoneStalactites.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z), maxLength);
- success = true;
- break;
- case 2:
- world.setBlock(x, y , z, Block.web.blockID);
- success = true;
- break;
- case 3:
- break;
- case 4:
- GenerateSkulls.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z));
- success = true;
- break;
- default:
- GenerateStoneStalactite.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z), maxLength);
- success = true;
+ public boolean generate(World world, Random random, BlockPos pos) {
+ switch (Utils.weightedChoise(WorldGenWildCaves.probabilitySandStalactites, WorldGenWildCaves.probabilitySpiderWeb, WorldGenWildCaves.probabilityDry, WorldGenWildCaves.probabilitySkulls,
+ WorldGenWildCaves.probabilityStalactite, 0)) {
+ case 1:
+ new GenerateSandstoneStalactites().generate(world, random, pos, Utils.getNumEmptyBlocks(world, pos), WorldGenWildCaves.maxLength);
+ return true;
+ case 2:
+ world.setBlockState(pos, Blocks.web.getDefaultState(), 2);
+ return true;
+ case 3:
+ return false;
+ case 4:
+ DecorationHelper.generateSkulls(world, random, pos, Utils.getNumEmptyBlocks(world, pos));
+ return true;
+ default:
+ new GenerateStoneStalactite().generate(world, random, pos, Utils.getNumEmptyBlocks(world, pos), WorldGenWildCaves.maxLength);
+ return true;
}
- return success;
}
-
}
diff --git a/wildCaves/generation/biomeGen/GenerationFrozen.java b/wildCaves/generation/biomeGen/GenerationFrozen.java
index 91bb0e8..230886b 100644
--- a/wildCaves/generation/biomeGen/GenerationFrozen.java
+++ b/wildCaves/generation/biomeGen/GenerationFrozen.java
@@ -1,65 +1,39 @@
package wildCaves.generation.biomeGen;
-import java.util.Random;
-
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
import wildCaves.Utils;
-import wildCaves.generation.structureGen.GenerateIceshrooms;
-import wildCaves.generation.structureGen.GenerateIcicles;
-import wildCaves.generation.structureGen.GenerateSkulls;
+import wildCaves.WorldGenWildCaves;
+import wildCaves.generation.structureGen.DecorationHelper;
import wildCaves.generation.structureGen.GenerateStoneStalactite;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
+import java.util.Random;
-public class GenerationFrozen extends WorldGenerator
-{
- private static float probabilityIceshrooms;
- private static float probabilityStalactite;
- private static float probabilitySpiderWeb;
- private static float probabilityIcicle;
- private static float probabilitySkulls;
- public static int maxLength;
-
- public GenerationFrozen(float probabilityStalactite, int maxLength, float probabilityIceshrooms, float probabilitySpiderWeb, float probabilityIcicle, float probabilitySkulls)
- {
- this.probabilityStalactite = probabilityStalactite;
- this.maxLength = maxLength;
- this.probabilityIcicle = probabilityIcicle;
- this.probabilityIceshrooms = probabilityIceshrooms;
- this.probabilitySpiderWeb = probabilitySpiderWeb;
- this.probabilitySkulls = probabilitySkulls;
+public final class GenerationFrozen extends WorldGenerator {
+ public GenerationFrozen() {
}
@Override
- public boolean generate(World world, Random random, int x, int y, int z)
- {
- boolean success = false;
-
- switch(Utils.weightedChoise(probabilityIceshrooms, probabilitySpiderWeb, probabilityIcicle, probabilitySkulls, probabilityStalactite, 0))
- {
- case 1:
- GenerateIceshrooms.generate(world, random, x, y-Utils.getNumEmptyBlocks(world, x, y, z)+1, z);
- success = true;
- break;
- case 2:
- world.setBlock(x, y , z, Block.web.blockID);
- success = true;
- break;
- case 3:
- GenerateIcicles.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z));
- success = true;
- break;
- case 4:
- GenerateSkulls.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z));
- success = true;
- break;
- default:
- GenerateStoneStalactite.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z), maxLength);
- success = true;
+ public boolean generate(World world, Random random, BlockPos pos) {
+ switch (Utils.weightedChoise(WorldGenWildCaves.probabilityIceshrooms, WorldGenWildCaves.probabilitySpiderWeb, WorldGenWildCaves.probabilityIcicle, WorldGenWildCaves.probabilitySkulls,
+ WorldGenWildCaves.probabilityStalactite, 0)) {
+ case 1:
+ DecorationHelper.generateIceshrooms(world, random, pos);
+ return true;
+ case 2:
+ world.setBlockState(pos, Blocks.web.getDefaultState(), 2);
+ return true;
+ case 3:
+ DecorationHelper.generateIcicles(world, random, pos, Utils.getNumEmptyBlocks(world, pos));
+ return true;
+ case 4:
+ DecorationHelper.generateSkulls(world, random, pos, Utils.getNumEmptyBlocks(world, pos));
+ return true;
+ default:
+ new GenerateStoneStalactite().generate(world, random, pos, Utils.getNumEmptyBlocks(world, pos), WorldGenWildCaves.maxLength);
+ return true;
}
- return success;
}
}
diff --git a/wildCaves/generation/biomeGen/GenerationHumid.java b/wildCaves/generation/biomeGen/GenerationHumid.java
index 0220a9f..ac0fed4 100644
--- a/wildCaves/generation/biomeGen/GenerationHumid.java
+++ b/wildCaves/generation/biomeGen/GenerationHumid.java
@@ -1,70 +1,42 @@
package wildCaves.generation.biomeGen;
-import java.util.Random;
-
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
import wildCaves.Utils;
-import wildCaves.generation.structureGen.GenerateGlowcaps;
-import wildCaves.generation.structureGen.GenerateSkulls;
+import wildCaves.WorldGenWildCaves;
+import wildCaves.generation.structureGen.DecorationHelper;
import wildCaves.generation.structureGen.GenerateStoneStalactite;
-import wildCaves.generation.structureGen.GenerateVines;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
+import java.util.Random;
-public class GenerationHumid extends WorldGenerator
-{
- private static float probabilityWet;
- private static float probabilityGlowcapsHumid;
- private static float probabilityStalactite;
- private static float probabilityVines;
- private static float probabilitySpiderWeb;
- private static float probabilitySkulls;
- public static int maxLength;
-
- public GenerationHumid(float probabilityStalactite, int maxLength, float probabilityWet, float probabilityGlowcapsHumid, float probabilityVines, float probabilitySpiderWeb, float probabilitySkulls)
- {
- this.probabilityStalactite = probabilityStalactite;
- this.maxLength = maxLength;
- this.probabilityWet = probabilityWet;
- this.probabilityGlowcapsHumid = probabilityGlowcapsHumid;
- this.probabilityVines = probabilityVines;
- this.probabilitySpiderWeb = probabilitySpiderWeb;
- this.probabilitySkulls = probabilitySkulls;
+public final class GenerationHumid extends WorldGenerator {
+ public GenerationHumid() {
}
@Override
- public boolean generate(World world, Random random, int x, int y, int z)
- {
- boolean success = false;
-
- switch(Utils.weightedChoise(probabilityGlowcapsHumid, probabilityWet, probabilityVines, probabilitySpiderWeb, probabilitySkulls, probabilityStalactite))
- {
- case 1:
- GenerateGlowcaps.generate(world, random, x, y-Utils.getNumEmptyBlocks(world, x, y, z)+1, z);
- success = true;
- break;
- case 2:
- world.setBlock(x, y + 1, z, Block.waterMoving.blockID);
- success = true;
- break;
- case 3:
- GenerateVines.generate(world, random, x, y, z);
- success = true;
- break;
- case 4:
- world.setBlock(x, y-Utils.getNumEmptyBlocks(world, x, y, z)+1, z, Block.web.blockID);
- break;
- case 5:
- GenerateSkulls.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z));
- success = true;
- break;
- default:
- GenerateStoneStalactite.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z), maxLength);
- success = true;
+ public boolean generate(World world, Random random, BlockPos pos) {
+ switch (Utils.weightedChoise(WorldGenWildCaves.probabilityGlowcapsHumid, WorldGenWildCaves.probabilityWet, WorldGenWildCaves.probabilityVines, WorldGenWildCaves.probabilitySpiderWeb,
+ WorldGenWildCaves.probabilitySkulls, WorldGenWildCaves.probabilityStalactite)) {
+ case 1:
+ DecorationHelper.generateGlowcaps(world, random, pos);
+ return true;
+ case 2:
+ DecorationHelper.generateFloodedCaves(world, random, pos);
+ return true;
+ case 3:
+ DecorationHelper.generateVines(world, random, pos);
+ return true;
+ case 4:
+ world.setBlockState(pos.down(Utils.getNumEmptyBlocks(world, pos) - 1), Blocks.web.getDefaultState(), 2);
+ return true;
+ case 5:
+ DecorationHelper.generateSkulls(world, random, pos, Utils.getNumEmptyBlocks(world, pos));
+ return true;
+ default:
+ new GenerateStoneStalactite().generate(world, random, pos, Utils.getNumEmptyBlocks(world, pos), WorldGenWildCaves.maxLength);
+ return true;
}
- return success;
}
}
diff --git a/wildCaves/generation/biomeGen/GenerationJungle.java b/wildCaves/generation/biomeGen/GenerationJungle.java
index 41fa64a..96ed837 100644
--- a/wildCaves/generation/biomeGen/GenerationJungle.java
+++ b/wildCaves/generation/biomeGen/GenerationJungle.java
@@ -1,68 +1,39 @@
package wildCaves.generation.biomeGen;
-import java.util.Random;
-
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
import wildCaves.Utils;
-import wildCaves.generation.structureGen.GenerateGlowcaps;
-import wildCaves.generation.structureGen.GenerateSkulls;
+import wildCaves.WorldGenWildCaves;
+import wildCaves.generation.structureGen.DecorationHelper;
import wildCaves.generation.structureGen.GenerateStoneStalactite;
-import wildCaves.generation.structureGen.GenerateVines;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
+import java.util.Random;
-public class GenerationJungle extends WorldGenerator
-{
- private Random random;
- private World world;
- private static float probabilityVinesJungle;
- private static float probabilityGlowcapsHumid;
- private static float probabilityStalactite;
- private static float probabilitySpiderWeb;
- private static float probabilitySkulls;
- private static int maxLength;
-
- public GenerationJungle(float probabilityStalactite, int maxLength, float probabilityVinesJungle, float probabilityGlowcapsHumid, float probabilitySpiderWeb, float probabilitySkulls)
- {
- this.probabilityStalactite = probabilityStalactite;
- this.maxLength = maxLength;
- this.probabilityVinesJungle = probabilityVinesJungle;
- this.probabilityGlowcapsHumid = probabilityVinesJungle;
- this.probabilitySpiderWeb = probabilitySpiderWeb;
- this.probabilitySkulls = probabilitySkulls;
+public final class GenerationJungle extends WorldGenerator {
+ public GenerationJungle() {
}
@Override
- public boolean generate(World world, Random random, int x, int y, int z)
- {
- boolean success = false;
- this.random = random;
- this.world = world;
-
- switch(Utils.weightedChoise(probabilityGlowcapsHumid, probabilityVinesJungle, probabilitySpiderWeb, probabilitySkulls, probabilityStalactite, 0))
- {
- case 1:
- GenerateGlowcaps.generate(world, random, x, y-Utils.getNumEmptyBlocks(world, x, y, z)+1, z);
- success = true;
- break;
- case 2:
- GenerateVines.generate(world, random, x, y, z);
- success = true;
- break;
- case 3:
- world.setBlock(x, y , z, Block.web.blockID);
- break;
- case 4:
- GenerateSkulls.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z));
- success = true;
- break;
- default:
- GenerateStoneStalactite.generate(world, random, x, y, z, Utils.getNumEmptyBlocks(world, x, y, z), maxLength);
- success = true;
- }
- return success;
+ public boolean generate(World world, Random random, BlockPos pos) {
+ switch (Utils.weightedChoise(WorldGenWildCaves.probabilityGlowcapsHumid, WorldGenWildCaves.probabilityVinesJungle, WorldGenWildCaves.probabilitySpiderWeb, WorldGenWildCaves.probabilitySkulls,
+ WorldGenWildCaves.probabilityStalactite, 0)) {
+ case 1:
+ DecorationHelper.generateGlowcaps(world, random, pos);
+ return true;
+ case 2:
+ DecorationHelper.generateVines(world, random, pos);
+ return true;
+ case 3:
+ world.setBlockState(pos, Blocks.web.getDefaultState(), 2);
+ return true;
+ case 4:
+ DecorationHelper.generateSkulls(world, random, pos, Utils.getNumEmptyBlocks(world, pos));
+ return true;
+ default:
+ new GenerateStoneStalactite().generate(world, random, pos, Utils.getNumEmptyBlocks(world, pos), WorldGenWildCaves.maxLength);
+ return true;
+ }
}
}
diff --git a/wildCaves/generation/biomeGen/GenerationNormal.java b/wildCaves/generation/biomeGen/GenerationNormal.java
index 31702e6..d6bc028 100644
--- a/wildCaves/generation/biomeGen/GenerationNormal.java
+++ b/wildCaves/generation/biomeGen/GenerationNormal.java
@@ -1,69 +1,40 @@
package wildCaves.generation.biomeGen;
-import java.util.Random;
-
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
import wildCaves.Utils;
-import wildCaves.generation.structureGen.GenerateGlowcaps;
-import wildCaves.generation.structureGen.GenerateSkulls;
+import wildCaves.WorldGenWildCaves;
+import wildCaves.generation.structureGen.DecorationHelper;
import wildCaves.generation.structureGen.GenerateStoneStalactite;
-import wildCaves.generation.structureGen.GenerateVines;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenerator;
+import java.util.Random;
-public class GenerationNormal extends WorldGenerator
-{
- private static float probabilityGlowcaps;
- private static float probabilityStalactite;
- private static float probabilityVines;
- private static float probabilitySpiderWeb;
- private static float probabilitySkulls;
- private static int maxLength;
- private static int maxGenHeightGlowcapNormal;
-
- public GenerationNormal(float probabilityStalactite, int maxLength, float probabilityGlowcaps, float probabilityVines, float probabilitySpiderWeb, float probabilitySkulls, int maxGenHeightGlowcapNormal)
- {
- this.probabilityStalactite = probabilityStalactite;
- this.maxLength = maxLength;
- this.probabilityVines = probabilityVines;
- this.probabilitySpiderWeb = probabilitySpiderWeb;
- this.probabilitySkulls = probabilitySkulls;
- this.maxGenHeightGlowcapNormal = maxGenHeightGlowcapNormal;
+public final class GenerationNormal extends WorldGenerator {
+ public GenerationNormal() {
}
@Override
- public boolean generate(World world, Random random, int x, int y, int z)
- {
- boolean success = false;
- float glowcapsAux = 0;
- if(y 400)
+ return;
+ }
+ }
+ if(blocks > 150){
+ int y = pos.getY() - (Utils.getNumEmptyBlocks(world, pos)/3);
+ System.out.println(pos);
+ for(int i=x-6; i 0) {
+ BlockPos auxY = pos.down(numEmptyBlocks - 1);
+ if (auxY.getY() > 0 && numEmptyBlocks>0) {
+ world.setBlockState(auxY, Blocks.skull.getStateFromMeta(1), 2);
+ TileEntity skullTE = world.getTileEntity(auxY);
+ if (skullTE instanceof TileEntitySkull) {
+ ((TileEntitySkull) skullTE).setSkullRotation(random.nextInt(360));
+ }
+ }
+ }
+ }
+
+ // place a vine from top to bottom at the specified x,y,z
+ public static void generateVines(World world, Random random, BlockPos pos) {
+ int distance = Utils.getNumEmptyBlocks(world, pos);
+ int aux;
+ if (distance > 5)
+ aux = random.nextInt(distance-5)+5;
+ else
+ aux = distance;
+
+ //the side the vine should be facing
+ EnumFacing side = EnumFacing.values()[random.nextInt(4)+2];
+ // length of the vine
+ int i=0;
+ while(i 3)
- {
- y -= (distance/3)*2;
-
- int i=0, j=0;
- while ((world.isAirBlock(x, y, z) || world.getBlockId(x, y, z) != Block.waterMoving.blockID)&&i<30)
- {
- while((world.isAirBlock(x, y, z) || world.getBlockId(x, y, z) != Block.waterMoving.blockID)&&j<30)
- {
- world.setBlock(x, y, z, Block.waterStill.blockID);
- z--;
- j++;
- }
- i++;
- x--;
- }
- }
- }
-}
diff --git a/wildCaves/generation/structureGen/GenerateGlowcaps.java b/wildCaves/generation/structureGen/GenerateGlowcaps.java
deleted file mode 100644
index 6fb6a2b..0000000
--- a/wildCaves/generation/structureGen/GenerateGlowcaps.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package wildCaves.generation.structureGen;
-
-import java.util.Random;
-
-import wildCaves.WildCaves;
-
-import net.minecraft.world.World;
-
-public class GenerateGlowcaps
-{
- // Genarates Glowing mushrooms at the specified x,y,z
- public static boolean generate(World world, Random random, int x, int y, int z)
- {
- if(!world.isAirBlock(x, y-1, z))
- {
- int glowcapNum = 0;
- if(world.isAirBlock(x, y+1, z))
- glowcapNum = random.nextInt(5);
- else
- glowcapNum = random.nextInt(4);
-
- world.setBlock(x, y, z, WildCaves.blockFloraID, glowcapNum, 2);
- if(glowcapNum == 4)
- {
- world.setBlock(x, y+1, z, WildCaves.blockFloraID, glowcapNum+1, 2);
- }
- return true;
- }
- else
- return false;
- }
-}
diff --git a/wildCaves/generation/structureGen/GenerateIceshrooms.java b/wildCaves/generation/structureGen/GenerateIceshrooms.java
deleted file mode 100644
index 2338188..0000000
--- a/wildCaves/generation/structureGen/GenerateIceshrooms.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package wildCaves.generation.structureGen;
-
-import java.util.Random;
-
-import wildCaves.Utils;
-import wildCaves.WildCaves;
-
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
-
-public class GenerateIceshrooms
-{
- public static void generate(World world, Random random, int x, int y, int z)
- {
- if(!world.isAirBlock(x, y-1, z))
- {
- if(!world.getBlockMaterial(x, y, z).isLiquid())
- {
- world.setBlock(x, y-1, z, Block.ice.blockID);
- world.setBlock(x, y, z, WildCaves.blockFloraID, Utils.randomChoise(6, 7, 8, 9), 2);
- }
- Utils.convertToFrozenType(world, random, x, y, z);
- }
- }
-}
diff --git a/wildCaves/generation/structureGen/GenerateIcicles.java b/wildCaves/generation/structureGen/GenerateIcicles.java
deleted file mode 100644
index f4f4f74..0000000
--- a/wildCaves/generation/structureGen/GenerateIcicles.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package wildCaves.generation.structureGen;
-
-import java.util.Random;
-
-import wildCaves.Utils;
-import wildCaves.WildCaves;
-
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
-
-public class GenerateIcicles
-{
- public static void generate(World world, Random random, int x, int y, int z, int distance)
- {
- int botY = y - distance + 1;
-
- world.setBlock(x, y+1, z, Block.ice.blockID);
- world.setBlock(x, y, z, WildCaves.blockDecorationsID, Utils.randomChoise(0, 1, 2), 2);
- Utils.convertToFrozenType(world, random, x, y, z);
-
- if(!world.getBlockMaterial(x, botY, z).isLiquid())
- {
- Utils.convertToFrozenType(world, random, x, botY, z);
- }
- }
-}
diff --git a/wildCaves/generation/structureGen/GenerateSandstoneStalactites.java b/wildCaves/generation/structureGen/GenerateSandstoneStalactites.java
index 398ee60..4fbcc1b 100644
--- a/wildCaves/generation/structureGen/GenerateSandstoneStalactites.java
+++ b/wildCaves/generation/structureGen/GenerateSandstoneStalactites.java
@@ -1,93 +1,29 @@
package wildCaves.generation.structureGen;
-import java.util.Random;
-
+import net.minecraft.init.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
import wildCaves.Utils;
import wildCaves.WildCaves;
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
+import java.util.Random;
+
+public final class GenerateSandstoneStalactites extends GenerateStoneStalactite{
+ public GenerateSandstoneStalactites(){
+ super(WildCaves.blockSandStalactite);
+ }
-public class GenerateSandstoneStalactites
-{
- public static void generate(World world, Random random, int x, int y, int z, int distance, int maxLength)
- {
- boolean stalagmiteGenerated = false;
- int blockId = WildCaves.blockSandStalactiteID;
-
- if(world.getBlockId(x, y+1, z)==Block.stone.blockID)
- world.setBlock(x, y+1, z, blockId, 0, 2);
-
- if (distance == 1)
- {
- world.setBlock(x, y, z, blockId, 0, 2);
- }
- else
- {
- int k = 0; // counter
- int j = 0; // blocks placed
- int topMetadata = 0;
- int bottomMetadata = 0;
- int topY = y;
- int botY = y - distance + 1;
- int aux;
+ @Override
+ protected void generateStalactiteBase(World world, Random random, BlockPos topY) {
+ super.generateStalactiteBase(world, random, topY);
+ Utils.convertToSandType(world, random, topY);
+ }
- //stalactite base
- world.setBlock(x, topY, z, blockId, Utils.randomChoise(1, 2, 3, 3), 2);
- Utils.convertToSandType(world, random, x, topY, z);
- j++;
-
- // stalagmite base
- if(!world.getBlockMaterial(x, botY, z).isLiquid() && !world.isAirBlock(x, botY-1, z))
- {
- aux = Utils.randomChoise(-1, 8, 9, 10);
- if (aux != -1)
- {
- if(world.getBlockId(x, botY-1, z)==Block.stone.blockID)
- world.setBlock(x, botY-1, z, Block.sandStone.blockID, 0, 2);
-
- world.setBlock(x, botY, z, blockId, aux, 2);
- j++;
- stalagmiteGenerated = true;
-
- Utils.convertToSandType(world, random, x, botY, z);
- }
- }
-
- if (distance > 2)
- {
- while (k < maxLength && topY >= botY && j < distance && !world.getBlockMaterial(x, topY-1, z).isLiquid())
- {
- k++;
- topMetadata = world.getBlockMetadata(x, topY, z);
- bottomMetadata = world.getBlockMetadata(x, botY, z);
- topY--;
- botY++;
- // Expand downwards
- if(world.isAirBlock(x, topY, z) && topMetadata > 2 && topMetadata < 6)
- {
- aux = random.nextInt(5);
- if (aux != 4)
- world.setBlock(x, topY, z, blockId, Utils.randomChoise(4, 5, 7, 11), 2);
- else
- world.setBlock(x, topY, z, blockId, Utils.randomChoise(7, 11), 2);
- j++;
- }
-
- // Expand upwards
- if (world.isAirBlock(x, botY, z) && (bottomMetadata > 3 && bottomMetadata < 5 || bottomMetadata == 8) && j < distance && stalagmiteGenerated)
- {
- aux = random.nextInt(5);
- if (aux != 4)
- world.setBlock(x, botY, z, blockId, Utils.randomChoise(4, 5, 6, 12), 2);
- else
- world.setBlock(x, botY, z, blockId, Utils.randomChoise(12, 6), 2);
- j++;
- }
- }
- }
- }
- }
-
-
+ @Override
+ protected void generateStalagmiteBase(World world, Random random, BlockPos botY, int aux) {
+ if (world.getBlockState(botY.down()) == Blocks.stone)
+ world.setBlockState(botY.down(), Blocks.sandstone.getDefaultState(), 2);
+ super.generateStalagmiteBase(world, random, botY, aux);
+ Utils.convertToSandType(world, random, botY);
+ }
}
diff --git a/wildCaves/generation/structureGen/GenerateSkulls.java b/wildCaves/generation/structureGen/GenerateSkulls.java
deleted file mode 100644
index a2ab6d0..0000000
--- a/wildCaves/generation/structureGen/GenerateSkulls.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package wildCaves.generation.structureGen;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.world.World;
-import wildCaves.Utils;
-
-public class GenerateSkulls
-{
- public static void generate(World world, Random random, int x, int y, int z, int numEmptyBlocks)
- {
- if(numEmptyBlocks > 0)
- {
- int auxY = y-numEmptyBlocks+1;
- world.setBlock(x, auxY, z, Block.skull.blockID, 1, 2);
- TileEntity skullTE = world.getBlockTileEntity(x, auxY, z);
- //((TileEntitySkull)skullTE).setSkullType(0, "");
- ((TileEntitySkull)skullTE).setSkullRotation(random.nextInt(360));
- }
- }
-}
diff --git a/wildCaves/generation/structureGen/GenerateStoneStalactite.java b/wildCaves/generation/structureGen/GenerateStoneStalactite.java
index 7917283..989ebf2 100644
--- a/wildCaves/generation/structureGen/GenerateStoneStalactite.java
+++ b/wildCaves/generation/structureGen/GenerateStoneStalactite.java
@@ -1,81 +1,87 @@
package wildCaves.generation.structureGen;
-import java.util.Random;
-
+import net.minecraft.block.Block;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.World;
import wildCaves.Utils;
import wildCaves.WildCaves;
+import wildCaves.WorldGenWildCaves;
-import net.minecraft.world.World;
+import java.util.Random;
+
+public class GenerateStoneStalactite {
+ public final Block blockId;
+ public GenerateStoneStalactite(){this(WildCaves.blockStoneStalactite);}
+ public GenerateStoneStalactite(Block toGen){
+ blockId = toGen;
+ }
-public class GenerateStoneStalactite
-{
- public static void generate(World world, Random random, int x, int y, int z, int distance, int maxLength)
- {
+ public void generate(World world, Random random, BlockPos pos, int distance, int maxLength) {
boolean stalagmiteGenerated = false;
- int blockId = WildCaves.blockStoneStalactiteID;
- if (distance == 1)
- {
- //x,y,z,blockID, metadate, set the last one to 2
- world.setBlock(x, y, y, blockId, 0, 2);
- }
- else
- {
- int k = 0; // counter
+ if (distance <= 1) {
+ //x,y,z,blockID, metadata, no update
+ if (!world.isAirBlock(pos.up())) {
+ world.setBlockState(pos, blockId.getDefaultState(), 2);
+ }
+ } else {
int j = 0; // blocks placed
- int topMetadata = 0;
- int bottomMetadata = 0;
- int topY = y;
- int botY = y - distance + 1;
+ BlockPos topY = new BlockPos(pos);
+ BlockPos botY = pos.down(distance - 1);
int aux;
-
//stalactite base
- world.setBlock(x, topY, z, blockId, Utils.randomChoise(1, 2, 3, 3), 2);
- j++;
-
+ if (!world.isAirBlock(topY.up())) {
+ generateStalactiteBase(world, random, topY);
+ j++;
+ }
// stalagmite base
- if(!world.getBlockMaterial(x, botY, z).isLiquid() && !world.isAirBlock(x, botY-1, z))
- {
+ if (!world.getBlockState(botY).getMaterial().isLiquid() && WorldGenWildCaves.isWhiteListed(world.getBlockState(botY.down()).getBlock())) {
aux = Utils.randomChoise(-1, 8, 9, 10);
- if (aux != -1)
- {
- world.setBlock(x, botY, z, blockId, aux, 2);
+ if (aux != -1) {
+ generateStalagmiteBase(world, random, botY, aux);
j++;
stalagmiteGenerated = true;
}
}
-
- if (distance > 2)
- {
- while (k < maxLength && topY >= botY && j < distance && !world.getBlockMaterial(x, topY-1, z).isLiquid())
- {
+ if (j==2) {
+ int k = 0; // counter
+ int topMetadata, bottomMetadata;
+ while (k < maxLength && topY.getY() >= botY.getY() && j < distance && !world.getBlockState(topY.down()).getMaterial().isLiquid()) {
k++;
- topMetadata = world.getBlockMetadata(x, topY, z);
- bottomMetadata = world.getBlockMetadata(x, botY, z);
- topY--;
- botY++;
+ IBlockState state = world.getBlockState(topY);
+ topMetadata = state.getBlock().getMetaFromState(state);
+ state = world.getBlockState(botY);
+ bottomMetadata = state.getBlock().getMetaFromState(state);
+ topY = topY.down();
+ botY = botY.up();
// Expand downwards
- if(world.isAirBlock(x, topY, z) && topMetadata > 2 && topMetadata < 6)
- {
+ if (world.isAirBlock(topY) && topMetadata > 2 && topMetadata < 6) {
aux = random.nextInt(5);
- if (aux != 4)
- world.setBlock(x, topY, z, blockId, Utils.randomChoise(4, 5, 7, 11), 2);
- else
- world.setBlock(x, topY, z, blockId, Utils.randomChoise(7, 11),2);
+ if (aux != 4)
+ world.setBlockState(topY, blockId.getStateFromMeta(Utils.randomChoise(4, 5, 7, 11)), 2);
+ else
+ world.setBlockState(topY, blockId.getStateFromMeta(Utils.randomChoise(7, 11)), 2);
j++;
}
-
// Expand upwards
- if (world.isAirBlock(x, botY, z) && (bottomMetadata > 3 && bottomMetadata < 5 || bottomMetadata == 8) && j < distance && stalagmiteGenerated)
- {
+ if (world.isAirBlock(botY) && (bottomMetadata > 3 && bottomMetadata < 5 || bottomMetadata == 8) && j < distance && stalagmiteGenerated) {
aux = random.nextInt(5);
- if (aux != 4)
- world.setBlock(x, botY, z, blockId, Utils.randomChoise(4, 5, 6, 12),2);
- else
- world.setBlock(x, botY, z, blockId, Utils.randomChoise(12, 6),2);
+ if (aux != 4)
+ world.setBlockState(botY, blockId.getStateFromMeta(Utils.randomChoise(4, 5, 6, 12)), 2);
+ else
+ world.setBlockState(botY, blockId.getStateFromMeta(Utils.randomChoise(12, 6)), 2);
j++;
}
}
}
}
}
+
+ protected void generateStalagmiteBase(World world, Random random, BlockPos botY, int aux) {
+ world.setBlockState(botY, blockId.getStateFromMeta(aux), 2);
+ }
+
+ protected void generateStalactiteBase(World world, Random random, BlockPos topY) {
+ world.setBlockState(topY, blockId.getStateFromMeta(Utils.randomChoise(1, 2, 3, 3)), 2);
+ }
}
diff --git a/wildCaves/generation/structureGen/GenerateVines.java b/wildCaves/generation/structureGen/GenerateVines.java
deleted file mode 100644
index 58fc02d..0000000
--- a/wildCaves/generation/structureGen/GenerateVines.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package wildCaves.generation.structureGen;
-
-import java.util.Random;
-
-import wildCaves.Utils;
-
-import net.minecraft.block.Block;
-import net.minecraft.util.Direction;
-import net.minecraft.util.Facing;
-import net.minecraft.world.World;
-
-public class GenerateVines
-{
- // returns wether it managed to place a vine or not
- public static boolean generate(World world, Random random, int x, int y, int z)
- {
- int distance = Utils.getNumEmptyBlocks(world, x, y, z);
- int aux;
- boolean result = false;
-
- if (distance > 5)
- aux = random.nextInt(distance-5)+5;
- else
- aux = distance;
-
- //the side the vine should be facing
- int side = random.nextInt(4)+2;
- result = true;
-
- // length of the vine
- int i=0;
- while(i