diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..3159304
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..17463c1
--- /dev/null
+++ b/.project
@@ -0,0 +1,16 @@
+
+
+ forge-1.7.10-10.13.2.1291
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
diff --git a/build.gradle b/build.gradle
index 61dd0dd..f9d0068 100644
--- a/build.gradle
+++ b/build.gradle
@@ -17,12 +17,12 @@ buildscript {
apply plugin: 'forge'
-version = "1.7.10-1.4a"
+version = "1.7.10-1.4b3"
group= "com.stek101.projectzulu" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ProjectZulu"
minecraft {
- version = "1.7.10-10.13.2.1230"
+ version = "1.7.10-10.13.2.1291"
runDir = "eclipse"
}
diff --git a/eclipse/.metadata/.log b/eclipse/.metadata/.log
index b0d1e3c..ffb1fa2 100644
--- a/eclipse/.metadata/.log
+++ b/eclipse/.metadata/.log
@@ -1,4 +1,4 @@
-!SESSION 2015-01-01 14:05:55.914 -----------------------------------------------
+!SESSION 2015-02-01 12:34:01.915 -----------------------------------------------
eclipse.buildId=4.4.1.M20140925-0400
java.version=1.8.0_11
java.vendor=Oracle Corporation
@@ -6,7 +6,7 @@ BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-01 14:05:59.288
+!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-02-01 12:34:04.618
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
@@ -39,7 +39,7 @@ Chain 2:
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-01 14:06:34.381
+!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-02-01 12:34:36.494
!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
!STACK 0
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
@@ -51,7 +51,7 @@ java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfigu
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-01 14:07:02.805
+!ENTRY org.eclipse.egit.ui 2 0 2015-02-01 12:35:11.901
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
@@ -59,1118 +59,19 @@ this system level configuration. The Git installation location can be configured
Team > Git > Configuration preference page's 'System Settings' tab.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-01 14:07:02.806
+!ENTRY org.eclipse.egit.ui 2 0 2015-02-01 12:35:11.917
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-!ENTRY org.eclipse.core.resources 4 566 2015-01-01 14:13:08.613
+!ENTRY org.eclipse.core.resources 4 566 2015-02-01 12:52:50.091
!MESSAGE Workspace was not properly initialized or has already shutdown.
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-01 14:13:08.613
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/src PZ pre 1.3/main/java/com/stek101/projectzulu/common])
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-01 14:13:09.160
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-!SESSION 2015-01-01 14:13:28.791 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-01 14:13:31.151
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.core.resources 2 10035 2015-01-01 14:13:34.230
-!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-01 14:13:35.137
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-01 14:13:50.093
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-01 14:13:50.093
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-01 14:19:06.326
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-01 14:19:06.326
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/bin/assets/projectzulublock])
-!SESSION 2015-01-04 09:57:46.387 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-04 09:57:49.138
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-04 09:57:56.076
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-04 09:58:33.035
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-04 09:58:33.037
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-04 12:44:19.397
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-04 12:44:19.426
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/build/tmp/recompSrc/assets/minecraft])
-!SESSION 2015-01-04 20:30:49.901 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-04 20:30:52.743
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-04 20:31:19.773
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-04 20:32:13.328
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-04 20:32:13.407
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-!SESSION 2015-01-11 20:01:05.186 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-11 20:01:07.817
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-11 20:01:14.020
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-11 20:01:42.329
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-11 20:01:42.331
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-11 22:02:11.794
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-11 22:02:11.855
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/eclipse/.metadata/.plugins])
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-11 22:02:12.000
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-!SESSION 2015-01-12 00:05:44.546 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-12 00:05:47.001
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.core.resources 2 10035 2015-01-12 00:06:00.124
-!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-12 00:06:02.969
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 00:06:40.194
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 00:06:40.195
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-12 01:39:59.940
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-12 01:39:59.942
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/src/main/resources/assets/projectzulumob])
-!SESSION 2015-01-12 10:30:20.508 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-12 10:30:26.054
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-12 10:32:04.593
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.osgi 2 0 2015-01-12 10:34:51.523
-!MESSAGE While loading class "org.eclipse.jdt.internal.core.builder.JavaBuilder", thread "Thread[Worker-0,5,main]" timed out waiting (5016ms) for thread "Thread[main,6,main]" to finish starting bundle "org.eclipse.jdt.core_3.10.0.v20140902-0626 [909]". To avoid deadlock, thread "Thread[Worker-0,5,main]" is proceeding but "org.eclipse.jdt.internal.core.builder.JavaBuilder" may not be fully initialized.
-!STACK 0
-org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.jdt.core"; type="osgi.bundle"; version:Version="3.10.0.v20140902-0626"; singleton:="true" [id=909] STARTED [STARTED]
- at org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)
- at org.eclipse.osgi.container.Module.start(Module.java:389)
- at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
- at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
- at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:531)
- at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
- at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:320)
- at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:395)
- at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
- at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
- at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
- at java.lang.ClassLoader.loadClass(Unknown Source)
- at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
- at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
- at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
- at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
- at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
- at org.eclipse.core.internal.events.BuildManager.instantiateBuilder(BuildManager.java:907)
- at org.eclipse.core.internal.events.BuildManager.initializeBuilder(BuildManager.java:860)
- at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:545)
- at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:574)
- at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:244)
- at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
- at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
- at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
- at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
- at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
- at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
-
-!ENTRY org.eclipse.osgi 2 0 2015-01-12 10:34:56.540
-!MESSAGE While loading class "org.eclipse.jdt.internal.core.builder.ImageBuilderInternalException", thread "Thread[Worker-0,5,main]" timed out waiting (5017ms) for thread "Thread[main,6,main]" to finish starting bundle "org.eclipse.jdt.core_3.10.0.v20140902-0626 [909]". To avoid deadlock, thread "Thread[Worker-0,5,main]" is proceeding but "org.eclipse.jdt.internal.core.builder.ImageBuilderInternalException" may not be fully initialized.
-!STACK 0
-org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.jdt.core"; type="osgi.bundle"; version:Version="3.10.0.v20140902-0626"; singleton:="true" [id=909] STARTED [STARTED]
- at org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)
- at org.eclipse.osgi.container.Module.start(Module.java:389)
- at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
- at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
- at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:531)
- at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
- at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:320)
- at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:395)
- at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
- at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
- at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
- at java.lang.ClassLoader.loadClass(Unknown Source)
- at java.lang.Class.getDeclaredConstructors0(Native Method)
- at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
- at java.lang.Class.getConstructor0(Unknown Source)
- at java.lang.Class.newInstance(Unknown Source)
- at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
- at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
- at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
- at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
- at org.eclipse.core.internal.events.BuildManager.instantiateBuilder(BuildManager.java:907)
- at org.eclipse.core.internal.events.BuildManager.initializeBuilder(BuildManager.java:860)
- at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:545)
- at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:574)
- at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:244)
- at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
- at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
- at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
- at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
- at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
- at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 10:38:06.722
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 10:38:06.724
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-12 16:55:23.181
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-12 16:55:23.441
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-12 16:55:23.442
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/build/tmp/recompCls])
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-12 16:55:23.785
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-!SESSION 2015-01-12 19:52:55.845 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-12 19:52:58.997
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.core.resources 2 10035 2015-01-12 19:54:52.162
-!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-12 19:54:53.692
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 19:55:35.331
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 19:55:35.332
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-!SESSION 2015-01-12 21:29:26.476 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-12 21:29:43.250
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-12 21:36:51.584
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 21:38:33.285
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-12 21:38:33.286
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-12 22:16:38.073
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-12 22:16:38.088
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/build/tmp/recompSrc/net/minecraft])
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-12 22:16:38.323
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-!SESSION 2015-01-13 00:08:11.595 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-13 00:08:14.081
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-13 00:09:29.808
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-13 00:09:56.997
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-13 00:09:56.999
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-13 00:12:23.029
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-13 00:12:23.032
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/bin/assets/projectzulumob])
-!SESSION 2015-01-13 00:16:02.105 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-13 00:16:04.418
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-13 00:16:08.293
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-13 00:16:26.717
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-13 00:16:26.717
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-13 00:39:56.532
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-13 00:39:56.532
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/src/main/resources/assets/projectzuluworld])
-!SESSION 2015-01-13 15:36:53.846 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-13 15:36:56.340
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.core.resources 2 10035 2015-01-13 15:37:05.634
-!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-13 15:37:11.757
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-13 15:37:46.243
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-13 15:37:46.243
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-14 00:06:00.498
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 2 2015-01-14 00:06:00.545
-!MESSAGE An internal error occurred during: "Win32 refresh daemon".
-!STACK 0
-java.lang.NullPointerException
- at org.eclipse.core.internal.localstore.FileSystemResourceManager.asyncRefresh(FileSystemResourceManager.java:137)
- at org.eclipse.core.internal.localstore.FileSystemResourceManager.isSynchronized(FileSystemResourceManager.java:722)
- at org.eclipse.core.internal.resources.Resource.isSynchronized(Resource.java:1543)
- at org.eclipse.core.internal.resources.refresh.win32.Win32Monitor$Handle.postRefreshRequest(Win32Monitor.java:204)
- at org.eclipse.core.internal.resources.refresh.win32.Win32Monitor$ResourceHandle.handleNotification(Win32Monitor.java:293)
- at org.eclipse.core.internal.resources.refresh.win32.Win32Monitor.waitForNotification(Win32Monitor.java:593)
- at org.eclipse.core.internal.resources.refresh.win32.Win32Monitor.run(Win32Monitor.java:507)
- at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-14 00:06:00.545
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/build/sources/java/com/stek101/projectzulu/common])
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-14 00:06:00.701
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-14 00:06:00.764
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-!SESSION 2015-01-14 20:34:36.377 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-14 20:34:39.320
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.core.resources 2 10035 2015-01-14 20:35:11.549
-!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-14 20:35:13.812
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-14 20:35:48.239
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-14 20:35:48.651
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.equinox.event 4 0 2015-01-15 14:32:18.086
-!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/widget/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@6e6135e5
-!STACK 0
-java.lang.NullPointerException
- at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176)
- at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193)
- at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:407)
- at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:4995)
- at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$1.handleEvent(CompatibilityPart.java:98)
- at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
- at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
- at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
- at org.eclipse.swt.widgets.Display.syncExec(Display.java:4734)
- at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:218)
- at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
- at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
- at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
- at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
- at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
- at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
- at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
- at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
- at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
- at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
- at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261)
- at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:149)
- at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:137)
- at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:123)
- at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
- at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
- at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
- at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
- at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:874)
- at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:165)
- at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:789)
- at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1290)
- at org.eclipse.swt.widgets.Widget.release(Widget.java:819)
- at org.eclipse.swt.widgets.Widget.dispose(Widget.java:454)
- at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:447)
- at org.eclipse.swt.widgets.Shell.dispose(Shell.java:715)
- at org.eclipse.swt.widgets.Display.release(Display.java:3811)
- at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
- at org.eclipse.swt.widgets.Display.messageProc(Display.java:3292)
- at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
- at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2544)
- at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)
- at org.eclipse.swt.widgets.Control.windowProc(Control.java:4705)
- at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
- at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1626)
- at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
- at org.eclipse.swt.widgets.Display.windowProc(Display.java:5036)
- at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
- at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3141)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
- at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
- at org.eclipse.jface.window.Window.open(Window.java:808)
- at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:341)
- at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:114)
- at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:209)
- at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:218)
- at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$2.handleEvent(IDEWorkbenchAdvisor.java:171)
- at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
- at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
- at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4346)
- at org.eclipse.swt.widgets.Display.messageProc(Display.java:3305)
- at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
- at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2544)
- at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)
- at org.eclipse.swt.widgets.Control.windowProc(Control.java:4705)
- at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
- at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1626)
- at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
- at org.eclipse.swt.widgets.Display.windowProc(Display.java:5036)
- at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
- at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3141)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
- at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
- at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
- at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
- at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
- at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
- at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
- at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
- at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
- at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
- at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
- at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
- at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
- at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
-!SESSION 2015-01-15 18:51:06.779 -----------------------------------------------
+!ENTRY org.eclipse.core.jobs 4 1 2015-02-01 12:52:50.107
+!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/bin/com/stek101/projectzulu/common])
+!SESSION 2015-02-03 10:26:14.611 -----------------------------------------------
eclipse.buildId=4.4.1.M20140925-0400
java.version=1.8.0_11
java.vendor=Oracle Corporation
@@ -1178,7 +79,7 @@ BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-15 18:51:09.201
+!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-02-03 10:26:17.315
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
@@ -1211,238 +112,10 @@ Chain 2:
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-!ENTRY org.eclipse.core.resources 2 10035 2015-01-15 18:51:12.841
+!ENTRY org.eclipse.core.resources 2 10035 2015-02-03 10:27:29.982
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-15 18:51:15.351
-!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
-!STACK 0
-java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
- at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
- at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
- at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
- at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
- at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
- at java.util.TimerThread.mainLoop(Unknown Source)
- at java.util.TimerThread.run(Unknown Source)
-
-!ENTRY org.eclipse.jst.j2ee.core 4 0 2015-01-15 18:51:39.456
-!MESSAGE
-!STACK 0
-java.lang.InterruptedException
- at org.eclipse.core.internal.jobs.OrderedLock.acquire(OrderedLock.java:102)
- at org.eclipse.jst.j2ee.internal.J2EEInit.aquireInitializePackageContentsLock(J2EEInit.java:454)
- at org.eclipse.jst.j2ee.ejb.internal.impl.EjbPackageImpl.freeze(EjbPackageImpl.java:1757)
- at org.eclipse.jst.j2ee.ejb.internal.impl.EjbPackageImpl.init(EjbPackageImpl.java:325)
- at org.eclipse.jst.j2ee.ejb.EjbPackage.(EjbPackage.java:1916)
- at org.eclipse.jst.j2ee.ejb.internal.impl.EjbFactoryImpl.getPackage(EjbFactoryImpl.java:671)
- at org.eclipse.jst.j2ee.internal.provider.J2EEAdapterFactoryLabelProvider.(J2EEAdapterFactoryLabelProvider.java:42)
- at org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider.initialize(J2EELabelProvider.java:57)
- at org.eclipse.jst.j2ee.navigator.internal.J2EELabelProvider.init(J2EELabelProvider.java:246)
- at org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension$2.run(NavigatorContentExtension.java:176)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension.getLabelProvider(NavigatorContentExtension.java:169)
- at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.findStyledText(NavigatorContentServiceLabelProvider.java:163)
- at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getStyledText(NavigatorContentServiceLabelProvider.java:151)
- at org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider$StyledLabelProviderAdapter.getStyledText(NavigatorDecoratingLabelProvider.java:67)
- at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getStyledText(DelegatingStyledCellLabelProvider.java:206)
- at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getStyledText(DecoratingStyledCellLabelProvider.java:199)
- at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:106)
- at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:136)
- at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:154)
- at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:949)
- at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:114)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
- at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
- at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1029)
- at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:472)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
- at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
- at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2150)
- at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:843)
- at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:818)
- at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
- at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:791)
- at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:611)
- at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:762)
- at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1543)
- at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:790)
- at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1527)
- at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1436)
- at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:366)
- at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1397)
- at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1519)
- at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292)
- at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1675)
- at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:212)
- at org.eclipse.ui.navigator.resources.ProjectExplorer.createPartControl(ProjectExplorer.java:93)
- at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:141)
- at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:155)
- at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:327)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
- at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
- at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:869)
- at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
- at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
- at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
- at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
- at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
- at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
- at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
- at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:127)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:547)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:531)
- at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:69)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1250)
- at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:100)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:678)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
- at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:185)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
- at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveRenderer.processContents(PerspectiveRenderer.java:49)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:103)
- at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:100)
- at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:77)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:678)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
- at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:185)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
- at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:664)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
- at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1078)
- at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
- at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
- at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
- at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
- at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
- at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
- at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
- at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
- at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
- at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
- at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
- at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
- at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
- at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-15 18:51:54.552
-!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
-this system level configuration. The Git installation location can be configured on the
-Team > Git > Configuration preference page's 'System Settings' tab.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-15 18:51:54.552
-!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
-user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
-not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
-EGit might behave differently since they see different configuration options.
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.core.resources 4 566 2015-01-15 23:40:06.025
-!MESSAGE Workspace was not properly initialized or has already shutdown.
-
-!ENTRY org.eclipse.core.jobs 4 1 2015-01-15 23:40:06.075
-!MESSAGE Worker thread ended job: Refreshing workspace(10), but still holds rule: ThreadJob(Refreshing workspace(10),[F/Minecraft/eclipse/.metadata/.plugins])
-!SESSION 2015-01-16 11:01:36.892 -----------------------------------------------
-eclipse.buildId=4.4.1.M20140925-0400
-java.version=1.8.0_11
-java.vendor=Oracle Corporation
-BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
-Framework arguments: -product org.eclipse.epp.package.jee.product
-Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
-
-!ENTRY org.eclipse.jpt.dbws.eclipselink.ui 4 0 2015-01-16 11:01:39.979
-!MESSAGE FrameworkEvent ERROR
-!STACK 0
-org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jpt.dbws.eclipselink.ui [394]
- Bundle was not resolved because of a uses contraint violation.
- org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"] and javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"] via two dependency chains.
-
-Chain 1:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.wst.common.project.facet.ui)(&(bundle-version>=1.3.0)(!(bundle-version>=2.0.0))))
- |
- provide: osgi.wiring.bundle: org.eclipse.wst.common.project.facet.ui
- org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.1.v20140909-1633"; singleton:="true"]
-
-Chain 2:
- org.eclipse.jpt.dbws.eclipselink.ui [osgi.identity; osgi.identity="org.eclipse.jpt.dbws.eclipselink.ui"; type="osgi.bundle"; version:Version="1.1.100.v201310142259"; singleton:="true"]
- require: (&(osgi.wiring.bundle=org.eclipse.persistence.dbws.builder)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0))))
- |
- provide: osgi.wiring.bundle; bundle-version:Version="2.6.0.v20130815-a4708b6"; osgi.wiring.bundle="org.eclipse.persistence.dbws.builder"
- org.eclipse.persistence.dbws.builder [osgi.identity; osgi.identity="org.eclipse.persistence.dbws.builder"; type="osgi.bundle"; version:Version="2.6.0.v20130815-a4708b6"]
- import: (osgi.wiring.package=javax.xml.bind)
- |
- export: osgi.wiring.package: javax.xml.bind
- javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.1.9.v201005080401"]
- at org.eclipse.osgi.container.Module.start(Module.java:434)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
- at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
- at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
- at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
-
-!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-16 11:01:58.842
+!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-02-03 10:27:33.847
!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
!STACK 0
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
@@ -1454,7 +127,7 @@ java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfigu
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-16 11:02:54.086
+!ENTRY org.eclipse.egit.ui 2 0 2015-02-03 10:28:14.722
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
@@ -1462,29 +135,9 @@ this system level configuration. The Git installation location can be configured
Team > Git > Configuration preference page's 'System Settings' tab.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-!ENTRY org.eclipse.egit.ui 2 0 2015-01-16 11:02:54.086
+!ENTRY org.eclipse.egit.ui 2 0 2015-02-03 10:28:14.722
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\BELFAM_ADMIN'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-
-!ENTRY org.eclipse.osgi 4 0 2015-01-17 00:40:29.392
-!MESSAGE Shutdown error
-!STACK 1
-java.lang.InterruptedException
- at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(Unknown Source)
- at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(Unknown Source)
- at org.eclipse.osgi.container.SystemModule.waitForStop(SystemModule.java:119)
- at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.waitForStop(EquinoxBundle.java:260)
- at org.eclipse.osgi.launch.Equinox.waitForStop(Equinox.java:181)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:436)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:254)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
- at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
- at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
- at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
diff --git a/eclipse/.metadata/.mylyn/repositories.xml.zip b/eclipse/.metadata/.mylyn/repositories.xml.zip
index 57101ee..1c9d715 100644
Binary files a/eclipse/.metadata/.mylyn/repositories.xml.zip and b/eclipse/.metadata/.mylyn/repositories.xml.zip differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3027c2a0c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3027c2a0c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 9b941a8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3027c2a0c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,330 +0,0 @@
-package projectzulu.common.core;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-
-public class ObfuscationHelper {
-
- /**
- * Helper used to See if we are unObfuscated by checking for a known non-Obfuscated name
- * return true if unObfuscated (eclipse), false if obfuscated (Minecraft)
- * @param list
- */
- public static boolean isUnObfuscated(Field[] fieldList, String desired){
- for (int i = 0; i < fieldList.length; i++) {
- if(fieldList[i].getName().equals(desired)){
- return true;
- }
- }
- return false;
- }
-
- public static boolean isUnObfuscated(Class> regularClass, String regularClassName){
- return regularClass.getSimpleName().equals(regularClassName);
- }
-
- public static Object invokeMethod(String eclipseName, String seargeName, Class> containingClass,
- Object containterInstance, Object... args) {
- try {
- Method method;
- method = getIntanceOfMethod(eclipseName, seargeName, containterInstance);
- if (method == null) {
- throw new NoSuchMethodException();
- }
- method.setAccessible(true);
- return method.invoke(containterInstance, args);
- } catch (NoSuchMethodException e) {
- ProjectZuluLog.severe("Obfuscation needs updating to access method %s. Notify modmaker.", eclipseName);
- e.printStackTrace();
- } catch (SecurityException e) {
- ProjectZuluLog.severe("Obfuscation needs updating to access method %s. Notify modmaker.", eclipseName);
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- ProjectZuluLog.severe("Obfuscation needs updating to access method %s. Notify modmaker.", eclipseName);
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- ProjectZuluLog.severe("Obfuscation needs updating to access method %s. Notify modmaker.", eclipseName);
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- ProjectZuluLog.severe("Obfuscation needs updating to access method %s. Notify modmaker.", eclipseName);
- e.printStackTrace();
- }
- return null;
- }
-
- private static Method getIntanceOfMethod(String eclipseName, String seargeName, Object containterInstance, Class>... topClassToLook) {
- Class> classToSearch = containterInstance.getClass();
- while (classToSearch.getSuperclass() != null) {
- for (Method method : classToSearch.getDeclaredMethods()) {
- if (eclipseName.equalsIgnoreCase(method.getName()) || seargeName.equalsIgnoreCase(method.getName())) {
- return method;
- }
- }
- classToSearch = classToSearch.getSuperclass();
- }
- return null;
- }
-
- /**
- * Helper method to Perform Reflection to Get Static Field of Provided Type. Field is assumed Private.
- * @param fieldName
- * @param type
- * @return
- */
- public static T getFieldFromReflection(String fieldName, Class> containingClass, Class type){
- try {
- Field desiredField = containingClass.getDeclaredField(fieldName);
- desiredField.setAccessible(true);
- return type.cast(desiredField.get(null));
- }catch (NoSuchFieldException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s %s. Please notify modmaker Immediately.", fieldName, type.getSimpleName());
- e.printStackTrace();
- }catch (IllegalArgumentException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s %s. Please notify modmaker Immediately.", fieldName, type.getSimpleName());
- e.printStackTrace();
- }catch (IllegalAccessException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s %s. Please notify modmaker Immediately.", fieldName, type.getSimpleName());
- e.printStackTrace();
- }catch (SecurityException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s %s. Please notify modmaker Immediately.", fieldName, type.getSimpleName());
- e.printStackTrace();
- }
- return null;
- }
-
- /**
- * Helper method to Perform Reflection to Get non-static Field of Provided Type. Field is assumed Private.
- * @param fieldName
- * @param type
- * @return
- */
- public static T getFieldFromReflection(String fieldName, Object containterInstance, Class type){
- return getFieldFromReflection(fieldName, containterInstance.getClass(), containterInstance, type);
- }
-
- /**
- * Get Non-Static Field
- */
- public static T getFieldFromReflection(String srgName, String sourceName, Object containterInstance,
- Class type) {
- try {
- return getCatchableFieldFromReflection(srgName, containterInstance.getClass(), containterInstance, type);
- } catch (NoSuchFieldException e) {
- return getFieldFromReflection(sourceName, containterInstance.getClass(), containterInstance, type);
- }
- }
-
- public static T getFieldFromReflection(String fieldName, Class> containingClass, Object containterInstance,
- Class type) {
- try {
- return getCatchableFieldFromReflection(fieldName, containingClass, containterInstance, type);
- } catch (NoSuchFieldException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s %s. Please notify modmaker Immediately.",
- fieldName, type.getSimpleName());
- e.printStackTrace();
- }
- return null;
- }
-
- /**
- * Helper method to Perform Reflection to Get non-static Field of Provided Type. Field is assumed Private.
- *
- * @param fieldName
- * @param type
- * @return
- */
- public static T getCatchableFieldFromReflection(String fieldName, Object containterInstance, Class type)
- throws NoSuchFieldException {
- return getCatchableFieldFromReflection(fieldName, containterInstance.getClass(), containterInstance, type);
- }
-
- /**
- * Helper method to Perform Reflection to Get non-static Field of Provided Type. Field is assumed Private.
- *
- * @param fieldName
- * @param type
- * @return
- */
- public static T getCatchableFieldFromReflection(String fieldName, Class> containingClass, Object containterInstance, Class type)
- throws NoSuchFieldException {
- try {
- Field desiredField = containingClass.getDeclaredField(fieldName);
- desiredField.setAccessible(true);
- return type.cast(desiredField.get(containterInstance));
- } catch (IllegalArgumentException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- } catch (SecurityException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }
- return null;
- }
-
- /**
- * Helper method to Perform Reflection to Set non-static Field of Provided Type. Field is assumed Private.
- *
- * @param fieldName
- * @param containingClass Class that contains desired field containerInstance should be castable to it. Required to
- * get fields from parent classes
- * @param containterInstance Instance of the Object to get the non-static Field
- * @param isPrivate Whether the field is private and requires setAccessible(true)
- * @param type
- * @param value
- * @return
- * @throws NoSuchFieldException
- */
- public static void setCatchableFieldUsingReflection(String fieldName, Class> containingClass, Object containterInstance, boolean isPrivate, T value) throws NoSuchFieldException{
- try {
- Field desiredField = containingClass.getDeclaredField(fieldName);
- if (isPrivate) {
- desiredField.setAccessible(true);
- }
- desiredField.set(containterInstance, value);
- }catch (IllegalArgumentException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (IllegalAccessException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (SecurityException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }
- }
-
- /**
- * Helper method to Perform Reflection to Set non-static Field of Provided Type. Field is assumed Private.
- *
- * @param fieldName
- * @param containingClass Class that contains desired field containerInstance should be castable to it. Required to
- * get fields from parent classes
- * @param containterInstance Instance of the Object to get the non-static Field
- * @param isPrivate Whether the field is private and requires setAccessible(true)
- * @param type
- * @param value
- * @return
- */
- public static void setFieldUsingReflection(String fieldName, Class> containingClass, Object containterInstance, boolean isPrivate, T value){
- try {
- Field desiredField = containingClass.getDeclaredField(fieldName);
- if (isPrivate) {
- desiredField.setAccessible(true);
- }
- desiredField.set(containterInstance, value);
- }catch (NoSuchFieldException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (IllegalArgumentException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (IllegalAccessException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (SecurityException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }
- }
-
- /**
- * Helper method to Perform Reflection to Set non-static Field of Provided Type. Field is assumed Private.
- *
- * @param fieldName
- * @param containingClass Class that contains desired field containerInstance should be castable to it. Required to
- * get fields from parent classes
- * @param containterInstance Instance of the Object to get the non-static Field
- * @param isPrivate Whether the field is private and requires setAccessible(true)
- * @param type
- * @param value
- * @return
- */
- public static void setFieldUsingReflection(String fieldName, Class> containingClass,
- Object containterInstance, boolean isPrivate, boolean isFinal, T value) {
- try {
- Field desiredField = containingClass.getDeclaredField(fieldName);
- if (isPrivate) {
- desiredField.setAccessible(true);
- }
- if (isFinal || isPrivate) {
- Field modifiersField = Field.class.getDeclaredField("modifiers");
- modifiersField.setAccessible(true);
- modifiersField.set(desiredField, desiredField.getModifiers() & ~Modifier.FINAL);
- }
- desiredField.set(containterInstance, value);
- }catch (NoSuchFieldException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (IllegalArgumentException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (IllegalAccessException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }catch (SecurityException e) {
- ProjectZuluLog.severe("Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }
- }
-
- /**
- * Helper method to Perform Reflection to Set non-static Field of Provided Type. Field is assumed Private.
- *
- * @param fieldName
- * @param containingClass Class that contains desired field containerInstance should be castable to it. Required to
- * get fields from parent classes
- * @param containterInstance Instance of the Object to get the non-static Field
- * @param isPrivate Whether the field is private and requires setAccessible(true)
- * @param type
- * @param value
- * @return
- * @throws NoSuchFieldException
- */
- public static void setCatchableFieldUsingReflection(String fieldName, Class> containingClass,
- Object containterInstance, boolean isPrivate, boolean isFinal, T value) throws NoSuchFieldException {
- try {
- Field desiredField = containingClass.getDeclaredField(fieldName);
- if (isPrivate) {
- desiredField.setAccessible(true);
- }
- if (isFinal || isPrivate) {
- Field modifiersField = Field.class.getDeclaredField("modifiers");
- modifiersField.setAccessible(true);
- modifiersField.set(desiredField, desiredField.getModifiers() & ~Modifier.FINAL);
- }
- desiredField.set(containterInstance, value);
- } catch (IllegalArgumentException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- } catch (SecurityException e) {
- ProjectZuluLog.severe(
- "Obfuscation needs to be updated to access the %s. Please notify modmaker Immediately.", fieldName);
- e.printStackTrace();
- }
- }
-
-
- public static Class> getDeclaredClass(String className, Class> containingClass){
- for (Class> declaredClass : containingClass.getDeclaredClasses()) {
- if(declaredClass.getSimpleName().equals(className)){
- return declaredClass;
- }
- }
- return null;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/40ff4901c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/40ff4901c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 9f68f96..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/40ff4901c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,156 +0,0 @@
-package com.ngb.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.common.mobs.entity.EntityFinch;
-import projectzulu.common.mobs.entity.EntityStates;
-
-public class ModelFinch extends ModelBase {
-
- ModelRenderer Body;
- ModelRenderer wingrig;
- ModelRenderer winglef;
- ModelRenderer tail;
- ModelRenderer LEGRIGTOPROT;
- ModelRenderer LEGLEFTOPROT;
- ModelRenderer HEADROT;
- private ModelRenderer LEGRIGBOTROT;
- private ModelRenderer LEGLEFBOTROT;
- private ModelRenderer BEAKROT;
-
- public ModelFinch() {
- textureWidth = 32;
- textureHeight = 32;
- setTextureOffset("LEGRIGTOPROT.lefrigtop", 0, 12);
- setTextureOffset("LEGRIGBOTROT.legbotrig", 0, 15);
- setTextureOffset("LEGLEFTOPROT.legtoplef", 3, 12);
- setTextureOffset("LEGLEFBOTROT.legbotlef", 7, 15);
- setTextureOffset("HEADROT.Head", 0, 7);
- setTextureOffset("BEAKROT.beak", 9, 9);
-
- Body = new ModelRenderer(this, 0, 0);
- Body.addBox(-1F, -1F, -2F, 2, 2, 4);
- Body.setRotationPoint(0F, 21.3F, 0F);
- Body.setTextureSize(32, 32);
- Body.mirror = true;
- setRotation(Body, 0F, 0F, 0F);
- wingrig = new ModelRenderer(this, 13, 0);
- wingrig.addBox(0F, 0F, -1.5F, 1, 1, 3);
- wingrig.setRotationPoint(1F, 20.3F, 0F);
- wingrig.setTextureSize(32, 32);
- wingrig.mirror = true;
- setRotation(wingrig, 0F, 0F, 0F);
- winglef = new ModelRenderer(this, 22, 0);
- winglef.addBox(-1F, 0F, -1.5F, 1, 1, 3);
- winglef.setRotationPoint(-1F, 20.3F, 0F);
- winglef.setTextureSize(32, 32);
- winglef.mirror = true;
- setRotation(winglef, 0F, 0F, 0F);
- tail = new ModelRenderer(this, 14, 8);
- tail.addBox(-0.4666667F, 0F, 0F, 1, 1, 3);
- tail.setRotationPoint(0F, 20.8F, 1F);
- tail.setTextureSize(32, 32);
- tail.mirror = true;
- setRotation(tail, 0.3346075F, 0F, 0F);
- LEGRIGTOPROT = new ModelRenderer(this, "LEGRIGTOPROT");
- LEGRIGTOPROT.setRotationPoint(0.5F, 22.3F, 1F);
- setRotation(LEGRIGTOPROT, -0.6684611F, 0F, 0F);
- LEGRIGTOPROT.mirror = true;
- LEGRIGTOPROT.addBox("lefrigtop", -0.5F, 0F, 0F, 1, 2, 1);
- LEGRIGBOTROT = new ModelRenderer(this, "LEGRIGBOTROT");
- LEGRIGBOTROT.setRotationPoint(0F, 1F, 0F);
- setRotation(LEGRIGBOTROT, 0.6702064F, 0F, 0F);
- LEGRIGBOTROT.mirror = true;
- LEGRIGBOTROT.addBox("legbotrig", -0.5F, -0.4F, -2.3F, 1, 1, 2);
- LEGRIGTOPROT.addChild(LEGRIGBOTROT);
- LEGLEFTOPROT = new ModelRenderer(this, "LEGLEFTOPROT");
- LEGLEFTOPROT.setRotationPoint(-0.5F, 22.3F, 1F);
- setRotation(LEGLEFTOPROT, -0.6702064F, 0F, 0F);
- LEGLEFTOPROT.mirror = true;
- LEGLEFTOPROT.addBox("legtoplef", -0.5F, 0F, 0F, 1, 2, 1);
- LEGLEFBOTROT = new ModelRenderer(this, "LEGLEFBOTROT");
- LEGLEFBOTROT.setRotationPoint(0F, 1F, 0F);
- setRotation(LEGLEFBOTROT, 0.6702064F, 0F, 0F);
- LEGLEFBOTROT.mirror = true;
- LEGLEFBOTROT.addBox("legbotlef", -0.5F, -0.4F, -2.3F, 1, 1, 2);
- LEGLEFTOPROT.addChild(LEGLEFBOTROT);
- HEADROT = new ModelRenderer(this, "HEADROT");
- HEADROT.setRotationPoint(0F, 19.8F, -2F);
- setRotation(HEADROT, 0F, 0F, 0F);
- HEADROT.mirror = true;
- HEADROT.addBox("Head", -1F, -1F, -1F, 2, 2, 2);
- BEAKROT = new ModelRenderer(this, "BEAKROT");
- BEAKROT.setRotationPoint(0F, 0F, 0F);
- setRotation(BEAKROT, -0.7801622F, 0F, 0F);
- BEAKROT.mirror = true;
- BEAKROT.addBox("beak", -0.5333334F, 0.3F, -0.9F, 1, 1, 1);
- HEADROT.addChild(BEAKROT);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- float field_78145_g = 8.0F;
- float field_78151_h = 4.0F;
-
- if (this.isChild) {
- float var8 = 2.0F;
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, field_78145_g * f5, field_78151_h * f5);
- HEADROT.render(f5);
- GL11.glPopMatrix();
- GL11.glPushMatrix();
- GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
- GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
- Body.render(f5);
- Body.render(f5);
- wingrig.render(f5);
- winglef.render(f5);
- tail.render(f5);
- LEGRIGTOPROT.render(f5);
- LEGLEFTOPROT.render(f5);
- GL11.glPopMatrix();
- } else {
- Body.render(f5);
- wingrig.render(f5);
- winglef.render(f5);
- tail.render(f5);
- LEGRIGTOPROT.render(f5);
- LEGLEFTOPROT.render(f5);
- HEADROT.render(f5);
- }
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
- EntityFinch var5 = (EntityFinch) par1EntityLiving;
- if (var5.getEntityState() == EntityStates.posture) {
- /* On Ground Idle Standing Animation */
- } else {
- winglef.rotateAngleZ = MathHelper.cos(var5.worldObj.getWorldTime() * 0.6662F * 2f) * 1.8F * 0.5f;
- wingrig.rotateAngleZ = MathHelper.cos(var5.worldObj.getWorldTime() * 0.6662F * 2f
- + (float) Math.PI) * 1.8F * 0.5f;
- tail.rotateAngleX = MathHelper.cos(var5.worldObj.getWorldTime() * 0.6662F * 2f + (float) Math.PI) * 0.3f;
- }
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- HEADROT.rotateAngleX = Math.min(Math.max(f4, -15), +15) * (float) (Math.PI / 180f);
- HEADROT.rotateAngleY = Math.min(Math.max(f3, -45), +45) * (float) (Math.PI / 180f);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/509a1ffec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/509a1ffec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index d1b0428..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/509a1ffec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.ngb.projectzulu.common.blocks.universalpot;
-
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.common.core.DefaultProps;
-
-public class GuiContainerUniversalFlowerPot extends GuiContainer {
- public final static ResourceLocation FLOWERPOT_GUI = new ResourceLocation(DefaultProps.coreKey,
- "gui/FlowerPotGUI.png");
-
- public GuiContainerUniversalFlowerPot(InventoryPlayer inventoryPlayer, TileEntityUniversalFlowerPot tileEntity) {
- super(new ContainerUniversalFlowerPot(inventoryPlayer, tileEntity));
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString("Flower Pot", 8, 6, 4210752);
- fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.renderEngine.bindTexture(FLOWERPOT_GUI);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/5175dcf5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/5175dcf5c42100141fce95f06aba7e85
deleted file mode 100644
index 5e885da..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/5175dcf5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entity;
-
-import net.minecraft.world.World;
-import com.ngb.projectzulu.common.core.DefaultProps;
-
-public class EntityHorseGrey extends EntityHorseBase {
-
- public EntityHorseGrey(World par1World) {
- super(par1World);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/81870cfec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/81870cfec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index df04f78..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/81870cfec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.client.renderer.entity.RenderBiped;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemArmor;
-import net.minecraft.item.ItemStack;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.temperature.ITempArmor;
-
-public class ItemZuluArmor extends ItemArmor implements ITempArmor {
- /** Holds the 'base' maxDamage that each armorType have. */
- private static final int[] maxDamageArray = new int[] { 11, 16, 15, 13 };
-
- /**
- * Stores the armor type: 0 is helmet, 1 is plate, 2 is legs and 3 is boots
- */
- public final int armorType;
-
- /** Holds the amount of damage that the armor reduces at full durability. */
- public final int damageReduceAmount;
-
- /**
- * Used on RenderPlayer to select the correspondent armor to be rendered on the player: 0 is cloth, 1 is chain, 2 is
- * iron, 3 is diamond and 4 is gold.
- */
- public final int renderIndex;
-
- /** The EnumArmorMaterial used for this ItemArmor */
- private final ArmorMaterial material;
-
- public ItemZuluArmor(ArmorMaterial armorMat, int renderIndex, int armorType, String name) {
- super(armorMat, renderIndex, armorType);
- this.material = armorMat;
- this.armorType = armorType;
- this.renderIndex = renderIndex;
- this.damageReduceAmount = armorMat.getDamageReductionAmount(armorType);
- this.setMaxDamage(armorMat.getDurability(armorType));
- this.maxStackSize = 1;
- this.setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setUnlocalizedName(name);
- setTextureName(DefaultProps.blockKey + ":" + name);
- }
-
- /**
- * Return the enchantability factor of the item, most of the time is based on material.
- */
- public int getItemEnchantability() {
- return this.material.getEnchantability();
- }
-
- /**
- * Returns the 'max damage' factor array for the armor, each piece of armor have a durability factor (that gets
- * multiplied by armor material factor)
- */
- static int[] getMaxDamageArray() {
- return maxDamageArray;
- }
-
- @Override
- public float getAddToPlayTempOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp) {
- return 0;
- }
-
- @Override
- public float getAddToLocTempOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp) {
- if (material.equals(ProjectZulu_Core.desertClothMaterial)) {
- return -0.4f;
- } else if (material.equals(ProjectZulu_Core.scaleMaterial)) {
- return -0.4f;
- } else if (material.equals(ProjectZulu_Core.goldScaleMaterial)) {
- return -0.3f;
- } else if (material.equals(ProjectZulu_Core.ironScaleMaterial)) {
- return -0.3f;
- } else if (material.equals(ProjectZulu_Core.diamondScaleMaterial)) {
- return -0.2f;
- }
-
- if (material.equals(ProjectZulu_Core.furMaterial)) {
- return 0.3f;
- }
-
- return 0f;
- }
-
- @Override
- public float getAddToHeatTransferOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp,
- float currentHeatRate) {
- return 0;
- }
-
- @Override
- public boolean getBooleanCauseFastHeatTransferOnEquip(EntityPlayer player, float playerTemp,
- float playerLocationTemp, float currentHeatRate) {
- return false;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
- return DefaultProps.blockKey + ":armor_sets/" + RenderBiped.bipedArmorFilenamePrefix[renderIndex] + "_"
- + (armorType == 2 ? 2 : 1) + ".png";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/9186f6f8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/9186f6f8c42100141fce95f06aba7e85
deleted file mode 100644
index 57c46f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/9186f6f8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entityai;
-
-import net.minecraft.entity.EntityCreature;
-import net.minecraft.entity.ai.EntityAIBase;
-import net.minecraft.util.Vec3;
-import com.ngb.projectzulu.common.mobs.entity.EntityGenericCreature;
-import com.ngb.projectzulu.common.mobs.entity.EntityStates;
-import net.minecraft.entity.ai.RandomPositionGenerator;
-
-public class EntityAIPanic extends EntityAIBase {
- private EntityCreature theEntityCreature;
- private float speed;
- private double randPosX;
- private double randPosY;
- private double randPosZ;
-
- boolean shouldHop = false;
- int slimeJumpDelay = 0;
-
- public EntityAIPanic(EntityCreature par1EntityCreature, float par2) {
- this.theEntityCreature = par1EntityCreature;
- this.speed = par2;
- this.setMutexBits(1);
- }
-
- public EntityAIPanic(EntityCreature par1EntityCreature, float par2, boolean shouldHop) {
- this(par1EntityCreature, par2);
- this.shouldHop = shouldHop;
- }
-
- /**
- * Returns whether the EntityAIBase should begin execution.
- */
- public boolean shouldExecute() {
- if (this.theEntityCreature.getAITarget() == null && !this.theEntityCreature.isBurning())
- {
- return false;
- }
- else {
- Vec3 var1 = RandomPositionGenerator.findRandomTarget(this.theEntityCreature, 5, 4);
-
- if (var1 == null) {
- return false;
- }
- else {
- this.randPosX = var1.xCoord;
- this.randPosY = var1.yCoord;
- this.randPosZ = var1.zCoord;
- return true;
- }
- }
- }
-
- /**
- * Execute a one shot task or start executing a continuous task
- */
- public void startExecuting() {
- this.theEntityCreature.getNavigator().tryMoveToXYZ(this.randPosX, this.randPosY, this.randPosZ, this.speed);
- if(shouldHop){
- tryToHop();
- }
- }
-
- /**
- * Returns whether an in-progress EntityAIBase should continue executing
- */
- public boolean continueExecuting() {
- if(shouldHop){
- tryToHop();
- }
- return !this.theEntityCreature.getNavigator().noPath();
- }
-
- @Override
- public void resetTask() {
- super.resetTask();
- }
-
- public void tryToHop(){
- if (theEntityCreature.onGround && this.slimeJumpDelay-- <= 0){
- this.slimeJumpDelay = this.getJumpDelay();
-
- theEntityCreature.getJumpHelper().setJumping();
- theEntityCreature.getNavigator().setSpeed(speed);
- }
- else{
- theEntityCreature.getNavigator().setSpeed(0);
- }
- }
-
- /**
- * Gets the amount of time the slime needs to wait between jumps.
- */
- protected int getJumpDelay(){
- return theEntityCreature.getRNG().nextInt(5) + 2;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/a03582e5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/a03582e5c42100141fce95f06aba7e85
deleted file mode 100644
index 175f5ce..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/a03582e5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,68 +0,0 @@
-package projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.CustomEntityList;
-import projectzulu.common.api.CustomMobData;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ConfigHelper;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ItemGenerics;
-import projectzulu.common.core.entitydeclaration.EntityProperties;
-import projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import projectzulu.common.mobs.entity.EntitySandWorm;
-import projectzulu.common.mobs.models.ModelSandWorm;
-import projectzulu.common.mobs.renders.RenderGenericIdle;
-import projectzulu.common.mobs.renders.RenderWrapper;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class SandwormDeclaration extends SpawnableDeclaration {
-
- public SandwormDeclaration() {
- super("SandWorm", 1, EntitySandWorm.class, EnumCreatureType.monster);
- setSpawnProperties(1, 100, 1, 1);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 2);
-
- eggColor1 = (24 << 16) + (0 << 8) + 8;
- eggColor2 = (49 << 16) + (16 << 8) + 8;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.SmallHeart.meta(), 4);
- ConfigHelper.userItemConfigRangeToMobData(config, "MOB CONTROLS." + mobName, customMobData);
- customMobData.entityProperties = new EntityProperties(20f, 3.0f, 0.22f).createFromConfig(config, mobName);
- CustomEntityList.SANDWORM.modData = Optional.of(customMobData);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericIdle(new ModelSandWorm(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "sandworm.png"), new ResourceLocation(DefaultProps.mobKey, "sandworm_hidden.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.desert.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.desertHills.biomeName);
- defaultBiomesToSpawn.add("Mountainous Desert");
- defaultBiomesToSpawn.addAll(typeToArray(Type.DESERT));
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/a097aff9ea9d00141ce0d62fbd2fd1cf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/a097aff9ea9d00141ce0d62fbd2fd1cf
deleted file mode 100644
index 2dd87b9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/a097aff9ea9d00141ce0d62fbd2fd1cf
+++ /dev/null
@@ -1,217 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entity;
-
-import java.util.EnumSet;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.ai.EntityAIWatchClosest;
-import net.minecraft.entity.passive.IAnimals;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.EnumSkyBlock;
-import net.minecraft.world.World;
-
-import com.stek101.projectzulu.common.api.BlockList;
-import com.stek101.projectzulu.common.api.CustomEntityList;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.mobs.EntityAFightorFlight;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIFlyingWander;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIStayStill;
-
-import cpw.mods.fml.common.Loader;
-
-public class EntityPZBat extends EntityGenericAnimal implements IAnimals {
- int stayStillTimer = 0;
- private EntityAFightorFlight EAFF;
- private float aggroLevel;
- private double aggroRange;
-
- public EntityPZBat(World par1World) {
- super(par1World);
- // noClip = true;
- //this.setSize(0.5f, 0.5f);
-
- float moveSpeed = 0.22f;
- CustomEntityList entityEntry = CustomEntityList.getByName(EntityList.getEntityString(this));
- if (entityEntry != null && entityEntry.modData.get().entityProperties != null) {
- // TODO: Switch to this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).getAttributeValue()???
- moveSpeed = entityEntry.modData.get().entityProperties.moveSpeed;
- this.aggroLevel = entityEntry.modData.get().entityProperties.aggroLevel;
- this.aggroRange = entityEntry.modData.get().entityProperties.aggroRange;
- }
-
- if (Math.round(this.aggroRange) != 0) {
- EAFF = new EntityAFightorFlight().setEntity(this, worldObj, this.aggroLevel, this.aggroRange);
- }
-
- this.maxFlightHeight = 7;
- this.getNavigator().setAvoidsWater(true);
- this.tasks.addTask(2, new EntityAIStayStill(this, EntityStates.posture));
- this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0f, false));
- this.tasks.addTask(4, new EntityAIFlyingWander(this, (float) moveSpeed));
- this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 16.0F));
-
- targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, false));
- targetTasks.addTask(2,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
- }
-
- @Override
- public boolean defaultGrounded() {
- return false;
- }
-
- /**
- * Called when the mob is falling. Calculates and applies fall damage.
- */
- @Override
- protected void fall(float par1) {
- }
-
- /**
- * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
- * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
- */
- @Override
- protected void updateFallState(double par1, boolean par3) {
- }
-
- @Override
- public int getTotalArmorValue() {
- return 1;
- }
-
- /**
- * Returns the sound this mob makes while it's alive.
- */
- @Override
- protected String getLivingSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "birdhurt";
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "bird";
- }
-
- @Override
- public int getTalkInterval() {
- return 120;
- }
-
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (Math.round(this.aggroRange) != 0) {
- EAFF.updateEntityAFF(worldObj);
- }
- }
-
- /**
- * Plays step sound at given x, y, z for the entity
- */
- @Override
- protected void func_145780_a(int xCoord, int yCoord, int zCoord, Block stepBlock) {
- this.worldObj.playSoundAtEntity(this, "sounds.birdplop", 1.0F, 1.0F);
- }
-
- @Override
- public boolean isValidBreedingItem(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public void updateAIState() {
- if (stayStillTimer > 0) {
- entityState = EntityStates.posture;
- } else {
- super.updateAIState();
- }
- }
-
- @Override
- protected void updateAITasks() {
- super.updateAITasks();
-
- /* If We are above Solid Ground, have a small Chance at Landing */
- if (this.rand.nextInt(100) == 0
- && this.worldObj.getBlock(MathHelper.floor_double(this.posX), (int) this.posY - 1,
- MathHelper.floor_double(this.posZ)).isNormalCube()) {
- stayStillTimer = 400;
- }
-
- /* If Posing, Check if We should Stay Flee */
- if (getEntityState() == EntityStates.posture) {
- /* If we are not on a Normal Block, Fly Free */
- if (!this.worldObj.getBlock(MathHelper.floor_double(this.posX), (int) this.posY - 1,
- MathHelper.floor_double(this.posZ)).isNormalCube()) {
- stayStillTimer = 0;
- } else {
- /* Chance to Chance Direction We are Facing ?--Do We Care?--? */
- if (this.rand.nextInt(200) == 0) {
- this.rotationYawHead = this.rand.nextInt(360);
- }
-
- /* If Player is nearby, Entity Should Fly away, think Pigeons */
- if (this.worldObj.getClosestPlayerToEntity(this, 4.0D) != null || this.rand.nextInt(400) == 0) {
- stayStillTimer = 0;
- }
- }
- /*
- * Deincrement stayStillTimer, if it hits zero Entity Should Fly : Note that timer is likely being set to
- * max again by the initial shouldSit check
- */
- stayStillTimer = Math.max(stayStillTimer - 1, 0);
- }
- }
-
- /**
- * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
- * prevent them from trampling crops
- */
- @Override
- protected boolean canTriggerWalking() {
- return false;
- }
-
- // @Override
- // protected boolean isValidLightLevel(World world, int xCoord, int yCoord, int zCoord) {
- // return this.worldObj.getSavedLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord) < 1;
- // }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- // @Override
- // protected void dropRareDrop(int par1) {
- // if (Loader.isModLoaded(DefaultProps.BlocksModId) && BlockList.mobHeads.isPresent()) {
- // entityDropItem(new ItemStack(BlockList.mobHeads.get(), 1, 0), 1);
- // }
- // super.dropRareDrop(par1);
- // }
-
- @Override
- public boolean attackEntityAsMob(Entity entity) {
- boolean success = super.attackEntityAsMob(entity);
- if (entity instanceof EntityLiving) {
- ((EntityLiving)entity).addPotionEffect(new PotionEffect(Potion.poison.id, 40, 1));
- success = true;
- }
- return success;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/b1fc1ff8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/b1fc1ff8c42100141fce95f06aba7e85
deleted file mode 100644
index 0cb9561..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/b1fc1ff8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.ngb.projectzulu.common.world2.blueprint;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import com.ngb.projectzulu.common.world.CellIndexDirection;
-import com.ngb.projectzulu.common.world.dataobjects.BlockWithMeta;
-
-public class BlueprintLabyrinthCobweb implements Blueprint {
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- if ((piecePos.posY == 0 || piecePos.posY == cellHeight - 1)) {
- return new BlockWithMeta(Blocks.stonebrick, 0);
- } else if ((piecePos.posY == 1 || piecePos.posY == cellHeight - 2) && 10 - random.nextInt(100) >= 0) {
- return new BlockWithMeta(Blocks.web, 0);
- } else {
- return new BlockWithMeta(Blocks.air);
- }
- }
-
- @Override
- public int getWeight() {
- return 1;
- }
-
- @Override
- public String getIdentifier() {
- return "labyrinthcobweb";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/d0e2b800c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/d0e2b800c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 05588d6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/d0e2b800c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,113 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entity;
-
-import java.util.EnumSet;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.ai.EntityAISwimming;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import projectzulu.common.mobs.entityai.EntityAIFollowParent;
-import projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import projectzulu.common.mobs.entityai.EntityAIMate;
-import projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import projectzulu.common.mobs.entityai.EntityAIPanic;
-import projectzulu.common.mobs.entityai.EntityAITempt;
-import projectzulu.common.mobs.entityai.EntityAIWander;
-import cpw.mods.fml.common.Loader;
-
-public class EntityGorilla extends EntityGenericAnimal {
-
- public EntityGorilla(World par1World) {
- super(par1World);
- setSize(1.7f, 1.5f);
-
- getNavigator().setAvoidsWater(true);
- tasks.addTask(0, new EntityAISwimming(this));
- tasks.addTask(1, new EntityAIPanic(this, 1.25f));
-
- tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0f, false));
- // tasks.addTask(4, new EntityAIFollowOwner(this, moveSpeed, 10.0F, 2.0F));
-
- tasks.addTask(5, new EntityAIMate(this, 1.0f));
- tasks.addTask(6, new EntityAITempt(this, 1.2f, Items.spider_eye, false));
- tasks.addTask(6, new EntityAITempt(this, 1.2f, Item.getItemFromBlock(Blocks.tallgrass), false));
-
- tasks.addTask(7, new EntityAIFollowParent(this, 1.1f));
- tasks.addTask(9, new EntityAIWander(this, 1.0f, 120));
-
- targetTasks.addTask(3, new EntityAIHurtByTarget(this, false, false));
- targetTasks.addTask(4,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
- // targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true,
- // IMob.mobSelector));
- }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- /**
- * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
- */
- @Override
- public int getTotalArmorValue() {
- return 3;
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.coreKey + ":" + DefaultProps.entitySounds + "gorillahurt";
- }
-
- @Override
- public void knockBack(Entity par1Entity, float par2, double par3, double par5) {
- if (this.rand.nextDouble() >= this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).getAttributeValue()) {
- this.isAirBorne = true;
- float var7 = MathHelper.sqrt_double(par3 * par3 + par5 * par5);
- float var8 = 0.4F;
- this.motionX /= 2.0D;
- this.motionY /= 2.0D;
- this.motionZ /= 2.0D;
- this.motionX -= par3 / var7 * var8 * 0.2;
- this.motionY += var8;
- this.motionZ -= par5 / var7 * var8 * 0.2;
-
- if (this.motionY > 0.2000000059604645D) {
- this.motionY = 0.2D;
- }
- }
- }
-
- @Override
- public boolean isValidBreedingItem(ItemStack itemStack) {
- if (itemStack != null
- && (itemStack.getItem() == Items.spider_eye || itemStack.getItem() == Item.getItemFromBlock(Blocks.tallgrass))) {
- return true;
- }
- return super.isValidBreedingItem(itemStack);
- }
-
- @Override
- protected void dropRareDrop(int par1) {
- if (Loader.isModLoaded(DefaultProps.BlocksModId) && BlockList.mobHeads.isPresent()) {
- entityDropItem(new ItemStack(BlockList.mobHeads.get(), 1, 9), 1);
- }
- super.dropRareDrop(par1);
- }
-
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/e07a4afec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/e07a4afec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index b57847f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/e07a4afec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.ngb.projectzulu.common.dungeon.packets;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.ByteBufInputStream;
-import io.netty.buffer.ByteBufOutputStream;
-import io.netty.channel.ChannelHandlerContext;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-
-import projectzulu.common.core.PZPacket;
-import projectzulu.common.core.ProjectZuluLog;
-
-import com.sun.xml.internal.messaging.saaj.util.ByteInputStream;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-
-/**
- * Wraps ByteBuf into ByteStreams for additional read/write features such as writeString
- */
-public abstract class PacketByteStream implements PZPacket {
-
- @Override
- public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
- ByteBufOutputStream data = new ByteBufOutputStream(buffer);
- try {
- writeData(ctx, data);
- } catch (Exception e) {
- ProjectZuluLog.severe("Error writing packet %s to ByteBufOutputStream", this);
- e.printStackTrace();
- }
- }
-
- protected abstract void writeData(ChannelHandlerContext ctx, ByteBufOutputStream buffer) throws IOException;
-
- @Override
- public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
- ByteBufInputStream byteStream = new ByteBufInputStream(buffer);
- try {
- readData(ctx, byteStream);
- } catch (Exception e) {
- ProjectZuluLog.severe("Error reading packet %s from ByteBufInputStream", this);
- e.printStackTrace();
- }
- }
-
- protected abstract void readData(ChannelHandlerContext ctx, ByteBufInputStream buffer) throws IOException;
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/f1d1d2f8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/f1d1d2f8c42100141fce95f06aba7e85
deleted file mode 100644
index 19fe516..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/f1d1d2f8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Items;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import com.ngb.projectzulu.common.api.CustomMobData;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.core.ConfigHelper;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.ItemGenerics;
-import com.ngb.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.ngb.projectzulu.common.mobs.entity.EntityHorseRandom;
-import com.ngb.projectzulu.common.mobs.models.ModelHorse;
-import com.ngb.projectzulu.common.mobs.renders.RenderGenericHorse;
-import com.ngb.projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class HorseRandomDeclaration extends SpawnableDeclaration {
-
- public HorseRandomDeclaration() {
- super("HorseRandom", 42, EntityHorseRandom.class, EnumCreatureType.creature);
- setSpawnProperties(5, 100, 3, 4);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 3);
-
- shouldExist = false;
- eggColor1 = (200 << 16) + (245 << 8) + 245;
- eggColor2 = (51 << 16) + (51 << 8) + 51;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- Items.beef, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.LargeHeart.meta(), 4);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericHorse(new ModelHorse(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "Horse/horse_white.png"), new ResourceLocation(DefaultProps.mobKey, "Horse/horse_white_saddled.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.plains.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add("Autumn Woods");
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
-
- HashSet nonFrozenForest = new HashSet();
- nonFrozenForest.addAll(typeToArray(Type.FOREST));
- nonFrozenForest.addAll(typeToArray(Type.PLAINS));
- nonFrozenForest.removeAll(typeToArray(Type.FROZEN));
- defaultBiomesToSpawn.addAll(nonFrozenForest);
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/f2db75a0c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/f2db75a0c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index e404ac4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/f2db75a0c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,59 +0,0 @@
-package projectzulu.common.blocks;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-
-public class ItemWateredDirt extends ItemBlock {
-
- public ItemWateredDirt(Block block) {
- super(block);
- setHasSubtypes(true);
- }
-
- public int getMetadata(int par1) {
- return par1;
- }
-
- public String getUnlocalizedName(ItemStack itemstack) {
- String name = "";
- switch (itemstack.getItemDamage()) {
- case 0: {
- name = "soil_1";
- break;
- }
- case 1: {
- name = "soil_2";
- break;
- }
- case 2: {
- name = "soil_3";
- break;
- }
- case 3: {
- name = "soil_4";
- break;
- }
- case 4: {
- name = "sand_1";
- break;
- }
- case 5: {
- name = "sand_2";
- break;
- }
- case 6: {
- name = "sand_3";
- break;
- }
- case 7: {
- name = "sand_4";
- break;
- }
- default:
- name = "ore";
- }
- return getUnlocalizedName() + "." + name;
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/00366734bfab00141ee9bf3050c1025b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/00366734bfab00141ee9bf3050c1025b
new file mode 100644
index 0000000..47ee177
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/00366734bfab00141ee9bf3050c1025b
@@ -0,0 +1,292 @@
+package com.stek101.projectzulu.common.core;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.config.Configuration;
+import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
+import net.minecraftforge.event.entity.living.LivingHurtEvent;
+import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
+import net.minecraftforge.event.world.BlockEvent.BreakEvent;
+
+import com.stek101.projectzulu.common.api.CustomEntityList;
+import com.stek101.projectzulu.common.api.ItemList;
+import com.stek101.projectzulu.common.mobs.entity.EntityBeetleAS;
+import com.stek101.projectzulu.common.mobs.entity.EntityBeetleBS;
+import com.stek101.projectzulu.common.mobs.entity.EntityCentipede;
+import com.stek101.projectzulu.common.mobs.entity.EntityTreeEnt;
+
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+
+public class EventHookContainerClass {
+ // zLevel is protected float copied from GUI along with drawTexturedModelRect
+ protected float zLevel = 0.0F;
+ boolean nearBossTriggered = false;
+ private Configuration config;
+ private boolean bugRelease = true;
+ Random classRand = new Random();
+
+
+
+ @SubscribeEvent
+ public void onPlayerUpdateStarve(LivingUpdateEvent event) {
+ World worldObj = event.entity.worldObj;
+ if (worldObj != null && event.entity != null && event.entity instanceof EntityPlayer) {
+
+ EntityPlayer thePlayer = (EntityPlayer) event.entity;
+
+ int var1 = MathHelper.floor_double(thePlayer.posX);
+ int var2 = MathHelper.floor_double(thePlayer.boundingBox.minY);
+ int var3 = MathHelper.floor_double(thePlayer.posZ);
+ BiomeGenBase currentBiome = worldObj.getBiomeGenForCoords(var1, var3);
+ boolean isDesertSun = worldObj.canBlockSeeTheSky(var1, var2, var3) && worldObj.isDaytime() == true
+ && (currentBiome == BiomeGenBase.desert || currentBiome == BiomeGenBase.desertHills);
+
+ /* Armor Effect Only Occurs When Block/Item Package is Installed */
+ if (!thePlayer.capabilities.isCreativeMode && isDesertSun == true
+ && Loader.isModLoaded(DefaultProps.BlocksModId)) {
+ float exhaustion = 0.0032f;
+ switch (worldObj.difficultySetting) {
+ case PEACEFUL:
+ exhaustion = 0.0f;
+ break;
+ case EASY:
+ exhaustion = 0.0032f * 1;
+ break;
+ case NORMAL:
+ exhaustion = 0.0032f * 2;
+ break;
+ case HARD:
+ exhaustion = 0.0032f * 3;
+ default:
+ break;
+ }
+
+ for (int i = 0; i < 4; i++) {
+ if (thePlayer.inventory.armorInventory[i] == null) {
+ exhaustion -= (exhaustion - exhaustion * 0.4) / 4f;
+ break;
+ }
+ }
+ thePlayer.addExhaustion(Math.max(exhaustion, 0));
+ }
+ }
+ }
+
+ /* Armor Effect Only Occurs When Block/Item Package is Installed */
+ @SubscribeEvent
+ public void cactusArmorDamage(LivingHurtEvent event) {
+ if (Loader.isModLoaded(DefaultProps.BlocksModId) && event.entity != null
+ && event.entity instanceof EntityPlayer && event.source.getSourceOfDamage() instanceof EntityLiving) {
+ EntityPlayer hurtEntity = (EntityPlayer) event.entity;
+ EntityLiving attackingEntity = (EntityLiving) event.source.getSourceOfDamage();
+ if (attackingEntity != null && event.source.getDamageType() == "mob") {
+
+ double cactusDamage = 0;
+ if (hurtEntity.inventory.armorInventory[3] != null && ItemList.cactusArmorHead.isPresent()
+ && hurtEntity.inventory.armorInventory[3].getItem() == ItemList.cactusArmorHead.get()) {
+ cactusDamage += 0.5;
+ }
+ if (hurtEntity.inventory.armorInventory[2] != null && ItemList.cactusArmorChest.isPresent()
+ && hurtEntity.inventory.armorInventory[2].getItem() == ItemList.cactusArmorChest.get()) {
+ cactusDamage += 0.5;
+ }
+ if (hurtEntity.inventory.armorInventory[1] != null && ItemList.cactusArmorLeg.isPresent()
+ && hurtEntity.inventory.armorInventory[1].getItem() == ItemList.cactusArmorLeg.get()) {
+ cactusDamage += 0.5;
+ }
+ if (hurtEntity.inventory.armorInventory[0] != null && ItemList.cactusArmorBoots.isPresent()
+ && hurtEntity.inventory.armorInventory[0].getItem() == ItemList.cactusArmorBoots.get()) {
+ cactusDamage += 0.5;
+ }
+
+ if (cactusDamage > 0) {
+ attackingEntity.attackEntityFrom(DamageSource.causeThornsDamage(hurtEntity),
+ MathHelper.ceiling_double_int(cactusDamage));
+ }
+
+ }
+ }
+ }
+
+ /**
+ * Used to Notify nearby Treeents they should be attacking this Player. Triggered by the Player breaking Wood Only
+ * notifies TreeEnts that are looking at the Player
+ */
+ @SubscribeEvent
+ public void treeEntDefendForest(BreakSpeed event) {
+ if (Loader.isModLoaded(DefaultProps.MobsModId)) {
+ if (event.entity != null && event.entity instanceof EntityPlayer
+ && (event.block == Blocks.log || event.block == Blocks.log2)) {
+ EntityPlayer player = (EntityPlayer) (event.entity);
+ World worldObj = player.worldObj;
+ AxisAlignedBB playerBounding = player.boundingBox.copy();
+ playerBounding = playerBounding.expand(24, 24, 24);
+ List listOfTreeEnts = player.worldObj
+ .getEntitiesWithinAABB(EntityTreeEnt.class, playerBounding);
+ if (!listOfTreeEnts.isEmpty()) {
+ Iterator entIterator = listOfTreeEnts.iterator();
+ while (entIterator.hasNext()) {
+ Entity entity = (Entity) entIterator.next();
+ if (((EntityTreeEnt) entity).getAngerLevel() <= 0
+ && worldObj.rayTraceBlocks(
+ // worldObj.getWorldVec3Pool().getVecFromPool(player.posX,
+ // player.posY + player.getEyeHeight(), player.posZ),
+ // worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY,
+ // entity.posZ)) == null) {
+ // worldObj.getWorldVec3Pool().getVecFromPool(player.posX,
+ // player.posY + player.getEyeHeight(), player.posZ),
+ Vec3.createVectorHelper((double)player.posX, (double)player.posY + player.getEyeHeight(), (double)player.posZ),
+ // worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY,
+ // entity.posZ)
+ Vec3.createVectorHelper((double)entity.posX, (double)entity.posY, (double) entity.posZ)
+ ) == null) {
+ if (!worldObj.isRemote) {
+ ((EntityTreeEnt) entity).setAttackTarget(player);
+ }
+ ((EntityTreeEnt) entity).setAngerLevel(60);
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+ @SubscribeEvent
+ public void onBreakBlock(BreakEvent event)
+ {
+ Random rand1 = new Random();
+
+ config = new Configuration(new File( "." + "/config/", DefaultProps.configDirectory
+ + DefaultProps.defaultConfigFile));
+ config.load();
+
+ bugRelease = config.get("mob controls", "Spawn Ambient Bugs on Block Break", this.bugRelease).getBoolean(bugRelease);
+
+ config.save();
+
+ //System.out.println("***** Done setting up the config for spawned bugs");
+
+ if (event.block == Blocks.leaves || event.block == Blocks.leaves2){
+ int stickDrop = rand1.nextInt(10);
+
+ if (stickDrop == 0) {
+ ItemStack itemstack1 = new ItemStack(Items.stick, 1);
+
+ double xrand = (double) (event.world.rand.nextFloat() * 0.7F) + (double) (0.3F) * 0.5D;
+ double yrand = (double) (event.world.rand.nextFloat() * 0.7F) + (double) (0.3F) * 0.5D;
+ double zrand = (double) (event.world.rand.nextFloat() * 0.7F) + (double) (0.3F) * 0.5D;
+ EntityItem itemDrop1 = new EntityItem(event.world, (double) event.x + xrand, (double) event.y + yrand, (double) event.z + zrand, itemstack1);
+ itemDrop1.delayBeforeCanPickup = 10;
+ event.world.spawnEntityInWorld(itemDrop1);
+
+ }
+ }
+
+ if (CustomEntityList.BEETLEAS.modData.isPresent() && CustomEntityList.BEETLEAS.modData.isPresent()) {
+ if (bugRelease == true) {
+
+ //TileEntity entity = event.world.getTileEntity(event.x, event.y, event.z);
+ if (event.block == Blocks.tallgrass || event.block == Blocks.vine
+ || event.block == Blocks.brown_mushroom_block || event.block == Blocks.yellow_flower
+ || event.block == Blocks.red_flower || event.block == Blocks.deadbush || event.block == Blocks.double_plant
+ || event.block == Blocks.leaves || event.block == Blocks.leaves2)
+ {
+ // Makes sure to only run on server, entity spawns must be done on server
+ if (!event.world.isRemote && rand1.nextInt(29) == 0) {
+ int bugType = rand1.nextInt(10);
+ int bugCount1 = rand1.nextInt(2);
+ int bugCount2 = rand1.nextInt(2);
+ int bugCount3 = rand1.nextInt(2);
+
+ if (bugType <= 2 ) {
+ for (int i=0; i <= bugCount1; i++) {
+ EntityBeetleAS entity = new EntityBeetleAS(event.world);
+
+ // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
+ entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
+
+ // Insert the bug in the world
+ event.world.spawnEntityInWorld(entity);
+
+ // Creates the "puff" effect
+ entity.spawnExplosionParticle();
+ }
+
+ for (int i=0; i <= bugCount2; i++) {
+ EntityBeetleBS entity = new EntityBeetleBS(event.world);
+
+ // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
+ entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
+
+ // Insert the bug in the world
+ event.world.spawnEntityInWorld(entity);
+
+ // Creates the "puff" effect
+ entity.spawnExplosionParticle();
+ }
+
+ } else if ((bugType >= 3) && (bugType <= 5) ) {
+ for (int i=0; i <= bugCount1; i++) {
+ EntityBeetleAS entity = new EntityBeetleAS(event.world);
+
+ // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
+ entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
+
+ // Insert the bug in the world
+ event.world.spawnEntityInWorld(entity);
+
+ // Creates the "puff" effect
+ entity.spawnExplosionParticle();
+ }
+ } else if ((bugType >= 6) && (bugType <= 8) ) {
+ for (int i=0; i <= bugCount1; i++) {
+ EntityBeetleBS entity = new EntityBeetleBS(event.world);
+
+ // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
+ entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
+
+ // Insert the bug in the world
+ event.world.spawnEntityInWorld(entity);
+
+ // Creates the "puff" effect
+ entity.spawnExplosionParticle();
+ }
+ } else {
+ for (int i=0; i <= bugCount3; i++) {
+ EntityCentipede entity = new EntityCentipede(event.world);
+
+ // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
+ entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
+
+ // Insert the bug in the world
+ event.world.spawnEntityInWorld(entity);
+
+ // Creates the "puff" effect
+ entity.spawnExplosionParticle();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/117025f7c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/117025f7c42100141fce95f06aba7e85
deleted file mode 100644
index fa7524a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/117025f7c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.core.ItemGenerics;
-import com.ngb.projectzulu.common.core.itemblockdeclaration.ItemDeclaration;
-import com.ngb.projectzulu.common.potion.brewingstands.PotionIngredients;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class GenericCraftingItemsDeclaration extends ItemDeclaration {
-
- public GenericCraftingItemsDeclaration() {
- super("GenericCraftingItems1");
- }
-
- @Override
- protected boolean createItem() {
- ItemGenerics itemGenerics = (ItemGenerics) new ItemGenerics();
- ItemList.genericCraftingItems = Optional.of(itemGenerics);
- PotionIngredients.addIngredientProperties(itemGenerics, itemGenerics);
- return true;
- }
-
- @Override
- protected void registerItem() {
- Item item = ItemList.genericCraftingItems.get();
- OreDictionary.registerOre("foodSalt", new ItemStack(item, 1, ItemGenerics.Properties.Salt.meta()));
- GameRegistry.registerItem(item, name);
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/2094262bc52100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/2094262bc52100141fce95f06aba7e85
deleted file mode 100644
index 0ea25f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/2094262bc52100141fce95f06aba7e85
+++ /dev/null
@@ -1,527 +0,0 @@
-package projectzulu.common;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.logging.Level;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.item.EntityXPOrb;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.DamageSource;
-import net.minecraft.world.GameRules;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-import net.minecraftforge.event.entity.living.LivingDeathEvent;
-import net.minecraftforge.event.entity.player.PlayerDropsEvent;
-import net.minecraftforge.event.world.WorldEvent;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.blocks.tombstone.TileEntityTombstone;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ObfuscationHelper;
-import projectzulu.common.core.ProjectZuluLog;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DeathGamerules {
- int maxDropXP = 100;
- int percKeptXp = 0;
-
- int armorDeathDamage = 0;
- int inventoryDeathDamage = 0;
- int hotbarDeathDamage = 0;
-
- int armorDropDamage = 0;
- int inventoryDropDamage = 0;
- int hotbarDropDamage = 0;
-
- int armorDropChance = 100;
- int inventoryDropChance = 100;
- int hotbarDropChance = 100;
-
- int armorMaxDrop = 0;
- int inventoryMaxDrop = 0;
- int hotbarMaxDrop = 0;
-
- boolean tombstoneOnDeath = true;
- boolean tombstoneAbsorbDrops = true;
- boolean doDropEvent = true;
-
- boolean keepInventoryDefault = false;
- boolean dropArmorDefault = false;
- boolean dropInventoryDefault = false;
- boolean dropHotbarDefault = false;
- boolean dropXPDefault = false;
- private ExperienceRedistributor redistributor;
- private ItemBlacklist itemBlacklist;
-
- public DeathGamerules() {
- redistributor = new ExperienceRedistributor();
- FMLCommonHandler.instance().bus().register(redistributor);
- }
-
- public DeathGamerules loadConfiguration(File modConfigDirectory) {
- itemBlacklist = new ItemBlacklist();
- Configuration config = new Configuration(new File(modConfigDirectory, DefaultProps.configDirectory
- + DefaultProps.defaultConfigFile));
- config.load();
- itemBlacklist.loadFromConfig(config);
- tombstoneOnDeath = config.get("General Controls", "Drop Tombstone On Death", tombstoneOnDeath).getBoolean(
- tombstoneOnDeath);
- tombstoneAbsorbDrops = config.get("General Controls", "Tombstone Absorb Drops", tombstoneAbsorbDrops)
- .getBoolean(tombstoneAbsorbDrops);
- doDropEvent = config.get("General Controls", "doDropEvent", doDropEvent).getBoolean(doDropEvent);
-
- String category = "General Controls.gamerule_settings";
- maxDropXP = config
- .get(category + ".Experience", "maxDropXP", 100,
- "Maximum amount XP dropped on Death. The rest is lost if not kept via percKeptXp. 100 is vanilla default")
- .getInt(100);
- keepInventoryDefault = config.get(category, "keepInventoryDefault", false,
- "The Default settings for the keepInventory gamerule").getBoolean(false);
- Property keptXpProperty = config.get(category + ".Experience", "percKeptXp", 0,
- "Percentage of XP (minus dropped amount) kept with the player on respawn.");
- percKeptXp = keptXpProperty.getInt();
- if (percKeptXp < 0 || percKeptXp > 100) {
- percKeptXp = percKeptXp < 0 ? 0 : percKeptXp > 100 ? 100 : percKeptXp;
- keptXpProperty.set(percKeptXp);
- }
- dropArmorDefault = config.get(category + ".Armor", "isEnabledDefault", false,
- "The Default settings for the dropArmor gamerule").getBoolean(false);
- dropInventoryDefault = config.get(category + ".Inventory", "isEnabledDefault", false,
- "The Default settings for the dropInventory gamerule").getBoolean(false);
- dropHotbarDefault = config.get(category + ".Hotbar", "isEnabledDefault", false,
- "The Default settings for the dropHotbar gamerule").getBoolean(false);
- dropXPDefault = config.get(category + ".Experience", "isEnabledDefault", false,
- "The Default settings for the dropXP gamerule").getBoolean(false);
-
- armorDeathDamage = handlePropMinMax(config.get(category + ".Armor", "armorDeathDamage", 0,
- "Percentage of Max durability dealth on Death to armor slot items"), 0, 0, 100);
- inventoryDeathDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDeathDamage", 0,
- "Percentage of Max durability dealth on Death to inventory slot items"), 0, 0, 100);
- hotbarDeathDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDeathDamage", 0,
- "Percentage of Max durability dealth on Death to hotbar slot items"), 0, 0, 100);
-
- armorDropDamage = handlePropMinMax(config.get(category + ".Armor", "armorDropDamage", 0,
- "Percentage of Max durability dealth on Drop to armor slot items"), 0, 0, 100);
- inventoryDropDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropDamage", 0,
- "Percentage of Max durability dealth on Drop to inventory slot items"), 0, 0, 100);
- hotbarDropDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropDamage", 0,
- "Percentage of Max durability dealth on Drop to hotbar slot items"), 0, 0, 100);
-
- armorDropChance = handlePropMinMax(config.get(category + ".Armor", "armorDropChance", 100,
- "Chance that each armor slot item will drop on death"), 100, 0, 100);
- inventoryDropChance = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropChance", 100,
- "Chance that each inventory slot item will drop on death"), 100, 0, 100);
- hotbarDropChance = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropChance", 100,
- "Chance that each hotbar slot item will drop on death"), 100, 0, 100);
-
- armorMaxDrop = handlePropMinMax(config.get(category + ".Armor", "armorMaxDrop", 0,
- "Max number of armor slot items that can drop on death."), 0, 0, null);
- inventoryMaxDrop = handlePropMinMax(config.get(category + ".Inventory", "inventoryMaxDrop", 0,
- "Max number of inventory slot items that can drop on death"), 0, 0, null);
- hotbarMaxDrop = handlePropMinMax(config.get(category + ".Hotbar", "hotbarMaxDrop", 0,
- "Max number of hotbar slot items that can drop on death"), 0, 0, null);
- config.save();
- return this;
- }
-
- private int handlePropMinMax(Property prop, int value, Integer min, Integer max) {
- value = prop.getInt(value);
- if (min != null && value < min) {
- prop.set(min);
- value = min;
- } else if (max != null && value > max) {
- prop.set(max);
- value = max;
- }
- return value;
- }
-
- @SubscribeEvent
- public void worldLoad(WorldEvent.Load event) {
- GameRules gameRule = event.world.getGameRules();
- if (createGameruleIfAbsent(gameRule, "pzKeepInventory", keepInventoryDefault)) {
- gameRule.setOrCreateGameRule("keepInventory", Boolean.toString(keepInventoryDefault));
- }
- createGameruleIfAbsent(gameRule, "dropInventory", dropInventoryDefault);
- createGameruleIfAbsent(gameRule, "dropHotbar", dropHotbarDefault);
- createGameruleIfAbsent(gameRule, "dropArmor", dropArmorDefault);
- createGameruleIfAbsent(gameRule, "dropXP", dropXPDefault);
- }
-
- private boolean createGameruleIfAbsent(GameRules gameRule, String gameruleName, boolean value) {
- boolean added = false;
- if (!gameRule.hasRule(gameruleName)) {
- gameRule.addGameRule(gameruleName, Boolean.toString(value));
- added = true;
- }
- ProjectZuluLog.info("Gamerule %s is set to %s", gameruleName, gameRule.getGameRuleBooleanValue(gameruleName));
- return added;
- }
-
- @SubscribeEvent
- public void onPlayerDeath(LivingDeathEvent event) {
- if (event.entity instanceof EntityPlayerMP) {
- GameRules gameRules = event.entity.worldObj.getGameRules();
- boolean dropInventory = gameRules.getGameRuleBooleanValue("dropInventory");
- boolean dropHotbar = gameRules.getGameRuleBooleanValue("dropHotbar");
- boolean dropArmor = gameRules.getGameRuleBooleanValue("dropArmor");
- boolean dropXP = gameRules.getGameRuleBooleanValue("dropXP");
-
- EntityPlayer player = (EntityPlayer) event.entity;
-
- TileEntityTombstone tombstone = tombstoneOnDeath ? placeTombstone(player) : null;
- if (tombstone != null) {
- tombstone.setSignString(event.source.func_151519_b((EntityPlayer) event.entity).toString());
- }
-
- if (!dropInventory && !dropHotbar && !dropArmor && !dropXP) {
- return;
- }
-
- player.captureDrops = true;
- player.capturedDrops.clear();
-
- /* Get items/XP to drop and clear them from Player */
- int xpDropped = 0;
- if (dropXP) {
- if (!player.worldObj.isRemote) {
- xpDropped = player.experienceTotal;
- xpDropped = xpDropped > maxDropXP ? maxDropXP : xpDropped;
- int keptXp = (player.experienceTotal - xpDropped) * percKeptXp / 100;
- redistributor.addExpereince(player, keptXp >= 0 ? keptXp : 0);
- player.experienceLevel = 0;
- player.experienceTotal = 0;
- player.experience = 0;
- }
- }
-
- List itemsToDrop = new ArrayList();
- if (dropArmor) {
- itemsToDrop.addAll(dropArmor(player));
- }
-
- if (dropInventory) {
- itemsToDrop.addAll(dropInventory(player));
- }
-
- if (dropHotbar) {
- itemsToDrop.addAll(dropHotbar(player));
- }
-
- dropItems(player, itemsToDrop);
- boolean isCancelled = false;
- if (doDropEvent) {
- PlayerDropsEvent dropEvent = createPlayerDropEvent(player, event.source, player.capturedDrops);
- isCancelled = MinecraftForge.EVENT_BUS.post(dropEvent);
- }
- player.captureDrops = false;
- if (!isCancelled) {
- /* Handler actually Dropping Items or Placing them in Tombstone */
- if (tombstoneAbsorbDrops && tombstone != null) {
- for (EntityItem entityItem : player.capturedDrops) {
- tombstone.addDrop(entityItem.getEntityItem());
- }
- tombstone.experience = xpDropped;
- } else {
- if (tombstoneAbsorbDrops) {
- ProjectZuluLog.warning("Tombstone could not be placed so items dropping normally.");
- }
- while (xpDropped > 0) {
- int j = EntityXPOrb.getXPSplit(xpDropped);
- xpDropped -= j;
- player.worldObj.spawnEntityInWorld(new EntityXPOrb(player.worldObj, player.posX, player.posY,
- player.posZ, j));
- }
- for (EntityItem item : player.capturedDrops) {
- player.joinEntityItemWithWorld(item);
- }
- }
- } else {
- ProjectZuluLog.warning("Player drop event was cancelled, so items will not be dropped per convention."
- + "Results may not desireable, consider disabling 'doDropEvent' in the config.");
- }
- }
- }
-
- private void dropItems(EntityPlayer player, List drops) {
- for (ItemStack itemDrop : drops) {
- player.inventory.player.dropPlayerItemWithRandomChoice(itemDrop, true);
- }
- }
-
- private PlayerDropsEvent createPlayerDropEvent(EntityPlayer player, DamageSource damageSource,
- ArrayList drops) {
- int recentlyHit;
- try {
- recentlyHit = ObfuscationHelper.getCatchableFieldFromReflection("field_70718_bc", EntityLivingBase.class,
- player, Integer.class);
- } catch (NoSuchFieldException e) {
- recentlyHit = ObfuscationHelper.getFieldFromReflection("recentlyHit", EntityLivingBase.class, player,
- Integer.class);
- }
- return new PlayerDropsEvent(player, damageSource, player.capturedDrops, recentlyHit > 0);
- }
-
- private TileEntityTombstone placeTombstone(EntityPlayer player) {
- Optional chunkCoordinate = findValidTombstoneLocation(player);
- if (chunkCoordinate.isPresent()) {
- /* Place a Tombstone */
- player.worldObj.setBlock(chunkCoordinate.get().posX, chunkCoordinate.get().posY,
- chunkCoordinate.get().posZ, BlockList.tombstone.get());
- TileEntity tileEntity = player.worldObj.getTileEntity(chunkCoordinate.get().posX,
- chunkCoordinate.get().posY, chunkCoordinate.get().posZ);
- StringBuilder sb = new StringBuilder();
- sb.append("Tombstone summoned to mark the 'passing' of ").append(player.getCommandSenderName()).append(" at [");
- sb.append(chunkCoordinate.get().posX).append(", ");
- sb.append(chunkCoordinate.get().posY).append(", ");
- sb.append(chunkCoordinate.get().posZ).append("]");
- player.addChatMessage(new ChatComponentText(sb.toString()));
- if (tileEntity != null && tileEntity instanceof TileEntityTombstone) {
- ProjectZuluLog.debug(Level.INFO, sb.toString());
- return (TileEntityTombstone) tileEntity;
- }
- }
- ProjectZuluLog.warning("Failed to find location to place tombstone at player location {X:%s, Y:%s, Z:%s}",
- player.posX, player.posY, player.posZ);
- return null;
- }
-
- private Optional findValidTombstoneLocation(EntityPlayer player) {
- final int maxRadius = 100;
- /** Search an increasing square box (only check edge) for a valid location */
- for (int radius = 0; radius < maxRadius; radius++) {
- List validLocations = new ArrayList();
- validLocations.addAll(searchXPlaneAt(-radius, radius, player));
- validLocations.addAll(searchXPlaneAt(radius, radius, player));
- validLocations.addAll(searchZPlaneAt(-radius, radius, player));
- validLocations.addAll(searchZPlaneAt(radius, radius, player));
- validLocations.addAll(searchYPlaneAt(-radius, radius, player));
- validLocations.addAll(searchYPlaneAt(radius, radius, player));
- ChunkCoordinates closestPoint = null;
- float bestDistance = 0;
- for (ChunkCoordinates chunkCoordinates : validLocations) {
- if (closestPoint != null) {
- float distance = chunkCoordinates.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- if (distance < bestDistance) {
- bestDistance = distance;
- closestPoint = chunkCoordinates;
- }
- } else {
- closestPoint = chunkCoordinates;
- bestDistance = closestPoint.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- }
- }
- if (closestPoint != null) {
- return Optional.of(closestPoint);
- }
- }
- return Optional.absent();
- }
-
- private List searchXPlaneAt(int xOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchZPlaneAt(int zOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchYPlaneAt(int yOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private boolean isLocationValid(EntityPlayer player, int posX, int posY, int posZ) {
- if (player.worldObj.isAirBlock(posX, posY, posZ) && player.worldObj.getBlock(posX, posY - 1, posZ).isOpaqueCube()) {
- return true;
- }
- return false;
- }
-
- private List dropArmor(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.armorInventory.length];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
-
- shuffleArray(placeArray, player.worldObj.rand);
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.armorInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((armorMaxDrop == 0 || countDrops < armorMaxDrop)
- && (armorDropChance - player.worldObj.rand.nextInt(100) >= 1)) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? armorDeathDamage + armorDropDamage : armorDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.armorInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.armorInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private List dropInventory(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- if (player.inventory.mainInventory.length > 8) {
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.mainInventory.length - 9];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i + 9;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((inventoryMaxDrop == 0 || countDrops < inventoryMaxDrop)
- && inventoryDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? inventoryDeathDamage + inventoryDropDamage : inventoryDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- }
- return itemsToDrop;
- }
-
- private List dropHotbar(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- int inventorySize = player.inventory.mainInventory.length > 9 ? 9 : player.inventory.mainInventory.length;
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[inventorySize];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((hotbarMaxDrop == 0 || countDrops < hotbarMaxDrop)
- && hotbarDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? hotbarDeathDamage + hotbarDropDamage : hotbarDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private void shuffleArray(int[] array, Random random) {
- for (int i = array.length - 1; i >= 0; i--) {
- int index = random.nextInt(i + 1);
- int a = array[index];
- array[index] = array[i];
- array[i] = a;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/20e65501c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/20e65501c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 2f5d95e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/20e65501c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,222 +0,0 @@
-package com.ngb.projectzulu.common.mobs.models;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-import projectzulu.common.core.ModelHelper;
-import projectzulu.common.mobs.entity.EntityGenericAnimal;
-import projectzulu.common.mobs.entity.EntityStates;
-import projectzulu.common.mobs.renders.RenderMimic;
-
-public class ModelMimic extends ModelBase {
- ModelRenderer botchest;
- ModelRenderer BOTTEETHROT;
- ModelRenderer LEG1TOPROT;
- ModelRenderer LEG2TOPROT;
- ModelRenderer LEG4TOPROT;
- ModelRenderer LEG3TOPROT;
- ModelRenderer TOPCHESTROT;
- private ModelRenderer LEG1BOTROT;
- private ModelRenderer LEG2BOTROT;
- private ModelRenderer LEG4BOTROT;
- private ModelRenderer LEG3BOTROT;
-
- public ModelMimic() {
- textureWidth = 64;
- textureHeight = 64;
- setTextureOffset("BOTTEETHROT.TEETH7", 0, 0);
- setTextureOffset("BOTTEETHROT.TEETH5", 0, 0);
- setTextureOffset("BOTTEETHROT.TEETH6", 0, 0);
- setTextureOffset("BOTTEETHROT.TEETHR1", 0, 0);
- setTextureOffset("BOTTEETHROT.TEETHL3", 0, 0);
- setTextureOffset("BOTTEETHROT.TEETHR3", 0, 0);
- setTextureOffset("BOTTEETHROT.TEETHL1", 0, 0);
- setTextureOffset("LEG1TOPROT.leg1bot", 0, 20);
- setTextureOffset("LEG1BOTROT.leg1top", 0, 7);
- setTextureOffset("LEG2TOPROT.leg2bot", 0, 20);
- setTextureOffset("LEG2BOTROT.leg2top", 0, 7);
- setTextureOffset("LEG4TOPROT.leg4bot", 0, 20);
- setTextureOffset("LEG4BOTROT.leg4top", 0, 7);
- setTextureOffset("LEG3TOPROT.leg3bot", 0, 20);
- setTextureOffset("LEG3BOTROT.leg3top", 0, 7);
- setTextureOffset("TOPCHESTROT.topchest", 0, 0);
- setTextureOffset("TOPCHESTROT.chestnose", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETH4", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETH1", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETH3", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETH2", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETHR2", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETHR4", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETHL2", 0, 0);
- setTextureOffset("TOPCHESTROT.TEETHL4", 0, 0);
-
- botchest = new ModelRenderer(this, 0, 19);
- botchest.addBox(-7.5F, -9.5F, -7.5F, 14, 10, 14);
- botchest.setRotationPoint(0F, 14.53333F, 0F);
- botchest.setTextureSize(128, 64);
- botchest.mirror = true;
- setRotation(botchest, 0F, 0F, 0F);
- BOTTEETHROT = new ModelRenderer(this, "BOTTEETHROT");
- BOTTEETHROT.setRotationPoint(0F, 0.5F, 6.5F);
- setRotation(BOTTEETHROT, 0F, 0F, 0F);
- BOTTEETHROT.mirror = true;
- BOTTEETHROT.addBox("TEETH7", -1F, 3F, -13F, 2, 2, 1);
- BOTTEETHROT.addBox("TEETH5", -4.5F, 3F, -13F, 1, 2, 1);
- BOTTEETHROT.addBox("TEETH6", 3F, 3F, -13F, 1, 2, 1);
- BOTTEETHROT.addBox("TEETHR1", 4.5F, 3F, -11F, 1, 2, 1);
- BOTTEETHROT.addBox("TEETHL3", -6.5F, 4F, -7F, 1, 1, 1);
- BOTTEETHROT.addBox("TEETHR3", 4.5F, 4F, -7F, 1, 1, 1);
- BOTTEETHROT.addBox("TEETHL1", -6.5F, 3F, -11F, 1, 2, 1);
- LEG1TOPROT = new ModelRenderer(this, "LEG1TOPROT");
- LEG1TOPROT.setRotationPoint(4F, 14.5F, -5F);
- setRotation(LEG1TOPROT, 0F, 0F, 0F);
- LEG1TOPROT.mirror = true;
- LEG1TOPROT.addBox("leg1bot", -1F, 0F, -1F, 2, 3, 2);
- LEG1BOTROT = new ModelRenderer(this, "LEG1BOTROT");
- LEG1BOTROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG1BOTROT, 0F, 0F, 0F);
- LEG1BOTROT.mirror = true;
- LEG1BOTROT.addBox("leg1top", -1F, 0F, -1F, 2, 5, 2);
- LEG1TOPROT.addChild(LEG1BOTROT);
- LEG2TOPROT = new ModelRenderer(this, "LEG2TOPROT");
- LEG2TOPROT.setRotationPoint(-5F, 14.5F, -5F);
- setRotation(LEG2TOPROT, 0F, 0F, 0F);
- LEG2TOPROT.mirror = true;
- LEG2TOPROT.addBox("leg2bot", -1F, 0F, -1F, 2, 3, 2);
- LEG2BOTROT = new ModelRenderer(this, "LEG2BOTROT");
- LEG2BOTROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG2BOTROT, 0F, 0.0174533F, 0F);
- LEG2BOTROT.mirror = true;
- LEG2BOTROT.addBox("leg2top", -1F, 0F, -1F, 2, 5, 2);
- LEG2TOPROT.addChild(LEG2BOTROT);
- LEG4TOPROT = new ModelRenderer(this, "LEG4TOPROT");
- LEG4TOPROT.setRotationPoint(-5F, 14.5F, 4F);
- setRotation(LEG4TOPROT, 0F, 0F, 0F);
- LEG4TOPROT.mirror = true;
- LEG4TOPROT.addBox("leg4bot", -1F, 0F, -1F, 2, 3, 2);
- LEG4BOTROT = new ModelRenderer(this, "LEG4BOTROT");
- LEG4BOTROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG4BOTROT, 0F, 0F, 0F);
- LEG4BOTROT.mirror = true;
- LEG4BOTROT.addBox("leg4top", -1F, 0F, -1F, 2, 5, 2);
- LEG4TOPROT.addChild(LEG4BOTROT);
- LEG3TOPROT = new ModelRenderer(this, "LEG3TOPROT");
- LEG3TOPROT.setRotationPoint(4F, 14.5F, 4F);
- setRotation(LEG3TOPROT, 0F, 0F, 0F);
- LEG3TOPROT.mirror = true;
- LEG3TOPROT.addBox("leg3bot", -1F, 0F, -1F, 2, 3, 2);
- LEG3BOTROT = new ModelRenderer(this, "LEG3BOTROT");
- LEG3BOTROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG3BOTROT, 0F, 0F, 0F);
- LEG3BOTROT.mirror = true;
- LEG3BOTROT.addBox("leg3top", -1F, 0F, -1F, 2, 5, 2);
- LEG3TOPROT.addChild(LEG3BOTROT);
- TOPCHESTROT = new ModelRenderer(this, "TOPCHESTROT");
- TOPCHESTROT.setRotationPoint(0F, 5F, 6.5F);
- setRotation(TOPCHESTROT, 0F, 0F, 0F);
- TOPCHESTROT.mirror = true;
- TOPCHESTROT.addBox("topchest", -7.5F, -5F, -14F, 14, 5, 14);
- TOPCHESTROT.addBox("chestnose", -1F, -1.5F, -15.5F, 2, 3, 1);
- TOPCHESTROT.addBox("TEETH4", 4.5F, 0F, -13F, 1, 2, 1);
- TOPCHESTROT.addBox("TEETH1", -6.5F, 0F, -13F, 1, 2, 1);
- TOPCHESTROT.addBox("TEETH3", 1.5F, 0F, -13F, 1, 2, 1);
- TOPCHESTROT.addBox("TEETH2", -2.5F, 0F, -13F, 1, 2, 1);
- TOPCHESTROT.addBox("TEETHR2", 4.5F, 0F, -9F, 1, 2, 1);
- TOPCHESTROT.addBox("TEETHR4", 4.5F, 0F, -5F, 1, 1, 1);
- TOPCHESTROT.addBox("TEETHL2", -6.5F, 0F, -9F, 1, 2, 1);
- TOPCHESTROT.addBox("TEETHL4", -6.5F, 0F, -5F, 1, 1, 1);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- LEG1TOPROT.render(f5);
- LEG2TOPROT.render(f5);
- LEG4TOPROT.render(f5);
- LEG3TOPROT.render(f5);
- Minecraft.getMinecraft().renderEngine.bindTexture(RenderMimic.normalChest);
- botchest.render(f5);
- BOTTEETHROT.render(f5);
- TOPCHESTROT.render(f5);
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
-
- EntityGenericAnimal var5 = (EntityGenericAnimal) par1EntityLiving;
-
- /* State Based Animations */
- if (var5.getEntityState() != EntityStates.idle) {
- float heightToRaise = 0.0f;
- botchest.rotationPointY = 14.5333f - heightToRaise;
- BOTTEETHROT.rotationPointY = 0.5f - heightToRaise;
- TOPCHESTROT.rotationPointY = 5f - heightToRaise;
- LEG1TOPROT.rotationPointY = 14.5f - heightToRaise;
- LEG2TOPROT.rotationPointY = 14.5f - heightToRaise;
- LEG3TOPROT.rotationPointY = 14.5f - heightToRaise;
- LEG4TOPROT.rotationPointY = 14.5f - heightToRaise;
-
- LEG1TOPROT.rotateAngleX = (float) (-10 * Math.PI / 180)
- + (float) (MathHelper.cos(par2 * 0.6662F) * 1.8F * ModelHelper.abs(Math.log(par3 + 1)));
- LEG1TOPROT.rotateAngleZ = (float) (-50 * Math.PI / 180);
- LEG1BOTROT.rotateAngleZ = (float) (50 * Math.PI / 180);
-
- LEG3TOPROT.rotateAngleX = (float) (+10 * Math.PI / 180)
- + (float) (MathHelper.cos(par2 * 0.6662F) * 1.8F * ModelHelper.abs(Math.log(par3 + 1)));
- LEG3TOPROT.rotateAngleZ = (float) (-50 * Math.PI / 180);
- LEG3BOTROT.rotateAngleZ = (float) (50 * Math.PI / 180);
-
- LEG2TOPROT.rotateAngleX = (float) (-10 * Math.PI / 180)
- + (float) (MathHelper.cos(par2 * 0.6662F + (float) Math.PI) * 1.8F * ModelHelper.abs(Math
- .log(par3 + 1)));
- LEG2TOPROT.rotateAngleZ = (float) (+50 * Math.PI / 180);
- LEG2BOTROT.rotateAngleZ = (float) (-50 * Math.PI / 180);
-
- LEG4TOPROT.rotateAngleX = (float) (+10 * Math.PI / 180)
- + (float) (MathHelper.cos(par2 * 0.6662F + (float) Math.PI) * 1.8F * ModelHelper.abs(Math
- .log(par3 + 1)));
- LEG4TOPROT.rotateAngleZ = (float) (+50 * Math.PI / 180);
- LEG4BOTROT.rotateAngleZ = (float) (-50 * Math.PI / 180);
-
- TOPCHESTROT.rotateAngleX = (float) (Math.abs(MathHelper.cos(par2 * 0.6662F)) * -60 * Math.PI / 180 * par3);
-
- } else {
- float heightToRaise = -9f;
- botchest.rotationPointY = 14.5333f - heightToRaise;
- BOTTEETHROT.rotationPointY = 0.5f - heightToRaise;
- TOPCHESTROT.rotationPointY = 5f - (heightToRaise - 1f);
- LEG1TOPROT.rotationPointY = 14.5f - heightToRaise;
- LEG2TOPROT.rotationPointY = 14.5f - heightToRaise;
- LEG3TOPROT.rotationPointY = 14.5f - heightToRaise;
- LEG4TOPROT.rotationPointY = 14.5f - heightToRaise;
-
- LEG1TOPROT.rotateAngleX = (float) (+30 * Math.PI / 180);
- LEG1TOPROT.rotateAngleZ = (float) (+90 * Math.PI / 180);
- LEG3TOPROT.rotateAngleX = (float) (-30 * Math.PI / 180);
- LEG3TOPROT.rotateAngleZ = (float) (+90 * Math.PI / 180);
-
- LEG2TOPROT.rotateAngleX = (float) (+30 * Math.PI / 180);
- LEG2TOPROT.rotateAngleZ = (float) (-90 * Math.PI / 180);
- LEG4TOPROT.rotateAngleX = (float) (-30 * Math.PI / 180);
- LEG4TOPROT.rotateAngleZ = (float) (-90 * Math.PI / 180);
-
- TOPCHESTROT.rotateAngleX = 0f;
- }
- super.setLivingAnimations(par1EntityLiving, par2, par3, par4);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/701d439ec52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/701d439ec52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 680b206..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/701d439ec52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,47 +0,0 @@
-package projectzulu.common.core.entitydeclaration;
-
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityList.EntityEggInfo;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.api.CustomMobData;
-
-public abstract class EggableDeclaration extends CreatureDeclaration {
-
- protected int eggColor1;
- protected int eggColor2;
-
- protected EggableDeclaration(String mobName, int entityID, Class mobClass, EnumCreatureType creatureType) {
- super(mobName, entityID, mobClass, creatureType);
- }
-
- @Override
- public void loadCreaturesFromConfig(Configuration config) {
- super.loadCreaturesFromConfig(config);
- eggColor1 = config.get("MOB CONTROLS." + mobName, mobName.toLowerCase() + " EggColor1", eggColor1).getInt(
- eggColor1);
- eggColor2 = config.get("MOB CONTROLS." + mobName, mobName.toLowerCase() + " EggColor2", eggColor2).getInt(
- eggColor2);
- }
-
- /*
- * Create loadCustomMobData() method which calls outputData to List. loadCustom contains calls that are the same for
- * all creatures
- */
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- public void registerEgg() {
- super.registerEgg();
- int eggID = ProjectZulu_Core.getNextDefaultEggID();
- while (EntityList.IDtoClassMapping.containsKey(eggID)) {
- eggID = ProjectZulu_Core.getNextDefaultEggID();
- }
- EntityList.IDtoClassMapping.put(eggID, mobClass);
- EntityList.entityEggs.put(eggID, new EntityEggInfo(eggID, eggColor1, eggColor2));
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/a0da2ba0c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/a0da2ba0c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 37275a0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/a0da2ba0c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,166 +0,0 @@
-package projectzulu.common.blocks.heads;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-
-public class ModelBirdHead extends ModelBase{
- ModelRenderer Body;
- ModelRenderer wingrig;
- ModelRenderer winglef;
- ModelRenderer tail;
- ModelRenderer LEGRIGTOPROT;
- ModelRenderer LEGLEFTOPROT;
- ModelRenderer HEADROT;
- private ModelRenderer LEGRIGBOTROT;
- private ModelRenderer LEGLEFBOTROT;
- private ModelRenderer BEAKROT;
- private ModelRenderer BODY;
- private ModelRenderer WINGLEFROT;
- private ModelRenderer WINGRIGROT;
- private ModelRenderer TAILROT;
-
- public ModelBirdHead(){
- textureWidth = 32;
- textureHeight = 32;
- setTextureOffset("BODY.Body", 0, 0);
- setTextureOffset("WINGLEFROT.winglef", 22, 0);
- setTextureOffset("WINGRIGROT.wingrig", 13, 0);
- setTextureOffset("TAILROT.tail", 14, 8);
- setTextureOffset("HEADROT.Head", 0, 7);
- setTextureOffset("BEAKROT.beak", 9, 9);
- setTextureOffset("LEGLEFTOPROT.legtoplef", 3, 12);
- setTextureOffset("LEGLEFBOTROT.legbotlef", 7, 15);
- setTextureOffset("LEGRIGTOPROT.lefrigtop", 0, 12);
- setTextureOffset("LEGRIGBOTROT.legbotrig", 0, 15);
-
- BODY = new ModelRenderer(this, "BODY");
- BODY.setRotationPoint(0F, 21F, 0F);
- setRotation(BODY, 0F, 0F, 0F);
- BODY.mirror = true;
- BODY.addBox("Body", -1F, -1F, -2F, 2, 2, 4);
- WINGLEFROT = new ModelRenderer(this, "WINGLEFROT");
- WINGLEFROT.setRotationPoint(-1F, -0.7F, 0F);
- setRotation(WINGLEFROT, 0F, 0F, 0F);
- WINGLEFROT.mirror = true;
- WINGLEFROT.addBox("winglef", -1F, 0F, -1.5F, 1, 1, 3);
- BODY.addChild(WINGLEFROT);
- WINGRIGROT = new ModelRenderer(this, "WINGRIGROT");
- WINGRIGROT.setRotationPoint(1F, -0.7F, 0F);
- setRotation(WINGRIGROT, 0F, 0F, 0F);
- WINGRIGROT.mirror = true;
- WINGRIGROT.addBox("wingrig", 0F, 0F, -1.5F, 1, 1, 3);
- BODY.addChild(WINGRIGROT);
- TAILROT = new ModelRenderer(this, "TAILROT");
- TAILROT.setRotationPoint(0F, -0.2F, 1F);
- setRotation(TAILROT, 0.3346145F, 0F, 0F);
- TAILROT.mirror = true;
- TAILROT.addBox("tail", -0.4666667F, 0F, 0F, 1, 0, 3);
- BODY.addChild(TAILROT);
- HEADROT = new ModelRenderer(this, "HEADROT");
- HEADROT.setRotationPoint(0F, -1.2F, -2F);
- setRotation(HEADROT, 0F, 0F, 0F);
- HEADROT.mirror = true;
- HEADROT.addBox("Head", -1F, -1F, -1F, 2, 2, 2);
- BEAKROT = new ModelRenderer(this, "BEAKROT");
- BEAKROT.setRotationPoint(0F, 0F, 0F);
- setRotation(BEAKROT, -0.7801622F, 0F, 0F);
- BEAKROT.mirror = true;
- BEAKROT.addBox("beak", -0.5333334F, 0.3F, -0.9F, 1, 1, 1);
- HEADROT.addChild(BEAKROT);
- BODY.addChild(HEADROT);
- LEGLEFTOPROT = new ModelRenderer(this, "LEGLEFTOPROT");
- LEGLEFTOPROT.setRotationPoint(-0.5F, 1.3F, 1F);
- setRotation(LEGLEFTOPROT, -0.6702064F, 0F, 0F);
- LEGLEFTOPROT.mirror = true;
- LEGLEFTOPROT.addBox("legtoplef", -0.5F, 0F, 0F, 1, 2, 0);
- LEGLEFBOTROT = new ModelRenderer(this, "LEGLEFBOTROT");
- LEGLEFBOTROT.setRotationPoint(0F, 2F, 0F);
- setRotation(LEGLEFBOTROT, 0.6702064F, 0F, 0F);
- LEGLEFBOTROT.mirror = true;
- LEGLEFBOTROT.addBox("legbotlef", -0.5F, -0.4F, -2.3F, 1, 0, 2);
- LEGLEFTOPROT.addChild(LEGLEFBOTROT);
- BODY.addChild(LEGLEFTOPROT);
- LEGRIGTOPROT = new ModelRenderer(this, "LEGRIGTOPROT");
- LEGRIGTOPROT.setRotationPoint(0.5F, 1.3F, 1F);
- setRotation(LEGRIGTOPROT, -0.6684611F, 0F, 0F);
- LEGRIGTOPROT.mirror = true;
- LEGRIGTOPROT.addBox("lefrigtop", -0.5F, 0F, 0F, 1, 2, 0);
- LEGRIGBOTROT = new ModelRenderer(this, "LEGRIGBOTROT");
- LEGRIGBOTROT.setRotationPoint(0F, 2F, 0F);
- setRotation(LEGRIGBOTROT, 0.6702064F, 0F, 0F);
- LEGRIGBOTROT.mirror = true;
- LEGRIGBOTROT.addBox("legbotrig", -0.5F, -0.4F, -2.3F, 1, 0, 2);
- LEGRIGTOPROT.addChild(LEGRIGBOTROT);
- BODY.addChild(LEGRIGTOPROT);
-
- }
-
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5){
- // super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- // float field_78145_g = 8.0F;
- // float field_78151_h = 4.0F;
- //
- // if (this.isChild){
- // float var8 = 2.0F;
- // GL11.glPushMatrix();
- // GL11.glTranslatef(0.0F, field_78145_g * f5, field_78151_h * f5);
- // HEADROT.render(f5);
- // GL11.glPopMatrix();
- // GL11.glPushMatrix();
- // GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
- // GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
- // Body.render(f5);
- // Body.render(f5);
- // wingrig.render(f5);
- // winglef.render(f5);
- // tail.render(f5);
- // LEGRIGTOPROT.render(f5);
- // LEGLEFTOPROT.render(f5);
- // GL11.glPopMatrix();
- // }else{
-// Body.render(f5);
-// wingrig.render(f5);
-// winglef.render(f5);
-// tail.render(f5);
-// LEGRIGTOPROT.render(f5);
-// LEGLEFTOPROT.render(f5);
-// HEADROT.render(f5);
- BODY.render(f5);
- // }
- //
- }
-
- public void renderHead(float f5){
- Body.render(f5);
- wingrig.render(f5);
- winglef.render(f5);
- tail.render(f5);
- LEGRIGTOPROT.render(f5);
- LEGLEFTOPROT.render(f5);
- HEADROT.render(f5);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z){
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity)
- {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- BODY.rotateAngleY = f3 / (180F / (float)Math.PI);
-
-// Body.rotateAngleY = f3 / (180F / (float)Math.PI);
-// wingrig.rotateAngleY = f3 / (180F / (float)Math.PI);
-// winglef.rotateAngleY = f3 / (180F / (float)Math.PI);
-// tail.rotateAngleY = f3 / (180F / (float)Math.PI);
-// LEGRIGTOPROT.rotateAngleY = f3 / (180F / (float)Math.PI);
-// LEGLEFTOPROT.rotateAngleY = f3 / (180F / (float)Math.PI);
-// HEADROT.rotateAngleY = f3 / (180F / (float)Math.PI);
- }
-
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/d0517fa0c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/d0517fa0c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 48c8070..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/d0517fa0c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,617 +0,0 @@
-package projectzulu.common.blocks.spike;
-
-import javax.swing.Icon;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.EntityRenderer;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
-
-public class RenderSpike implements ISimpleBlockRenderingHandler {
-
- /* Leaving This here For Reference */
- // ProjectZuluLog.info("func_94209_e %s", var10.getMinU()); // 0.46875
- // ProjectZuluLog.info("func_94216_b %s", var10.func_94216_b()); // 192
- // ProjectZuluLog.info("func_94209_e %s", var10.getMinU()); // 0.46875
- // ProjectZuluLog.info("func_94212_f %s", var10.getMaxU()); // 0.5
- // ProjectZuluLog.info("func_94214_a %s", var10.getInterpolatedU(8D)); // 0: 0.46875, 8: 0.484375
- // ProjectZuluLog.info("func_94206_g %s", var10.getMinV()); // 0.375
- // ProjectZuluLog.info("func_94210_h %s", var10.getMaxV()); // 0.40625
- // ProjectZuluLog.info("func_94207_b %s", var10.func_94207_b(8D)); // 0: 0.375, 8: 0.390625
- // ProjectZuluLog.info("func_94215_i %s", var10.func_94215_i()); // NAME
- // ProjectZuluLog.info("func_94213_j %s", var10.func_94213_j()); // 512
- // ProjectZuluLog.info("func_94208_k %s", var10.func_94208_k()); // 512
-
- @Override
- public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
- }
-
- @Override
- public boolean renderWorldBlock(IBlockAccess blockAccess, int par2, int par3, int par4, Block par1Block,
- int modelId, RenderBlocks renderer) {
- return Render(blockAccess, par2, par3, par4, par1Block, modelId, renderer);
- }
-
- private boolean Render(IBlockAccess blockAccess, int par2, int par3, int par4, Block par1Block, int modelId,
- RenderBlocks renderer) {
- Tessellator tessellator = Tessellator.instance;
- tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(blockAccess, par2, par3, par4));
- float var6 = 1.0F;
- int var7 = par1Block.colorMultiplier(blockAccess, par2, par3, par4);
- float var8 = (var7 >> 16 & 255) / 255.0F;
- float var9 = (var7 >> 8 & 255) / 255.0F;
- float var10 = (var7 & 255) / 255.0F;
-
- if (EntityRenderer.anaglyphEnable) {
- float var11 = (var8 * 30.0F + var9 * 59.0F + var10 * 11.0F) / 100.0F;
- float var12 = (var8 * 30.0F + var9 * 70.0F) / 100.0F;
- float var13 = (var8 * 30.0F + var10 * 70.0F) / 100.0F;
- var8 = var11;
- var9 = var12;
- var10 = var13;
- }
-
- tessellator.setColorOpaque_F(var6 * var8, var6 * var9, var6 * var10);
- double var19 = par2;
- double var20 = par3;
- double var15 = par4;
-
- // // if (par1Block == Block.tallGrass)
- // // {
- // // long var17 = (long)(par2 * 3129871) ^ (long)par4 * 116129781L ^ (long)par3;
- // // var17 = var17 * var17 * 42317861L + var17 * 11L;
- // // var19 += ((double)((float)(var17 >> 16 & 15L) / 15.0F) - 0.5D) * 0.5D;
- // // var20 += ((double)((float)(var17 >> 20 & 15L) / 15.0F) - 1.0D) * 0.2D;
- // // var15 += ((double)((float)(var17 >> 24 & 15L) / 15.0F) - 0.5D) * 0.5D;
- // // }
- if (blockAccess.getBlock(par2, par3 - 1, par4) == Blocks.iron_bars
- || blockAccess.getBlock(par2, par3 - 1, par4) == Blocks.nether_brick_fence) {
- // renderAsSpike(blockAccess, par2, par3, par4, par1Block, modelId, renderer);
- RenderFencePikes(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15, renderer);
-
- } else if (blockAccess.getBlock(par2, par3 - 1, par4) == Blocks.iron_bars) {
- boolean isNegZ = canThisPaneConnectToThisBlockID(blockAccess.getBlock(par2, par3 - 1, par4 - 1));
- boolean isPosZ = canThisPaneConnectToThisBlockID(blockAccess.getBlock(par2, par3 - 1, par4 + 1));
- boolean isNegX = canThisPaneConnectToThisBlockID(blockAccess.getBlock(par2 - 1, par3 - 1, par4));
- boolean isPosX = canThisPaneConnectToThisBlockID(blockAccess.getBlock(par2 + 1, par3 - 1, par4));
-
- /* Check For Along Z */
- if (isNegZ && isPosZ) {
- drawSpikeStrip(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15,
- renderer, false, 0);
- } else if (!isNegZ && isPosZ) {
- drawSpikeStrip(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15,
- renderer, false, 1);
- } else if (isNegZ && !isPosZ) {
- drawSpikeStrip(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15,
- renderer, false, 2);
- }
-
- /* Check For Along X */
- if (isNegX && isPosX) {
- drawSpikeStrip(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15,
- renderer, true, 0);
- } else if (!isNegX && isPosX) {
- drawSpikeStrip(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15,
- renderer, true, 1);
- } else if (isNegX && !isPosX) {
- drawSpikeStrip(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15,
- renderer, true, 2);
- }
-
- if (!isNegZ && !isPosZ && !isNegX && !isPosX) {
- drawSpikeCross(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15, renderer);
- }
-
- } else {
- // renderer.drawCrossedSquares(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20,
- // var15, 1.0f);
- drawCrossedSquares(par1Block, blockAccess.getBlockMetadata(par2, par3, par4), var19, var20, var15, renderer);
- }
- return true;
- }
-
- /**
- * Copied from BlockPane (Iron Fence). Gets passed in the blockID of the block adjacent and supposed to return true
- * if its allowed to connect to the type of blockID passed in. Args: blockID
- */
- private final boolean canThisPaneConnectToThisBlockID(Block par1) {
- return par1.isOpaqueCube() || par1 == Blocks.iron_bars || par1 == Blocks.glass;
- }
-
- public void drawCrossedSquares(Block par1Block, int par2, double par3, double par5, double par7,
- RenderBlocks renderer) {
- Tessellator var9 = Tessellator.instance;
- IIcon var10 = renderer.getBlockIconFromSideAndMetadata(par1Block, 0, par2);
-
- if (renderer.overrideBlockTexture != null) {
- var10 = renderer.overrideBlockTexture;
- }
-
- double var13 = var10.getMinU();
- double var15 = var10.getMaxU();
- double var17 = var10.getMinV();
- double var19 = var10.getMaxV();
-
- double var21 = par3 + 0.5D - 0.5D;
- double var23 = par3 + 0.5D + 0.5D;
- double var25 = par7 + 0.5D - 0.5D;
- double var27 = par7 + 0.5D + 0.5D;
-
- switch (par2) {
- case 0:
- drawOnSide0(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 1:
- drawOnSide1(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 2:
- drawOnSide2(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 3:
- drawOnSide3(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 4:
- drawOnSide4(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 5:
- drawOnSide5(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
-
- case 6:
- drawOnSide0(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 7:
- drawOnSide1(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 8:
- drawOnSide2(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 9:
- drawOnSide3(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 10:
- drawOnSide4(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- case 11:
- drawOnSide5(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
-
- default:
- drawOnSide0(var9, par5, var21, var23, var25, var27, var13, var15, var17, var19);
- break;
- }
- }
-
- public void drawOnSide0(Tessellator tessellator, double par5, double var21, double var23, double var25,
- double var27, double var13, double var15, double var17, double var19) {
-
- /* Bottom Facing Texture */
- tessellator.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var17);
- tessellator.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- tessellator.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- tessellator.addVertexWithUV(var23, par5 + 1.0D, var27, var15, var17);
-
- tessellator.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var17);
- tessellator.addVertexWithUV(var23, par5 + 0.0D, var27, var13, var19);
- tessellator.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var19);
- tessellator.addVertexWithUV(var21, par5 + 1.0D, var25, var15, var17);
-
- /* Bottom Facing Texture */
- tessellator.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var17);
- tessellator.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- tessellator.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- tessellator.addVertexWithUV(var23, par5 + 1.0D, var25, var15, var17);
-
- tessellator.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var17);
- tessellator.addVertexWithUV(var23, par5 + 0.0D, var25, var13, var19);
- tessellator.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- tessellator.addVertexWithUV(var21, par5 + 1.0D, var27, var15, var17);
- }
-
- public void drawOnSide1(Tessellator var9, double par5, double var21, double var23, double var25, double var27,
- double var13, double var15, double var17, double var19) {
- /* First Texture */
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var17);
-
- /* Second Texture */
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var17);
- }
-
- public void drawOnSide2(Tessellator var9, double par5, double var21, double var23, double var25, double var27,
- double var13, double var15, double var17, double var19) {
- /* First Texture */
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var17);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var17);
-
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var17);
-
- /* Second Texture */
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var17);
- }
-
- public void drawOnSide3(Tessellator var9, double par5, double var21, double var23, double var25, double var27,
- double var13, double var15, double var17, double var19) {
- /* First Texture */
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var17);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var17);
-
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var17);
-
- /* Second Texture */
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var17);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var17);
-
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var17);
- }
-
- public void drawOnSide4(Tessellator var9, double par5, double var21, double var23, double var25, double var27,
- double var13, double var15, double var17, double var19) {
- /* First Texture */
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var17);
-
- /* Second Texture */
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var17);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var17);
-
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var17);
- }
-
- public void drawOnSide5(Tessellator var9, double par5, double var21, double var23, double var25, double var27,
- double var13, double var15, double var17, double var19) {
-
- /* First Texture */
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var13, var17);
- var9.addVertexWithUV(var23, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var17);
-
- /* Second Texture */
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var13, var17);
- var9.addVertexWithUV(var23, par5 + 1.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 1.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var17);
- }
-
- public void RenderFencePikes(Block par1Block, int par2, double par3, double par5, double par7, RenderBlocks renderer) {
- Tessellator var9 = Tessellator.instance;
- // Icon var10 = par1Block.getIcon(0, par2);
- IIcon var10 = renderer.getBlockIconFromSideAndMetadata(par1Block, 0, par2);
-
- if (renderer.overrideBlockTexture != null) {
- var10 = renderer.overrideBlockTexture;
- }
-
- double var13 = var10.getMinU() + (var10.getMaxU() - var10.getMinU()) * 1f / 4f;
- double var15 = var10.getMinU() + (var10.getMaxU() - var10.getMinU()) * 3f / 4f;
- double var17 = var10.getMinV();
- double var19 = var10.getMaxV();
-
- double var21 = par3 + 0.5D - (0.625 - 0.375) / 2D;
- double var23 = par3 + 0.5D + (0.625 - 0.375) / 2D;
- double var25 = par7 + 0.5D - (0.625 - 0.375) / 2D;
- double var27 = par7 + 0.5D + (0.625 - 0.375) / 2D;
-
- double maxY = 0.6;
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var27, var13, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var25, var15, var17);
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var27, var15, var17);
-
- }
-
- public void drawSpikeCross(Block par1Block, int par2, double par3, double par5, double par7, RenderBlocks renderer) {
- Tessellator var9 = Tessellator.instance;
- // Icon var10 = par1Block.getIcon(0, par2);
- IIcon var10 = renderer.getBlockIconFromSideAndMetadata(par1Block, 0, par2);
-
- if (renderer.overrideBlockTexture != null) {
- var10 = renderer.overrideBlockTexture;
- }
-
- double var13 = var10.getMinU();
- double var15 = var10.getMaxU();
- double var17 = var10.getMinV();
- double var19 = var10.getMaxV();
-
- /* Render Strip Along X */
- double var21 = par3 + 0.5D - 0.5;
- double var23 = par3 + 0.5D + 0.5;
- double var25 = par7 + 0.5D - 0.06;
- double var27 = par7 + 0.5D + 0.06;
-
- // float var6 = 0.375F;
- // float var7 = 0.625F;
- double maxY = 0.6;
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
-
- /* Render Strip Along Z */
- var21 = par3 + 0.5D - 0.06;
- var23 = par3 + 0.5D + 0.06;
- var25 = par7 + 0.5D - 0.5;
- var27 = par7 + 0.5D + 0.5;
-
- // float var6 = 0.375F;
- // float var7 = 0.625F;
- maxY = 0.6;
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
- }
-
- public void drawSpikeStrip(Block par1Block, int par2, double par3, double par5, double par7, RenderBlocks renderer,
- Boolean alongX, int type) {
- Tessellator var9 = Tessellator.instance;
- IIcon var10 = renderer.getBlockIconFromSideAndMetadata(par1Block, 0, par2);
-
- if (renderer.overrideBlockTexture != null) {
- var10 = renderer.overrideBlockTexture;
- }
-
- double var13;
- double var15;
- double var17;
- double var19;
-
- switch (type) {
- case 1:
- var13 = var10.getInterpolatedU(8D);
- var15 = var10.getMaxU();
- var17 = var10.getMinV();
- var19 = var10.getMaxV();
- break;
-
- case 2:
- var13 = var10.getMinU();
- var15 = var10.getInterpolatedU(8D); // var10.getMaxU();
- var15 = var10.getMinU() + (var10.getMaxU() - var10.getMinU()) / 2f; // var10.getMaxU();
- var17 = var10.getMinV();
- var19 = var10.getMaxV();
- break;
-
- default:
- var13 = var10.getMinU();
- var15 = var10.getMaxU();
- var17 = var10.getMinV();
- var19 = var10.getMaxV();
- }
-
- double var21;
- double var23;
- double var25;
- double var27;
- if (alongX) {
- switch (type) {
- case 1:
- var21 = par3 + 0.5D - 0.0;
- var23 = par3 + 0.5D + 0.5;
- var25 = par7 + 0.5D - 0.06;
- var27 = par7 + 0.5D + 0.06;
-
- break;
- case 2:
- var21 = par3 + 0.5D - 0.5;
- var23 = par3 + 0.5D + 0.0;
- var25 = par7 + 0.5D - 0.06;
- var27 = par7 + 0.5D + 0.06;
- break;
- default:
- var21 = par3 + 0.5D - 0.5;
- var23 = par3 + 0.5D + 0.5;
- var25 = par7 + 0.5D - 0.06;
- var27 = par7 + 0.5D + 0.06;
- break;
- }
-
- } else {
- switch (type) {
- case 1:
- var21 = par3 + 0.5D - 0.06;
- var23 = par3 + 0.5D + 0.06;
- var25 = par7 + 0.5D - 0.0;
- var27 = par7 + 0.5D + 0.5;
-
- break;
- case 2:
- var21 = par3 + 0.5D - 0.06;
- var23 = par3 + 0.5D + 0.06;
- var25 = par7 + 0.5D - 0.5;
- var27 = par7 + 0.5D + 0.0;
-
- break;
- default:
- var21 = par3 + 0.5D - 0.06;
- var23 = par3 + 0.5D + 0.06;
- var25 = par7 + 0.5D - 0.5;
- var27 = par7 + 0.5D + 0.5;
- break;
- }
- }
-
- // float var6 = 0.375F;
- // float var7 = 0.625F;
- double maxY = 0.6;
-
- if (alongX) {
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var25, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var27, var13, var17);
-
- } else {
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var27, var15, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var25, var13, var17);
-
- /* Bottom Facing Texture */
- var9.addVertexWithUV(var21, par5 + maxY, var27, var15, var17);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var23, par5 + maxY, var25, var13, var17);
-
- var9.addVertexWithUV(var23, par5 + maxY, var25, var13, var17);
- var9.addVertexWithUV(var23, par5 + 0.0D, var25, var13, var19);
- var9.addVertexWithUV(var21, par5 + 0.0D, var27, var15, var19);
- var9.addVertexWithUV(var21, par5 + maxY, var27, var15, var17);
-
- }
- }
-
- @Override
- public boolean shouldRender3DInInventory(int modelId) {
- return false;
- }
-
- @Override
- public int getRenderId() {
- return 0;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/d2b8def8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/d2b8def8c42100141fce95f06aba7e85
deleted file mode 100644
index 90055a3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/d2b8def8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import com.ngb.projectzulu.common.api.CustomMobData;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.core.ConfigHelper;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.ItemGenerics;
-import com.ngb.projectzulu.common.core.entitydeclaration.EntityProperties;
-import com.ngb.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.ngb.projectzulu.common.mobs.entity.EntityFrog;
-import com.ngb.projectzulu.common.mobs.models.ModelFrog;
-import com.ngb.projectzulu.common.mobs.renders.RenderGenericLiving;
-import com.ngb.projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class FrogDeclaration extends SpawnableDeclaration {
-
- public FrogDeclaration() {
- super("Frog", 13, EntityFrog.class, EnumCreatureType.creature);
- setSpawnProperties(10, 100, 1, 3);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 1);
-
- eggColor1 = (95 << 16) + (186 << 8) + 50;
- eggColor2 = (105 << 16) + (203 << 8) + 67;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.Gill.meta(), 4);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.FrogLegs.meta(), 4);
- customMobData.entityProperties = new EntityProperties(10f, 2.0f, 0.3f, 100f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericLiving(new ModelFrog(), 0.5f, new ResourceLocation(DefaultProps.mobKey, "frog.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.swampland.biomeName);
- defaultBiomesToSpawn.add("Green Swamplands");
- defaultBiomesToSpawn.add("Marsh");
- defaultBiomesToSpawn.addAll(typeToArray(Type.SWAMP));
- return defaultBiomesToSpawn;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/00352701c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/00352701c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 7ddfdc5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/00352701c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Items;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.CustomMobData;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ConfigHelper;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ItemGenerics;
-import projectzulu.common.core.entitydeclaration.EntityProperties;
-import projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import projectzulu.common.mobs.entity.EntityHorseBrown;
-import projectzulu.common.mobs.models.ModelHorse;
-import projectzulu.common.mobs.renders.RenderGenericHorse;
-import projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class HorseBrownDeclaration extends SpawnableDeclaration {
-
- public HorseBrownDeclaration() {
- super("Horse Brown", 30, EntityHorseBrown.class, EnumCreatureType.creature);
- setSpawnProperties(5, 100, 1, 2);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 3);
-
- eggColor1 = (137 << 16) + (78 << 8) + 0;
- eggColor2 = (81 << 16) + (46 << 8) + 0;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- Items.beef, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.LargeHeart.meta(), 4);
- customMobData.entityProperties = new EntityProperties(20f, 3.0f, 0.3f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericHorse(new ModelHorse(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "Horse/horse_brown.png"), new ResourceLocation(DefaultProps.mobKey, "Horse/horse_brown_saddled.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.plains.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add("Autumn Woods");
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
-
- HashSet nonFrozenForest = new HashSet();
- nonFrozenForest.addAll(typeToArray(Type.FOREST));
- nonFrozenForest.addAll(typeToArray(Type.PLAINS));
- nonFrozenForest.removeAll(typeToArray(Type.FROZEN));
- defaultBiomesToSpawn.addAll(nonFrozenForest);
- return defaultBiomesToSpawn;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/00edbdef9f9d00141ce0d62fbd2fd1cf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/00edbdef9f9d00141ce0d62fbd2fd1cf
deleted file mode 100644
index 375baf2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/00edbdef9f9d00141ce0d62fbd2fd1cf
+++ /dev/null
@@ -1,206 +0,0 @@
-package com.stek101.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import com.stek101.projectzulu.common.mobs.entity.EntityFollower;
-
-public class ModelFollower extends ModelBase {
-
- float heightToRaise = 20f;
- float renderScale = 0.5f;
-
- ModelRenderer sidebody2;
- ModelRenderer body;
- ModelRenderer sidebody3;
- ModelRenderer sidebody1;
- ModelRenderer ANTENLEFROT1;
- ModelRenderer ANTENRIGROT1;
- ModelRenderer LEG11ROT;
- ModelRenderer LEG21ROT;
- ModelRenderer LEG31ROT;
- ModelRenderer LEG41ROT;
- private ModelRenderer ANTENLEFROT2;
- private ModelRenderer ANTENLEFROT3;
- private ModelRenderer ANTENRIGROT2;
- private ModelRenderer ANTENRIGROT3;
- private ModelRenderer LEG12ROT;
- private ModelRenderer LEG22ROT;
- private ModelRenderer LEG32ROT;
- private ModelRenderer LEG42ROT;
-
- public ModelFollower() {
- textureWidth = 64;
- textureHeight = 32;
- setTextureOffset("ANTENLEFROT1.antenlef1", 54, 0);
- setTextureOffset("ANTENLEFROT2.antenlef2", 50, 0);
- setTextureOffset("ANTENLEFROT3.antenlef3", 47, 0);
- setTextureOffset("ANTENRIGROT1.antenrig1", 54, 0);
- setTextureOffset("ANTENRIGROT2.antenrig2", 50, 0);
- setTextureOffset("ANTENRIGROT3.antenrig3", 47, 0);
- setTextureOffset("LEG11ROT.leg11", 34, 0);
- setTextureOffset("LEG12ROT.leg12", 34, 3);
- setTextureOffset("LEG21ROT.leg21", 34, 0);
- setTextureOffset("LEG22ROT.leg22", 34, 3);
- setTextureOffset("LEG31ROT.leg31", 34, 0);
- setTextureOffset("LEG32ROT.leg32", 34, 3);
- setTextureOffset("LEG41ROT.leg41", 34, 0);
- setTextureOffset("LEG42ROT.leg42", 34, 3);
-
- sidebody2 = new ModelRenderer(this, 42, 17);
- sidebody2.addBox(0F, -2.5F, -5F, 1, 5, 10);
- sidebody2.setRotationPoint(4.5F, 18.5F - heightToRaise, 0F);
- sidebody2.setTextureSize(64, 32);
- sidebody2.mirror = true;
- setRotation(sidebody2, 0F, 0F, 0F);
- body = new ModelRenderer(this, 0, 14);
- body.addBox(-4.5F, -3F, -12F, 9, 6, 12);
- body.setRotationPoint(0F, 18.5F - heightToRaise, 6F);
- body.setTextureSize(64, 32);
- body.mirror = true;
- setRotation(body, 0F, 0F, 0F);
- sidebody3 = new ModelRenderer(this, 0, 2);
- sidebody3.addBox(-3F, 0F, -5.5F, 6, 1, 11);
- sidebody3.setRotationPoint(0F, 21.5F - heightToRaise, 0F);
- sidebody3.setTextureSize(64, 32);
- sidebody3.mirror = true;
- setRotation(sidebody3, 0F, 0F, 0F);
- sidebody1 = new ModelRenderer(this, 42, 17);
- sidebody1.addBox(-1F, -2.5F, -5F, 1, 5, 10);
- sidebody1.setRotationPoint(-4.5F, 18.5F - heightToRaise, 0F);
- sidebody1.setTextureSize(64, 32);
- sidebody1.mirror = true;
- setRotation(sidebody1, 0F, 0F, 0F);
- ANTENLEFROT1 = new ModelRenderer(this, "ANTENLEFROT1");
- ANTENLEFROT1.setRotationPoint(-3F, 17.5F - heightToRaise, -6F);
- setRotation(ANTENLEFROT1, -0.5235988F, 0.5235988F, 0F);
- ANTENLEFROT1.mirror = true;
- ANTENLEFROT1.addBox("antenlef1", -0.5F, -0.5F, -4F, 1, 1, 4);
- ANTENLEFROT2 = new ModelRenderer(this, "ANTENLEFROT2");
- ANTENLEFROT2.setRotationPoint(0F, 0F, -4F);
- setRotation(ANTENLEFROT2, -0.5235988F, 0F, 0F);
- ANTENLEFROT2.mirror = true;
- ANTENLEFROT2.addBox("antenlef2", -0.5F, -0.5F, -3F, 1, 1, 3);
- ANTENLEFROT3 = new ModelRenderer(this, "ANTENLEFROT3");
- ANTENLEFROT3.setRotationPoint(0F, 0F, -3F);
- setRotation(ANTENLEFROT3, -0.5235988F, 0F, 0F);
- ANTENLEFROT3.mirror = true;
- ANTENLEFROT3.addBox("antenlef3", -0.5F, -0.5F, -2F, 1, 1, 2);
- ANTENLEFROT2.addChild(ANTENLEFROT3);
- ANTENLEFROT1.addChild(ANTENLEFROT2);
- ANTENRIGROT1 = new ModelRenderer(this, "ANTENRIGROT1");
- ANTENRIGROT1.setRotationPoint(3F, 17.5F - heightToRaise, -6F);
- setRotation(ANTENRIGROT1, -0.5235988F, -0.5235988F, 0F);
- ANTENRIGROT1.mirror = true;
- ANTENRIGROT1.addBox("antenrig1", -0.5F, -0.5F, -4F, 1, 1, 4);
- ANTENRIGROT2 = new ModelRenderer(this, "ANTENRIGROT2");
- ANTENRIGROT2.setRotationPoint(0F, 0F, -4F);
- setRotation(ANTENRIGROT2, -0.5235988F, 0F, 0F);
- ANTENRIGROT2.mirror = true;
- ANTENRIGROT2.addBox("antenrig2", -0.5F, -0.5F, -3F, 1, 1, 3);
- ANTENRIGROT3 = new ModelRenderer(this, "ANTENRIGROT3");
- ANTENRIGROT3.setRotationPoint(0F, 0F, -3F);
- setRotation(ANTENRIGROT3, -0.5235988F, 0F, 0F);
- ANTENRIGROT3.mirror = true;
- ANTENRIGROT3.addBox("antenrig3", -0.5F, -0.5F, -2F, 1, 1, 2);
- ANTENRIGROT2.addChild(ANTENRIGROT3);
- ANTENRIGROT1.addChild(ANTENRIGROT2);
- LEG11ROT = new ModelRenderer(this, "LEG11ROT");
- LEG11ROT.setRotationPoint(-3F, 22F - heightToRaise, -3F);
- setRotation(LEG11ROT, 0F, 0F, -0.1745329F);
- LEG11ROT.mirror = true;
- LEG11ROT.addBox("leg11", -4F, -0.5F, -1F, 4, 1, 2);
- LEG12ROT = new ModelRenderer(this, "LEG12ROT");
- LEG12ROT.setRotationPoint(-4F, 0F, 0F);
- setRotation(LEG12ROT, 0F, 0F, -0.7853982F);
- LEG12ROT.mirror = true;
- LEG12ROT.addBox("leg12", -2F, -0.5F, -1F, 2, 1, 2);
- LEG11ROT.addChild(LEG12ROT);
- LEG21ROT = new ModelRenderer(this, "LEG21ROT");
- LEG21ROT.setRotationPoint(3F, 22F - heightToRaise, -3F);
- setRotation(LEG21ROT, 0F, 0F, 0.1745329F);
- LEG21ROT.mirror = true;
- LEG21ROT.addBox("leg21", 0F, -0.5F, -1F, 4, 1, 2);
- LEG22ROT = new ModelRenderer(this, "LEG22ROT");
- LEG22ROT.setRotationPoint(4F, 0F, 0F);
- setRotation(LEG22ROT, 0F, 0F, 0.7853982F);
- LEG22ROT.mirror = true;
- LEG22ROT.addBox("leg22", 0F, -0.5F, -1F, 2, 1, 2);
- LEG21ROT.addChild(LEG22ROT);
- LEG31ROT = new ModelRenderer(this, "LEG31ROT");
- LEG31ROT.setRotationPoint(-3F, 22F - heightToRaise, 3F);
- setRotation(LEG31ROT, 0F, 0F, -0.1745329F);
- LEG31ROT.mirror = true;
- LEG31ROT.addBox("leg31", -4F, -0.5F, -1F, 4, 1, 2);
- LEG32ROT = new ModelRenderer(this, "LEG32ROT");
- LEG32ROT.setRotationPoint(-4F, 0F, 0F);
- setRotation(LEG32ROT, 0F, 0F, -0.7853982F);
- LEG32ROT.mirror = true;
- LEG32ROT.addBox("leg32", -2F, -0.5F, -1F, 2, 1, 2);
- LEG31ROT.addChild(LEG32ROT);
- LEG41ROT = new ModelRenderer(this, "LEG41ROT");
- LEG41ROT.setRotationPoint(3F, 22F - heightToRaise, 3F);
- setRotation(LEG41ROT, 0F, 0F, 0.1745329F);
- LEG41ROT.mirror = true;
- LEG41ROT.addBox("leg41", 0F, -0.5F, -1F, 4, 1, 2);
- LEG42ROT = new ModelRenderer(this, "LEG42ROT");
- LEG42ROT.setRotationPoint(4F, 0F, 0F);
- setRotation(LEG42ROT, 0F, 0F, 0.7853982F);
- LEG42ROT.mirror = true;
- LEG42ROT.addBox("leg42", 0F, -0.5F, -1F, 2, 1, 2);
- LEG41ROT.addChild(LEG42ROT);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- float scale = f5;
- if (entity instanceof EntityFollower && ((EntityFollower) entity).getFollowerIndex() % 2 == 0) {
- scale = f5 * 0.58f;
- }
-
- sidebody2.render(renderScale * f5);
- body.render(renderScale * f5);
- sidebody3.render(renderScale * f5);
- sidebody1.render(renderScale * f5);
- //ANTENLEFROT1.render(renderScale * f5);
- //ANTENRIGROT1.render(renderScale * f5);
- LEG11ROT.render(renderScale * f5);
- LEG21ROT.render(renderScale * f5);
- LEG31ROT.render(renderScale * f5);
- LEG41ROT.render(renderScale * f5);
-
- /* sidebody2.render(scale);
- body.render(scale);
- sidebody3.render(scale);
- sidebody1.render(scale);
- LEG11ROT.render(scale);
- LEG21ROT.render(scale);
- LEG31ROT.render(scale);
- LEG41ROT.render(scale);*/
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
- super.setLivingAnimations(par1EntityLiving, par2, par3, par4);
- LEG11ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F + (float) Math.PI) * 1.4F * par3;
- LEG21ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
- LEG31ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F + (float) Math.PI) * 1.4F * par3;
- LEG41ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/203ffc9fc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/203ffc9fc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 43a02d9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/203ffc9fc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,82 +0,0 @@
-package projectzulu.common.world2.buildingmanager;
-
-import java.awt.Point;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import projectzulu.common.core.terrain.TerrainFeature.FeatureDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.MazeCell;
-import projectzulu.common.world2.architect.ArchitectCemetary;
-import projectzulu.common.world2.randomizer.Randomizer;
-import projectzulu.common.world2.randomizer.SelectedFewRandomizer;
-
-public class BuildingManagerCemetary extends BuildingManagerBase {
-
- public ArchitectCemetary architect;
- public Randomizer randomizer;
-
- MazeCell[][] cemetary;
-
- public BuildingManagerCemetary(World world, ChunkCoordinates startingPos, FeatureDirection direction) {
- super(world);
- architect = new ArchitectCemetary(world);
- randomizer = new SelectedFewRandomizer(world.rand, 3, 10, false);
-
- int xCells = 6;
- int zCells = 6;
- int cellSize = 3;
- int cellHeight = 5;
- startingPos = calcTranslatedPosition(direction, startingPos, xCells * cellSize, zCells * cellSize, cellHeight);
-
- cemetary = new MazeCell[xCells][zCells];
- for (int i = 0; i < cemetary.length; i++) {
- for (int j = 0; j < cemetary[0].length; j++) {
- cemetary[i][j] = new MazeCell(cellSize, cellHeight, new ChunkCoordinates(startingPos.posX + cellSize
- * i, startingPos.posY, startingPos.posZ + cellSize * j));
- }
- }
- }
-
- @Override
- protected void randomizeCells() {
- randomizer.randomize(cemetary);
- }
-
- @Override
- protected void assignBlueprints(int pass, int maxPass) {
- if (pass == maxPass) {
- for (int cellX = 0; cellX < cemetary.length; cellX++) {
- for (int cellZ = 0; cellZ < cemetary[0].length; cellZ++) {
- architect.assignBlueprint(cemetary, new Point(cellX, cellZ), pass, maxPass);
- }
- }
- }
- }
-
- @Override
- protected void construct() {
- for (int cellX = 0; cellX < cemetary.length; cellX++) {
- for (int cellZ = 0; cellZ < cemetary[0].length; cellZ++) {
- MazeCell currentCell = cemetary[cellX][cellZ];
- processCellPieces(currentCell, architect);
- }
- }
- }
-
- @Override
- protected void handleBlockPlacement(BlockWithMeta blockWithMeta, ChunkCoordinates position, Random random) {
- Block blockAt = world.getBlock(position.posX, position.posY, position.posZ);
- if (blockWithMeta.block.equals(Blocks.air) && blockAt.equals(Block.getBlockFromName("snow"))) {
- return;
- }
- if (blockAt.getMaterial().equals(Material.wood) || blockAt.getMaterial().equals(Material.leaves)) {
- return;
- }
- super.handleBlockPlacement(blockWithMeta, position, random);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/20995ea2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/20995ea2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 88da588..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/20995ea2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,38 +0,0 @@
-package projectzulu.common.world.dataobjects;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.WeightedRandom;
-import net.minecraft.world.World;
-
-/* Helper Class to contain both BlockID and Meta in a single Structure */
-public class BlockWithMeta extends WeightedRandom.Item {
- public final Block block;
- public final int meta;
-
- public BlockWithMeta(Block block) {
- this(block, 0);
- }
-
- public BlockWithMeta(Block block, int meta) {
- this(block, meta, 1);
- }
-
- public BlockWithMeta(Block block, int meta, int weight) {
- super(weight);
- this.block = block;
- this.meta = meta;
- }
-
- /**
- * Helper Function to Place Block/TileEntity/Spawner. Overridden in child to make use of specific knowledge, i.e. A
- * Chests Loot Chance
- */
- public void placeBlock(World world, ChunkCoordinates position, Random random) {
- if (block != null) {
- world.setBlock(position.posX, position.posY, position.posZ, block, meta, 3);
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/209e43192124001415179d45b0e27e9a b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/209e43192124001415179d45b0e27e9a
deleted file mode 100644
index 08e8a5a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/209e43192124001415179d45b0e27e9a
+++ /dev/null
@@ -1,527 +0,0 @@
-package com.ngb.projectzulu.common;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.logging.Level;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.item.EntityXPOrb;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.DamageSource;
-import net.minecraft.world.GameRules;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-import net.minecraftforge.event.entity.living.LivingDeathEvent;
-import net.minecraftforge.event.entity.player.PlayerDropsEvent;
-import net.minecraftforge.event.world.WorldEvent;
-import com.ngb.projectzulu.common.api.BlockList;
-import com.ngb.projectzulu.common.blocks.tombstone.TileEntityTombstone;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.ObfuscationHelper;
-import com.ngb.projectzulu.common.core.ProjectZuluLog;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DeathGamerules {
- int maxDropXP = 100;
- int percKeptXp = 0;
-
- int armorDeathDamage = 0;
- int inventoryDeathDamage = 0;
- int hotbarDeathDamage = 0;
-
- int armorDropDamage = 0;
- int inventoryDropDamage = 0;
- int hotbarDropDamage = 0;
-
- int armorDropChance = 100;
- int inventoryDropChance = 100;
- int hotbarDropChance = 100;
-
- int armorMaxDrop = 0;
- int inventoryMaxDrop = 0;
- int hotbarMaxDrop = 0;
-
- boolean tombstoneOnDeath = true;
- boolean tombstoneAbsorbDrops = true;
- boolean doDropEvent = true;
-
- boolean keepInventoryDefault = false;
- boolean dropArmorDefault = false;
- boolean dropInventoryDefault = false;
- boolean dropHotbarDefault = false;
- boolean dropXPDefault = false;
- private ExperienceRedistributor redistributor;
- private ItemBlacklist itemBlacklist;
-
- public DeathGamerules() {
- redistributor = new ExperienceRedistributor();
- FMLCommonHandler.instance().bus().register(redistributor);
- }
-
- public DeathGamerules loadConfiguration(File modConfigDirectory) {
- itemBlacklist = new ItemBlacklist();
- Configuration config = new Configuration(new File(modConfigDirectory, DefaultProps.configDirectory
- + DefaultProps.defaultConfigFile));
- config.load();
- itemBlacklist.loadFromConfig(config);
- tombstoneOnDeath = config.get("General Controls", "Drop Tombstone On Death", tombstoneOnDeath).getBoolean(
- tombstoneOnDeath);
- tombstoneAbsorbDrops = config.get("General Controls", "Tombstone Absorb Drops", tombstoneAbsorbDrops)
- .getBoolean(tombstoneAbsorbDrops);
- doDropEvent = config.get("General Controls", "doDropEvent", doDropEvent).getBoolean(doDropEvent);
-
- String category = "General Controls.gamerule_settings";
- maxDropXP = config
- .get(category + ".Experience", "maxDropXP", 100,
- "Maximum amount XP dropped on Death. The rest is lost if not kept via percKeptXp. 100 is vanilla default")
- .getInt(100);
- keepInventoryDefault = config.get(category, "keepInventoryDefault", false,
- "The Default settings for the keepInventory gamerule").getBoolean(false);
- Property keptXpProperty = config.get(category + ".Experience", "percKeptXp", 0,
- "Percentage of XP (minus dropped amount) kept with the player on respawn.");
- percKeptXp = keptXpProperty.getInt();
- if (percKeptXp < 0 || percKeptXp > 100) {
- percKeptXp = percKeptXp < 0 ? 0 : percKeptXp > 100 ? 100 : percKeptXp;
- keptXpProperty.set(percKeptXp);
- }
- dropArmorDefault = config.get(category + ".Armor", "isEnabledDefault", false,
- "The Default settings for the dropArmor gamerule").getBoolean(false);
- dropInventoryDefault = config.get(category + ".Inventory", "isEnabledDefault", false,
- "The Default settings for the dropInventory gamerule").getBoolean(false);
- dropHotbarDefault = config.get(category + ".Hotbar", "isEnabledDefault", false,
- "The Default settings for the dropHotbar gamerule").getBoolean(false);
- dropXPDefault = config.get(category + ".Experience", "isEnabledDefault", false,
- "The Default settings for the dropXP gamerule").getBoolean(false);
-
- armorDeathDamage = handlePropMinMax(config.get(category + ".Armor", "armorDeathDamage", 0,
- "Percentage of Max durability dealth on Death to armor slot items"), 0, 0, 100);
- inventoryDeathDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDeathDamage", 0,
- "Percentage of Max durability dealth on Death to inventory slot items"), 0, 0, 100);
- hotbarDeathDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDeathDamage", 0,
- "Percentage of Max durability dealth on Death to hotbar slot items"), 0, 0, 100);
-
- armorDropDamage = handlePropMinMax(config.get(category + ".Armor", "armorDropDamage", 0,
- "Percentage of Max durability dealth on Drop to armor slot items"), 0, 0, 100);
- inventoryDropDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropDamage", 0,
- "Percentage of Max durability dealth on Drop to inventory slot items"), 0, 0, 100);
- hotbarDropDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropDamage", 0,
- "Percentage of Max durability dealth on Drop to hotbar slot items"), 0, 0, 100);
-
- armorDropChance = handlePropMinMax(config.get(category + ".Armor", "armorDropChance", 100,
- "Chance that each armor slot item will drop on death"), 100, 0, 100);
- inventoryDropChance = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropChance", 100,
- "Chance that each inventory slot item will drop on death"), 100, 0, 100);
- hotbarDropChance = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropChance", 100,
- "Chance that each hotbar slot item will drop on death"), 100, 0, 100);
-
- armorMaxDrop = handlePropMinMax(config.get(category + ".Armor", "armorMaxDrop", 0,
- "Max number of armor slot items that can drop on death."), 0, 0, null);
- inventoryMaxDrop = handlePropMinMax(config.get(category + ".Inventory", "inventoryMaxDrop", 0,
- "Max number of inventory slot items that can drop on death"), 0, 0, null);
- hotbarMaxDrop = handlePropMinMax(config.get(category + ".Hotbar", "hotbarMaxDrop", 0,
- "Max number of hotbar slot items that can drop on death"), 0, 0, null);
- config.save();
- return this;
- }
-
- private int handlePropMinMax(Property prop, int value, Integer min, Integer max) {
- value = prop.getInt(value);
- if (min != null && value < min) {
- prop.set(min);
- value = min;
- } else if (max != null && value > max) {
- prop.set(max);
- value = max;
- }
- return value;
- }
-
- @SubscribeEvent
- public void worldLoad(WorldEvent.Load event) {
- GameRules gameRule = event.world.getGameRules();
- if (createGameruleIfAbsent(gameRule, "pzKeepInventory", keepInventoryDefault)) {
- gameRule.setOrCreateGameRule("keepInventory", Boolean.toString(keepInventoryDefault));
- }
- createGameruleIfAbsent(gameRule, "dropInventory", dropInventoryDefault);
- createGameruleIfAbsent(gameRule, "dropHotbar", dropHotbarDefault);
- createGameruleIfAbsent(gameRule, "dropArmor", dropArmorDefault);
- createGameruleIfAbsent(gameRule, "dropXP", dropXPDefault);
- }
-
- private boolean createGameruleIfAbsent(GameRules gameRule, String gameruleName, boolean value) {
- boolean added = false;
- if (!gameRule.hasRule(gameruleName)) {
- gameRule.addGameRule(gameruleName, Boolean.toString(value));
- added = true;
- }
- ProjectZuluLog.info("Gamerule %s is set to %s", gameruleName, gameRule.getGameRuleBooleanValue(gameruleName));
- return added;
- }
-
- @SubscribeEvent
- public void onPlayerDeath(LivingDeathEvent event) {
- if (event.entity instanceof EntityPlayerMP) {
- GameRules gameRules = event.entity.worldObj.getGameRules();
- boolean dropInventory = gameRules.getGameRuleBooleanValue("dropInventory");
- boolean dropHotbar = gameRules.getGameRuleBooleanValue("dropHotbar");
- boolean dropArmor = gameRules.getGameRuleBooleanValue("dropArmor");
- boolean dropXP = gameRules.getGameRuleBooleanValue("dropXP");
-
- EntityPlayer player = (EntityPlayer) event.entity;
-
- TileEntityTombstone tombstone = tombstoneOnDeath ? placeTombstone(player) : null;
- if (tombstone != null) {
- tombstone.setSignString(event.source.func_151519_b((EntityPlayer) event.entity).toString());
- }
-
- if (!dropInventory && !dropHotbar && !dropArmor && !dropXP) {
- return;
- }
-
- player.captureDrops = true;
- player.capturedDrops.clear();
-
- /* Get items/XP to drop and clear them from Player */
- int xpDropped = 0;
- if (dropXP) {
- if (!player.worldObj.isRemote) {
- xpDropped = player.experienceTotal;
- xpDropped = xpDropped > maxDropXP ? maxDropXP : xpDropped;
- int keptXp = (player.experienceTotal - xpDropped) * percKeptXp / 100;
- redistributor.addExpereince(player, keptXp >= 0 ? keptXp : 0);
- player.experienceLevel = 0;
- player.experienceTotal = 0;
- player.experience = 0;
- }
- }
-
- List itemsToDrop = new ArrayList();
- if (dropArmor) {
- itemsToDrop.addAll(dropArmor(player));
- }
-
- if (dropInventory) {
- itemsToDrop.addAll(dropInventory(player));
- }
-
- if (dropHotbar) {
- itemsToDrop.addAll(dropHotbar(player));
- }
-
- dropItems(player, itemsToDrop);
- boolean isCancelled = false;
- if (doDropEvent) {
- PlayerDropsEvent dropEvent = createPlayerDropEvent(player, event.source, player.capturedDrops);
- isCancelled = MinecraftForge.EVENT_BUS.post(dropEvent);
- }
- player.captureDrops = false;
- if (!isCancelled) {
- /* Handler actually Dropping Items or Placing them in Tombstone */
- if (tombstoneAbsorbDrops && tombstone != null) {
- for (EntityItem entityItem : player.capturedDrops) {
- tombstone.addDrop(entityItem.getEntityItem());
- }
- tombstone.experience = xpDropped;
- } else {
- if (tombstoneAbsorbDrops) {
- ProjectZuluLog.warning("Tombstone could not be placed so items dropping normally.");
- }
- while (xpDropped > 0) {
- int j = EntityXPOrb.getXPSplit(xpDropped);
- xpDropped -= j;
- player.worldObj.spawnEntityInWorld(new EntityXPOrb(player.worldObj, player.posX, player.posY,
- player.posZ, j));
- }
- for (EntityItem item : player.capturedDrops) {
- player.joinEntityItemWithWorld(item);
- }
- }
- } else {
- ProjectZuluLog.warning("Player drop event was cancelled, so items will not be dropped per convention."
- + "Results may not desireable, consider disabling 'doDropEvent' in the config.");
- }
- }
- }
-
- private void dropItems(EntityPlayer player, List drops) {
- for (ItemStack itemDrop : drops) {
- player.inventory.player.dropPlayerItemWithRandomChoice(itemDrop, true);
- }
- }
-
- private PlayerDropsEvent createPlayerDropEvent(EntityPlayer player, DamageSource damageSource,
- ArrayList drops) {
- int recentlyHit;
- try {
- recentlyHit = ObfuscationHelper.getCatchableFieldFromReflection("field_70718_bc", EntityLivingBase.class,
- player, Integer.class);
- } catch (NoSuchFieldException e) {
- recentlyHit = ObfuscationHelper.getFieldFromReflection("recentlyHit", EntityLivingBase.class, player,
- Integer.class);
- }
- return new PlayerDropsEvent(player, damageSource, player.capturedDrops, recentlyHit > 0);
- }
-
- private TileEntityTombstone placeTombstone(EntityPlayer player) {
- Optional chunkCoordinate = findValidTombstoneLocation(player);
- if (chunkCoordinate.isPresent()) {
- /* Place a Tombstone */
- player.worldObj.setBlock(chunkCoordinate.get().posX, chunkCoordinate.get().posY,
- chunkCoordinate.get().posZ, BlockList.tombstone.get());
- TileEntity tileEntity = player.worldObj.getTileEntity(chunkCoordinate.get().posX,
- chunkCoordinate.get().posY, chunkCoordinate.get().posZ);
- StringBuilder sb = new StringBuilder();
- sb.append("A tombstone has been summoned to mark the 'passing' of ").append(player.getCommandSenderName()).append(" at [");
- sb.append(chunkCoordinate.get().posX).append(", ");
- sb.append(chunkCoordinate.get().posY).append(", ");
- sb.append(chunkCoordinate.get().posZ).append("]");
- player.addChatMessage(new ChatComponentText(sb.toString()));
- if (tileEntity != null && tileEntity instanceof TileEntityTombstone) {
- ProjectZuluLog.debug(Level.INFO, sb.toString());
- return (TileEntityTombstone) tileEntity;
- }
- }
- ProjectZuluLog.warning("Failed to find location to place tombstone at player location {X:%s, Y:%s, Z:%s}",
- player.posX, player.posY, player.posZ);
- return null;
- }
-
- private Optional findValidTombstoneLocation(EntityPlayer player) {
- final int maxRadius = 100;
- /** Search an increasing square box (only check edge) for a valid location */
- for (int radius = 0; radius < maxRadius; radius++) {
- List validLocations = new ArrayList();
- validLocations.addAll(searchXPlaneAt(-radius, radius, player));
- validLocations.addAll(searchXPlaneAt(radius, radius, player));
- validLocations.addAll(searchZPlaneAt(-radius, radius, player));
- validLocations.addAll(searchZPlaneAt(radius, radius, player));
- validLocations.addAll(searchYPlaneAt(-radius, radius, player));
- validLocations.addAll(searchYPlaneAt(radius, radius, player));
- ChunkCoordinates closestPoint = null;
- float bestDistance = 0;
- for (ChunkCoordinates chunkCoordinates : validLocations) {
- if (closestPoint != null) {
- float distance = chunkCoordinates.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- if (distance < bestDistance) {
- bestDistance = distance;
- closestPoint = chunkCoordinates;
- }
- } else {
- closestPoint = chunkCoordinates;
- bestDistance = closestPoint.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- }
- }
- if (closestPoint != null) {
- return Optional.of(closestPoint);
- }
- }
- return Optional.absent();
- }
-
- private List searchXPlaneAt(int xOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchZPlaneAt(int zOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchYPlaneAt(int yOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private boolean isLocationValid(EntityPlayer player, int posX, int posY, int posZ) {
- if (player.worldObj.isAirBlock(posX, posY, posZ) && player.worldObj.getBlock(posX, posY - 1, posZ).isOpaqueCube()) {
- return true;
- }
- return false;
- }
-
- private List dropArmor(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.armorInventory.length];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
-
- shuffleArray(placeArray, player.worldObj.rand);
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.armorInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((armorMaxDrop == 0 || countDrops < armorMaxDrop)
- && (armorDropChance - player.worldObj.rand.nextInt(100) >= 1)) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? armorDeathDamage + armorDropDamage : armorDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.armorInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.armorInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private List dropInventory(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- if (player.inventory.mainInventory.length > 8) {
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.mainInventory.length - 9];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i + 9;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((inventoryMaxDrop == 0 || countDrops < inventoryMaxDrop)
- && inventoryDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? inventoryDeathDamage + inventoryDropDamage : inventoryDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- }
- return itemsToDrop;
- }
-
- private List dropHotbar(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- int inventorySize = player.inventory.mainInventory.length > 9 ? 9 : player.inventory.mainInventory.length;
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[inventorySize];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((hotbarMaxDrop == 0 || countDrops < hotbarMaxDrop)
- && hotbarDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? hotbarDeathDamage + hotbarDropDamage : hotbarDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private void shuffleArray(int[] array, Random random) {
- for (int i = array.length - 1; i >= 0; i--) {
- int index = random.nextInt(i + 1);
- int a = array[index];
- array[index] = array[i];
- array[i] = a;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/216f8bf5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/216f8bf5c42100141fce95f06aba7e85
deleted file mode 100644
index d4339ec..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/216f8bf5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.common.config.Configuration;
-import com.ngb.projectzulu.common.api.CustomMobData;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.entitydeclaration.CreatureDeclaration;
-import com.ngb.projectzulu.common.mobs.entity.EntityFollower;
-import com.ngb.projectzulu.common.mobs.models.ModelFollower;
-import com.ngb.projectzulu.common.mobs.renders.RenderGenericLiving;
-import com.ngb.projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class FollowerDeclaration extends CreatureDeclaration {
-
- public FollowerDeclaration() {
- super("Follower", 41, EntityFollower.class, null);
- setRegistrationProperties(128, 3, true);
- }
-
- @Override
- public void loadCreaturesFromConfig(Configuration config) {
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericLiving(new ModelFollower(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "serpent.png"));
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/30dc7effc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/30dc7effc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 534f64b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/30dc7effc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.ngb.projectzulu.common.world2.randomizer;
-
-import java.util.Random;
-
-import projectzulu.common.world2.MazeCell;
-
-import net.minecraft.world.World;
-
-public class EdgeRandomizer extends Randomizer {
- Random random;
- int edgeDepth;
-
- public EdgeRandomizer(World world, int edgeDepth) {
- this.random = world.rand;
- this.edgeDepth = edgeDepth;
- }
-
- @Override
- public void randomize(MazeCell[][] cells) {
- /* Mark Outer Cells As Walls (X axis) */
- for (int i = 0; i < cells.length; i++) {
- for (int k = 0; k < edgeDepth; k++) {
- cells[i][k].rawState = 1;
- }
- for (int k = cells[0].length - 1; k > cells[0].length - 1 - edgeDepth; k--) {
- cells[i][k].rawState = 1;
- }
- }
-
- /* Mark Outer Cells As Walls (Z axis) */
- for (int k = 0; k < cells[0].length; k++) {
- for (int i = 0; i < edgeDepth; i++) {
- cells[i][k].rawState = 1;
- }
-
- for (int i = cells.length - 1; i > cells.length - 1 - edgeDepth; i--) {
- cells[i][k].rawState = 1;
- }
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/51206be4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/51206be4c42100141fce95f06aba7e85
deleted file mode 100644
index 7a0443a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/51206be4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,15 +0,0 @@
-package projectzulu.common.blocks;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemReed;
-import projectzulu.common.ProjectZulu_Core;
-
-public class ItemUniversalFlowerPot extends ItemReed {
-
- public ItemUniversalFlowerPot(Block block) {
- super(block);
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setUnlocalizedName(block.getUnlocalizedName());
- setTextureName("flower_pot");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/60ea1b01c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/60ea1b01c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index faaed09..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/60ea1b01c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.CustomMobData;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ConfigHelper;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ItemGenerics;
-import projectzulu.common.core.entitydeclaration.EntityProperties;
-import projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import projectzulu.common.mobs.entity.EntityFrog;
-import projectzulu.common.mobs.models.ModelFrog;
-import projectzulu.common.mobs.renders.RenderGenericLiving;
-import projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class FrogDeclaration extends SpawnableDeclaration {
-
- public FrogDeclaration() {
- super("Frog", 13, EntityFrog.class, EnumCreatureType.creature);
- setSpawnProperties(10, 100, 1, 3);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 1);
-
- eggColor1 = (95 << 16) + (186 << 8) + 50;
- eggColor2 = (105 << 16) + (203 << 8) + 67;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.Gill.meta(), 4);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.FrogLegs.meta(), 4);
- customMobData.entityProperties = new EntityProperties(10f, 2.0f, 0.3f, 100f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericLiving(new ModelFrog(), 0.5f, new ResourceLocation(DefaultProps.mobKey, "frog.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.swampland.biomeName);
- defaultBiomesToSpawn.add("Green Swamplands");
- defaultBiomesToSpawn.add("Marsh");
- defaultBiomesToSpawn.addAll(typeToArray(Type.SWAMP));
- return defaultBiomesToSpawn;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/705a993d129d001411accd8c5614e9d3 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/705a993d129d001411accd8c5614e9d3
deleted file mode 100644
index 9716af8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/705a993d129d001411accd8c5614e9d3
+++ /dev/null
@@ -1,949 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entity;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.util.EnumSet;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.ai.EntityAILookIdle;
-import net.minecraft.entity.ai.EntityAISwimming;
-import net.minecraft.entity.ai.EntityAIWatchClosest;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.AnimalChest;
-import net.minecraft.inventory.IInvBasic;
-import net.minecraft.inventory.InventoryBasic;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.living.EnderTeleportEvent;
-
-import com.stek101.projectzulu.common.ProjectZulu_Core;
-import com.stek101.projectzulu.common.api.CustomEntityList;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.core.packets.PZPacketTameParticle;
-import com.stek101.projectzulu.common.mobs.EntityAFightorFlight;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIFollowParent;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIMate;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIPanic;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAITempt;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIWander;
-
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-
-public class EntityCamel extends EntityGenericAnimal implements IInvBasic {
-
- private EntityAFightorFlight EAFF;
- private CustomEntityList entityEntry;
- private float aggroLevel;
- private double aggroRange;
- public boolean camelSaddled;
- public AnimalChest camelChest;
- private static final int[] armorValues = new int[] {0, 5, 7, 11};
- private boolean animalChested;
- protected float jumpPower = 0.0f;
- protected boolean mountJumping;
- public boolean mountJump = false;
- private World parWorld;
- private int field_110285_bP;
-
- public EntityCamel(World par1World) {
- super(par1World);
- setSize(1.6f, 1.8f);
- //animalChested = true;
- this.setChested(false);
- this.setSaddled(false);
- this.camelSaddled = false;
- this.parWorld = par1World;
- this.setPosition(this.posX, this.posY, this.posZ);
- this.entityEntry = CustomEntityList.getByName(EntityList.getEntityString(this));
-
- /* Check if aggroLevel and aggroRange have valid values to activate AFoF */
- if (entityEntry != null && entityEntry.modData.get().entityProperties != null) {
- this.aggroLevel = entityEntry.modData.get().entityProperties.aggroLevel;
- this.aggroRange = entityEntry.modData.get().entityProperties.aggroRange;
- }
-
- if (Math.round(this.aggroRange) != 0) {
- EAFF = new EntityAFightorFlight().setEntity(this, worldObj, this.aggroLevel, this.aggroRange);
- }
-
- getNavigator().setAvoidsWater(true);
- tasks.addTask(0, new EntityAISwimming(this));
- tasks.addTask(1, new EntityAIPanic(this, 1.0f));
- tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0f, false));
- tasks.addTask(3, new EntityAILookIdle(this));
- tasks.addTask(5, new EntityAIMate(this, 0.8f));
- tasks.addTask(6, new EntityAITempt(this, 0.9f, Items.water_bucket, false));
- tasks.addTask(7, new EntityAIFollowParent(this, 0.9f));
- tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
- tasks.addTask(9, new EntityAIWander(this, 0.8f, 120));
-
- targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, false));
- targetTasks.addTask(2,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
- this.createCamelChest();
- }
-
- @Override
- protected void entityInit()
- {
- super.entityInit();
- this.dataWatcher.addObject(22, Integer.valueOf(0)); //mount armor
- this.dataWatcher.addObject(26, Integer.valueOf(0)); //chested aka saddle bags
- }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (Math.round(this.aggroRange) != 0) {
- EAFF.updateEntityAFF(worldObj, Items.water_bucket);
- }
- }
-
- /**
- * Returns the sound this mob makes while it's alive.
- */
- @Override
- protected String getLivingSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "camellivingsound";
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "camelhurtsound";
- }
-
- @Override
- public int getTalkInterval() {
- return 160;
- }
-
- @Override
- public boolean isValidBreedingItem(ItemStack itemStack) {
- if (itemStack != null && itemStack.getItem() == Item.getItemFromBlock(Blocks.leaves)) {
- this.setAngerLevel(0);
- this.setFleeTick(0);
- return true;
-
- } else {
- return super.isValidBreedingItem(itemStack);
- }
- }
-
- @Override
- public boolean isValidTamingItem(ItemStack itemStack) {
- if (itemStack == null) {
- return false;
- }
-
- if (itemStack.getItem() == Items.water_bucket) {
- return true;
- }
- return super.isValidTamingItem(itemStack);
- }
-
- @Override
- public boolean isRideable() {
- return true;
- }
-
- private void createCamelChest()
- {
- AnimalChest animalchest = this.camelChest;
- this.camelChest = new AnimalChest("CamelChest", 17);
- this.camelChest.func_110133_a(this.getCommandSenderName());
-
- if (animalchest != null)
- {
- animalchest.func_110132_b((IInvBasic) this);
- int i = Math.min(animalchest.getSizeInventory(), this.camelChest.getSizeInventory());
-
- for (int j = 0; j < i; ++j)
- {
- ItemStack itemstack = animalchest.getStackInSlot(j);
-
- if (itemstack != null)
- {
- this.camelChest.setInventorySlotContents(j, itemstack.copy());
- }
- }
- animalchest = null;
- }
-
- this.camelChest.func_110134_a((IInvBasic) this);
- }
-
- public void func_146086_d(ItemStack p_146086_1_)
- {
- this.dataWatcher.updateObject(22, Integer.valueOf(this.getCamelArmorIndex(p_146086_1_)));
- //this.func_110230_cF();
- }
-
- /**
- * 0 = iron, 1 = gold, 2 = diamond
- */
- private int getCamelArmorIndex(ItemStack p_110260_1_)
- {
- if (p_110260_1_ == null)
- {
- return 0;
- }
- else
- {
- Item item = p_110260_1_.getItem();
- return item == Items.iron_horse_armor ? 1 : (item == Items.golden_horse_armor ? 2 : (item == Items.diamond_horse_armor ? 3 : 0));
- }
- }
-
- public void setCamelSaddled(boolean p_110251_1_)
- {
- //this.setHorseWatchableBoolean(4, p_110251_1_);
- this.setSaddled(true);
- }
-
- /**
- * Called by InventoryBasic.onInventoryChanged() on a array that is never filled.
- */
- @Override
- public void onInventoryChanged(InventoryBasic p_76316_1_)
- {
- int i = this.getMountArmorValue();
- boolean flag = this.isCamelSaddled();
- //this.func_110232_cE();
-
- if (this.ticksExisted > 20)
- {
- if (!(p_76316_1_.getStackInSlot(0) == null)) {
- if (p_76316_1_.getStackInSlot(0).getItem() ==Items.saddle){
- this.setSaddled(true);
- this.playSound("mob.horse.leather", 0.5F, 1.0F);
- }
- }else
- {
- this.setSaddled(false);
- }
-
- if (i == 0 && i != this.getMountArmorValue())
- {
- this.playSound("mob.horse.armor", 0.5F, 1.0F);
- }
- else if (i != this.getMountArmorValue())
- {
- this.playSound("mob.horse.armor", 0.5F, 1.0F);
- }
- }
- }
-
- public boolean isCamelSaddled()
- {
- return this.getSaddled();
- }
-
-/* public boolean isChested()
- {
- return this.animalChested;
- }*/
-
- public int getMountArmorValue()
- {
- return this.dataWatcher.getWatchableObjectInt(22);
- }
-
-
-/* public EntityGenericAgeable createChild(EntityGenericAgeable p_90011_1_) {
- //EntityCamel entity = (EntityCamel)p_90011_1_;
- EntityCamel entityCamel1 = new EntityCamel(this.worldObj);
- return entityCamel1;
- //return null;
- }*/
-
- /**
- * Called when the entity is attacked.
- */
- @Override
- public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
- {
- Entity entity = p_70097_1_.getEntity();
- return this.riddenByEntity != null && this.riddenByEntity.equals(entity) ? false : super.attackEntityFrom(p_70097_1_, p_70097_2_);
- }
-
- /**
- * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
- */
- @Override
- public int getTotalArmorValue()
- {
- //return armorValues[this.getMountArmorValue()];
- return 2;
- }
-
- public void dropChests()
- {
- if (!this.worldObj.isRemote && this.isChested())
- {
- this.dropItem(Item.getItemFromBlock(Blocks.chest), 1);
- this.setChested(false);
- }
- }
-
- /* public void setChested(boolean p_110207_1_)
- {
- this.animalChested = p_110207_1_;
- }*/
-
- @Override
- public boolean shouldNotifySimilar(EntityPlayer attackingPlayer) {
- return true;
- }
-
- /**
- * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
- */
- @Override
- public boolean interact(EntityPlayer p_70085_1_)
- {
- ItemStack itemstack = p_70085_1_.inventory.getCurrentItem();
-
- if(this.isTamed()){
- if (itemstack != null && itemstack.getItem() == Items.spawn_egg)
- {
- return super.interact(p_70085_1_);
- }
-
- else
- if (this.isAdultCamel() && p_70085_1_.isSneaking())
- {
- this.openGUI(p_70085_1_);
- return true;
- }
- else if (this.isAdultCamel() && this.riddenByEntity != null)
- {
- return super.interact(p_70085_1_);
- }
- else if (itemstack != null && this.isValidBreedingItem(itemstack))
- {
- return super.interact(p_70085_1_);
- }
- else
- {
- if (itemstack != null)
- {
- boolean flag = false;
-
- // if (this.func_110259_cr())
- // {
- byte b0 = -1;
-
- if (itemstack.getItem() == Items.stick)
- {
- b0 = 1;
- }
-
- /* if (itemstack.getItem() == Items.iron_horse_armor)
- {
- b0 = 1;
- }
- else if (itemstack.getItem() == Items.golden_horse_armor)
- {
- b0 = 2;
- }
- else if (itemstack.getItem() == Items.diamond_horse_armor)
- {
- b0 = 3;
- }*/
-
- if (b0 >= 0)
- {
- this.openGUI(p_70085_1_);
- return true;
- }
- // }
-
- if (!flag )
- {
- float f = 0.0F;
- short short1 = 0;
- byte b1 = 0;
-
- if (itemstack.getItem() == Items.wheat)
- {
- f = 2.0F;
- short1 = 60;
- b1 = 3;
- }
- else if (itemstack.getItem() == Items.sugar)
- {
- f = 1.0F;
- short1 = 30;
- b1 = 3;
- }
- else if (itemstack.getItem() == Items.bread)
- {
- f = 7.0F;
- short1 = 180;
- b1 = 3;
- }
- else if (Block.getBlockFromItem(itemstack.getItem()) == Blocks.hay_block)
- {
- f = 20.0F;
- short1 = 180;
- }
- else if (itemstack.getItem() == Items.apple)
- {
- f = 3.0F;
- short1 = 60;
- b1 = 3;
- }
- else if (itemstack.getItem() == Items.golden_carrot)
- {
- f = 4.0F;
- short1 = 60;
- b1 = 5;
-
- if (this.isTamed() && this.getGrowingAge() == 0)
- {
- flag = true;
- //this.func_146082_f(p_70085_1_);
- }
- }
- else if (itemstack.getItem() == Items.golden_apple) {
-
- f = 10.0F;
- short1 = 240;
- b1 = 10;
-
- if (this.isTamed() && this.getGrowingAge() == 0)
- {
- flag = true;
- //this.func_146082_f(p_70085_1_);
- }
- }
-
- if (this.getHealth() < this.getMaxHealth() && f > 0.0F)
- {
- this.heal(f);
- flag = true;
- }
-
- /*if (!this.isAdultHorse() && short1 > 0)
- {
- this.addGrowth(short1);
- flag = true;
- }*/
-
- /*if (b1 > 0 && (flag || !this.isTamed()))
- {
- flag = true;
- this.increaseTemper(b1);
- }*/
-
- if (flag)
- {
- this.worldObj.playSoundAtEntity(this, "eating", 1.0F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
- }
- }
-
- if (!flag && !this.isChested() && itemstack.getItem() == Item.getItemFromBlock(Blocks.chest))
- {
- this.setChested(true);
- this.playSound("mob.chickenplop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
- flag = true;
- this.createCamelChest();
- }
-
- if (!flag && this.func_110253_bW() && !this.isCamelSaddled() && itemstack.getItem() == Items.saddle)
- {
- this.openGUI(p_70085_1_);
- return true;
- }
-
- if (flag)
- {
- if (!p_70085_1_.capabilities.isCreativeMode && --itemstack.stackSize == 0)
- {
- p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack)null);
- }
-
- return true;
- }
- }
-
- if (this.func_110253_bW() && this.riddenByEntity == null)
- {
- if (itemstack != null && itemstack.interactWithEntity(p_70085_1_, this))
- {
- return true;
- }
- else
- {
- this.func_110237_h(p_70085_1_);
- return true;
- }
- }
- else
- {
- return super.interact(p_70085_1_);
- }
- }
- }
- else if (itemstack != null && itemstack.getItem() == Items.saddle )
- {
- return false;
- }
- else if (itemstack != null && itemstack.getItem() == Item.getItemFromBlock(Blocks.chest))
- {
- return false;
- }
- else if(itemstack != null && this.isValidTamingItem(itemstack)) {
- if (!p_70085_1_.capabilities.isCreativeMode){
- p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem,
- new ItemStack(Items.bucket));
- }
-
- if (itemstack.stackSize <= 0){
- p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack)null);
- }
-
- if(!worldObj.isRemote){
- boolean tameEffectSuccess = false;
-
- if(rand.nextInt(3) == 0){
- this.setTamed(true);
- this.setAttackTarget((EntityLiving)null);
- this.setHealth(getMaxHealth());
- this.setOwner(p_70085_1_.getCommandSenderName());
- setEntityTamed(getDefaultEntityName());
- tameEffectSuccess = true;
- }
-
- /* Send Tame Effect Packet */
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- DataOutputStream data = new DataOutputStream(bytes);
- /* Write PacketID into Packet */
- try {
- data.writeInt(5);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- /* Write Temperature Into Packet */
- try {
- data.writeInt(getEntityId());
- data.writeBoolean(tameEffectSuccess);
- } catch (Exception e) {
- e.printStackTrace();
- }
- PZPacketTameParticle message = new PZPacketTameParticle().setPacketData(getEntityId(), tameEffectSuccess);
- ProjectZulu_Core.packetHandler.sendToAllAround(message, new TargetPoint(dimension, posX, posY, posZ, 10));
- }
- return true;
- }
- if(super.interact(p_70085_1_)){
- return true;
- }
-
- return false;
- }
-
- public boolean isAdultCamel()
- {
- return !this.isChild();
- }
-
- public void openGUI(EntityPlayer player)
- {
- if (!this.worldObj.isRemote && (this.riddenByEntity == null || this.riddenByEntity == player) && this.isTamed())
- {
- this.camelChest.func_110133_a(this.getCommandSenderName());
- if (player.inventory == null){
- }
-
- if (this.camelChest == null) {
- }
- player.openGui(ProjectZulu_Core.modInstance, 5, player.worldObj, this.getEntityId(), 0, 0);
- }
- }
-
- /**
- * Gets the name of this command sender (usually username, but possibly "Rcon")
- */
- public String getCommandSenderName()
- {
- //if (this.hasCustomNameTag())
- //{
- return this.getCustomNameTag();
- //}
-
- }
-
- public boolean func_110253_bW()
- {
- return this.isAdultCamel();
- }
-
- private void func_110237_h(EntityPlayer p_110237_1_)
- {
- p_110237_1_.rotationYaw = this.rotationYaw;
- p_110237_1_.rotationPitch = this.rotationPitch;
-
- if (!this.worldObj.isRemote)
- {
- p_110237_1_.mountEntity(this);
- }
- }
-
- public static boolean func_146085_a(Item p_146085_0_)
- {
- return p_146085_0_ == Items.iron_horse_armor || p_146085_0_ == Items.golden_horse_armor || p_146085_0_ == Items.diamond_horse_armor;
- }
-
- /**
- * (abstract) Protected helper method to write subclass entity data to NBT.
- */
- @Override
- public void writeEntityToNBT(NBTTagCompound p_70014_1_)
- {
- super.writeEntityToNBT(p_70014_1_);
- p_70014_1_.setBoolean("ChestedCamel", this.isChested());
-
- if (this.isChested())
- {
- NBTTagList nbttaglist = new NBTTagList();
-
- for (int i = 2; i < this.camelChest.getSizeInventory(); ++i)
- {
- ItemStack itemstack = this.camelChest.getStackInSlot(i);
-
- if (itemstack != null)
- {
- NBTTagCompound nbttagcompound1 = new NBTTagCompound();
- nbttagcompound1.setByte("Slot", (byte)i);
- itemstack.writeToNBT(nbttagcompound1);
- nbttaglist.appendTag(nbttagcompound1);
- }
- }
-
- p_70014_1_.setTag("Items", nbttaglist);
- }
-
- if (this.camelChest.getStackInSlot(1) != null)
- {
- p_70014_1_.setTag("ArmorItem", this.camelChest.getStackInSlot(1).writeToNBT(new NBTTagCompound()));
- }
-
- if (this.camelChest.getStackInSlot(0) != null)
- {
- p_70014_1_.setTag("SaddleItem", this.camelChest.getStackInSlot(0).writeToNBT(new NBTTagCompound()));
- }
- }
-
- /**
- * (abstract) Protected helper method to read subclass entity data from NBT.
- */
- @Override
- public void readEntityFromNBT(NBTTagCompound p_70037_1_)
- {
- super.readEntityFromNBT(p_70037_1_);
- this.setChested(p_70037_1_.getBoolean("ChestedCamel"));
-
- if (this.isChested())
- {
- NBTTagList nbttaglist = p_70037_1_.getTagList("Items", 10);
- this.createCamelChest();
-
- for (int i = 0; i < nbttaglist.tagCount(); ++i)
- {
- NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
- int j = nbttagcompound1.getByte("Slot") & 255;
-
- if (j >= 2 && j < this.camelChest.getSizeInventory())
- {
- this.camelChest.setInventorySlotContents(j, ItemStack.loadItemStackFromNBT(nbttagcompound1));
- }
- }
- }
-
- ItemStack itemstack;
-
- /* if (p_70037_1_.hasKey("ArmorItem", 10))
- {
- itemstack = ItemStack.loadItemStackFromNBT(p_70037_1_.getCompoundTag("ArmorItem"));
-
- if (itemstack != null && func_146085_a(itemstack.getItem()))
- {
- this.camelChest.setInventorySlotContents(1, itemstack);
- }
- }*/
-
- if (p_70037_1_.hasKey("SaddleItem", 10))
- {
- itemstack = ItemStack.loadItemStackFromNBT(p_70037_1_.getCompoundTag("SaddleItem"));
-
- if (itemstack != null && itemstack.getItem() == Items.saddle)
- {
- this.camelChest.setInventorySlotContents(0, itemstack);
- }
- }
- else if (p_70037_1_.getBoolean("Saddle"))
- {
- this.camelChest.setInventorySlotContents(0, new ItemStack(Items.saddle));
- }
- }
-
- /**
- * Moves the entity based on the specified heading. Args: strafe, forward
- */
- @Override
- public void moveEntityWithHeading(float moveStrafe, float moveForward)
- {
-
- if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityLivingBase
- && this.getSaddled())
- {
- // Apply Rider Movement:
- EntityLivingBase rider = (EntityLivingBase)this.riddenByEntity;
-
- this.prevRotationYaw = this.rotationYaw = rider.rotationYaw;
- this.rotationPitch = rider.rotationPitch * 0.5F;
- this.setRotation(this.rotationYaw, this.rotationPitch);
- this.rotationYawHead = this.renderYawOffset = this.rotationYaw;
- moveStrafe = ((EntityLivingBase)rider).moveStrafing * 0.5F;
- moveForward = ((EntityLivingBase)rider).moveForward;
-
- // Jumping Controls:
- if(!this.isMountJumping() && this.onGround) {
- if(this.riddenByEntity instanceof EntityPlayer) {
- EntityPlayer player = (EntityPlayer)this.riddenByEntity;
- //ExtendedPlayer playerExt = ExtendedPlayer.getForPlayer(player);
- if(this.mountJump)
- this.startJumping();
- }
- }
-
- // Jumping Behaviour:
- if(this.getJumpPower() > 0.0F && !this.isMountJumping() && this.onGround) {
- this.motionY = this.getMountJumpHeight() * (double)this.getJumpPower();
- if(this.isPotionActive(Potion.jump))
- this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
- this.setMountJumping(true);
- this.isAirBorne = true;
- if(moveForward > 0.0F) {
- float f2 = MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F);
- float f3 = MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F);
- this.motionX += (double)(-0.4F * f2 * this.jumpPower);
- this.motionZ += (double)(0.4F * f3 * this.jumpPower);
- }
- if(!this.worldObj.isRemote)
- this.playSound("mob.horse.jump", 0.4F, 1.0F);
- this.setJumpPower(0);
- }
- //this.jumpMovementFactor = (float)(this.getAIMoveSpeed() * this.getGlideScale());
- this.stepHeight = 1.0F;
- this.jumpMovementFactor = this.getAIMoveSpeed() * 0.1F;
-
- // Apply Movement:
- if(!this.worldObj.isRemote) {
- this.setAIMoveSpeed((float)this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue());
- super.moveEntityWithHeading(moveStrafe, moveForward);
- }
-
- // Clear Jumping:
- if(this.onGround) {
- this.setJumpPower(0);
- this.setMountJumping(false);
- this.mountJump = false;
- }
-
- // Animate Limbs:
- this.prevLimbSwingAmount = this.limbSwingAmount;
- double d0 = this.posX - this.prevPosX;
- double d1 = this.posZ - this.prevPosZ;
- float f4 = MathHelper.sqrt_double(d0 * d0 + d1 * d1) * 4.0F;
- if (f4 > 1.0F)
- f4 = 1.0F;
- this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F;
- this.limbSwing += this.limbSwingAmount;
- }
- else
- {
- this.stepHeight = 0.5F;
- this.jumpMovementFactor = 0.02F;
- super.moveEntityWithHeading(moveStrafe, moveForward);
- }
- }
-
- /**
- * returns true if all the conditions for steering the entity are met. For pigs, this is true if it is being ridden
- * by a player and the player is holding a carrot-on-a-stick
- */
- @Override
- public boolean canBeSteered()
- {
- return false;
- }
-
- /**
- * Called when the mob's health reaches 0.
- */
- @Override
- public void onDeath(DamageSource p_70645_1_)
- {
- super.onDeath(p_70645_1_);
-
- if (!this.worldObj.isRemote)
- {
- this.dropChestItems();
- }
- }
-
- public void dropChestItems()
- {
- this.dropItemsInChest(this, this.camelChest);
- this.dropChests();
- }
-
- private void dropItemsInChest(Entity p_110240_1_, AnimalChest p_110240_2_)
- {
- if (p_110240_2_ != null && !this.worldObj.isRemote)
- {
- for (int i = 0; i < p_110240_2_.getSizeInventory(); ++i)
- {
- ItemStack itemstack = p_110240_2_.getStackInSlot(i);
-
- if (itemstack != null)
- {
- this.entityDropItem(itemstack, 0.0F);
- }
- }
- }
- }
-
- /**
- * Returns true if this entity should push and be pushed by other entities when colliding.
- */
- @Override
- public boolean canBePushed()
- {
- return this.riddenByEntity == null;
- }
-
- @Override
- public double getMountedYOffset() {
- return 2.6f;
- }
-
- // ========== Jumping Start ==========
- public void startJumping() {
- this.setJumpPower();
- }
-
- // ========== Jump Power ==========
- public void setJumpPower(int power) {
- if(power < 0)
- power = 0;
- if(power > 99)
- power = 99;
- if(power < 90)
- this.jumpPower = 1.0F * ((float)power / 89.0F);
- else
- this.jumpPower = 1.0F + (1.0F * ((float)(power - 89) / 10.0F));
- }
-
- public void setJumpPower() {
- this.setJumpPower(89);
- }
-
- public float getJumpPower() {
- return this.jumpPower;
- }
-
- // ========== Gliding ==========
- public double getGlideScale() {
- return 0.1F;
- }
-
- // ========== Jumping ==========
- public double getMountJumpHeight() {
- return 0.5D;
- }
-
- public boolean isMountJumping() {
- return this.mountJumping;
- }
-
- public void setMountJumping(boolean set) {
- this.mountJumping = set;
- }
-
- public void setMountJump(){
- this.mountJump = true;
- }
-
- private boolean getCamelWatchableBoolean(int p_110233_1_)
- {
- return (this.dataWatcher.getWatchableObjectInt(26) & p_110233_1_) != 0;
- }
-
- private void setCamelWatchableBoolean(int p_110208_1_, boolean p_110208_2_)
- {
- int j = this.dataWatcher.getWatchableObjectInt(26);
-
- if (p_110208_2_)
- {
- this.dataWatcher.updateObject(26, Integer.valueOf(j | p_110208_1_));
- }
- else
- {
- this.dataWatcher.updateObject(26, Integer.valueOf(j & ~p_110208_1_));
- }
- }
-
- public boolean isChested()
- {
- return this.getCamelWatchableBoolean(8);
- }
-
- public void setChested(boolean p_110207_1_)
- {
- this.setCamelWatchableBoolean(8, p_110207_1_);
- }
-
- public void riderDismount(){
- if (!this.worldObj.isRemote)
- {
- if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayerMP)
- {
- EntityPlayerMP entityplayermp = (EntityPlayerMP)this.riddenByEntity;
- entityplayermp.setPositionAndUpdate(this.posX + 0.3D, this.posY, this.posZ);
-
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/7147a1a2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/7147a1a2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index b025cfc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/7147a1a2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,54 +0,0 @@
-package projectzulu.common.world2.blueprints.oasis;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.WeightedRandom;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.blueprint.Blueprint;
-
-public class BPOasisGrass implements Blueprint {
-
- BlockWithMeta sandstone = new BlockWithMeta(Blocks.sandstone);
- BlockWithMeta sand = new BlockWithMeta(Blocks.sand);
- BlockWithMeta grass = new BlockWithMeta(Blocks.grass);
- BlockWithMeta air = new BlockWithMeta(Blocks.air);
- List flowers = new ArrayList();
-
- public BPOasisGrass() {
- flowers.add(new BlockWithMeta(Blocks.red_flower, 0, 1));
- flowers.add(new BlockWithMeta(Blocks.yellow_flower, 0, 1));
- flowers.add(new BlockWithMeta(Blocks.tallgrass, 1, 20));
- flowers.add(new BlockWithMeta(Blocks.air, 0, 4));
- }
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- if (piecePos.posY == 0) {
- return sandstone;
- } else if (piecePos.posY == 1) {
- return sand;
- } else if (piecePos.posY == 2) {
- return grass;
- } else if (piecePos.posY == 3) {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, flowers);
- }
- return air;
- }
-
- @Override
- public int getWeight() {
- return 100;
- }
-
- @Override
- public String getIdentifier() {
- return "OasisGrass";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/803c51ffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/803c51ffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 8c7e4d0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/803c51ffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.ngb.projectzulu.common.world2.blueprint;
-
-import java.util.Random;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.tileentity.TileEntityChest;
-import net.minecraft.util.ChunkCoordinates;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world.dataobjects.ChestWithMeta;
-import projectzulu.common.world.dataobjects.MimicWithMeta;
-import projectzulu.common.world.terrain.LabyrinthFeature;
-
-public class BlueprintDeadEndChest implements Blueprint {
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- if ((piecePos.posY == 0 || piecePos.posY == cellHeight - 1)) {
- return new BlockWithMeta(Blocks.stonebrick, 0);
- }
-
- if (piecePos.posY == 1) {
- if (random.nextInt(8) == 0) {
- LabyrinthFeature feature = (LabyrinthFeature) ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(LabyrinthFeature.LABYRINTH);
- return new ChestWithMeta(Blocks.chest, 0, new TileEntityChest(), feature.chestLootChance,
- feature.chestMaxLoot);
- } else if (random.nextInt(8) == 1) {
- return new MimicWithMeta();
- }
- }
-
- return new BlockWithMeta(Blocks.air);
- }
-
- @Override
- public int getWeight() {
- return 1;
- }
-
- @Override
- public String getIdentifier() {
- return "deadend";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/810aa09ec52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/810aa09ec52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 4cdeb40..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/810aa09ec52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,36 +0,0 @@
-package projectzulu.common.dungeon.spawner.tag.keys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.world.World;
-import projectzulu.common.dungeon.spawner.tag.OptionalParser;
-import projectzulu.common.dungeon.spawner.tag.TypeValuePair;
-import projectzulu.common.dungeon.spawner.tag.settings.OptionalSettings.Operand;
-
-public class KeyParserSpawnRange extends KeyParserBase {
-
- public KeyParserSpawnRange(Key key) {
- super(key, false, KeyType.VALUE);
- }
-
- @Override
- public boolean parseChainable(String parseable, ArrayList parsedChainable,
- ArrayList operandvalue) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean parseValue(String parseable, HashMap valueCache) {
- String[] pieces = parseable.split(",");
- OptionalParser.parseSpawnRange(pieces, valueCache);
- return true;
- }
-
- @Override
- public boolean isValidLocation(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord,
- TypeValuePair typeValuePair, HashMap valueCache) {
- throw new UnsupportedOperationException();
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/909f78f4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/909f78f4c42100141fce95f06aba7e85
deleted file mode 100644
index 38690ba..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/909f78f4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.ngb.projectzulu.common.world2.blueprint;
-
-import java.util.Random;
-
-import net.minecraft.entity.EntityList;
-import net.minecraft.init.Blocks;
-import net.minecraft.tileentity.TileEntityChest;
-import net.minecraft.util.ChunkCoordinates;
-import com.ngb.projectzulu.common.ProjectZulu_Core;
-import com.ngb.projectzulu.common.core.ProjectZuluLog;
-import com.ngb.projectzulu.common.world.CellIndexDirection;
-import com.ngb.projectzulu.common.world.dataobjects.BlockWithMeta;
-import com.ngb.projectzulu.common.world.dataobjects.ChestWithMeta;
-import com.ngb.projectzulu.common.world.dataobjects.MobSpawnerWithMeta;
-import com.ngb.projectzulu.common.world.terrain.LabyrinthFeature;
-
-public class BlueprintLabyrinthHiddenWall implements Blueprint {
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- if ((piecePos.posY == 0 || piecePos.posY == cellHeight - 1)) {
- return new BlockWithMeta(Blocks.stonebrick, 0);
- }
-
- if (piecePos.posX == cellSize / 2 && piecePos.posZ == cellSize / 2) {
- if (piecePos.posY == 1) {
- LabyrinthFeature feature = (LabyrinthFeature) ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(LabyrinthFeature.LABYRINTH);
- String entityName = feature.getEntityEntry(random);
- if (EntityList.stringToClassMapping.containsKey(entityName)) {
- return new MobSpawnerWithMeta(entityName);
- } else {
- if (!entityName.equalsIgnoreCase("EMPTY")) {
- ProjectZuluLog.severe("Entity with name %s does not seem to exist.", entityName);
- }
- return new BlockWithMeta(Blocks.stonebrick, 2);
- }
- } else if (piecePos.posY == 2) {
- LabyrinthFeature feature = (LabyrinthFeature) ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(LabyrinthFeature.LABYRINTH);
- return new ChestWithMeta(Blocks.chest, 0, new TileEntityChest(), feature.chestLootChance,
- feature.chestMaxLoot);
- } else {
- return new BlockWithMeta(Blocks.air);
- }
- }
-
- if (piecePos.posX == 0 || piecePos.posX == cellSize - 1 || piecePos.posZ == 0 || piecePos.posZ == cellSize - 1) {
- return new BlockWithMeta(Blocks.stonebrick, 2);
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- @Override
- public int getWeight() {
- return 1;
- }
-
- @Override
- public String getIdentifier() {
- return "labyrinthhiddenwall";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/919f47ffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/919f47ffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index aa12d36..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/919f47ffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.ngb.projectzulu.common.world2.architect;
-
-import java.awt.Point;
-import java.util.Random;
-
-import net.minecraft.world.World;
-import projectzulu.common.world2.Direction;
-import projectzulu.common.world2.MazeCell;
-
-public abstract class ArchitectBase implements Architect {
- protected BlueprintSetStockpile stockpile;
- protected Random random;
-
- public ArchitectBase(World world) {
- this.random = world.rand;
- stockpile = new BlueprintSetStockpile(world.rand);
- }
-
- /**
- * Checks if the selected cell has walls in 3 cardinal directions
- */
- public static Boolean isDeadEnd(MazeCell[][] allCells, Point buildCoords, int... rawState) {
- int wallsNearby = 0;
-
- for (Direction direction : Direction.getCardinals()) {
- int neighbourX = buildCoords.x + direction.x;
- int neighbourZ = buildCoords.y + direction.z;
- if (ArchitectBase.isCellOutOfBounds(allCells, neighbourX, neighbourZ)) {
- continue;
- }
- for (int state : rawState) {
- if (allCells[neighbourX][neighbourZ].rawState == state) {
- wallsNearby++;
- break;
- }
- }
- }
- return wallsNearby == 3 ? true : false;
- }
-
- /**
- * Checks if the selected cell is touching a valid number of valid cells
- */
- public static Boolean isTouchingAmount(MazeCell[][] allCells, Point buildCoords, int minTouching, int maxTouching,
- boolean countEdges, int... rawState) {
- int wallsNearby = 0;
-
- for (Direction direction : Direction.getCardinals()) {
- int neighbourX = buildCoords.x + direction.x;
- int neighbourZ = buildCoords.y + direction.z;
- if (ArchitectBase.isCellOutOfBounds(allCells, neighbourX, neighbourZ)) {
- if (countEdges) {
- wallsNearby++;
- }
- continue;
- }
- for (int state : rawState) {
- if (allCells[neighbourX][neighbourZ].rawState == state) {
- wallsNearby++;
- break;
- }
- }
- }
- return wallsNearby >= minTouching && wallsNearby <= maxTouching ? true : false;
- }
-
- /**
- * Evaluates if the Cell is Out of Bounds
- *
- * @param allCells
- * @param currentX
- * @param currentZ
- * @return
- */
- public static boolean isCellOutOfBounds(MazeCell[][] allCells, int currentX, int currentZ) {
- return currentX < 0 || currentX >= allCells.length || currentZ < 0 || currentZ >= allCells[0].length;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/a12ffefdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/a12ffefdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 3180cd9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/a12ffefdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.blocks.ItemZuluArmor;
-import projectzulu.common.core.itemblockdeclaration.ItemSetDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class WhiteClothArmorDeclaration extends ItemSetDeclaration {
-
- public final int renderIndex;
-
- public WhiteClothArmorDeclaration(int renderIndex) {
- super(new String[] { "WhiteClothHelmet", "WhiteClothChest", "WhiteClothLegs", "WhiteClothBoots" });
- this.renderIndex = renderIndex;
- }
-
- @Override
- protected boolean createItem(int partIndex) {
- Item item = new ItemZuluArmor(ProjectZulu_Core.desertClothMaterial, renderIndex, partIndex,
- name[partIndex].toLowerCase());
-
- switch (partIndex) {
- case 0:
- ItemList.whiteClothHead = Optional.of(item);
- return true;
- case 1:
- ItemList.whiteClothChest = Optional.of(item);
- return true;
- case 2:
- ItemList.whiteClothLeg = Optional.of(item);
- return true;
- case 3:
- ItemList.whiteClothBoots = Optional.of(item);
- return true;
- }
- return false;
- }
-
- @Override
- protected void registerItem(int partIndex) {
- Item item = null;
- switch (partIndex) {
- case 0:
- item = ItemList.whiteClothHead.get();
- break;
- case 1:
- item = ItemList.whiteClothChest.get();
- break;
- case 2:
- item = ItemList.whiteClothLeg.get();
- break;
- case 3:
- item = ItemList.whiteClothBoots.get();
- break;
- }
- GameRegistry.registerItem(item, name[partIndex]);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/a1348ea2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/a1348ea2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index dd67271..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/a1348ea2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,141 +0,0 @@
-package projectzulu.common.world2.blueprint.cathedral;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.WeightedRandom;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.BoundaryPair;
-import projectzulu.common.world2.CellHelper;
-import projectzulu.common.world2.blueprint.Blueprint;
-
-public class BPCathedralDome implements Blueprint {
- List wallBlocks = new ArrayList(3);
-
- public BPCathedralDome() {
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 2, 5));
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 1, 10));
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 0, 100));
- }
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- if (cellIndexDirection == CellIndexDirection.NorthWestCorner) {
- return getDomeBlock(CellHelper.rotateCellTo(piecePos, cellSize, CellIndexDirection.NorthWall), cellSize,
- cellHeight, random, cellIndexDirection);
- } else if (cellIndexDirection == CellIndexDirection.NorthEastCorner) {
- return getDomeBlock(CellHelper.rotateCellTo(piecePos, cellSize, CellIndexDirection.EastWall), cellSize,
- cellHeight, random, cellIndexDirection);
- } else if (cellIndexDirection == CellIndexDirection.SouthWestCorner) {
- return getDomeBlock(CellHelper.rotateCellTo(piecePos, cellSize, CellIndexDirection.WestWall), cellSize,
- cellHeight, random, cellIndexDirection);
- } else if (cellIndexDirection == CellIndexDirection.SouthEastCorner) {
- return getDomeBlock(CellHelper.rotateCellTo(piecePos, cellSize, CellIndexDirection.SouthWall), cellSize,
- cellHeight, random, cellIndexDirection);
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- private BlockWithMeta getDomeBlock(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- int diagonalIndex = piecePos.posZ + piecePos.posX;
- int domeFloor = cellHeight - (cellSize + 1);
- BlockWithMeta woodenPlank = new BlockWithMeta(Blocks.planks, 1);
- if (piecePos.posY > domeFloor) {
- int slope = CellHelper.getSlopeIndex(piecePos, 2 * cellSize - diagonalIndex - 1, 2,
- BoundaryPair.createPair(cellSize - 4, cellSize * 2), cellHeight);
- if (slope == 0) {
- return woodenPlank;
- } else if (slope > 0) {
- return new BlockWithMeta(Blocks.air);
- }
-
- if (piecePos.posX == 0) {
- return piecePos.posZ % 2 == 0 ? (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks) : new BlockWithMeta(Blocks.air);
- }
-
- if (piecePos.posZ == 0) {
- return piecePos.posX % 2 == 0 ? (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks) : new BlockWithMeta(Blocks.air);
- }
- }
-
- if (piecePos.posY == domeFloor && diagonalIndex > 2 && diagonalIndex < cellSize * 2 - 3) {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- } else if (piecePos.posY == domeFloor + 1 && diagonalIndex == cellSize * 2 - 4) {
- return new BlockWithMeta(Blocks.iron_bars);
- } else if (piecePos.posY == domeFloor + 1 && diagonalIndex == cellSize * 2 - 5 && piecePos.posX != cellSize - 1
- && piecePos.posZ != cellSize - 1) {
- return new BlockWithMeta(Blocks.iron_bars);
- }
-
- if (diagonalIndex == 2) {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
-
- if (piecePos.posY == 0 && diagonalIndex > 2) {
- if (diagonalIndex == 3) {
- return new BlockWithMeta(Blocks.cobblestone);
- } else {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
- }
-
- if (diagonalIndex > 6) {
- if (piecePos.posY == 1) {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- } else if (piecePos.posY == 2) {
- if (cellIndexDirection == CellIndexDirection.SouthEastCorner) {
- if (piecePos.posZ >= cellSize - 3 && piecePos.posX == cellSize - 2) {
- return new BlockWithMeta(Blocks.stone_brick_stairs, 1);
- } else if (piecePos.posZ == cellSize - 3 && piecePos.posX > cellSize - 2) {
- return new BlockWithMeta(Blocks.stone_brick_stairs, 3);
- }
- } else if (cellIndexDirection == CellIndexDirection.SouthWestCorner) {
- if (piecePos.posX >= cellSize - 3 && piecePos.posZ == cellSize - 2) {
- return new BlockWithMeta(Blocks.stone_brick_stairs, 0);
- } else if (piecePos.posX == cellSize - 3 && piecePos.posZ > cellSize - 2) {
- return new BlockWithMeta(Blocks.stone_brick_stairs, 3);
- }
- }
- return new BlockWithMeta(Blocks.stone_slab, 5);
- } else if (piecePos.posY == 3) {
- if (cellIndexDirection == CellIndexDirection.SouthEastCorner) {
- if (piecePos.posZ == cellSize - 2 && piecePos.posX > cellSize - 2) {
- return new BlockWithMeta(Blocks.stone_slab, 5);
- }
- } else if (cellIndexDirection == CellIndexDirection.SouthWestCorner) {
- if (piecePos.posX == cellSize - 2 && piecePos.posZ > cellSize - 2) {
- return new BlockWithMeta(Blocks.stone_slab, 5);
- }
- }
- }
- }
-
- if (piecePos.posY == 1) {
- if (diagonalIndex == 4 + 2 && piecePos.posZ == cellSize - 1
- && cellIndexDirection == CellIndexDirection.NorthEastCorner || diagonalIndex == 4 + 2
- && piecePos.posX == cellSize - 1 && cellIndexDirection == CellIndexDirection.NorthWestCorner) {
- return new BlockWithMeta(Blocks.stone_brick_stairs, 2);
- } else if (diagonalIndex > 4) {
- return new BlockWithMeta(Blocks.carpet, 14);
- }
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- @Override
- public String getIdentifier() {
- return "CathedralDome";
- }
-
- @Override
- public int getWeight() {
- return 0;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/b174f9fdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/b174f9fdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 742fce2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/b174f9fdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.Properties;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.blocks.ItemUniversalFlowerPot;
-import projectzulu.common.blocks.universalpot.BlockUniversalFlowerPot;
-import projectzulu.common.blocks.universalpot.RenderUniversalFlowerPot;
-import projectzulu.common.blocks.universalpot.TileEntityUniversalFlowerPot;
-import projectzulu.common.blocks.universalpot.TileEntityUniversalFlowerPotRenderer;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.core.itemblockdeclaration.BlockDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.client.registry.ClientRegistry;
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class UniversalFlowerPotDeclaration extends BlockDeclaration {
-
- private int renderID = -1;
-
- public UniversalFlowerPotDeclaration() {
- super("UniversalFlowerPot");
- }
-
- @Override
- protected void preCreateLoadConfig(Configuration config) {
- renderID = config.get("Do Not Touch", "Universal Flower Pot Render ID", renderID).getInt(renderID);
- renderID = renderID == -1 ? RenderingRegistry.getNextAvailableRenderId() : renderID;
- }
-
- @Override
- protected boolean createBlock() {
- BlockList.universalFlowerPot = Optional.of(new BlockUniversalFlowerPot(renderID).setBlockName("uniFlowerPot")
- .setBlockTextureName("flower_pot"));
- return true;
- }
-
- @Override
- protected void registerBlock() {
- Block block = BlockList.universalFlowerPot.get();
- GameRegistry.registerBlock(block, name.toLowerCase());
- GameRegistry.registerItem(new ItemUniversalFlowerPot(block), name);
- GameRegistry.registerTileEntity(TileEntityUniversalFlowerPot.class, "TileEntityUniversalFlowerPot");
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- protected void clientRegisterBlock() {
- RenderingRegistry.registerBlockHandler(renderID, new RenderUniversalFlowerPot());
- ProjectZuluLog.info("Universal Flower Pot Render ID Registed to %s", renderID);
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityUniversalFlowerPot.class,
- new TileEntityUniversalFlowerPotRenderer());
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0a92cd3fa2000141769cb1ed0c338cd b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0a92cd3fa2000141769cb1ed0c338cd
deleted file mode 100644
index fdb268e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0a92cd3fa2000141769cb1ed0c338cd
+++ /dev/null
@@ -1,17 +0,0 @@
-package projectzulu.common.API;
-
-import net.minecraft.potion.Potion;
-
-import com.google.common.base.Optional;
-
-public enum PotionList {
- INSTANCE;
- public static Optional extends Potion> bubbling = Optional.absent();
- public static Optional extends Potion> incendiary = Optional.absent();
- public static Optional extends Potion> slowfall = Optional.absent();
- public static Optional extends Potion> cleansing = Optional.absent();
- public static Optional extends Potion> curse = Optional.absent();
- public static Optional extends Potion> thorn = Optional.absent();
- public static Optional extends Potion> heal2 = Optional.absent();
- public static Optional extends Potion> harm2 = Optional.absent();
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0a9c7f4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0a9c7f4c42100141fce95f06aba7e85
deleted file mode 100644
index 7c7b253..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0a9c7f4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.ngb.projectzulu.common.potion.subitem;
-
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.api.SubItemPotionList;
-import com.ngb.projectzulu.common.core.ItemGenerics.Properties;
-import com.ngb.projectzulu.common.potion.PotionParser;
-
-import com.google.common.base.Optional;
-
-public class SubItemPotionRegeneration extends SubItemPotionHalfPower {
-
- public SubItemPotionRegeneration(Item itemID, int subID) {
- super(itemID, subID, "Regeneration");
- setSubItemBounds(4, 4, 4, 0);
- setEffectScale(20 * 10, 15, 6, 10, 1);
- }
-
- @Override
- Optional extends Potion> getPotion() {
- return Optional.of(Potion.regeneration);
- }
-
- @Override
- protected TYPE getIngredientType(ItemStack ingredient, ItemStack brewingStack) {
- if (ItemList.genericCraftingItems.isPresent()
- && ingredient.getItem() == ItemList.genericCraftingItems.get()
- && ingredient.getItemDamage() == Properties.LargeUnhealthyHeart.meta) {
- return TYPE.CHEMICAL;
- } else if (ingredient.getItem() == Items.fermented_spider_eye) {
- return TYPE.CHEMICAL;
- } else {
- return super.getIngredientType(ingredient, brewingStack);
- }
- }
-
- @Override
- protected ItemStack getChemicalPotionResult(ItemStack ingredient, ItemStack brewingStack) {
- if (SubItemPotionList.WEAKNESS.isPresent()) {
- SubItemPotion subItemPotion = SubItemPotionList.WEAKNESS.get();
- return new ItemStack(subItemPotion.item, 1, PotionParser.setID(subItemPotion.subID,
- brewingStack.getItemDamage()));
- }
- return null;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f13a6fa2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f13a6fa2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index a61d1a7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f13a6fa2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,145 +0,0 @@
-package projectzulu.common.world.terrain;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.IllegalFormatException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.material.Material;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.WeightedRandom;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import projectzulu.common.api.CustomEntityList;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.core.TerrainFeatureHelper;
-import projectzulu.common.core.terrain.BiomeFeature;
-import projectzulu.common.core.terrain.FeatureConfiguration;
-import projectzulu.common.world2.buildingmanager.BuildingManagerPyramid;
-
-public class PyramidFeature extends BiomeFeature {
- public static final String PYRAMID = "Pyramid";
-
- private List entityEntries = new ArrayList();
- public int chestLootChance;
- public int chestMaxLoot;
-
- public String getEntityEntry(Random rand) {
- if (entityEntries.isEmpty()) {
- return "EMPTY";
- }
- return ((EntityEntry) WeightedRandom.getRandomItem(rand, entityEntries)).entityname;
- }
-
- public PyramidFeature() {
- super(PYRAMID, Size.LARGE);
- }
-
- @Override
- protected void loadDefaultSettings() {
- minChunkDistance = 9;
- chunksPerSpawn = 100;
- chestLootChance = 15;
- chestMaxLoot = -1;
- if (CustomEntityList.MUMMY.modData.isPresent()) {
- entityEntries.add(new EntityEntry(DefaultProps.CoreModId.concat(".").concat(
- CustomEntityList.MUMMY.modData.get().mobName), 4));
- }
- if (entityEntries.isEmpty()) {
- entityEntries.add(new EntityEntry("Zombie", 4));
- }
- }
-
- @Override
- protected Collection getDefaultBiomeList() {
- return Arrays.asList(new String[] { BiomeGenBase.desert.biomeName, "Mountainous Desert" });
- }
-
- @Override
- protected void loadSettings(FeatureConfiguration config) {
- super.loadSettings(config);
- chestMaxLoot = config.getFeatureProperty(this, "general", "Chest Max Loot", chestMaxLoot).getInt(chestMaxLoot);
- chestLootChance = config.getFeatureProperty(this, "general", "Chest Loot Chance", chestLootChance).getInt(
- chestLootChance);
-
- String entries = "";
- Iterator iterator = entityEntries.iterator();
- while (iterator.hasNext()) {
- EntityEntry entityEntry = iterator.next();
- entries = entries.concat(entityEntry.entityname).concat("-")
- .concat(Integer.toString(entityEntry.itemWeight));
- if (iterator.hasNext()) {
- entries = entries.concat(",");
- }
- }
-
- entries = config.getFeatureProperty(this, "general", "SpawnerEntities", entries,
- "Entities that appear in Spawner. Format: Entityname-Weight,").getString();
- entityEntries.clear();
-
- for (String entry : entries.split(",")) {
- if (entry.trim().equals("")) {
- continue;
- }
-
- String[] pair = entry.trim().split("-");
- if (pair.length != 2) {
- ProjectZuluLog.severe("Skipping Entity parsing for TF %s. %s has Invalid Number of Arguments.",
- getFeatureName(), entries);
- }
- try {
- EntityEntry entityEntry = new EntityEntry(pair[0].trim(), Integer.parseInt(pair[1]));
- entityEntries.add(entityEntry);
- } catch (IllegalFormatException e) {
- ProjectZuluLog.severe("Skipping Entity parsing for TF %s. %s has invalid format.", getFeatureName(),
- entries);
- continue;
- } catch (IllegalArgumentException e) {
- ProjectZuluLog.severe("Skipping Entity parsing for TF %s. %s has invalid format.", getFeatureName(),
- entries);
- continue;
- }
- }
- }
-
- @Override
- public ChunkCoordinates[] getGenerationCoordinates(World world, int chunkX, int chunkZ) {
- Random random = new Random(world.getSeed());
- long randomFactor1 = random.nextLong() / 2L * 2L + 1L;
- long randomFactor2 = random.nextLong() / 2L * 2L + 1L;
- random.setSeed(chunkX * 16 * randomFactor1 + chunkZ * 16 * randomFactor2 ^ world.getSeed());
-
- int xCoord = chunkX * 16 + random.nextInt(16);
- int zCoord = chunkZ * 16 + random.nextInt(16);
- return new ChunkCoordinates[] { new ChunkCoordinates(xCoord, world.getTopSolidOrLiquidBlock(xCoord, zCoord),
- zCoord) };
- }
-
- @Override
- public boolean canGenerateHere(World world, int chunkX, int chunkZ, ChunkCoordinates genBlockCoords, Random random) {
- if (super.canGenerateHere(world, chunkX, chunkZ, genBlockCoords, random)) {
- if (world.getBlock(genBlockCoords.posX, genBlockCoords.posY, genBlockCoords.posZ).getMaterial() != Material.water) {
- if (!TerrainFeatureHelper.doesTerrainFluctuate(world, genBlockCoords.posX, genBlockCoords.posY,
- genBlockCoords.posZ, 5, 12)) {
- if (printToLog) {
- ProjectZuluLog.info("Generating %s at %s, %s, %s", getFeatureName(), genBlockCoords.posX,
- genBlockCoords.posY, genBlockCoords.posZ);
- }
- return true;
- }
- }
- }
- return false;
- }
-
- @Override
- public void generateFeature(World world, int chunkX, int chunkZ, ChunkCoordinates genBlockCoords, Random random,
- FeatureDirection direction) {
- new BuildingManagerPyramid(world, new ChunkCoordinates(genBlockCoords.posX, genBlockCoords.posY - 1,
- genBlockCoords.posZ), direction).generate();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/01f9d69ec52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/01f9d69ec52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 2d22fcb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/01f9d69ec52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,40 +0,0 @@
-package projectzulu.common.mobs.entity;
-
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.EnumSkyBlock;
-import net.minecraft.world.World;
-import projectzulu.common.api.CustomEntityList;
-import projectzulu.common.core.ProjectZuluLog;
-
-public class EntityHorseBlack extends EntityHorseBase{
-
- public EntityHorseBlack(World par1World) {
- super(par1World);
- }
-
- /**
- * Checks if the entity's current position is a valid location to spawn this entity.
- */
- @Override
- public boolean getCanSpawnHere() {
- int var1 = MathHelper.floor_double(this.posX);
- int var2 = MathHelper.floor_double(this.boundingBox.minY);
- int var3 = MathHelper.floor_double(this.posZ);
- boolean wasSuccesful = false;
-
- if (CustomEntityList.HORSEBLACK.modData.get().secondarySpawnRate - rand.nextInt(100) >= 0 && super.getCanSpawnHere()
- && worldObj.getClosestPlayerToEntity(this, 32) == null && this.worldObj.getSavedLightValue(EnumSkyBlock.Block, var1, var2, var3) < 1
- && worldObj.canBlockSeeTheSky(var1, var2, var3) ){
- wasSuccesful = true;
- }
-
- if(CustomEntityList.HORSEBLACK.modData.get().reportSpawningInLog){
- if(wasSuccesful){
- ProjectZuluLog.info("Successfully spawned %s at X:%s Y:%s Z:%s in %s", getCommandSenderName(),var1,var2,var3,worldObj.getBiomeGenForCoords(var1, var3));
- }else{
- ProjectZuluLog.info("Failed to spawn %s at X:%s Y:%s Z:%s in %s, Spawning Location Inhospitable",getCommandSenderName(),var1,var2,var3,worldObj.getBiomeGenForCoords(var1, var3));
- }
- }
- return wasSuccesful;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10348dffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10348dffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 9ea1302..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10348dffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockBush;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import projectzulu.common.ProjectZulu_Core;
-
-public class BlockCreeperBlossom extends BlockBush {
-
- public BlockCreeperBlossom() {
- super(Material.tnt);
- this.setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setHardness(0.5F);
- setStepSound(Block.soundTypeGrass);
- }
-
- /**
- * Returns the quantity of items to drop on block destruction.
- */
- @Override
- public int quantityDropped(Random par1Random) {
- return 1;
- }
-
- /**
- * Called upon the block being destroyed by an explosion
- */
- public void onBlockDestroyedByExplosion(World par1World, int par2, int par3, int par4) {
- if (!par1World.isRemote) {
- EntityCreeperBlossomPrimed var5 = new EntityCreeperBlossomPrimed(par1World, par2 + 0.5F, par3 + 0.5F,
- par4 + 0.5F);
- var5.fuse = par1World.rand.nextInt(var5.fuse / 4) + var5.fuse / 8;
- par1World.spawnEntityInWorld(var5);
- }
- }
-
- /**
- * Called whenever an entity is walking on top of this block. Args: world, x, y, z, entity
- */
- @Override
- public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) {
-
- if (par5Entity instanceof EntityPlayer && !par1World.isRemote && !((EntityPlayer) par5Entity).isSneaking()) {
- EntityCreeperBlossomPrimed var6 = new EntityCreeperBlossomPrimed(par1World, par2 + 0.5F, par3 + 0.5F,
- par4 + 0.5F);
- par1World.spawnEntityInWorld(var6);
- par1World.playSoundAtEntity(var6, "random.fuse", 1.0F, 1.0F);
- par1World.setBlock(par2, par3, par4, Blocks.air);
- }
- }
-
- @Override
- protected boolean canPlaceBlockOn(Block block) {
- return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block == Blocks.log;
- }
-
- /**
- * Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage
- * and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.
- */
- @Override
- protected ItemStack createStackedBlock(int par1) {
- return null;
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/115aeee4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/115aeee4c42100141fce95f06aba7e85
deleted file mode 100644
index b5a81ea..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/115aeee4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,33 +0,0 @@
-package projectzulu.common.dungeon.spawner.tag.keys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.world.World;
-import projectzulu.common.dungeon.spawner.tag.TypeValuePair;
-import projectzulu.common.dungeon.spawner.tag.settings.OptionalSettings.Operand;
-
-public class KeyParserSpawn extends KeyParserBase {
-
- public KeyParserSpawn(Key key) {
- super(key, true, KeyType.PARENT);
- }
-
- @Override
- public boolean parseChainable(String parseable, ArrayList parsedChainable,
- ArrayList operandvalue) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean parseValue(String parseable, HashMap valueCache) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isValidLocation(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord,
- TypeValuePair typeValuePair, HashMap valueCache) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3086c2fdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3086c2fdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index d8a80cb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3086c2fdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.world.World;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.core.DefaultProps;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class BlockTumbleweed extends Block {
-
- public BlockTumbleweed() {
- super(Material.plants);
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setHardness(0.7F);
- setStepSound(Block.soundTypeWood);
- }
-
- /**
- * Called whenever the block is added into the world. Args: world, x, y, z
- */
- @Override
- public void onBlockAdded(World par1World, int par2, int par3, int par4) {
- super.onBlockAdded(par1World, par2, par3, par4);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3091dde4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3091dde4c42100141fce95f06aba7e85
deleted file mode 100644
index d87f46b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3091dde4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,36 +0,0 @@
-package projectzulu.common.dungeon.spawner.tag.keys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.world.World;
-import projectzulu.common.dungeon.spawner.tag.OptionalParser;
-import projectzulu.common.dungeon.spawner.tag.TypeValuePair;
-import projectzulu.common.dungeon.spawner.tag.settings.OptionalSettings.Operand;
-
-public class KeyParserEntityCap extends KeyParserBase {
-
- public KeyParserEntityCap(Key key) {
- super(key, false, KeyType.VALUE);
- }
-
- @Override
- public boolean parseChainable(String parseable, ArrayList parsedChainable,
- ArrayList operandvalue) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean parseValue(String parseable, HashMap valueCache) {
- String[] pieces = parseable.split(",");
- OptionalParser.parseEntityCap(pieces, valueCache);
- return true;
- }
-
- @Override
- public boolean isValidLocation(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord,
- TypeValuePair typeValuePair, HashMap valueCache) {
- throw new UnsupportedOperationException();
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3131ecf9c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3131ecf9c42100141fce95f06aba7e85
deleted file mode 100644
index b842e54..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/3131ecf9c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.item.Item;
-import com.ngb.projectzulu.common.ProjectZulu_Core;
-import com.ngb.projectzulu.common.core.DefaultProps;
-
-public class ItemCoconutShell extends Item {
-
- public ItemCoconutShell(boolean full3D, String name) {
- super();
- maxStackSize = 12;
- setMaxDamage(5);
- this.setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- bFull3D = full3D;
- setUnlocalizedName(name.toLowerCase());
- setTextureName(DefaultProps.blockKey + ":" + name.toLowerCase());
- }
-
- public int getMetadata(int par1) {
- return par1;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/7061b1cbfa2000141769cb1ed0c338cd b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/7061b1cbfa2000141769cb1ed0c338cd
deleted file mode 100644
index d703234..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/7061b1cbfa2000141769cb1ed0c338cd
+++ /dev/null
@@ -1,80 +0,0 @@
-package projectzulu.common.API;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.WeightedRandom;
-import projectzulu.common.core.entitydeclaration.EntityProperties;
-
-public class CustomMobData {
- public String mobName = "";
- public final HashMap customData = new HashMap();
- public int secondarySpawnRate = 100;
- public boolean reportSpawningInLog = false;
- public boolean shouldDespawn = true;
- public int maxSpawnInChunk = 4;
- public EnumCreatureType creatureType;
- public EnumCreatureType spawnType;
- public EntityProperties entityProperties;
-
- public int minDropNum = 0;
- public int maxDropNum = 0;
-
- private List lootItems = new ArrayList();
-
- public static class WeightedItemStack extends WeightedRandom.Item {
- public final String itemID;
- public final int itemDamage;
- public final int stackSize;
-
- public WeightedItemStack(String itemID, int itemDamage, int stackSize, int weight) {
- super(weight);
- this.itemID = itemID;
- this.itemDamage = itemDamage;
- this.stackSize = stackSize;
- }
- }
-
- public CustomMobData(String mobName) {
- this.mobName = mobName;
- }
-
- public void addLootToMob(ItemStack itemStack, int weight) {
- lootItems.add(new WeightedItemStack(Item.itemRegistry.getNameForObject(itemStack.getItem()), itemStack
- .getItemDamage(), itemStack.stackSize, weight));
- }
-
- public void addLootToMob(String itemID, int itemDamage, int stackSize, int weight) {
- lootItems.add(new WeightedItemStack(itemID, itemDamage, stackSize, weight));
- }
-
- public ItemStack getLootItem(Random rand) {
- if (lootItems != null && !lootItems.isEmpty()) {
- WeightedItemStack stack = ((WeightedItemStack) WeightedRandom.getRandomItem(rand, lootItems));
- Item item = (Item) Item.itemRegistry.getObject(stack.itemID);
- if (item != null) {
- return new ItemStack(item, stack.stackSize, stack.itemDamage);
- }
- }
- return null;
- }
-
- public Collection getLoot(Random rand, int extraDrops) {
- final int numberOfItems = minDropNum + rand.nextInt(1 + maxDropNum - minDropNum + extraDrops);
- List items = new ArrayList(numberOfItems);
- for (int i = 0; i < numberOfItems; i++) {
- ItemStack stack = getLootItem(rand);
- if (stack != null) {
- items.add(stack);
- }
- }
- return items;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/818c9ca2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/818c9ca2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 1cd0fef..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/818c9ca2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,50 +0,0 @@
-package projectzulu.common.world2.blueprints;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world.dataobjects.HauntedArmorWithMeta;
-import projectzulu.common.world2.blueprint.Blueprint;
-
-public class BPScatteredTombstonesAndFlowers implements Blueprint {
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
-
- if (piecePos.posY == 0) {
- return new BlockWithMeta(Blocks.grass);
- } else if (piecePos.posY == 1) {
- if (random.nextInt(90) == 0) {
- return new HauntedArmorWithMeta();
- }
-
- if (piecePos.posX % 2 == 1 ^ piecePos.posZ % 2 == 1 && random.nextInt(100) <= 20) {
- return BlockList.tombstone.isPresent() ? new BlockWithMeta(BlockList.tombstone.get())
- : new BlockWithMeta(Blocks.air);
- } else if (5 - random.nextInt(100) >= 0) {
- return new BlockWithMeta(Blocks.red_flower, 0);
- } else if (5 - random.nextInt(100) >= 0) {
- return new BlockWithMeta(Blocks.yellow_flower, 0);
- } else if (50 - random.nextInt(100) >= 0) {
- return new BlockWithMeta(Blocks.tallgrass, 1);
- }
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- @Override
- public int getWeight() {
- return 1;
- }
-
- @Override
- public String getIdentifier() {
- return "tombstonesandflowers";
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/a021b5e4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/a021b5e4c42100141fce95f06aba7e85
deleted file mode 100644
index 6a4f1f4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/a021b5e4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,28 +0,0 @@
-package projectzulu.common.core;
-
-import net.minecraft.world.World;
-
-public class TerrainFeatureHelper {
-
- /**
- * Method to evaluate the terrain variation. Compares the height along each point of an X to the center.
- * If greater than provided difference return false;
- * @param world
- * @param Xcoord
- * @param Ycoord
- * @param Zcoord
- * @param maxDifference
- * @param squareLength
- * @return
- */
- public static boolean doesTerrainFluctuate(World world, int Xcoord, int Ycoord, int Zcoord, int maxDifference, int squareLength){
- if( Math.abs( world.getTopSolidOrLiquidBlock(Xcoord+squareLength, Zcoord+squareLength) - Ycoord) < maxDifference
- && Math.abs( world.getTopSolidOrLiquidBlock(Xcoord-squareLength, Zcoord-squareLength) - Ycoord ) < maxDifference
- && Math.abs( world.getTopSolidOrLiquidBlock(Xcoord-squareLength, Zcoord+squareLength) - Ycoord ) < maxDifference
- && Math.abs( world.getTopSolidOrLiquidBlock(Xcoord+squareLength, Zcoord-squareLength) - Ycoord ) < maxDifference){
- return false;
- }
-
- return true;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b16383f6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b16383f6c42100141fce95f06aba7e85
deleted file mode 100644
index 248da5d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b16383f6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.ngb.projectzulu.common.core.terrain;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Random;
-
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-
-/**
- * Terrain Feature that is Restricted by Biome
- */
-public abstract class BiomeFeature extends BaseFeature {
-
- /** List of Biome Package Names that this Feature can Spawn in */
- protected ArrayList biomesToSpawn = new ArrayList();
-
- public BiomeFeature(String featureName, Size size) {
- super(featureName, size);
- }
-
- @Override
- public boolean canGenerateHere(World world, int chunkX, int chunkZ, ChunkCoordinates genBlockCoords, Random random) {
- if (super.canGenerateHere(world, chunkX, chunkZ, genBlockCoords, random)) {
- return biomesToSpawn.contains(getBiomePackageName(world.getBiomeGenForCoords(genBlockCoords.posX,
- genBlockCoords.posZ)));
- }
- return false;
- }
-
- protected abstract Collection getDefaultBiomeList();
-
- @Override
- protected void loadSettings(FeatureConfiguration config) {
- super.loadSettings(config);
- Collection defaultBiomesToSpawn = getDefaultBiomeList();
- for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++) {
- if (BiomeGenBase.getBiomeGenArray()[i] == null) {
- continue;
- }
- if (config.getFeatureProperty(this, "GeneratingBiomes",
- getBiomePackageName(BiomeGenBase.getBiomeGenArray()[i]),
- defaultBiomesToSpawn.contains(BiomeGenBase.getBiomeGenArray()[i].biomeName)).getBoolean(false)) {
- biomesToSpawn.add(getBiomePackageName(BiomeGenBase.getBiomeGenArray()[i]));
- }
- }
- }
-
- private String getBiomePackageName(BiomeGenBase biome) {
- return biome.getClass().getName() + "." + biome.biomeName;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c1bca9ffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c1bca9ffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index bac9d84..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c1bca9ffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.core.DefaultProps;
-
-public class ItemAloeVeraSeeds extends Item {
-
- /**
- * The ItemID of block this seed turns into (wheat or pumpkin stems for instance)
- */
- private Block blockType;
-
- public ItemAloeVeraSeeds(Block turnIntoID, String unlocalizedName) {
- super();
- blockType = turnIntoID;
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setUnlocalizedName(unlocalizedName);
- setTextureName(DefaultProps.blockKey + ":" + unlocalizedName);
- }
-
- @Override
- public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int xCoord, int yCoord, int zCoord,
- int par7, float par8, float par9, float par10) {
- if (par7 != 1) {
- return false;
- } else if (player.canPlayerEdit(xCoord, yCoord, zCoord, par7, itemStack)
- && player.canPlayerEdit(xCoord, yCoord + 1, zCoord, par7, itemStack)) {
- Block block = world.getBlock(xCoord, yCoord, zCoord);
-
- if ((block == Blocks.dirt || block == Blocks.sand || block == Blocks.grass)
- && world.isAirBlock(xCoord, yCoord + 1, zCoord)) {
- world.setBlock(xCoord, yCoord + 1, zCoord, this.blockType);
- --itemStack.stackSize;
- return true;
- } else {
- return false;
- }
- } else {
- return false;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/d07508b9052100141769cb1ed0c338cd b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/d07508b9052100141769cb1ed0c338cd
deleted file mode 100644
index a7da319..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/d07508b9052100141769cb1ed0c338cd
+++ /dev/null
@@ -1,63 +0,0 @@
-package projectzulu.common.mobs.entityai;
-
-import java.util.Iterator;
-import java.util.List;
-
-import projectzulu.common.mobs.entity.EntityGenericCreature;
-import net.minecraft.entity.EntityCreature;
-import net.minecraft.entity.ai.EntityAITarget;
-import net.minecraft.util.AxisAlignedBB;
-
-
-
-public class EntityAIHurtByTarget extends EntityAITarget {
- boolean shouldCallAllies;
-
- boolean entityCallsForHelp;
- private int field_142052_b;
-
- public EntityAIHurtByTarget(EntityCreature par1EntityCreature, boolean par2)
- {
- super(par1EntityCreature, false);
- this.entityCallsForHelp = par2;
- this.setMutexBits(1);
- }
-
- /**
- * Returns whether the EntityAIBase should begin execution.
- */
- public boolean shouldExecute()
- {
- int i = this.taskOwner.func_142015_aE();
- return i != this.field_142052_b && this.isSuitableTarget(this.taskOwner.getAITarget(), false);
- }
-
- /**
- * Execute a one shot task or start executing a continuous task
- */
- public void startExecuting()
- {
- this.taskOwner.setAttackTarget(this.taskOwner.getAITarget());
- this.field_142052_b = this.taskOwner.func_142015_aE();
-
- if (this.entityCallsForHelp)
- {
- double d0 = this.getTargetDistance();
- List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), AxisAlignedBB.getBoundingBox(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0));
- Iterator iterator = list.iterator();
-
- while (iterator.hasNext())
- {
- EntityCreature entitycreature = (EntityCreature)iterator.next();
-
- if (this.taskOwner != entitycreature && entitycreature.getAttackTarget() == null && !entitycreature.isOnSameTeam(this.taskOwner.getAITarget()))
- {
- entitycreature.setAttackTarget(this.taskOwner.getAITarget());
- }
- }
- }
-
- super.startExecuting();
- }
-}
-
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/d09a72f6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/d09a72f6c42100141fce95f06aba7e85
deleted file mode 100644
index 5d8846b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/d09a72f6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,123 +0,0 @@
-package com.ngb.projectzulu.common.dungeon.commands;
-
-import java.util.List;
-
-import net.minecraft.command.CommandBase;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.command.NumberInvalidException;
-import net.minecraft.command.PlayerNotFoundException;
-import net.minecraft.command.WrongUsageException;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.server.MinecraftServer;
-import com.ngb.projectzulu.common.ProjectZulu_Core;
-import com.ngb.projectzulu.common.core.PZPacket;
-import com.ngb.projectzulu.common.core.packets.PacketStreamSound;
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-
-public class CommandStreamSound extends CommandBase {
-
- @Override
- public String getCommandName() {
- return "streamsound";
- }
-
- /**
- * Return the required permission level for this command.
- */
- public int getRequiredPermissionLevel() {
- return 2;
- }
-
- @Override
- public String getCommandUsage(ICommandSender par1ICommandSender) {
- return "commands.streamsound.usage";
- }
-
- /**
- * Command stringArgs == 2: /streamsound [targetPlayer] [fileName] Command stringArgs == 2:
- * /streamsound @p sounds.fileName Command stringArgs == 3: /streamsound @p sounds.fileName Command
- * stringArgs == 5: /streamsound @p sounds.fileName Command stringArgs == 6:
- * /streamsound @p sounds.fileName
- */
- @Override
- public void processCommand(ICommandSender commandSender, String[] stringArgs) {
- if (stringArgs.length < 2) {
- throw new WrongUsageException("commands.streamsound.usage", new Object[0]);
- } else {
- int soundTargetX = 0;
- int soundTargetY = 0;
- int soundTargetZ = 0;
-
- EntityPlayerMP targetPlayer = getPlayer(commandSender, stringArgs[0]);
- if (targetPlayer == null) {
- throw new PlayerNotFoundException();
- }
-
- if (stringArgs.length == 2 || stringArgs.length == 3) {
- soundTargetX = (int) targetPlayer.posX;
- soundTargetY = (int) targetPlayer.posY;
- soundTargetZ = (int) targetPlayer.posZ;
- } else if (stringArgs.length == 5 || stringArgs.length == 6) {
- int indexOfPos = stringArgs.length - 3;
- soundTargetX = (int) parsePosition(commandSender, targetPlayer.posX, stringArgs[indexOfPos++]);
- soundTargetY = (int) parsePositionWithBounds(commandSender, targetPlayer.posY,
- stringArgs[indexOfPos++], 0, 0);
- soundTargetZ = (int) parsePosition(commandSender, targetPlayer.posZ, stringArgs[indexOfPos++]);
- }
-
- int soundRange = stringArgs.length == 3 || stringArgs.length == 6 ? parseIntBounded(commandSender,
- stringArgs[2], 0, 120) : 60;
-
- PZPacket packet = new PacketStreamSound().setPacketData(soundTargetX, soundTargetY, soundTargetZ,
- stringArgs[1]);
- ProjectZulu_Core.getPipeline().sendToAllAround(packet,
- new TargetPoint(targetPlayer.dimension, soundTargetX, soundTargetY, soundTargetZ, soundRange));
- }
- }
-
- /**
- * Adds the strings available in this command to the given list of tab completion options.
- */
- @Override
- public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) {
- return par2ArrayOfStr.length != 1 && par2ArrayOfStr.length != 2 ? null : getListOfStringsMatchingLastWord(
- par2ArrayOfStr, MinecraftServer.getServer().getAllUsernames());
- }
-
- private double parsePosition(ICommandSender commandSender, double currentPos, String stringDouble) {
- return this.parsePositionWithBounds(commandSender, currentPos, stringDouble, -30000000, 30000000);
- }
-
- private double parsePositionWithBounds(ICommandSender commandSender, double currentPos, String stringDouble,
- int lowerLimit, int upperLimit) {
- boolean isRelativeCoords = stringDouble.startsWith("~");
- double targetPos = isRelativeCoords ? currentPos : 0.0D;
-
- if (!isRelativeCoords || stringDouble.length() > 1) {
- boolean hasDecimal = stringDouble.contains(".");
-
- if (isRelativeCoords) {
- stringDouble = stringDouble.substring(1);
- }
-
- targetPos += parseDouble(commandSender, stringDouble);
-
- if (!hasDecimal && !isRelativeCoords) {
- targetPos += 0.5D;
- }
- }
-
- if (lowerLimit != 0 || upperLimit != 0) {
- if (targetPos < (double) lowerLimit) {
- throw new NumberInvalidException("commands.generic.double.tooSmall", new Object[] {
- Double.valueOf(targetPos), Integer.valueOf(lowerLimit) });
- }
-
- if (targetPos > (double) upperLimit) {
- throw new NumberInvalidException("commands.generic.double.tooBig", new Object[] {
- Double.valueOf(targetPos), Integer.valueOf(upperLimit) });
- }
- }
- return targetPos;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/e0e29ae4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/e0e29ae4c42100141fce95f06aba7e85
deleted file mode 100644
index 7fe9312..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/e0e29ae4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,75 +0,0 @@
-package projectzulu.common.core.itemblockdeclaration;
-
-import net.minecraft.item.Item;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.relauncher.Side;
-
-public abstract class ItemDeclaration implements ItemBlockDeclaration {
-
- private int registerPass;
- public final String name;
- private boolean isEnabled = true;
- private boolean isCreated = false;
-
- public ItemDeclaration(String name) {
- this(name, 0);
- }
-
- public ItemDeclaration(String name, int registerPass) {
- this.name = name;
- this.registerPass = registerPass;
- }
-
- @Override
- public Type getType() {
- return Type.Item;
- }
-
- @Override
- public int getRegisterPass() {
- return registerPass;
- }
-
- @Override
- public void createWithConfig(Configuration config, boolean readOnly) {
- if (!readOnly) {
- Property property = config.get("item", name + " isEnabled", isEnabled);
- isEnabled = property.getBoolean(isEnabled);
- if (isEnabled) {
- preCreateLoadConfig(config);
- isCreated = createItem();
- postCreateLoadConfig(config);
- }
- }
- }
-
- protected void preCreateLoadConfig(Configuration config) {
-
- }
-
- protected void postCreateLoadConfig(Configuration config) {
-
- }
-
- protected abstract boolean createItem();
-
- @Override
- public final void register(Side side) {
- if (isCreated) {
- registerItem();
- if (!side.isServer()) {
- clientRegisterItem();
- }
- }
- }
-
- protected abstract void registerItem();
-
- protected void clientRegisterItem() {
-
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/303b38f4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/303b38f4c42100141fce95f06aba7e85
deleted file mode 100644
index f2f88c1..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/303b38f4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,108 +0,0 @@
-package com.ngb.projectzulu.common.world2.buildingmanager;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import com.ngb.projectzulu.common.core.terrain.TerrainFeature.FeatureDirection;
-import com.ngb.projectzulu.common.world.dataobjects.BlockWithMeta;
-import com.ngb.projectzulu.common.world2.MazeCell;
-import com.ngb.projectzulu.common.world2.architect.Architect;
-
-public abstract class BuildingManagerBase implements BuildingManager {
- public World world;
- protected int blueprintPasses = 1;
-
- public BuildingManagerBase(World world) {
- this.world = world;
-
- }
-
- @Override
- public final void generate() {
- randomizeCells();
-
- for (int i = 1; i <= blueprintPasses; i++) {
- assignBlueprints(i, blueprintPasses);
- }
-
- construct();
- }
-
- protected ChunkCoordinates calcTranslatedPosition(FeatureDirection direction, ChunkCoordinates startingPos,
- int xWidth, int zWidth, int height) {
- if (direction == null) {
- direction = FeatureDirection.CENTERED;
- }
-
- switch (direction) {
- case NORTH:
- return new ChunkCoordinates(startingPos.posX - xWidth / 2, startingPos.posY, startingPos.posZ - zWidth);
- case SOUTH:
- return new ChunkCoordinates(startingPos.posX - xWidth / 2, startingPos.posY, startingPos.posZ + 1);
- case WEST:
- return new ChunkCoordinates(startingPos.posX - xWidth, startingPos.posY, startingPos.posZ - zWidth / 2);
- case EAST:
- return new ChunkCoordinates(startingPos.posX + 1, startingPos.posY, startingPos.posZ - zWidth / 2);
- case CENTERED:
- default:
- return new ChunkCoordinates(startingPos.posX - xWidth / 2, startingPos.posY, startingPos.posZ - zWidth / 2);
- }
- }
-
- /**
- * Method to Perform processing on the Cell array. Typically this invloves invoking the Randomizer
- */
- protected abstract void randomizeCells();
-
- /**
- * Method to Assign Blueprints to cells. Multiple can be peformed. The lastCall boolean indicates when the final
- * pass is being performed, during which all cells should receive blueprints
- */
- protected abstract void assignBlueprints(int pass, int maxPass);
-
- protected abstract void construct();
-
- protected void processCellPieces(MazeCell currentCell, Architect architect) {
- ChunkCoordinates pieceCoords = new ChunkCoordinates(0, 0, 0);
- for (int pieceX = 0; pieceX < currentCell.size; pieceX++) {
- for (int pieceZ = 0; pieceZ < currentCell.size; pieceZ++) {
- for (int pieceY = 0; pieceY < currentCell.getHeight(); pieceY++) {
-
- /* Set Local Piece coordinates */
- pieceCoords.set(pieceX, pieceY, pieceZ);
- BlockWithMeta block = architect.getBlockFromBlueprint(currentCell,
- new ChunkCoordinates(pieceCoords));
-
- /* Set Absolute Piece coordinates */
- pieceCoords.set(currentCell.initialPos.posX + pieceX, currentCell.initialPos.posY + pieceY,
- currentCell.initialPos.posZ + pieceZ);
- handleBlockPlacement(block, pieceCoords, world.rand);
- }
- }
- }
- }
-
- protected void handleBlockPlacement(BlockWithMeta blockWithMeta, ChunkCoordinates position, Random random) {
- if (blockWithMeta == null || !world.blockExists(position.posX, position.posY, position.posZ)) {
- return;
- }
-
- /*
- * Check if There is a Tile At This Block, if so, remove it This Doesn't Seem to Work, So Block Is only placed
- * if there is not TileEntity so as to prevent crash
- */
- TileEntity tileEntity = world.getTileEntity(position.posX, position.posY, position.posZ);
- if (tileEntity != null) {
- tileEntity.invalidate();
- world.removeTileEntity(position.posX, position.posY, position.posZ);
- world.setBlock(position.posX, position.posY, position.posZ, Block.getBlockFromName("air"));
- } else {
- /* Check Block to See How Block wants to be Placed */
- blockWithMeta.placeBlock(world, position, random);
- }
-
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/31f0f19dc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/31f0f19dc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index dbc2fe1..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/31f0f19dc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,63 +0,0 @@
-package projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.blocks.ItemZuluArmor;
-import projectzulu.common.core.itemblockdeclaration.ItemSetDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class IronScaleArmorDeclaration extends ItemSetDeclaration {
-
- public final int renderIndex;
-
- public IronScaleArmorDeclaration(int renderIndex) {
- super(new String[] { "IronScaleHelmet", "IronScaleChest", "IronScaleLegs", "IronScaleBoots" });
- this.renderIndex = renderIndex;
- }
-
- @Override
- protected boolean createItem(int partIndex) {
- Item item = new ItemZuluArmor(ProjectZulu_Core.ironScaleMaterial, renderIndex, partIndex,
- name[partIndex].toLowerCase());
-
- switch (partIndex) {
- case 0:
- ItemList.ironScaleArmorHead = Optional.of(item);
- return true;
- case 1:
- ItemList.ironScaleArmorChest = Optional.of(item);
- return true;
- case 2:
- ItemList.ironScaleArmorLeg = Optional.of(item);
- return true;
- case 3:
- ItemList.ironScaleArmorBoots = Optional.of(item);
- return true;
- }
- return false;
- }
-
- @Override
- protected void registerItem(int partIndex) {
- Item item = null;
- switch (partIndex) {
- case 0:
- item = ItemList.ironScaleArmorHead.get();
- break;
- case 1:
- item = ItemList.ironScaleArmorChest.get();
- break;
- case 2:
- item = ItemList.ironScaleArmorLeg.get();
- break;
- case 3:
- item = ItemList.ironScaleArmorBoots.get();
- break;
- }
- GameRegistry.registerItem(item, name[partIndex]);
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/40217affc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/40217affc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index ab2ff9d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/40217affc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.ngb.projectzulu.common.world2.buildingmanager;
-
-import java.awt.Point;
-
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import projectzulu.common.core.terrain.TerrainFeature.FeatureDirection;
-import projectzulu.common.world2.MazeCell;
-import projectzulu.common.world2.architect.ArchitectOasis;
-import projectzulu.common.world2.randomizer.EdgeRandomizer;
-import projectzulu.common.world2.randomizer.Randomizer;
-
-public class BuildingManagerOasis extends BuildingManagerBase {
-
- public ArchitectOasis architect;
- public Randomizer randomizer;
- MazeCell[][] oasis;
-
- public BuildingManagerOasis(World world, FeatureDirection direction, ChunkCoordinates startingPos, int xCells,
- int zCells, int cellSize) {
- super(world);
-
- int cellHeight = 4;
- randomizer = new EdgeRandomizer(world, 2);
- architect = new ArchitectOasis(world);
- startingPos = calcTranslatedPosition(direction, startingPos, xCells * cellSize, zCells * cellSize, cellHeight);
-
- oasis = new MazeCell[xCells][zCells];
- for (int i = 0; i < oasis.length; i++) {
- for (int j = 0; j < oasis[0].length; j++) {
- oasis[i][j] = new MazeCell(cellSize, cellHeight, new ChunkCoordinates(startingPos.posX + cellSize * i,
- startingPos.posY, startingPos.posZ + cellSize * j));
- }
- }
- }
-
- @Override
- protected void randomizeCells() {
- randomizer.randomize(oasis);
- }
-
- @Override
- protected void assignBlueprints(int pass, int maxPass) {
- if (pass == maxPass) {
- for (int cellX = 0; cellX < oasis.length; cellX++) {
- for (int cellZ = 0; cellZ < oasis[0].length; cellZ++) {
- architect.assignBlueprint(oasis, new Point(cellX, cellZ), pass, maxPass);
- }
- }
- }
- }
-
- @Override
- protected void construct() {
- for (int cellX = 0; cellX < oasis.length; cellX++) {
- for (int cellZ = 0; cellZ < oasis[0].length; cellZ++) {
- MazeCell currentCell = oasis[cellX][cellZ];
- processCellPieces(currentCell, architect);
- }
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/500270e4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/500270e4c42100141fce95f06aba7e85
deleted file mode 100644
index 5f13576..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/500270e4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,145 +0,0 @@
-package projectzulu.common.blocks;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-
-public class ModelTombstone extends ModelBase
-{
- //fields
- ModelRenderer baserig;
- ModelRenderer body4;
- ModelRenderer topcenter;
- ModelRenderer baselef;
- ModelRenderer body3;
- ModelRenderer body2;
- ModelRenderer body1;
- private ModelRenderer CENTERROT;
- private ModelRenderer TOPLEFROT;
- private ModelRenderer TOPRIGROT;
-
- public ModelTombstone(){
- textureWidth = 64;
- textureHeight = 32;
- setTextureOffset("TOPLEFROT.topleft", 0, 17);
- setTextureOffset("TOPRIGROT.topright", 0, 17);
-
- body4 = new ModelRenderer(this, 28, 15);
- body4.addBox(0F, -18F, -4.5F, 9, 8, 9);
- body4.setRotationPoint(0F, 28F, 0F);
- body4.setTextureSize(64, 32);
- body4.mirror = true;
- setRotation(body4, 0F, 0F, 0F);
- topcenter = new ModelRenderer(this, 28, 16);
- topcenter.addBox(-4.5F, -4F, -4.5F, 9, 4, 9);
- topcenter.setRotationPoint(0F, 2F, 0F);
- topcenter.setTextureSize(64, 32);
- topcenter.mirror = true;
- setRotation(topcenter, 0F, 0F, 0F);
- body3 = new ModelRenderer(this, 28, 15);
- body3.addBox(-9F, -18F, -4.5F, 9, 8, 9);
- body3.setRotationPoint(0F, 28F, 0F);
- body3.setTextureSize(64, 32);
- body3.mirror = true;
- body3.mirror = true;
- setRotation(body3, 0F, 0F, 0F);
- body3.mirror = false;
- body2 = new ModelRenderer(this, 28, 15);
- body2.addBox(0F, -18F, -4.5F, 9, 8, 9);
- body2.setRotationPoint(0F, 20F, 0F);
- body2.setTextureSize(64, 32);
- body2.mirror = true;
- body2.mirror = true;
- setRotation(body2, 0F, 0F, 0F);
- body2.mirror = false;
- body1 = new ModelRenderer(this, 28, 15);
- body1.addBox(-9F, -18F, -4.5F, 9, 8, 9);
- body1.setRotationPoint(0F, 20F, 0F);
- body1.setTextureSize(64, 32);
- body1.mirror = true;
- setRotation(body1, 0F, 0F, 0F);
- baselef = new ModelRenderer(this, 0, 0);
- baselef.addBox(-12F, -3F, -6F, 12, 6, 12);
- baselef.setRotationPoint(0F, 21F, 0F);
- baselef.setTextureSize(64, 32);
- baselef.mirror = true;
- baselef.mirror = true;
- setRotation(baselef, 0F, 0F, 0F);
- baselef.mirror = false;
- baserig = new ModelRenderer(this, 0, 0);
- baserig.addBox(0F, -3F, -6F, 12, 6, 12);
- baserig.setRotationPoint(0F, 21F, 0F);
- baserig.setTextureSize(64, 32);
- baserig.mirror = true;
- baserig.mirror = true;
- setRotation(baserig, 0F, 0F, 0F);
- baserig.mirror = false;
- CENTERROT = new ModelRenderer(this, "CENTERROT");
- CENTERROT.setRotationPoint(0F, 1.2F, 0F);
- setRotation(CENTERROT, 0F, 0F, 0F);
- CENTERROT.mirror = true;
- TOPLEFROT = new ModelRenderer(this, "TOPLEFROT");
- TOPLEFROT.setRotationPoint(-5.8F, 0F, 0F);
- setRotation(TOPLEFROT, 0F, 0F, 0.837758F);
- TOPLEFROT.mirror = true;
- TOPLEFROT.addBox("topleft", -1.5F, -3F, -4.5F, 3, 6, 9);
- CENTERROT.addChild(TOPLEFROT);
- TOPRIGROT = new ModelRenderer(this, "TOPRIGROT");
- TOPRIGROT.setRotationPoint(5.8F, 0F, 0F);
- setRotation(TOPRIGROT, 0F, 0F, -0.837758F);
- TOPRIGROT.mirror = true;
- TOPRIGROT.addBox("topright", -1.5F, -3F, -4.5F, 3, 6, 9);
- CENTERROT.addChild(TOPRIGROT);
- }
-
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5){
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- baserig.render(f5);
- body4.render(f5);
- topcenter.render(f5);
- baselef.render(f5);
- body3.render(f5);
- body2.render(f5);
- body1.render(f5);
-
- CENTERROT.render(f5);
-
- }
-
- public void render1(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float angle){
- body4.rotateAngleY = (float) (angle*Math.PI/180);
- body4.render(f5);
- topcenter.rotateAngleY = (float) (angle*Math.PI/180);
- topcenter.render(f5);
-
- body3.rotateAngleY = (float) (angle*Math.PI/180);
- body3.render(f5);
- body2.rotateAngleY = (float) (angle*Math.PI/180);
- body2.render(f5);
- body1.rotateAngleY = (float) (angle*Math.PI/180);
- body1.render(f5);
-
- baselef.rotateAngleY = (float) (angle*Math.PI/180);
- baselef.render(f5);
- baserig.rotateAngleY = (float) (angle*Math.PI/180);
- baserig.render(f5);
- }
-
- public void render2(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float angle){
- CENTERROT.rotateAngleY = (float) (angle*Math.PI/180);
- CENTERROT.render(f5);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z){
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity){
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- }
-
-}
-
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/500707e4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/500707e4c42100141fce95f06aba7e85
deleted file mode 100644
index a9ccaf7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/500707e4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,32 +0,0 @@
-package projectzulu.common.blocks;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.CustomMobData;
-import projectzulu.common.core.entitydeclaration.CreatureDeclaration;
-import projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class CreeperBlossomPrimedDefault extends CreatureDeclaration {
-
- public CreeperBlossomPrimedDefault() {
- super("CreeperBlossomPrimed", 43, EntityCreeperBlossomPrimed.class, null);
- setRegistrationProperties(128, 3, true);
- }
-
- @Override
- public void loadCreaturesFromConfig(Configuration config) {
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderCreeperBlossomPrimed(0.5f);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/514ae49fc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/514ae49fc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 43559de..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/514ae49fc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,176 +0,0 @@
-package projectzulu.common.world2.blueprint.cathedral;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.WeightedRandom;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.BoundaryPair;
-import projectzulu.common.world2.CellHelper;
-import projectzulu.common.world2.blueprint.Blueprint;
-
-public class BPCathedralHallwayEntrance implements Blueprint {
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- piecePos = applyRotation(piecePos, cellSize, cellIndexDirection);
- piecePos = applyMirror(piecePos, cellSize, cellIndexDirection);
-
- return getWallBlock(piecePos, cellSize, cellHeight, random, cellIndexDirection);
- }
-
- private ChunkCoordinates applyRotation(ChunkCoordinates piecePos, int cellSize,
- CellIndexDirection cellIndexDirection) {
- return CellHelper.rotateCellTo(piecePos, cellSize, CellIndexDirection.WestWall);
- }
-
- private ChunkCoordinates applyMirror(ChunkCoordinates piecePos, int cellSize, CellIndexDirection cellIndexDirection) {
- if (cellIndexDirection == CellIndexDirection.WestWall) {
- piecePos = CellHelper.mirrorCellTo(piecePos, cellSize, CellIndexDirection.NorthWestCorner);
- } else if (cellIndexDirection == CellIndexDirection.EastWall) {
- return CellHelper.mirrorCellTo(piecePos, cellSize, CellIndexDirection.SouthWestCorner);
- }
- return piecePos;
- }
-
- public BlockWithMeta getWallBlock(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- BlockWithMeta woodenPlank = new BlockWithMeta(Blocks.planks, 1);
- BlockWithMeta woodenStair = new BlockWithMeta(Blocks.spruce_stairs);
-
- List wallBlocks = new ArrayList(3);
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 2, 8)); // Cracked
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 1, 8)); // Mossy
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 0, 100)); // Regular
-
- /* Ceiling Top */
- if (piecePos.posY > cellHeight - cellSize) {
- int slope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 3, 1,
- BoundaryPair.createPair(0, cellSize * 2 - 8), cellHeight - cellSize / 3);
- int slopeBelow = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 2, 1,
- BoundaryPair.createPair(0, cellSize * 2 - 8), cellHeight - cellSize / 3);
- if (slope == 0) {
- if (slope != slopeBelow) {
- return new BlockWithMeta(woodenStair.block, getStairMeta(cellIndexDirection));
- } else {
- return woodenPlank;
- }
- } else if (slope > 0) {
- return new BlockWithMeta(Blocks.air);
- }
- }
-
- /* Outer Wall */
- if (piecePos.posZ == cellSize * 4 / 10) {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
-
- /* Mid Ceiling */
- if (piecePos.posY > cellHeight - cellSize * 2) {
- int slope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 3, 1,
- BoundaryPair.createPair(1, cellSize * 2 - 8), cellHeight - cellSize);
- int slopeBelow = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 2, 1,
- BoundaryPair.createPair(1, cellSize * 2 - 8), cellHeight - cellSize);
- if (slope == 0) {
- if (slope != slopeBelow) {
- return new BlockWithMeta(woodenStair.block, getStairMeta(cellIndexDirection));
- } else {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
- }
-
- /* Arches */
- int topAarchSlope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ + 0, 1,
- BoundaryPair.createPair(1, cellSize * 2), cellHeight - cellSize);
- if (topAarchSlope == 0 && piecePos.posX % 3 == 1) {
- if (piecePos.posZ > cellSize * 4 / 10) {
- return new BlockWithMeta(woodenStair.block, getArchStairMeta(cellIndexDirection, true));
- }
- }
-
- int botAarchSlope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ + 1, 1,
- BoundaryPair.createPair(1, cellSize * 2), cellHeight - cellSize);
- if (botAarchSlope == 0 && piecePos.posX % 3 == 1) {
- if (piecePos.posZ > cellSize * 4 / 10) {
- return new BlockWithMeta(woodenStair.block, getArchStairMeta(cellIndexDirection, false));
- }
- }
- }
-
- /* Red Carpet */
- if (piecePos.posY == 1 && piecePos.posZ == cellSize - 1) {
- return new BlockWithMeta(Blocks.carpet, 14);
- }
-
- /* Pews */
- if (piecePos.posY == 1 && piecePos.posX % 2 == 0) {
- if (piecePos.posZ == cellSize * 4 / 10 + 1 || piecePos.posZ == cellSize - 2) {
- return new BlockWithMeta(Blocks.oak_stairs, getPewStairMeta(cellIndexDirection,
- piecePos.posZ == cellSize - 2));
- }
- }
-
- if (piecePos.posZ > cellSize * 4 / 10 && piecePos.posY == 0) {
- if (piecePos.posZ == cellSize * 4 / 10 + 1) {
- return new BlockWithMeta(Blocks.cobblestone);
- } else {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- private int getStairMeta(CellIndexDirection cellIndexDirection) {
- switch (cellIndexDirection) {
- case WestWall:
- return 0;
- case EastWall:
- return 1;
- case SouthWall:
- return 3;
- case NorthWall:
- default:
- return 2;
- }
- }
-
- public int getArchStairMeta(CellIndexDirection cellIndexDirection, boolean top) {
- switch (cellIndexDirection) {
- case WestWall:
- return top ? 0 : 5;
- case EastWall:
- return top ? 1 : 4;
- case SouthWall:
- return 2;
- case NorthWall:
- default:
- return 2;
- }
- }
-
- private int getPewStairMeta(CellIndexDirection cellIndexDirection, boolean onRight) {
- switch (cellIndexDirection) {
- case WestWall:
- return onRight ? 0 : 1;
- case EastWall:
- return onRight ? 1 : 0;
- default:
- return 0;
- }
- }
-
- @Override
- public String getIdentifier() {
- return "BPCathedralHallwayEntrance";
- }
-
- @Override
- public int getWeight() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/602825f4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/602825f4c42100141fce95f06aba7e85
deleted file mode 100644
index 7c0367d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/602825f4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,154 +0,0 @@
-package com.ngb.projectzulu.common.world2.randomizer;
-
-import java.util.EnumSet;
-import java.util.Random;
-
-import net.minecraft.world.World;
-import com.ngb.projectzulu.common.world2.Direction;
-import com.ngb.projectzulu.common.world2.MazeCell;
-
-public class WalledMazeRandomizer extends Randomizer {
-
- Random random;
-
- public WalledMazeRandomizer(World world) {
- this.random = world.rand;
- }
-
- @Override
- public void randomize(MazeCell[][] allCells) {
- /* Mark Outer Cells As Walls (X axis) */
- for (int i = 0; i < allCells.length; i++) {
- int k = 0;
- allCells[i][k].rawState = 1;
- k = allCells[0].length - 1;
- allCells[i][k].rawState = 1;
- }
-
- /* Mark Outer Cells As Walls (Z axis) */
- for (int k = 0; k < allCells[0].length; k++) {
- int i = 0;
- allCells[i][k].rawState = 1;
- i = allCells.length - 1;
- allCells[i][k].rawState = 1;
- }
-
- /* Perform X wall placement attempts, then Assume that the maze is sufficiently random/complete */
- int attemptsSinceLastPlaced = 0;
- while (attemptsSinceLastPlaced < 800) {
-
- /* Decide Random Length, Random Direction to try Placing Walls */
- int randLength = random.nextInt(6) + 1;
- Direction direction = Direction.getCardinal(random);
-
- /* Select Wall to Try to Place at */
- int selectedX = random.nextInt(allCells.length);
- int selectedZ = random.nextInt(allCells[0].length);
- while (allCells[selectedX][selectedZ].rawState != 1) {
- selectedX = random.nextInt(allCells.length);
- selectedZ = random.nextInt(allCells[0].length);
- }
-
- if (isCellWallValid(allCells, selectedX, selectedZ, direction, randLength)) {
- for (int i = 1; i <= randLength; i++) {
- int tempX = selectedX + direction.x * i;
- int tempZ = selectedZ + direction.z * i;
- allCells[tempX][tempZ].rawState = 1;
- }
- attemptsSinceLastPlaced = 0;
- } else {
- attemptsSinceLastPlaced++;
- }
- }
- }
-
- /**
- * Evaluates if a wall of cells (of length randLength in direction) without touching another wall cell
- *
- * @param allCells
- * @param selectedX,Z Starting Wall Cell that Wall is Placed off of
- * @param direction Direction to generate wall of cells
- * @param randLength Length of wall of cells to place
- * @return
- */
- protected boolean isCellWallValid(MazeCell[][] allCells, int selectedX, int selectedZ, Direction direction,
- int randLength) {
-
- for (int i = 1; i <= randLength; i++) {
- int cellToPlaceX = selectedX + direction.x * i;
- int cellToPlaceZ = selectedZ + direction.z * i;
-
- if (isCellOutOfBounds(allCells, cellToPlaceX, cellToPlaceZ)
- || allCells[cellToPlaceX][cellToPlaceZ].rawState == 1) {
- return false;
- }
-
- /*
- * Never check previous cell, it should be a wall. Ignore maze edge by only check the 'Forward Hemisphere'
- * (+- 90o from Direction) on edge cells.
- */
- EnumSet neighbourDirections = Direction.getOrdinals();
- neighbourDirections.remove(direction.invert());
- neighbourDirections.remove(direction.invert().rotateOrdinal(true));
- neighbourDirections.remove(direction.invert().rotateOrdinal(false));
-
- for (Direction cellDirection : neighbourDirections) {
- int neighbourCellX = cellToPlaceX + cellDirection.x;
- int neighbourCellZ = cellToPlaceZ + cellDirection.z;
-
- if (isCellOutOfBounds(allCells, neighbourCellX, neighbourCellZ)) {
- continue;
- }
-
- if (allCells[neighbourCellX][neighbourCellZ].rawState == 1) {
- return false;
- }
-
- if (isCellSurrounded(allCells, neighbourCellX, neighbourCellZ)) {
- return false;
- }
-
- }
- }
- return true;
- }
-
- /**
- * Evaluates if the Provided Cells X,Z is surrounded by other walls
- *
- * @param allCells
- * @param currentX
- * @param currentZ
- * @return
- */
- protected boolean isCellSurrounded(MazeCell[][] allCells, int currentX, int currentZ) {
- int numberOfSidesOccupied = 0;
-
- for (Direction direction : Direction.getCardinals()) {
- int neighbourX = currentX + direction.x;
- int neighbourZ = currentZ + direction.z;
-
- if (isCellOutOfBounds(allCells, neighbourX, neighbourZ)) {
- continue;
- }
-
- if (allCells[neighbourX][neighbourZ].rawState == 1) {
- numberOfSidesOccupied++;
- }
- }
-
- return numberOfSidesOccupied < 4 ? false : true;
- }
-
- /**
- * Evaluates if the Cell is Out of Bounds
- *
- * @param allCells
- * @param currentX
- * @param currentZ
- * @return
- */
- private boolean isCellOutOfBounds(MazeCell[][] allCells, int currentX, int currentZ) {
- return currentX < 0 || currentX >= allCells.length || currentZ < 0 || currentZ >= allCells[0].length;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/618869e6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/618869e6c42100141fce95f06aba7e85
deleted file mode 100644
index 2039367..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/618869e6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,75 +0,0 @@
-package projectzulu.common.world2.architect;
-
-import java.awt.Point;
-
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.CellHelper;
-import projectzulu.common.world2.MazeCell;
-import projectzulu.common.world2.blueprint.BPSetGenericCardinal;
-import projectzulu.common.world2.blueprint.BPSetGenericCarved;
-import projectzulu.common.world2.blueprint.BPSetGenericEdge;
-import projectzulu.common.world2.blueprint.BPSetGenericLimited;
-import projectzulu.common.world2.blueprint.BPSetGenericUncarved;
-import projectzulu.common.world2.blueprint.BlueprintSet;
-import projectzulu.common.world2.blueprints.oasis.BPOasisEdgeDiagonal;
-import projectzulu.common.world2.blueprints.oasis.BPOasisEdgeRandomMid;
-import projectzulu.common.world2.blueprints.oasis.BPOasisEdgeRandomPoint;
-import projectzulu.common.world2.blueprints.oasis.BPOasisGrass;
-import projectzulu.common.world2.blueprints.oasis.BPOasisPool;
-import projectzulu.common.world2.blueprints.oasis.BPOasisSandCorner;
-import projectzulu.common.world2.blueprints.oasis.BPOasisTreeGrass;
-
-public class ArchitectOasis extends ArchitectBase {
- BlueprintSetStockpile edgeStockpile;
- BPSetGenericCarved sandCorner = new BPSetGenericCarved(new BPOasisSandCorner());
-
- public ArchitectOasis(World world) {
- super(world);
- edgeStockpile = new BlueprintSetStockpile(world.rand);
- edgeStockpile.addBlueprintSet(new BPSetGenericEdge(new BPOasisEdgeRandomPoint()));
- edgeStockpile.addBlueprintSet(new BPSetGenericEdge(new BPOasisEdgeDiagonal(false)));
- edgeStockpile.addBlueprintSet(new BPSetGenericEdge(new BPOasisEdgeDiagonal(true)));
- edgeStockpile.addBlueprintSet(new BPSetGenericEdge(new BPOasisEdgeRandomMid(false)));
- edgeStockpile.addBlueprintSet(new BPSetGenericEdge(new BPOasisEdgeRandomMid(true)));
- edgeStockpile.addBlueprintSet(sandCorner);
- stockpile.addBlueprintSet(new BPSetGenericUncarved(new BPOasisPool()));
- stockpile.addBlueprintSet(new BPSetGenericCardinal(new BPOasisGrass(), 1));
- stockpile.addBlueprintSet(new BPSetGenericLimited(new BPOasisTreeGrass(), 1, 3));
- }
-
- @Override
- public void assignBlueprint(MazeCell[][] cells, Point buildCoords, int pass, int maxPass) {
- BlueprintSet set = null;
- if (CellHelper.isCorner(cells, buildCoords)) {
- set = sandCorner;
- }
- if (set == null) {
- set = edgeStockpile.getRandomApplicable(cells, buildCoords);
- }
- if (set == null) {
- set = stockpile.getRandomApplicable(cells, buildCoords);
- }
-
- if (set != null) {
- set.assignCellsWithBlueprints(cells, buildCoords, random);
- }
- }
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(MazeCell cell, ChunkCoordinates piecePos) {
- BlueprintSet set;
- set = edgeStockpile.getBlueprintSet(cell);
- if (set != null) {
- return edgeStockpile.getBlueprintSet(cell).getBlockFromBlueprint(piecePos, cell.size, cell.getHeight(),
- cell.getDirection(), random, cell.getBuildingID());
- }
- set = stockpile.getBlueprintSet(cell);
- if (set != null) {
- return stockpile.getBlueprintSet(cell).getBlockFromBlueprint(piecePos, cell.size, cell.getHeight(),
- cell.getDirection(), random, cell.getBuildingID());
- }
- return null;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/804ba5a49d9d00141ce0d62fbd2fd1cf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/804ba5a49d9d00141ce0d62fbd2fd1cf
deleted file mode 100644
index 6efb84f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/804ba5a49d9d00141ce0d62fbd2fd1cf
+++ /dev/null
@@ -1,206 +0,0 @@
-package com.stek101.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import com.stek101.projectzulu.common.mobs.entity.EntityFollower;
-
-public class ModelFollower extends ModelBase {
-
- float heightToRaise = 10f;
- float renderScale = 0.5f;
-
- ModelRenderer sidebody2;
- ModelRenderer body;
- ModelRenderer sidebody3;
- ModelRenderer sidebody1;
- ModelRenderer ANTENLEFROT1;
- ModelRenderer ANTENRIGROT1;
- ModelRenderer LEG11ROT;
- ModelRenderer LEG21ROT;
- ModelRenderer LEG31ROT;
- ModelRenderer LEG41ROT;
- private ModelRenderer ANTENLEFROT2;
- private ModelRenderer ANTENLEFROT3;
- private ModelRenderer ANTENRIGROT2;
- private ModelRenderer ANTENRIGROT3;
- private ModelRenderer LEG12ROT;
- private ModelRenderer LEG22ROT;
- private ModelRenderer LEG32ROT;
- private ModelRenderer LEG42ROT;
-
- public ModelFollower() {
- textureWidth = 64;
- textureHeight = 32;
- setTextureOffset("ANTENLEFROT1.antenlef1", 54, 0);
- setTextureOffset("ANTENLEFROT2.antenlef2", 50, 0);
- setTextureOffset("ANTENLEFROT3.antenlef3", 47, 0);
- setTextureOffset("ANTENRIGROT1.antenrig1", 54, 0);
- setTextureOffset("ANTENRIGROT2.antenrig2", 50, 0);
- setTextureOffset("ANTENRIGROT3.antenrig3", 47, 0);
- setTextureOffset("LEG11ROT.leg11", 34, 0);
- setTextureOffset("LEG12ROT.leg12", 34, 3);
- setTextureOffset("LEG21ROT.leg21", 34, 0);
- setTextureOffset("LEG22ROT.leg22", 34, 3);
- setTextureOffset("LEG31ROT.leg31", 34, 0);
- setTextureOffset("LEG32ROT.leg32", 34, 3);
- setTextureOffset("LEG41ROT.leg41", 34, 0);
- setTextureOffset("LEG42ROT.leg42", 34, 3);
-
- sidebody2 = new ModelRenderer(this, 42, 17);
- sidebody2.addBox(0F, -2.5F, -5F, 1, 5, 10);
- sidebody2.setRotationPoint(4.5F, 18.5F - heightToRaise, 0F);
- sidebody2.setTextureSize(64, 32);
- sidebody2.mirror = true;
- setRotation(sidebody2, 0F, 0F, 0F);
- body = new ModelRenderer(this, 0, 14);
- body.addBox(-4.5F, -3F, -12F, 9, 6, 12);
- body.setRotationPoint(0F, 18.5F - heightToRaise, 6F);
- body.setTextureSize(64, 32);
- body.mirror = true;
- setRotation(body, 0F, 0F, 0F);
- sidebody3 = new ModelRenderer(this, 0, 2);
- sidebody3.addBox(-3F, 0F, -5.5F, 6, 1, 11);
- sidebody3.setRotationPoint(0F, 21.5F - heightToRaise, 0F);
- sidebody3.setTextureSize(64, 32);
- sidebody3.mirror = true;
- setRotation(sidebody3, 0F, 0F, 0F);
- sidebody1 = new ModelRenderer(this, 42, 17);
- sidebody1.addBox(-1F, -2.5F, -5F, 1, 5, 10);
- sidebody1.setRotationPoint(-4.5F, 18.5F - heightToRaise, 0F);
- sidebody1.setTextureSize(64, 32);
- sidebody1.mirror = true;
- setRotation(sidebody1, 0F, 0F, 0F);
- ANTENLEFROT1 = new ModelRenderer(this, "ANTENLEFROT1");
- ANTENLEFROT1.setRotationPoint(-3F, 17.5F - heightToRaise, -6F);
- setRotation(ANTENLEFROT1, -0.5235988F, 0.5235988F, 0F);
- ANTENLEFROT1.mirror = true;
- ANTENLEFROT1.addBox("antenlef1", -0.5F, -0.5F, -4F, 1, 1, 4);
- ANTENLEFROT2 = new ModelRenderer(this, "ANTENLEFROT2");
- ANTENLEFROT2.setRotationPoint(0F, 0F, -4F);
- setRotation(ANTENLEFROT2, -0.5235988F, 0F, 0F);
- ANTENLEFROT2.mirror = true;
- ANTENLEFROT2.addBox("antenlef2", -0.5F, -0.5F, -3F, 1, 1, 3);
- ANTENLEFROT3 = new ModelRenderer(this, "ANTENLEFROT3");
- ANTENLEFROT3.setRotationPoint(0F, 0F, -3F);
- setRotation(ANTENLEFROT3, -0.5235988F, 0F, 0F);
- ANTENLEFROT3.mirror = true;
- ANTENLEFROT3.addBox("antenlef3", -0.5F, -0.5F, -2F, 1, 1, 2);
- ANTENLEFROT2.addChild(ANTENLEFROT3);
- ANTENLEFROT1.addChild(ANTENLEFROT2);
- ANTENRIGROT1 = new ModelRenderer(this, "ANTENRIGROT1");
- ANTENRIGROT1.setRotationPoint(3F, 17.5F - heightToRaise, -6F);
- setRotation(ANTENRIGROT1, -0.5235988F, -0.5235988F, 0F);
- ANTENRIGROT1.mirror = true;
- ANTENRIGROT1.addBox("antenrig1", -0.5F, -0.5F, -4F, 1, 1, 4);
- ANTENRIGROT2 = new ModelRenderer(this, "ANTENRIGROT2");
- ANTENRIGROT2.setRotationPoint(0F, 0F, -4F);
- setRotation(ANTENRIGROT2, -0.5235988F, 0F, 0F);
- ANTENRIGROT2.mirror = true;
- ANTENRIGROT2.addBox("antenrig2", -0.5F, -0.5F, -3F, 1, 1, 3);
- ANTENRIGROT3 = new ModelRenderer(this, "ANTENRIGROT3");
- ANTENRIGROT3.setRotationPoint(0F, 0F, -3F);
- setRotation(ANTENRIGROT3, -0.5235988F, 0F, 0F);
- ANTENRIGROT3.mirror = true;
- ANTENRIGROT3.addBox("antenrig3", -0.5F, -0.5F, -2F, 1, 1, 2);
- ANTENRIGROT2.addChild(ANTENRIGROT3);
- ANTENRIGROT1.addChild(ANTENRIGROT2);
- LEG11ROT = new ModelRenderer(this, "LEG11ROT");
- LEG11ROT.setRotationPoint(-3F, 22F - heightToRaise, -3F);
- setRotation(LEG11ROT, 0F, 0F, -0.1745329F);
- LEG11ROT.mirror = true;
- LEG11ROT.addBox("leg11", -4F, -0.5F, -1F, 4, 1, 2);
- LEG12ROT = new ModelRenderer(this, "LEG12ROT");
- LEG12ROT.setRotationPoint(-4F, 0F, 0F);
- setRotation(LEG12ROT, 0F, 0F, -0.7853982F);
- LEG12ROT.mirror = true;
- LEG12ROT.addBox("leg12", -2F, -0.5F, -1F, 2, 1, 2);
- LEG11ROT.addChild(LEG12ROT);
- LEG21ROT = new ModelRenderer(this, "LEG21ROT");
- LEG21ROT.setRotationPoint(3F, 22F - heightToRaise, -3F);
- setRotation(LEG21ROT, 0F, 0F, 0.1745329F);
- LEG21ROT.mirror = true;
- LEG21ROT.addBox("leg21", 0F, -0.5F, -1F, 4, 1, 2);
- LEG22ROT = new ModelRenderer(this, "LEG22ROT");
- LEG22ROT.setRotationPoint(4F, 0F, 0F);
- setRotation(LEG22ROT, 0F, 0F, 0.7853982F);
- LEG22ROT.mirror = true;
- LEG22ROT.addBox("leg22", 0F, -0.5F, -1F, 2, 1, 2);
- LEG21ROT.addChild(LEG22ROT);
- LEG31ROT = new ModelRenderer(this, "LEG31ROT");
- LEG31ROT.setRotationPoint(-3F, 22F - heightToRaise, 3F);
- setRotation(LEG31ROT, 0F, 0F, -0.1745329F);
- LEG31ROT.mirror = true;
- LEG31ROT.addBox("leg31", -4F, -0.5F, -1F, 4, 1, 2);
- LEG32ROT = new ModelRenderer(this, "LEG32ROT");
- LEG32ROT.setRotationPoint(-4F, 0F, 0F);
- setRotation(LEG32ROT, 0F, 0F, -0.7853982F);
- LEG32ROT.mirror = true;
- LEG32ROT.addBox("leg32", -2F, -0.5F, -1F, 2, 1, 2);
- LEG31ROT.addChild(LEG32ROT);
- LEG41ROT = new ModelRenderer(this, "LEG41ROT");
- LEG41ROT.setRotationPoint(3F, 22F - heightToRaise, 3F);
- setRotation(LEG41ROT, 0F, 0F, 0.1745329F);
- LEG41ROT.mirror = true;
- LEG41ROT.addBox("leg41", 0F, -0.5F, -1F, 4, 1, 2);
- LEG42ROT = new ModelRenderer(this, "LEG42ROT");
- LEG42ROT.setRotationPoint(4F, 0F, 0F);
- setRotation(LEG42ROT, 0F, 0F, 0.7853982F);
- LEG42ROT.mirror = true;
- LEG42ROT.addBox("leg42", 0F, -0.5F, -1F, 2, 1, 2);
- LEG41ROT.addChild(LEG42ROT);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- float scale = f5;
- if (entity instanceof EntityFollower && ((EntityFollower) entity).getFollowerIndex() % 2 == 0) {
- scale = f5 * 0.58f;
- }
-
- /* sidebody2.render(renderScale * f5);
- body.render(renderScale * f5);
- sidebody3.render(renderScale * f5);
- sidebody1.render(renderScale * f5);
- //ANTENLEFROT1.render(renderScale * f5);
- //ANTENRIGROT1.render(renderScale * f5);
- LEG11ROT.render(renderScale * f5);
- LEG21ROT.render(renderScale * f5);
- LEG31ROT.render(renderScale * f5);
- LEG41ROT.render(renderScale * f5);
- */
- sidebody2.render(scale);
- body.render(scale);
- sidebody3.render(scale);
- sidebody1.render(scale);
- LEG11ROT.render(scale);
- LEG21ROT.render(scale);
- LEG31ROT.render(scale);
- LEG41ROT.render(scale);
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
- super.setLivingAnimations(par1EntityLiving, par2, par3, par4);
- LEG11ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F + (float) Math.PI) * 1.4F * par3;
- LEG21ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
- LEG31ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F + (float) Math.PI) * 1.4F * par3;
- LEG41ROT.rotateAngleY = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/a1aa27a2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/a1aa27a2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 25a049d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/a1aa27a2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,24 +0,0 @@
-package projectzulu.common.potion.effects;
-
-import net.minecraft.entity.EntityLivingBase;
-
-public class PotionCleansing extends PotionZulu {
-
- public PotionCleansing(int par1, boolean par2, int par3) {
- super(par1, par2, par3);
-
- setIconIndex(1, 0);
- setEffectiveness(1.0D);
- }
-
- @Override
- public void performEffect(EntityLivingBase effectedEntity, int par2) {
- super.performEffect(effectedEntity, par2);
- }
-
- @Override
- public boolean isReady(int par1, int par2) {
- int var3 = 25 >> par2;
- return var3 > 0 ? par1 % var3 == 0 : true;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/b01f27a0c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/b01f27a0c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index af2b6f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/b01f27a0c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,122 +0,0 @@
-package projectzulu.common.blocks.heads;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import projectzulu.common.api.BlockList;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class ItemMobHeads extends ItemBlock {
-
- public ItemMobHeads(Block mobHeads) {
- super(mobHeads);
- this.setCreativeTab(CreativeTabs.tabDecorations);
- setMaxDamage(0);
- setHasSubtypes(true);
- maxStackSize = 8;
- }
-
- // @Override
- // @SideOnly(Side.CLIENT)
- // public IIcon getIconFromDamage(int par1) {
- // return Block.blocksList[this.itemID].getIcon(2, par1);
- // }
-
- /**
- * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
- * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
- */
- @Override
- public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4,
- int par5, int par6, int par7, float par8, float par9, float par10) {
- if (par7 == 0) {
- return false;
- } else if (!par3World.getBlock(par4, par5, par6).getMaterial().isSolid()) {
- return false;
- } else {
- if (par7 == 1) {
- ++par5;
- }
-
- if (par7 == 2) {
- --par6;
- }
-
- if (par7 == 3) {
- ++par6;
- }
-
- if (par7 == 4) {
- --par4;
- }
-
- if (par7 == 5) {
- ++par4;
- }
-
- if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) {
- return false;
- } else if (!BlockList.mobHeads.get().canPlaceBlockAt(par3World, par4, par5, par6)) {
- return false;
- } else if (BlockList.mobHeads.isPresent()) {
- par3World.setBlock(par4, par5, par6, BlockList.mobHeads.get(), par7, 3);
- int var11 = 0;
-
- if (par7 == 1) {
- var11 = MathHelper.floor_double((double) (par2EntityPlayer.rotationYaw * 16.0F / 360.0F) + 0.5D) & 15;
- }
-
- TileEntity var12 = par3World.getTileEntity(par4, par5, par6);
-
- if (var12 != null && var12 instanceof TileEntityMobHeads) {
- String var13 = "";
-
- if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("SkullOwner")) {
- var13 = par1ItemStack.getTagCompound().getString("SkullOwner");
- }
-
- ((TileEntityMobHeads) var12).setSkullType(par1ItemStack.getItemDamage(), var13);
- ((TileEntityMobHeads) var12).setRotation(var11);
- /* Was Used to Summon wither For Block Skulls */
- // ((BlockSkull)Block.field_82512_cj).func_82529_a(par3World, par4, par5, par6,
- // (TileEntitySkull)var12);
- }
-
- --par1ItemStack.stackSize;
- return true;
- } else {
- return false;
- }
- }
- }
-
- /**
- * Returns the metadata of the block which this Item (ItemBlock) can place
- */
- public int getMetadata(int par1) {
- return par1;
- }
-
- /*
- * for every block, you need a name. it doesn't matter, really. its just so all your blocks wont have the same name.
- * delete this part and all your blocks have the same name.
- */
- @Override
- public String getUnlocalizedName(ItemStack itemstack) {
- return itemstack.getItem().getUnlocalizedName() + "."
- + BlockMobHeads.Head.getByMeta(itemstack.getItemDamage()).toString().toLowerCase();
- }
-
- @Override
- public IIcon getIconFromDamage(int par1) {
- return field_150939_a.getIcon(1, par1);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c0341ea2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c0341ea2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index d9e3e93..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c0341ea2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,89 +0,0 @@
-package projectzulu.common.potion.brewingstands;
-
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.common.core.DefaultProps;
-
-public class GuiBrewingStandSingle extends GuiContainer {
-
- private TileEntityBrewingBase brewingStand;
-
- public static final ResourceLocation brewing1 = new ResourceLocation(DefaultProps.coreKey, "gui/brewing1.png");
- public static final ResourceLocation brewing3 = new ResourceLocation(DefaultProps.coreKey, "gui/brewing3.png");
-
- public GuiBrewingStandSingle(InventoryPlayer inventoryPlayer, TileEntityBrewingBase tileEntity) {
- super(new ContainerBrewingStandSingle(inventoryPlayer, tileEntity));
- brewingStand = tileEntity;
- }
-
- /**
- * Draw the Foreground layer for the GuiContainer (everything in front of the items)
- */
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- String s = StatCollector.translateToLocal(this.brewingStand.getInventoryName());
- this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
- this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2,
- 4210752);
- }
-
- /**
- * Draw the background layer for the GuiContainer (everything behind the items)
- */
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- if (brewingStand.getSizeInventory() - 1 < 3) {
- this.mc.renderEngine.bindTexture(brewing1);
- } else {
- this.mc.renderEngine.bindTexture(brewing3);
- }
-
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int i1 = this.brewingStand.getBrewTime();
-
- if (i1 > 0) {
- int j1 = (int) (28.0F * (1.0F - i1 / 400.0F));
-
- if (j1 > 0) {
- this.drawTexturedModalRect(k + 97, l + 16, 176, 0, 9, j1);
- }
-
- int k1 = i1 / 2 % 7;
-
- switch (k1) {
- case 0:
- j1 = 29;
- break;
- case 1:
- j1 = 24;
- break;
- case 2:
- j1 = 20;
- break;
- case 3:
- j1 = 16;
- break;
- case 4:
- j1 = 11;
- break;
- case 5:
- j1 = 6;
- break;
- case 6:
- j1 = 0;
- }
-
- if (j1 > 0) {
- this.drawTexturedModalRect(k + 65, l + 14 + 29 - j1, 185, 29 - j1, 12, j1);
- }
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c0d1d801c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c0d1d801c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 014faa4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c0d1d801c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.ngb.projectzulu.common.world2.randomizer;
-
-import java.awt.Point;
-import java.util.Random;
-
-import projectzulu.common.world2.MazeCell;
-import projectzulu.common.world2.architect.ArchitectBase;
-
-public class SelectedFewRandomizer extends Randomizer {
-
- Random random;
- int maxSelected;
- int selectionChance;
- boolean allowTouching;
-
- public SelectedFewRandomizer(Random random, int maxSelected, int selectionChance, boolean allowTouching) {
- this.random = random;
- this.maxSelected = maxSelected;
- this.selectionChance = selectionChance;
- this.allowTouching = allowTouching;
- }
-
- @Override
- public void randomize(MazeCell[][] cells) {
- int[] indexes = new int[cells.length * cells[0].length];
- for (int i = 0; i < indexes.length; i++) {
- indexes[i] = i;
- }
- shuffleArray(indexes);
-
- int count = 0;
- for (int index : indexes) {
- int i = (int) (index / cells[0].length);
- int k = index % cells[0].length;
- if (random.nextInt(100) <= selectionChance
- && (allowTouching || ArchitectBase.isTouchingAmount(cells, new Point(i, k), 0, 0, true, 1))) {
- cells[i][k].rawState = 1;
- count++;
- if (maxSelected > -1 && count >= maxSelected) {
- return;
- }
- }
- }
- }
-
- private void shuffleArray(int[] array) {
- Random random = new Random();
- for (int i = array.length - 1; i >= 0; i--) {
- int index = random.nextInt(i + 1);
- /* Simple swap */
- int tempValue = array[index];
- array[index] = array[i];
- array[i] = tempValue;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/d2e50ffac42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/d2e50ffac42100141fce95f06aba7e85
deleted file mode 100644
index 5e127d1..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/d2e50ffac42100141fce95f06aba7e85
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.blocks.ItemCoconutSeed;
-import com.ngb.projectzulu.common.core.itemblockdeclaration.ItemDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class CoconutSeedDeclaration extends ItemDeclaration {
-
- public CoconutSeedDeclaration() {
- super("CoconutSeed");
- }
-
- @Override
- protected boolean createItem() {
- ItemList.coconutSeed = Optional.of(new ItemCoconutSeed(6, false, name.toLowerCase()));
- return true;
- }
-
- @Override
- protected void registerItem() {
- Item item = ItemList.coconutSeed.get();
- GameRegistry.registerItem(item, name);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/f0b33501c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/f0b33501c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 32adadb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/f0b33501c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.CustomMobData;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.entitydeclaration.EntityProperties;
-import projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import projectzulu.common.mobs.entity.EntityMummy;
-import projectzulu.common.mobs.models.ModelMummy;
-import projectzulu.common.mobs.renders.RenderGenericLiving;
-import projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class MummyDeclaration extends SpawnableDeclaration {
-
- public MummyDeclaration() {
- super("Mummy", 5, EntityMummy.class, EnumCreatureType.monster);
- setSpawnProperties(5, 100, 1, 2);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 2);
-
- eggColor1 = (255 << 16) + (255 << 8) + 255;
- eggColor2 = (255 << 16) + (255 << 8) + 255;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- customMobData.entityProperties = new EntityProperties(16f, 3.0f, 0.25f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericLiving(new ModelMummy(), 0.5f, new ResourceLocation(DefaultProps.mobKey, "mummy.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.desert.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.desertHills.biomeName);
- defaultBiomesToSpawn.addAll(typeToArray(Type.DESERT));
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/0193be01c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/0193be01c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index d7f1c40..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/0193be01c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,176 +0,0 @@
-package com.ngb.projectzulu.common.world2.blueprint.cathedral;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.WeightedRandom;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.BoundaryPair;
-import projectzulu.common.world2.CellHelper;
-import projectzulu.common.world2.blueprint.Blueprint;
-
-public class BPCathedralHallwayEntrance implements Blueprint {
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- piecePos = applyRotation(piecePos, cellSize, cellIndexDirection);
- piecePos = applyMirror(piecePos, cellSize, cellIndexDirection);
-
- return getWallBlock(piecePos, cellSize, cellHeight, random, cellIndexDirection);
- }
-
- private ChunkCoordinates applyRotation(ChunkCoordinates piecePos, int cellSize,
- CellIndexDirection cellIndexDirection) {
- return CellHelper.rotateCellTo(piecePos, cellSize, CellIndexDirection.WestWall);
- }
-
- private ChunkCoordinates applyMirror(ChunkCoordinates piecePos, int cellSize, CellIndexDirection cellIndexDirection) {
- if (cellIndexDirection == CellIndexDirection.WestWall) {
- piecePos = CellHelper.mirrorCellTo(piecePos, cellSize, CellIndexDirection.NorthWestCorner);
- } else if (cellIndexDirection == CellIndexDirection.EastWall) {
- return CellHelper.mirrorCellTo(piecePos, cellSize, CellIndexDirection.SouthWestCorner);
- }
- return piecePos;
- }
-
- public BlockWithMeta getWallBlock(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- BlockWithMeta woodenPlank = new BlockWithMeta(Blocks.planks, 1);
- BlockWithMeta woodenStair = new BlockWithMeta(Blocks.spruce_stairs);
-
- List wallBlocks = new ArrayList(3);
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 2, 8)); // Cracked
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 1, 8)); // Mossy
- wallBlocks.add(new BlockWithMeta(Blocks.stonebrick, 0, 100)); // Regular
-
- /* Ceiling Top */
- if (piecePos.posY > cellHeight - cellSize) {
- int slope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 3, 1,
- BoundaryPair.createPair(0, cellSize * 2 - 8), cellHeight - cellSize / 3);
- int slopeBelow = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 2, 1,
- BoundaryPair.createPair(0, cellSize * 2 - 8), cellHeight - cellSize / 3);
- if (slope == 0) {
- if (slope != slopeBelow) {
- return new BlockWithMeta(woodenStair.block, getStairMeta(cellIndexDirection));
- } else {
- return woodenPlank;
- }
- } else if (slope > 0) {
- return new BlockWithMeta(Blocks.air);
- }
- }
-
- /* Outer Wall */
- if (piecePos.posZ == cellSize * 4 / 10) {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
-
- /* Mid Ceiling */
- if (piecePos.posY > cellHeight - cellSize * 2) {
- int slope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 3, 1,
- BoundaryPair.createPair(1, cellSize * 2 - 8), cellHeight - cellSize);
- int slopeBelow = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ - 2, 1,
- BoundaryPair.createPair(1, cellSize * 2 - 8), cellHeight - cellSize);
- if (slope == 0) {
- if (slope != slopeBelow) {
- return new BlockWithMeta(woodenStair.block, getStairMeta(cellIndexDirection));
- } else {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
- }
-
- /* Arches */
- int topAarchSlope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ + 0, 1,
- BoundaryPair.createPair(1, cellSize * 2), cellHeight - cellSize);
- if (topAarchSlope == 0 && piecePos.posX % 3 == 1) {
- if (piecePos.posZ > cellSize * 4 / 10) {
- return new BlockWithMeta(woodenStair.block, getArchStairMeta(cellIndexDirection, true));
- }
- }
-
- int botAarchSlope = CellHelper.getSlopeIndex(piecePos, cellSize - piecePos.posZ + 1, 1,
- BoundaryPair.createPair(1, cellSize * 2), cellHeight - cellSize);
- if (botAarchSlope == 0 && piecePos.posX % 3 == 1) {
- if (piecePos.posZ > cellSize * 4 / 10) {
- return new BlockWithMeta(woodenStair.block, getArchStairMeta(cellIndexDirection, false));
- }
- }
- }
-
- /* Red Carpet */
- if (piecePos.posY == 1 && piecePos.posZ == cellSize - 1) {
- return new BlockWithMeta(Blocks.carpet, 14);
- }
-
- /* Pews */
- if (piecePos.posY == 1 && piecePos.posX % 2 == 0) {
- if (piecePos.posZ == cellSize * 4 / 10 + 1 || piecePos.posZ == cellSize - 2) {
- return new BlockWithMeta(Blocks.oak_stairs, getPewStairMeta(cellIndexDirection,
- piecePos.posZ == cellSize - 2));
- }
- }
-
- if (piecePos.posZ > cellSize * 4 / 10 && piecePos.posY == 0) {
- if (piecePos.posZ == cellSize * 4 / 10 + 1) {
- return new BlockWithMeta(Blocks.cobblestone);
- } else {
- return (BlockWithMeta) WeightedRandom.getRandomItem(random, wallBlocks);
- }
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- private int getStairMeta(CellIndexDirection cellIndexDirection) {
- switch (cellIndexDirection) {
- case WestWall:
- return 0;
- case EastWall:
- return 1;
- case SouthWall:
- return 3;
- case NorthWall:
- default:
- return 2;
- }
- }
-
- public int getArchStairMeta(CellIndexDirection cellIndexDirection, boolean top) {
- switch (cellIndexDirection) {
- case WestWall:
- return top ? 0 : 5;
- case EastWall:
- return top ? 1 : 4;
- case SouthWall:
- return 2;
- case NorthWall:
- default:
- return 2;
- }
- }
-
- private int getPewStairMeta(CellIndexDirection cellIndexDirection, boolean onRight) {
- switch (cellIndexDirection) {
- case WestWall:
- return onRight ? 0 : 1;
- case EastWall:
- return onRight ? 1 : 0;
- default:
- return 0;
- }
- }
-
- @Override
- public String getIdentifier() {
- return "BPCathedralHallwayEntrance";
- }
-
- @Override
- public int getWeight() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/2021eaffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/2021eaffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index ad2b0ca..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/2021eaffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,163 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.core.terrain.TerrainFeature;
-import projectzulu.common.core.terrain.TerrainFeature.FeatureDirection;
-import projectzulu.common.world.terrain.CathedralFeature;
-import projectzulu.common.world.terrain.CemetaryFeature;
-import projectzulu.common.world.terrain.LabyrinthFeature;
-import projectzulu.common.world.terrain.OasisFeature;
-import projectzulu.common.world.terrain.PyramidFeature;
-
-public class ItemStructurePlacer extends Item {
-
- String[] structureName = new String[] { "Oasis", "Pyramid", "Labyrinth", "Cemetary", "Cathedral" };
-
- public ItemStructurePlacer(String baseName) {
- super();
- setHasSubtypes(true);
- this.setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setUnlocalizedName(baseName);
- setTextureName("paper");
- }
-
- @Override
- public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) {
- if (!par2World.isRemote) {
- int buildingID = par1ItemStack.getItemDamage();
- int Xcoord = (int) par3EntityPlayer.posX;
- int Zcoord = (int) par3EntityPlayer.posZ;
- int Ycoord = ((int) par3EntityPlayer.posY) - 1;
-
- switch (buildingID) {
- case 0: {
- /* Oasis Generation */
- TerrainFeature terrainFeature = ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(OasisFeature.OASIS);
- if (terrainFeature != null) {
- terrainFeature.generateFeature(par2World, Xcoord / 16, Zcoord / 16, new ChunkCoordinates(Xcoord,
- Ycoord + 1, Zcoord), par2World.rand, calculateFeatureDirection(par3EntityPlayer));
- }
- break;
- }
- case 1: {
- /* Pyramid Generation */
- TerrainFeature terrainFeature = ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(PyramidFeature.PYRAMID);
- if (terrainFeature != null) {
- terrainFeature.generateFeature(par2World, Xcoord / 16, Zcoord / 16, new ChunkCoordinates(Xcoord,
- Ycoord + 1, Zcoord), par2World.rand, calculateFeatureDirection(par3EntityPlayer));
- }
- break;
- }
- case 2: {
- /* Labyrinth Generation */
- TerrainFeature terrainFeature = ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(LabyrinthFeature.LABYRINTH);
- if (terrainFeature != null) {
- terrainFeature.generateFeature(par2World, Xcoord / 16, Zcoord / 16, new ChunkCoordinates(Xcoord,
- Ycoord + 1, Zcoord), par2World.rand, calculateFeatureDirection(par3EntityPlayer));
- }
- break;
- }
- case 3: {
- /* Cemetary Generation */
- TerrainFeature terrainFeature = ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(CemetaryFeature.CEMETARY);
- if (terrainFeature != null) {
- terrainFeature.generateFeature(par2World, Xcoord / 16, Zcoord / 16, new ChunkCoordinates(Xcoord,
- Ycoord + 1, Zcoord), par2World.rand, calculateFeatureDirection(par3EntityPlayer));
- }
- break;
- }
- case 4: {
- /* Cathedral Generation */
- TerrainFeature terrainFeature = ProjectZulu_Core.featureGenerator
- .getRegisteredStructure(CathedralFeature.CATHEDRAL);
- if (terrainFeature != null) {
- terrainFeature.generateFeature(par2World, Xcoord / 16, Zcoord / 16, new ChunkCoordinates(Xcoord,
- Ycoord + 1, Zcoord), par2World.rand, calculateFeatureDirection(par3EntityPlayer));
- }
- break;
- }
- default:
- break;
- }
- }
-
- if (!par3EntityPlayer.capabilities.isCreativeMode) {
- par1ItemStack.stackSize--;
- }
-
- }
-
- private FeatureDirection calculateFeatureDirection(EntityPlayer player) {
- if (player.isSneaking()) {
- return FeatureDirection.CENTERED;
- } else {
- int direction = MathHelper.floor_double((double) (player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
- if (direction == 0) {
- return FeatureDirection.SOUTH;
- } else if (direction == 1) {
- return FeatureDirection.WEST;
- } else if (direction == 2) {
- return FeatureDirection.NORTH;
- } else if (direction == 3) {
- return FeatureDirection.EAST;
- }
- }
- throw new IllegalArgumentException();
- }
-
- @Override
- public int getMaxItemUseDuration(ItemStack par1ItemStack) {
- return 16;
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
- par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
- return par1ItemStack;
- }
-
- /**
- * Return an item rarity from EnumRarity
- */
- @Override
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- @Override
- public EnumAction getItemUseAction(ItemStack par1ItemStack) {
- return EnumAction.bow;
- }
-
- @Override
- public String getUnlocalizedName(ItemStack itemstack) {
- try {
- return super.getUnlocalizedName().concat(".")
- .concat(structureName[itemstack.getItemDamage()].toLowerCase());
- } catch (Exception e) {
- return "";
- }
- }
-
- @Override
- public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
- for (int i = 0; i < structureName.length; i++) {
- par3List.add(new ItemStack(par1, 1, i));
- }
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/21bfbff8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/21bfbff8c42100141fce95f06aba7e85
deleted file mode 100644
index 2845089..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/21bfbff8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,277 +0,0 @@
-package com.ngb.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import org.lwjgl.opengl.GL11;
-
-import com.ngb.projectzulu.common.mobs.entity.EntityArmadillo;
-import com.ngb.projectzulu.common.mobs.entity.EntityStates;
-
-public class ModelArmadillo extends ModelBase {
- public ModelRenderer WHOLE;
- public ModelRenderer HEADPIECE;
- public ModelRenderer REARRTR1;
- public ModelRenderer REARRTR2;
- public ModelRenderer REARRTR3;
-
- public ModelRenderer leg1;
- public ModelRenderer leg2;
- public ModelRenderer leg3;
- public ModelRenderer leg4;
- public ModelRenderer body2;
- public ModelRenderer tail;
- public ModelRenderer body1;
- public ModelRenderer body3;
- public ModelRenderer body4;
-
- public ModelRenderer chin;
- public ModelRenderer head;
- public ModelRenderer nose;
-
- public ModelArmadillo() {
- textureWidth = 64;
- textureHeight = 32;
- setTextureOffset("WHOLE.dltfold0", 0, 0);
-
- WHOLE = new ModelRenderer(this, "WHOLE");
- WHOLE.setRotationPoint(0F, 18F, 0F);
- // WHOLE.setRotationPoint(0F, 0F, 0F);
- WHOLE.mirror = true;
- setRotation(WHOLE, 0F, 0F, 0F);
-
- REARRTR1 = new ModelRenderer(this, "REARRTR1");
- WHOLE.addChild(REARRTR1);
- REARRTR1.setRotationPoint(0F, -3F, -2F);
- setRotation(REARRTR1, 0F, 0F, 0F);
- REARRTR1.mirror = true;
- body2 = new ModelRenderer(this, 32, 0);
- body2.addBox(-4.5F, -4F, -2F, 9, 8, 4);
- REARRTR1.addChild(body2);
- body2.setRotationPoint(0F, 3F, 2F);
- body2.setTextureSize(64, 32);
- body2.mirror = true;
- setRotation(body2, 0F, 0F, 0F);
- REARRTR2 = new ModelRenderer(this, "REARRTR2");
- REARRTR1.addChild(REARRTR2);
- REARRTR2.setRotationPoint(0F, -1F, 4F);
- setRotation(REARRTR2, 0F, 0F, 0F);
- REARRTR2.mirror = true;
- body3 = new ModelRenderer(this, 32, 0);
- body3.addBox(-4.5F, -4F, -2F, 9, 8, 4);
- REARRTR2.addChild(body3);
- body3.setRotationPoint(0F, 4F, 2F);
- body3.setTextureSize(64, 32);
- body3.mirror = true;
- setRotation(body3, 0F, 0F, 0F);
- REARRTR3 = new ModelRenderer(this, "REARRTR3");
- REARRTR2.addChild(REARRTR3);
- REARRTR3.setRotationPoint(0F, 0F, 4F);
- setRotation(REARRTR3, 0F, 0F, 0F);
- REARRTR3.mirror = true;
- tail = new ModelRenderer(this, 8, 14);
- tail.addBox(-0.5F, -0.5F, 0F, 1, 1, 6);
- REARRTR3.addChild(tail);
- tail.setRotationPoint(0F, 6F, 4F);
- tail.setTextureSize(64, 32);
- tail.mirror = true;
- setRotation(tail, 0F, 0F, 0F);
- body4 = new ModelRenderer(this, 32, 0);
- body4.addBox(-4.5F, -4F, -2F, 9, 8, 4);
- REARRTR3.addChild(body4);
- body4.setRotationPoint(0F, 4F, 2F);
- body4.setTextureSize(64, 32);
- body4.mirror = true;
- setRotation(body4, 0F, 0F, 0F);
- // dltfold3.addChildModelRenderer(REARRTR3);
- // dltfold2.addChildModelRenderer(REARRTR2);
- // dltfold0.addChildModelRenderer(REARRTR1);
- HEADPIECE = new ModelRenderer(this, "HEADPIECE");
- WHOLE.addChild(HEADPIECE);
- HEADPIECE.setRotationPoint(0F, 1F, -6F);
- setRotation(HEADPIECE, 0F, 0F, 0F);
- HEADPIECE.mirror = true;
- nose = new ModelRenderer(this, 12, 9);
- nose.addBox(-0.5F, -0.5F, -2F, 1, 1, 2);
- HEADPIECE.addChild(nose);
- nose.setRotationPoint(0F, 2F, -5F);
- nose.setTextureSize(64, 32);
- nose.mirror = true;
- setRotation(nose, 0F, 0F, 0F);
- head = new ModelRenderer(this, 0, 0);
- head.addBox(-2.5F, -2.5F, -1.5F, 5, 5, 3);
- HEADPIECE.addChild(head);
- head.setRotationPoint(0F, 0F, -1F);
- head.setTextureSize(64, 32);
- head.mirror = true;
- setRotation(head, 0F, 0F, 0F);
- chin = new ModelRenderer(this, 0, 8);
- chin.addBox(-1.5F, -1.5F, -2.5F, 3, 3, 3);
- HEADPIECE.addChild(chin);
- chin.setRotationPoint(0F, 1F, -3F);
- chin.setTextureSize(64, 32);
- chin.mirror = true;
- setRotation(chin, 0F, 0F, 0F);
- // dltfold0.addChildModelRenderer(HEADPIECE);
- body1 = new ModelRenderer(this, 32, 0);
- body1.addBox(-4.5F, -4F, -2F, 9, 8, 4);
- WHOLE.addChild(body1);
- body1.setRotationPoint(0F, 0F, -4F);
- body1.setTextureSize(64, 32);
- body1.mirror = true;
- setRotation(body1, 0F, 0F, 0F);
- leg4 = new ModelRenderer(this, 0, 15);
- leg4.addBox(-1F, 0F, -1F, 2, 2, 2);
- WHOLE.addChild(leg4);
- leg4.setRotationPoint(3F, 4F, 5F);
- leg4.setTextureSize(64, 32);
- leg4.mirror = true;
- setRotation(leg4, 0F, 0F, 0F);
- leg3 = new ModelRenderer(this, 0, 15);
- leg3.addBox(-1F, 0F, -1F, 2, 2, 2);
- WHOLE.addChild(leg3);
- leg3.setRotationPoint(-3F, 4F, 5F);
- leg3.setTextureSize(64, 32);
- leg3.mirror = true;
- setRotation(leg3, 0F, 0F, 0F);
- leg2 = new ModelRenderer(this, 0, 15);
- leg2.addBox(-1F, 0F, -1F, 2, 2, 2);
- WHOLE.addChild(leg2);
- leg2.setRotationPoint(3F, 4F, -4F);
- leg2.setTextureSize(64, 32);
- leg2.mirror = true;
- setRotation(leg2, 0F, 0F, 0F);
- leg1 = new ModelRenderer(this, 0, 15);
- leg1.addBox(-1F, 0F, -1F, 2, 2, 2);
- WHOLE.addChild(leg1);
- leg1.setRotationPoint(-3F, 4F, -4F);
- leg1.setTextureSize(64, 32);
- leg1.mirror = true;
- setRotation(leg1, 0F, 0F, 0F);
-
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
-
- float field_78145_g = 8.0F;
- float field_78151_h = 4.0F;
-
- if (this.isChild) {
- float var8 = 2.0F;
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, field_78145_g * f5, field_78151_h * f5);
- // Something Should GO here
- GL11.glPopMatrix();
- GL11.glPushMatrix();
- GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
- GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
- WHOLE.render(f5);
- GL11.glPopMatrix();
- } else {
- WHOLE.render(f5);
- }
- }
-
- @Override
- public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6,
- Entity par7Entity) {
- EntityArmadillo var5 = (EntityArmadillo) par7Entity;
- if (var5.getEntityState() == EntityStates.inCover || var5.isCharging() == true) {
- HEADPIECE.rotateAngleX = var5.eHEADPIECE.rotateX(+0.05f * 2.0f, 0f, (float) (145 * Math.PI / 180f));
- } else if (var5.getEntityState() != EntityStates.inCover && var5.isCharging() == false) {
- // HEADPIECE.rotateAngleX =
- // var5.eHEADPIECE.rotateX(-0.05f*animSpeed,0f,(float)(145*Math.PI/180f));
- this.HEADPIECE.rotateAngleX = var5.eHEADPIECE.rotateAngleX = Math.min(Math.max(par5, -180), +180)
- * (float) (Math.PI / 180f);
- this.HEADPIECE.rotateAngleY = var5.eHEADPIECE.rotateAngleY = Math.min(Math.max(par4, -30), +30)
- * (float) (Math.PI / 180f);
- }
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
-
- EntityArmadillo var5 = (EntityArmadillo) par1EntityLiving;
-
- if (var5.eWHOLE.isSetup == false) {
- var5.eWHOLE.setup(WHOLE);
- }
- if (var5.eHEADPIECE.isSetup == false) {
- var5.eHEADPIECE.setup(HEADPIECE);
- }
- if (var5.eREARRTR1.isSetup == false) {
- var5.eREARRTR1.setup(REARRTR1);
- }
- if (var5.eREARRTR2.isSetup == false) {
- var5.eREARRTR2.setup(REARRTR2);
- }
- if (var5.eREARRTR3.isSetup == false) {
- var5.eREARRTR3.setup(REARRTR3);
- }
- if (var5.etail.isSetup == false) {
- var5.etail.setup(tail);
- }
- if (var5.eleg3.isSetup == false) {
- var5.eleg3.setup(leg3);
- }
- if (var5.eleg4.isSetup == false) {
- var5.eleg4.setup(leg4);
- }
-
- if (var5.getEntityState() == EntityStates.inCover || var5.isCharging() == true) {
- float animSpeed = 2.0f;
- if (var5.isCharging() == true) {
- animSpeed = 5.0f;
- /* Make Complete Body Circle */
- if (var5.eWHOLE.rotateAngleX == (float) ((390 + 360) * Math.PI / 180f)) {
- var5.eWHOLE.rotateAngleX -= 360 * Math.PI / 180;
- }
- WHOLE.rotateAngleX = var5.eWHOLE
- .rotateX(+0.09f * animSpeed, 0f, (float) ((390 + 360) * Math.PI / 180f));
- } else {
- animSpeed = 2.0f;
- /* Make Complete Body Circle */
- WHOLE.rotateAngleX = var5.eWHOLE.rotateX(+0.09f * animSpeed, 0f, (float) (390 * Math.PI / 180f));
- }
- /* Rear Segments (square) fold to form circle */
- REARRTR1.rotateAngleX = var5.eREARRTR1.rotateX(-0.01f * animSpeed, (float) (-44 * Math.PI / 180f), 0f);
- REARRTR2.rotateAngleX = var5.eREARRTR2.rotateX(-0.01f * animSpeed, (float) (-44 * Math.PI / 180f), 0f);
- REARRTR3.rotateAngleX = var5.eREARRTR3.rotateX(-0.01f * animSpeed, (float) (-44 * Math.PI / 180f), 0f);
- tail.rotateAngleX = var5.etail.rotateX(+0.1f, (float) (0 * Math.PI / 180f), (float) (90 * Math.PI / 180f));
- tail.rotationPointZ = var5.etail.translateZ(-0.5f * animSpeed, 2.0f, 4.0f);
- leg3.rotationPointZ = var5.eleg3.translateZ(-0.5f * animSpeed, -4f, 4f);
- leg4.rotationPointZ = var5.eleg4.translateZ(-0.5f * animSpeed, -4f, 4f);
- } else if (var5.getEntityState() != EntityStates.inCover && var5.isCharging() == false) {
- float animSpeed = 2.0f;
- /* Make Complete Body Circle */
- WHOLE.rotateAngleX = var5.eWHOLE.rotateX(-0.09f * animSpeed, 0f, (float) ((390 + 360) * Math.PI / 180f));
- /* Rotate Face Inward */
- /* Rear Segments (square) fold to form circle */
- REARRTR1.rotateAngleX = var5.eREARRTR1.rotateX(+0.01f * animSpeed, (float) (-44 * Math.PI / 180f), 0f);
- REARRTR2.rotateAngleX = var5.eREARRTR2.rotateX(+0.01f * animSpeed, (float) (-44 * Math.PI / 180f), 0f);
- REARRTR3.rotateAngleX = var5.eREARRTR3.rotateX(+0.01f * animSpeed, (float) (-44 * Math.PI / 180f), 0f);
- tail.rotateAngleX = var5.etail.rotateX(-0.1f * animSpeed, (float) (-15 * Math.PI / 180f),
- (float) (30 * Math.PI / 180f));
- tail.rotationPointZ = var5.etail.translateZ(+0.5f * animSpeed, 0.0f, 4.0f);
- leg3.rotationPointZ = var5.eleg3.translateZ(+0.5f * animSpeed, -4f, 4f);
- leg4.rotationPointZ = var5.eleg4.translateZ(+0.5f * animSpeed, -4f, 4f);
-
- leg1.rotateAngleX = (float) (MathHelper.cos(4 * par2 * 0.6662F + (float) Math.PI) * 1.4F * par3);
- leg2.rotateAngleX = (float) (MathHelper.cos(4 * par2 * 0.6662F) * 1.4F * par3);
- leg3.rotateAngleX = (float) (MathHelper.cos(4 * par2 * 0.6662F + (float) Math.PI) * 1.4F * par3);
- leg4.rotateAngleX = (float) (MathHelper.cos(4 * par2 * 0.6662F) * 1.4F * par3);
- }
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40d3209fc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40d3209fc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index afea021..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40d3209fc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,79 +0,0 @@
-package projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Items;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.CustomMobData;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ConfigHelper;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ItemGenerics;
-import projectzulu.common.core.entitydeclaration.EntityProperties;
-import projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import projectzulu.common.mobs.entity.EntityHorseGrey;
-import projectzulu.common.mobs.models.ModelHorse;
-import projectzulu.common.mobs.renders.RenderGenericHorse;
-import projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class HorseGreyDeclaration extends SpawnableDeclaration {
-
- public HorseGreyDeclaration() {
- super("Horse Grey", 33, EntityHorseGrey.class, EnumCreatureType.creature);
- setSpawnProperties(5, 100, 1, 2);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 3);
-
- eggColor1 = (102 << 16) + (73 << 8) + 34;
- eggColor2 = (60 << 16) + (43 << 8) + 20;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- Items.beef, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.LargeHeart.meta(), 4);
- customMobData.entityProperties = new EntityProperties(20f, 3.0f, 0.3f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericHorse(new ModelHorse(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "Horse/horse_grey.png"), new ResourceLocation(DefaultProps.mobKey, "Horse/horse_grey_saddled.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.plains.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add("Autumn Woods");
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
-
- HashSet nonFrozenForest = new HashSet();
- nonFrozenForest.addAll(typeToArray(Type.FOREST));
- nonFrozenForest.addAll(typeToArray(Type.PLAINS));
- nonFrozenForest.removeAll(typeToArray(Type.FROZEN));
- defaultBiomesToSpawn.addAll(nonFrozenForest);
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/42cbbdfdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/42cbbdfdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 857b836..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/42cbbdfdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.init.Blocks;
-import projectzulu.common.ProjectZulu_Core;
-
-public class BlockPalmTreePlank extends Block {
-
- public BlockPalmTreePlank() {
- super(Material.wood);
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setHardness(2.0F);
- setResistance(5.0F);
- }
-
- @Override
- public boolean isOpaqueCube() {
- return true;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/50823115312000141dbfc2e92eb0e949 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/50823115312000141dbfc2e92eb0e949
deleted file mode 100644
index 0929e30..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/50823115312000141dbfc2e92eb0e949
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.example.soulmod;
-
-import net.minecraft.init.Blocks;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-
-@Mod(modid = SoulmodT1.MODID, version = SoulmodT1.VERSION)
-public class SoulmodT1
-{
- public static final String MODID = "soulmodt1";
- public static final String VERSION = "1.0b";
-
- @EventHandler
- public void init(FMLInitializationEvent event)
- {
- // some example code
- System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());
-
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/514281fec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/514281fec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 4d8445b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/514281fec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,563 +0,0 @@
-package com.ngb.projectzulu.common.dungeon;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.IEntityLivingData;
-import net.minecraft.init.Blocks;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.WeightedRandom;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.core.PZPacket;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.core.packets.PacketPlaySound;
-import projectzulu.common.dungeon.packets.PacketMobSpawner;
-import projectzulu.common.dungeon.spawner.tag.settings.OptionalSettingsSpawning;
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class TileEntityLimitedMobSpawner extends TileEntity {
- /** The stored delay before a new spawn. */
- public int delay = -1;
-
- private NBTTagCompound debugSavedSetup = new NBTTagCompound();
-
- public boolean isDebugEnabled() {
- return !(debugSavedSetup == null || debugSavedSetup.hasNoTags());
- }
-
- public void setDebugMode(NBTTagCompound debugSavedSetup) {
- this.debugSavedSetup = debugSavedSetup;
- }
-
- public void loadDebugNBT() {
- readFromNBT(debugSavedSetup);
- }
-
- /**
- * The string ID of the mobs being spawned from this spawner. Defaults to pig, apparently.
- */
- private String mobID = "Chicken";
- /* List of TileEntityLimitedMobSpawnData */
- private List spawnList = null;
-
- public List getSpawnList() {
- return spawnList;
- }
-
- public void setSpawnList(List spawnList) {
- this.spawnList = spawnList;
- }
-
- /** The extra NBT data to add to spawned entities */
- private TileEntityLimitedMobSpawnData spawnerTags = null;
- public double yaw;
- public double yaw2 = 0.0D;
- private int minSpawnDelay = 200;
- private int maxSpawnDelay = 800;
-
- public int getMinSpawnDelay() {
- return minSpawnDelay;
- }
-
- public int getMaxSpawnDelay() {
- return maxSpawnDelay;
- }
-
- public void setMinMaxSpawnDelay(int minSpawnDelay, int maxSpawnDelay) {
- if (maxSpawnDelay < minSpawnDelay) {
- this.maxSpawnDelay = minSpawnDelay;
- this.minSpawnDelay = minSpawnDelay;
- } else {
- this.maxSpawnDelay = maxSpawnDelay;
- this.minSpawnDelay = minSpawnDelay;
- }
- }
-
- private int spawnCount = 4;
- private Entity displayEntity;
-
- /** Toggles whether the GUI can edit this TileEntities Property */
- private boolean isEditable = true;
-
- /** Maximum Entities to Spawn Before MobSpawner should Stop Spawning */
- private int maxSpawnableEntities = 5;
-
- public int getMaxSpawnableEntities() {
- return maxSpawnableEntities;
- }
-
- public void setMaxSpawnableEntities(int maxSpawnableEntities) {
- this.maxSpawnableEntities = maxSpawnableEntities;
- }
-
- private int spawnedEntities = 0;
-
- /** Maximum number of entities for limiting mob spawning */
- private int maxNearbyEntities = 6;
-
- public int getMaxNearbyEntities() {
- return maxNearbyEntities;
- }
-
- public void setMaxNearbyEntities(int maxNearbyEntities) {
- this.maxNearbyEntities = maxNearbyEntities;
- }
-
- /** Required player range for mob spawning to occur */
- private int requiredPlayerRange = 16;
-
- public int getRequriedPLayerRange() {
- return requiredPlayerRange;
- }
-
- public void setRequiredPlayerRange(int requiredPlayerRange) {
- this.requiredPlayerRange = requiredPlayerRange;
- }
-
- /** Range for spawning new entities with mob spawners */
- private int spawnRangeHorizontal = 4;
- private int spawnRangeVertical = 1;
-
- public int spawnRangeOffsetX = 0;
- public int spawnRangeOffsetY = 0;
- public int spawnRangeOffsetZ = 0;
-
- public int getSpawnRangeHorizontal() {
- return spawnRangeHorizontal;
- }
-
- public int getSpawnRangeVertial() {
- return spawnRangeVertical;
- }
-
- public void setSpawnRangeHorizontal(int horizontal) {
- if (horizontal < 0) {
- spawnRangeHorizontal = 0;
- } else {
- spawnRangeHorizontal = horizontal;
- }
- }
-
- public void setSpawnRangeVertical(int vertical) {
- if (vertical < 0) {
- spawnRangeVertical = 0;
- } else {
- spawnRangeVertical = vertical;
- }
- }
-
- public TileEntityLimitedMobSpawner() {
- this.delay = 20;
- }
-
- public String getEntityName() {
- return this.spawnerTags == null ? this.mobID : this.spawnerTags.type;
- }
-
- public void setMobID(String par1Str) {
- this.mobID = par1Str;
- }
-
- /**
- * Returns true if there is a player in range (using World.getClosestPlayer)
- */
- public boolean anyPlayerInRange() {
- if (isDebugEnabled()) {
- return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D,
- this.requiredPlayerRange) != null;
- } else {
- return this.worldObj.getClosestVulnerablePlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D,
- this.requiredPlayerRange) != null;
- }
- }
-
- public boolean isEditable() {
- return this.isEditable;
- }
-
- @SideOnly(Side.CLIENT)
- public void playSpawnSound(String spawnSound) {
- worldObj.playSound(xCoord, yCoord, zCoord, spawnSound, 1.0f, 1.0f, true);
- }
-
- /**
- * Sets the sign's isEditable flag to the specified parameter.
- */
- @SideOnly(Side.CLIENT)
- public void setEditable(boolean par1) {
- this.isEditable = par1;
- }
-
- /**
- * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
- * ticks and creates a new spawn inside its implementation.
- */
- @Override
- public void updateEntity() {
- if (maxSpawnableEntities > 0 && spawnedEntities >= maxSpawnableEntities) {
- worldObj.setBlock(xCoord, yCoord, zCoord, Blocks.air);
- }
-
- if (this.anyPlayerInRange()) {
- double var5;
-
- if (this.worldObj.isRemote) {
- double var1 = this.xCoord + this.worldObj.rand.nextFloat();
- double var3 = this.yCoord + this.worldObj.rand.nextFloat();
- var5 = this.zCoord + this.worldObj.rand.nextFloat();
- this.worldObj.spawnParticle("smoke", var1, var3, var5, 0.0D, 0.0D, 0.0D);
- this.worldObj.spawnParticle("flame", var1, var3, var5, 0.0D, 0.0D, 0.0D);
-
- if (this.delay > 0) {
- --this.delay;
- }
-
- this.yaw2 = this.yaw;
- this.yaw = (this.yaw + 1000.0F / (this.delay + 200.0F)) % 360.0D;
- } else {
- if (this.delay == -1) {
- this.updateDelay();
- }
-
- if (this.delay > 0) {
- --this.delay;
- return;
- }
-
- boolean var12 = false;
-
- for (int var2 = 0; var2 < this.spawnCount; ++var2) {
- Entity var13 = EntityList.createEntityByName(this.getEntityName(), this.worldObj);
-
- if (var13 == null) {
- return;
- }
-
- int var4 = this.worldObj.getEntitiesWithinAABB(
- var13.getClass(),
- AxisAlignedBB
- .getAABBPool()
- .getAABB(xCoord + spawnRangeOffsetX, yCoord + spawnRangeOffsetY,
- zCoord + spawnRangeOffsetZ, xCoord + spawnRangeOffsetX + 1,
- yCoord + spawnRangeOffsetY + 1, zCoord + spawnRangeOffsetZ + 1)
- .expand(spawnRangeHorizontal * 2, spawnRangeVertical * 2 + 2,
- spawnRangeHorizontal * 2)).size();
-
- if (var4 >= this.maxNearbyEntities) {
- this.updateDelay();
- return;
- }
-
- if (var13 != null) {
- var5 = xCoord + spawnRangeOffsetX + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble())
- * spawnRangeHorizontal;
- double var7 = yCoord + spawnRangeOffsetY + worldObj.rand.nextInt(spawnRangeVertical * 2 + 1)
- - spawnRangeVertical / 2f;
- double var9 = zCoord + spawnRangeOffsetZ
- + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * spawnRangeHorizontal;
- EntityLiving var11 = var13 instanceof EntityLiving ? (EntityLiving) var13 : null;
- this.writeNBTTagsTo(var13);
- var13.setLocationAndAngles(var5, var7, var9, this.worldObj.rand.nextFloat() * 360.0F, 0.0F);
-
- boolean canSpawnHere = false;
- if (spawnerTags != null && spawnerTags.optionalSpawning.isOptionalEnabled()) {
- canSpawnHere = optionalCanSpawnHere(var11, spawnerTags.optionalSpawning);
- } else {
- canSpawnHere = var11.getCanSpawnHere();
- }
-
- if (var11 == null || canSpawnHere) {
- this.worldObj.spawnEntityInWorld(var13);
- this.worldObj.playAuxSFX(2004, this.xCoord, this.yCoord, this.zCoord, 0);
- if (!isDebugEnabled()) {
- spawnedEntities++;
- }
- if (spawnerTags != null) {
- PZPacket packet = new PacketPlaySound().setPacketData(xCoord, yCoord, zCoord,
- spawnerTags.spawnSound);
- ProjectZulu_Core.getPipeline().sendToAllAround(packet,
- new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 64));
- }
- if (var11 != null) {
- var11.spawnExplosionParticle();
- }
-
- var12 = true;
- }
- }
- }
-
- if (var12) {
- this.updateDelay();
- }
- }
-
- super.updateEntity();
- }
- }
-
- private boolean optionalCanSpawnHere(EntityLiving entity, OptionalSettingsSpawning optionalSpawning) {
- boolean canSpawn = optionalSpawning.isOptionalEnabled() ? !optionalSpawning.isInverted() : false;
- int xCoord = MathHelper.floor_double(entity.posX);
- int yCoord = MathHelper.floor_double(entity.boundingBox.minY);
- int zCoord = MathHelper.floor_double(entity.posZ);
- if (!optionalSpawning.isValidLocation(entity.worldObj, entity, xCoord, yCoord, zCoord)) {
- canSpawn = optionalSpawning.isInverted();
- }
- return canSpawn && entity.worldObj.checkNoEntityCollision(entity.boundingBox)
- && entity.worldObj.getCollidingBoundingBoxes(entity, entity.boundingBox).isEmpty();
- }
-
- public void writeNBTTagsTo(Entity par1Entity) {
- if (this.spawnerTags != null) {
- NBTTagCompound var2 = new NBTTagCompound();
- par1Entity.writeToNBTOptional(var2);
- Iterator keyIterator = spawnerTags.properties.func_150296_c().iterator();
- while (keyIterator.hasNext()) {
- String key = (String) keyIterator.next();
- NBTBase nbt = spawnerTags.properties.getTag(key);
- var2.setTag(key, nbt.copy());
- }
-
- try {
- par1Entity.readFromNBT(var2);
- } catch (Exception e) {
- if (!debugSavedSetup.hasNoTags()) {
- ProjectZuluLog.warning("Attempting to Recover From Debug Mode Backup due to Error %s",
- e.getMessage());
- try {
- loadDebugNBT();
- } catch (Exception e2) {
- ProjectZuluLog
- .severe("Exception Occured when Writing DebugNBT to %s. Entity may not work as expected. Recreate NBT on entity can repair.",
- EntityList.getEntityString(par1Entity));
- e2.printStackTrace();
- }
- } else {
- ProjectZuluLog
- .severe("Exception occured when writing NBT to Entity %s. Entity may not work as expected. Recreate NBT on entity can repair.",
- EntityList.getEntityString(par1Entity));
- e.printStackTrace();
- }
- }
- } else if (par1Entity instanceof EntityLiving && par1Entity.worldObj != null) {
- IEntityLivingData livingData = null;
- // livingData = ((EntityLiving) par1Entity).onSpawnWithEgg(livingData);
- }
- }
-
- /**
- * Sets the delay before a new spawn (base delay of 200 + random number up to 600).
- */
- private void updateDelay() {
- if (this.maxSpawnDelay <= this.minSpawnDelay) {
- this.delay = this.minSpawnDelay;
- } else {
- this.delay = this.minSpawnDelay + this.worldObj.rand.nextInt(this.maxSpawnDelay - this.minSpawnDelay);
- }
-
- if (this.spawnList != null && this.spawnList.size() > 0) {
- this.spawnerTags = (TileEntityLimitedMobSpawnData) WeightedRandom.getRandomItem(this.worldObj.rand,
- this.spawnList);
- this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
- }
-
- this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 0);
- }
-
- /**
- * Used to Force TileEntity to Repick its Spawnable Creature after being Synced to remove Old Data
- */
- public void forceUpdate() {
- updateDelay();
- }
-
- /**
- * Reads a tile entity from NBT.
- */
- @Override
- public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
- super.readFromNBT(par1NBTTagCompound);
- this.mobID = par1NBTTagCompound.getString("EntityId");
- this.delay = par1NBTTagCompound.getShort("Delay");
- if (par1NBTTagCompound.hasKey("SpawnPotentials")) {
- this.spawnList = new ArrayList();
- NBTTagList var2 = par1NBTTagCompound.getTagList("SpawnPotentials", 10);
-
- for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
- TileEntityLimitedMobSpawnData spawnData = new TileEntityLimitedMobSpawnData(this,
- var2.getCompoundTagAt(var3));
- if (EntityList.stringToClassMapping.containsKey(spawnData.type)) {
- this.spawnList.add(spawnData);
- } else {
- ProjectZuluLog
- .severe("Failed to load Limited Spawner entity %s at (%s, %s, %s). Entity does not appear to be declared.",
- spawnData.type, xCoord, yCoord, zCoord);
- }
- }
- } else {
- this.spawnList = null;
- }
- if (par1NBTTagCompound.hasKey("SpawnData")) {
- this.spawnerTags = new TileEntityLimitedMobSpawnData(this, par1NBTTagCompound.getCompoundTag("SpawnData"),
- this.mobID, "", "");
- if (!EntityList.classToStringMapping.containsKey(spawnerTags.type)) {
- ProjectZuluLog
- .severe("Failed to load Limited Spawner entity %s at (%s, %s, %s). Entity does not appear to be declared.",
- spawnerTags.type, xCoord, yCoord, zCoord);
- }
- spawnerTags = null;
- } else {
- this.spawnerTags = null;
- }
- if (par1NBTTagCompound.hasKey("MinSpawnDelay")) {
- this.minSpawnDelay = par1NBTTagCompound.getShort("MinSpawnDelay");
- this.maxSpawnDelay = par1NBTTagCompound.getShort("MaxSpawnDelay");
- this.spawnCount = par1NBTTagCompound.getShort("SpawnCount");
- this.maxSpawnableEntities = par1NBTTagCompound.getShort("MaxSpawnableEntities");
- }
- if (par1NBTTagCompound.hasKey("MaxNearbyEntities")) {
- this.maxNearbyEntities = par1NBTTagCompound.getShort("MaxNearbyEntities");
- this.requiredPlayerRange = par1NBTTagCompound.getShort("RequiredPlayerRange");
- }
-
- if (par1NBTTagCompound.hasKey("SpawnRangeHori")) {
- this.spawnRangeHorizontal = par1NBTTagCompound.getShort("SpawnRangeHori");
- } else if (par1NBTTagCompound.hasKey("SpawnRange")) {
- this.spawnRangeHorizontal = par1NBTTagCompound.getShort("SpawnRange");
- }
-
- if (par1NBTTagCompound.hasKey("SpawnRangeVert")) {
- this.spawnRangeVertical = par1NBTTagCompound.getShort("SpawnRangeVert");
- }
-
- if (par1NBTTagCompound.hasKey("DebugSavedSetup")) {
- debugSavedSetup = par1NBTTagCompound.getCompoundTag("DebugSavedSetup");
- }
-
- if (par1NBTTagCompound.hasKey("OffsetX")) {
- spawnRangeOffsetX = par1NBTTagCompound.getShort("OffsetX");
- }
-
- if (par1NBTTagCompound.hasKey("OffsetY")) {
- spawnRangeOffsetY = par1NBTTagCompound.getShort("OffsetY");
- }
-
- if (par1NBTTagCompound.hasKey("OffsetZ")) {
- spawnRangeOffsetZ = par1NBTTagCompound.getShort("OffsetZ");
- }
-
- if (this.worldObj != null && this.worldObj.isRemote) {
- this.displayEntity = null;
- }
- }
-
- /**
- * Writes a tile entity to NBT.
- */
- @Override
- public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
- super.writeToNBT(par1NBTTagCompound);
- par1NBTTagCompound.setTag("DebugSavedSetup", debugSavedSetup);
- par1NBTTagCompound.setString("EntityId", this.getEntityName());
- par1NBTTagCompound.setShort("Delay", (short) this.delay);
- par1NBTTagCompound.setShort("MinSpawnDelay", (short) this.minSpawnDelay);
- par1NBTTagCompound.setShort("MaxSpawnDelay", (short) this.maxSpawnDelay);
- par1NBTTagCompound.setShort("SpawnCount", (short) this.spawnCount);
- par1NBTTagCompound.setShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
- par1NBTTagCompound.setShort("RequiredPlayerRange", (short) this.requiredPlayerRange);
- par1NBTTagCompound.setShort("SpawnRangeHori", (short) this.spawnRangeHorizontal);
- par1NBTTagCompound.setShort("SpawnRangeVert", (short) this.spawnRangeVertical);
- par1NBTTagCompound.setShort("MaxSpawnableEntities", (short) this.maxSpawnableEntities);
- par1NBTTagCompound.setShort("OffsetX", (short) this.spawnRangeOffsetX);
- par1NBTTagCompound.setShort("OffsetY", (short) this.spawnRangeOffsetY);
- par1NBTTagCompound.setShort("OffsetZ", (short) this.spawnRangeOffsetZ);
-
- if (this.spawnerTags != null) {
- par1NBTTagCompound.setTag("SpawnData", (NBTTagCompound) this.spawnerTags.properties.copy());
- }
-
- if (this.spawnerTags != null || this.spawnList != null && this.spawnList.size() > 0) {
- NBTTagList var2 = new NBTTagList();
-
- if (this.spawnList != null && this.spawnList.size() > 0) {
- Iterator var3 = this.spawnList.iterator();
-
- while (var3.hasNext()) {
- TileEntityLimitedMobSpawnData var4 = (TileEntityLimitedMobSpawnData) var3.next();
- var2.appendTag(var4.getNBT());
- }
- } else {
- var2.appendTag(this.spawnerTags.getNBT());
- }
-
- par1NBTTagCompound.setTag("SpawnPotentials", var2);
- }
- }
-
- /**
- * will create the entity from the internalID the first time it is accessed
- */
- @SideOnly(Side.CLIENT)
- public Entity getMobEntity() {
- if (this.displayEntity == null) {
- Entity var1 = EntityList.createEntityByName(this.getEntityName(), Minecraft.getMinecraft().theWorld);
- this.writeNBTTagsTo(var1);
- this.displayEntity = var1;
- }
- return this.displayEntity;
- }
-
- /**
- * Overriden in a sign to provide the text.
- */
- @Override
- public Packet getDescriptionPacket() {
- NBTTagCompound var1 = new NBTTagCompound();
- this.writeToNBT(var1);
- return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, var1);
-
- }
-
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
- super.onDataPacket(net, pkt);
- NBTTagCompound tag = pkt.func_148857_g();
- readFromNBT(tag);
- }
-
- public void syncToServer() {
- NBTTagCompound tileEntityData = new NBTTagCompound();
- writeToNBT(tileEntityData);
- PZPacket packet = new PacketMobSpawner().setPacketData(xCoord, yCoord, zCoord, tileEntityData);
- ProjectZulu_Core.getPipeline().sendToServer(packet);
- }
-
- /**
- * Called when a client event is received with the event number and argument, see World.sendClientEvent
- */
- @Override
- public boolean receiveClientEvent(int par1, int par2) {
- if (par1 == 1 && this.worldObj.isRemote) {
- this.delay = this.minSpawnDelay;
- return true;
- } else {
- return super.receiveClientEvent(par1, par2);
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/60cb46a2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/60cb46a2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 0abb40e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/60cb46a2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,29 +0,0 @@
-package projectzulu.common.potion.subitem;
-
-import net.minecraft.item.Item;
-import net.minecraft.potion.Potion;
-import projectzulu.common.api.PotionList;
-
-import com.google.common.base.Optional;
-
-public class SubItemPotionIncendiary extends SubItemPotionGeneric {
-
- public SubItemPotionIncendiary(Item itemID, int subID) {
- super(itemID, subID, "potion.incendiary");
- setSubItemBounds(1, 1, 4, 2);
-// setEffectScale(20 * 5, 20 * 5, 20 * 10, 20 * 1, 2);
- setEffectScale(0, 0, 0, 0, 2);
-
- /* Invert Regular Potion Names as Incendiary "Duration" is useless "Power" controls how long a Fire is Set */
- strengthPrefixes = new String[] { "", "Extended", "Prolonged", "Continuous" };
- durationPrefixes = new String[] { "", "Thickened", "Strengthened", "Fortified" };
-
- durationPostfixes = new String[] { "", "of Thickness", "of Strength", "of Fortification" };
- strengthPostfixes = new String[] { "", "Extended", "Prolonged", "Continuous" };
- }
-
- @Override
- Optional extends Potion> getPotion() {
- return PotionList.incendiary;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/70db2d57389d001411accd8c5614e9d3 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/70db2d57389d001411accd8c5614e9d3
deleted file mode 100644
index 58c2129..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/70db2d57389d001411accd8c5614e9d3
+++ /dev/null
@@ -1,271 +0,0 @@
-package com.stek101.projectzulu.common.core;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
-import net.minecraftforge.event.entity.living.LivingHurtEvent;
-import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
-import net.minecraftforge.event.world.BlockEvent.BreakEvent;
-
-import com.stek101.projectzulu.common.api.ItemList;
-import com.stek101.projectzulu.common.mobs.entity.EntityBeetleAS;
-import com.stek101.projectzulu.common.mobs.entity.EntityBeetleBS;
-import com.stek101.projectzulu.common.mobs.entity.EntityCentipede;
-import com.stek101.projectzulu.common.mobs.entity.EntityTreeEnt;
-
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class EventHookContainerClass {
- // zLevel is protected float copied from GUI along with drawTexturedModelRect
- protected float zLevel = 0.0F;
- boolean nearBossTriggered = false;
-
- Random classRand = new Random();
-
- @SubscribeEvent
- public void onPlayerUpdateStarve(LivingUpdateEvent event) {
- World worldObj = event.entity.worldObj;
- if (worldObj != null && event.entity != null && event.entity instanceof EntityPlayer) {
-
- EntityPlayer thePlayer = (EntityPlayer) event.entity;
-
- int var1 = MathHelper.floor_double(thePlayer.posX);
- int var2 = MathHelper.floor_double(thePlayer.boundingBox.minY);
- int var3 = MathHelper.floor_double(thePlayer.posZ);
- BiomeGenBase currentBiome = worldObj.getBiomeGenForCoords(var1, var3);
- boolean isDesertSun = worldObj.canBlockSeeTheSky(var1, var2, var3) && worldObj.isDaytime() == true
- && (currentBiome == BiomeGenBase.desert || currentBiome == BiomeGenBase.desertHills);
-
- /* Armor Effect Only Occurs When Block/Item Package is Installed */
- if (!thePlayer.capabilities.isCreativeMode && isDesertSun == true
- && Loader.isModLoaded(DefaultProps.BlocksModId)) {
- float exhaustion = 0.0032f;
- switch (worldObj.difficultySetting) {
- case PEACEFUL:
- exhaustion = 0.0f;
- break;
- case EASY:
- exhaustion = 0.0032f * 1;
- break;
- case NORMAL:
- exhaustion = 0.0032f * 2;
- break;
- case HARD:
- exhaustion = 0.0032f * 3;
- default:
- break;
- }
-
- for (int i = 0; i < 4; i++) {
- if (thePlayer.inventory.armorInventory[i] == null) {
- exhaustion -= (exhaustion - exhaustion * 0.4) / 4f;
- break;
- }
- }
- thePlayer.addExhaustion(Math.max(exhaustion, 0));
- }
- }
- }
-
- /* Armor Effect Only Occurs When Block/Item Package is Installed */
- @SubscribeEvent
- public void cactusArmorDamage(LivingHurtEvent event) {
- if (Loader.isModLoaded(DefaultProps.BlocksModId) && event.entity != null
- && event.entity instanceof EntityPlayer && event.source.getSourceOfDamage() instanceof EntityLiving) {
- EntityPlayer hurtEntity = (EntityPlayer) event.entity;
- EntityLiving attackingEntity = (EntityLiving) event.source.getSourceOfDamage();
- if (attackingEntity != null && event.source.getDamageType() == "mob") {
-
- double cactusDamage = 0;
- if (hurtEntity.inventory.armorInventory[3] != null && ItemList.cactusArmorHead.isPresent()
- && hurtEntity.inventory.armorInventory[3].getItem() == ItemList.cactusArmorHead.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[2] != null && ItemList.cactusArmorChest.isPresent()
- && hurtEntity.inventory.armorInventory[2].getItem() == ItemList.cactusArmorChest.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[1] != null && ItemList.cactusArmorLeg.isPresent()
- && hurtEntity.inventory.armorInventory[1].getItem() == ItemList.cactusArmorLeg.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[0] != null && ItemList.cactusArmorBoots.isPresent()
- && hurtEntity.inventory.armorInventory[0].getItem() == ItemList.cactusArmorBoots.get()) {
- cactusDamage += 0.5;
- }
-
- if (cactusDamage > 0) {
- attackingEntity.attackEntityFrom(DamageSource.causeThornsDamage(hurtEntity),
- MathHelper.ceiling_double_int(cactusDamage));
- }
-
- }
- }
- }
-
- /**
- * Used to Notify nearby Treeents they should be attacking this Player. Triggered by the Player breaking Wood Only
- * notifies TreeEnts that are looking at the Player
- */
- @SubscribeEvent
- public void treeEntDefendForest(BreakSpeed event) {
- if (Loader.isModLoaded(DefaultProps.MobsModId)) {
- if (event.entity != null && event.entity instanceof EntityPlayer
- && (event.block == Blocks.log || event.block == Blocks.log2)) {
- EntityPlayer player = (EntityPlayer) (event.entity);
- World worldObj = player.worldObj;
- AxisAlignedBB playerBounding = player.boundingBox.copy();
- playerBounding = playerBounding.expand(24, 24, 24);
- List listOfTreeEnts = player.worldObj
- .getEntitiesWithinAABB(EntityTreeEnt.class, playerBounding);
- if (!listOfTreeEnts.isEmpty()) {
- Iterator entIterator = listOfTreeEnts.iterator();
- while (entIterator.hasNext()) {
- Entity entity = (Entity) entIterator.next();
- if (((EntityTreeEnt) entity).getAngerLevel() <= 0
- && worldObj.rayTraceBlocks(
- // worldObj.getWorldVec3Pool().getVecFromPool(player.posX,
- // player.posY + player.getEyeHeight(), player.posZ),
- // worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY,
- // entity.posZ)) == null) {
- // worldObj.getWorldVec3Pool().getVecFromPool(player.posX,
- // player.posY + player.getEyeHeight(), player.posZ),
- Vec3.createVectorHelper((double)player.posX, (double)player.posY + player.getEyeHeight(), (double)player.posZ),
- // worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY,
- // entity.posZ)
- Vec3.createVectorHelper((double)entity.posX, (double)entity.posY, (double) entity.posZ)
- ) == null) {
- if (!worldObj.isRemote) {
- ((EntityTreeEnt) entity).setAttackTarget(player);
- }
- ((EntityTreeEnt) entity).setAngerLevel(60);
- }
- }
- }
- }
- }
-
- }
-
- @SubscribeEvent
- public void onBreakBlock(BreakEvent event)
- {
- Random rand1 = new Random();
-
- //TileEntity entity = event.world.getTileEntity(event.x, event.y, event.z);
- if (event.block == Blocks.tallgrass || event.block == Blocks.grass || event.block == Blocks.vine
- || event.block == Blocks.brown_mushroom_block || event.block == Blocks.yellow_flower
- || event.block == Blocks.red_flower || event.block == Blocks.deadbush || event.block == Blocks.double_plant
- || event.block == Blocks.leaves || event.block == Blocks.leaves2)
- {
- // Makes sure to only run on server, entity spawns must be done on server
- if (!event.world.isRemote && rand1.nextInt(20) == 0) {
- int bugType = rand1.nextInt(10);
- int bugCount1 = rand1.nextInt(2);
- int bugCount2 = rand1.nextInt(2);
- int bugCount3 = rand1.nextInt(2);
-
- if (bugType <= 2 ) {
- for (int i=0; i <= bugCount1; i++) {
- EntityBeetleAS entity = new EntityBeetleAS(event.world);
-
- // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
- entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
-
- // Insert the bug in the world
- event.world.spawnEntityInWorld(entity);
-
- // Creates the "puff" effect
- entity.spawnExplosionParticle();
- }
-
- for (int i=0; i <= bugCount2; i++) {
- EntityBeetleBS entity = new EntityBeetleBS(event.world);
-
- // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
- entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
-
- // Insert the bug in the world
- event.world.spawnEntityInWorld(entity);
-
- // Creates the "puff" effect
- entity.spawnExplosionParticle();
- }
-
- } else if ((bugType >= 3) && (bugType <= 5) ) {
- for (int i=0; i <= bugCount1; i++) {
- EntityBeetleAS entity = new EntityBeetleAS(event.world);
-
- // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
- entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
-
- // Insert the bug in the world
- event.world.spawnEntityInWorld(entity);
-
- // Creates the "puff" effect
- entity.spawnExplosionParticle();
- }
- } else if ((bugType >= 6) && (bugType <= 8) ) {
- for (int i=0; i <= bugCount1; i++) {
- EntityBeetleBS entity = new EntityBeetleBS(event.world);
-
- // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
- entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
-
- // Insert the bug in the world
- event.world.spawnEntityInWorld(entity);
-
- // Creates the "puff" effect
- entity.spawnExplosionParticle();
- }
- } else {
- for (int i=0; i <= bugCount3; i++) {
- EntityCentipede entity = new EntityCentipede(event.world);
-
- // Places the entity close to the coords of the block (par2 = x, par3 = y, par4 = z)
- entity.setLocationAndAngles((double)event.x + 0.5D, (double)event.y, (double)event.z + 0.5D, 0.0F, 0.0F);
-
- // Insert the bug in the world
- event.world.spawnEntityInWorld(entity);
-
- // Creates the "puff" effect
- entity.spawnExplosionParticle();
- }
- }
-
- if (event.block == Blocks.leaves || event.block == Blocks.leaves2){
- int stickDrop = rand1.nextInt(3);
-
- if (stickDrop == 2) {
- ItemStack itemstack1 = new ItemStack(Items.stick, 1);
-
- double xrand = (double) (event.world.rand.nextFloat() * 0.7F) + (double) (0.3F) * 0.5D;
- double yrand = (double) (event.world.rand.nextFloat() * 0.7F) + (double) (0.3F) * 0.5D;
- double zrand = (double) (event.world.rand.nextFloat() * 0.7F) + (double) (0.3F) * 0.5D;
- EntityItem itemDrop1 = new EntityItem(event.world, (double) event.x + xrand, (double) event.y + yrand, (double) event.z + zrand, itemstack1);
- itemDrop1.delayBeforeCanPickup = 10;
- event.world.spawnEntityInWorld(itemDrop1);
-
- }
- }
- }
- }
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/72bd3aa2c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/72bd3aa2c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index db2dc74..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/72bd3aa2c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,89 +0,0 @@
-package projectzulu.common.potion.subitem;
-
-import java.util.Collections;
-import java.util.List;
-
-import com.google.common.base.Optional;
-
-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.potion.PotionEffect;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.api.SubItemPotionList;
-import projectzulu.common.core.ItemGenerics.Properties;
-import projectzulu.common.potion.PotionParser;
-
-public class SubItemPotionBubbling extends SubItemPotion {
-
- PotionRecipies recipies = new PotionRecipies();
-
- public SubItemPotionBubbling(Item item, int subID) {
- super(item, subID, "potion.shining");
- }
-
- @Override
- public void register() {
- recipies.addResultPotion(Items.golden_carrot, SubItemPotionList.NIGHT_VISION);
- recipies.addResultPotion(Items.magma_cream, SubItemPotionList.FIRE_RESISTANCE);
- recipies.addResultPotion(Items.sugar, SubItemPotionList.MOVE_SPEED);
- recipies.addResultPotion(Items.speckled_melon, SubItemPotionList.HEAL);
- recipies.addResultPotion(Items.spider_eye, SubItemPotionList.POISON);
- recipies.addResultPotion(Items.ghast_tear, SubItemPotionList.REGENERATION);
- recipies.addResultPotion(Items.fermented_spider_eye, SubItemPotionList.WEAKNESS);
- if (ItemList.genericCraftingItems.isPresent()) {
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.Talon.meta,
- SubItemPotionList.STRENGTH);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.LargeHeart.meta,
- SubItemPotionList.STRENGTH);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.RabbitsFoot.meta,
- SubItemPotionList.JUMP);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.FrogLegs.meta,
- SubItemPotionList.JUMP);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.SmallHeart.meta,
- SubItemPotionList.DIG_SPEED);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.PowderSlush.meta,
- SubItemPotionList.CLEANSING);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.PricklyPowder.meta,
- SubItemPotionList.THORNS);
- recipies.addResultPotion(ItemList.genericCraftingItems.get(), Properties.Gill.meta,
- SubItemPotionList.WATER_BREATHING);
- }
- }
-
- @Override
- public ItemStack getPotionResult(ItemStack ingredient, ItemStack brewingStack) {
- SubItemPotion resultingPotion = recipies.getResulingPotion(ingredient.getItem(), ingredient.getItemDamage());
- if (resultingPotion != null) {
- return new ItemStack(resultingPotion.item, 1, PotionParser.setID(resultingPotion.subID, 0));
- }
- return null;
- }
-
- @Override
- public boolean hasPotionEffects(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public List getPotionEffects(int damageMeta) {
- return Collections.emptyList();
- }
-
- @Override
- public void getSubItems(Item itemID, CreativeTabs creativeTab, List list) {
- list.add(new ItemStack(itemID, 1, subID));
- }
-
- @Override
- public boolean isEffectInstant(int damageMeta) {
- return false;
- }
-
- @Override
- public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
-
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/80a507fec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/80a507fec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index e482bb2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/80a507fec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.client.IItemRenderer;
-
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.experimental.ModelWarAxe;
-
-public class ItemRendererWarAxe implements IItemRenderer{
-
- ModelWarAxe model = new ModelWarAxe();
-
- @Override
- public boolean handleRenderType(ItemStack item, ItemRenderType type) {
- boolean answer = type == ItemRenderType.EQUIPPED ? true : false;
-// System.out.println(answer);
-
- return answer;
- }
-
- @Override
- public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
- ItemRendererHelper helper) {
-// System.out.println("shouldUseRenderHelper?");
-
- return false;
- }
-
- @Override
- public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
-// System.out.println("renderItem?");
- switch (type)
- {
-// case ENTITY: renderHelmet(-0.5F, 0.5F, -0.5F); break;
- case EQUIPPED: renderHelmet(0F, 0.4F, 0F); break;
-// case INVENTORY: renderHelmet(1F, 0.65F, 1F); break;
- default: break;
- }
- }
-
- public void renderHelmet(float x, float y, float z){
- String textureLocation = "";
- GL11.glPushMatrix(); //start
-// ForgeHooksClient.bindTexture("/mods/vikinghelmet.png", 0); //TODO: Commented bindTexture
- GL11.glTranslatef(x, y, z); //size
- float var10 = 0.0625F;
- model.render((Entity)null, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, var10);
- GL11.glPopMatrix(); //end
-
-
-// bindTextureByName(textureLocation);
-// GL11.glPushMatrix();
-// GL11.glDisable(GL11.GL_CULL_FACE);
-//
-// GL11.glTranslatef(par1 + (float)tranOffset[meta].xCoord, par2 + (float)tranOffset[meta].yCoord, par3 + (float)tranOffset[meta].zCoord);
-// switch (meta){
-// case 1:
-// break;
-// case 2:
-// break;
-// case 3:
-// rotation = 180.0F;
-// break;
-// case 4:
-// rotation = 270.0F;
-// break;
-// case 5:
-// default:
-// rotation = 90.0F;
-// }
-// System.out.println(meta);
-// System.out.println("Skull: ".concat(Integer.toString(skullState)));
-//
-// GL11.glRotatef(0.0f, 0.0f, 1.0F, 0.0f);
-// GL11.glScalef(-1.0f, -1.0F, 1.0F);
-// ((ModelBase) modelHeads.get(skullType)).render((Entity)null, 0.0F, 0.0F, 0.0F, rotation, skullState, scale);
-// GL11.glPopMatrix();
-
-// model.render((entity)null, f, f1, f2, f3, f4, f5);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/907556e6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/907556e6c42100141fce95f06aba7e85
deleted file mode 100644
index a3f5688..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/907556e6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,69 +0,0 @@
-package projectzulu.common.world;
-
-import java.util.Random;
-
-public enum CellIndexDirection {
- Middle, Inner, NorthMiddle, SouthMiddle, WestMiddle, EastMiddle, NorthWestCorner, NorthEastCorner, SouthWestCorner, SouthEastCorner, NorthWall, SouthWall, WestWall, EastWall;
-
- public boolean isCorner() {
- return this == NorthWestCorner || this == NorthEastCorner || this == SouthWestCorner || this == SouthEastCorner;
- }
-
- public static CellIndexDirection randomCardinalDirection(Random random) {
- switch (random.nextInt(4)) {
- case 0:
- return NorthMiddle;
- case 1:
- return SouthMiddle;
- case 2:
- return WestMiddle;
- case 3:
- return EastMiddle;
- default:
- return NorthMiddle;
- }
- }
-
- public CellIndexDirection calcDirection(int cellIndex, int cellSize) {
-
- /* Check if Middle */
- if (cellSize % 2 == 1) {
- if (cellIndex == cellSize * (cellSize - 1) / 2 + (cellSize - 1) / 2) {
- return Middle;
- } else if (cellIndex == (cellSize - 1) / 2) {
- return WestMiddle;
- } else if (cellIndex == cellSize * (cellSize - 1) / 2) {
- return NorthMiddle;
- } else if (cellIndex == cellSize * (cellSize - 1) + (cellSize - 1) / 2) {
- return EastMiddle;
- } else if (cellIndex == cellSize * (cellSize - 1) / 2 + (cellSize - 1)) {
- return SouthMiddle;
- }
- }
-
- /* Check if Corner */
- if (cellIndex == 0) {
- return NorthWestCorner;
- } else if (cellIndex == cellSize - 1) {
- return SouthWestCorner;
- } else if (cellIndex == cellSize * cellSize - 1) {
- return SouthEastCorner;
- } else if (cellIndex == cellSize * cellSize - cellSize) {
- return NorthEastCorner;
- }
-
- /* Check if Outer Edge */
- if ((cellIndex % cellSize == (0))) {
- return NorthWall;
- } else if ((cellIndex % cellSize == (cellSize - 1))) {
- return SouthWall;
- } else if (cellIndex >= cellSize * (cellSize - 1) && cellIndex < cellSize * cellSize) {
- return EastWall;
- } else if (cellIndex >= 0 && cellIndex < cellSize) {
- return WestWall;
- }
-
- /* If Nothing Else Mark as Inner */
- return Inner;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/907ccc9fc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/907ccc9fc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 658ee19..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/907ccc9fc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,34 +0,0 @@
-package projectzulu.common.world2.blueprint;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-
-public class BlueprintLabyrinthCobweb implements Blueprint {
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- if ((piecePos.posY == 0 || piecePos.posY == cellHeight - 1)) {
- return new BlockWithMeta(Blocks.stonebrick, 0);
- } else if ((piecePos.posY == 1 || piecePos.posY == cellHeight - 2) && 10 - random.nextInt(100) >= 0) {
- return new BlockWithMeta(Blocks.web, 0);
- } else {
- return new BlockWithMeta(Blocks.air);
- }
- }
-
- @Override
- public int getWeight() {
- return 1;
- }
-
- @Override
- public String getIdentifier() {
- return "labyrinthcobweb";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/a09421f6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/a09421f6c42100141fce95f06aba7e85
deleted file mode 100644
index 228cf5a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/a09421f6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ngb.projectzulu.common.dungeon.spawner.tag.keys;
-
-import java.util.HashMap;
-
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.world.EnumSkyBlock;
-import net.minecraft.world.World;
-import com.ngb.projectzulu.common.dungeon.spawner.tag.TypeValuePair;
-
-public class KeyParserTorchLight extends KeyParserRange {
-
- public KeyParserTorchLight(Key key) {
- super(key);
- }
-
- @Override
- int getCurrent(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord, TypeValuePair typeValuePair,
- HashMap valueCache) {
- return world.getSavedLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/b084abe4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/b084abe4c42100141fce95f06aba7e85
deleted file mode 100644
index cfde8a3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/b084abe4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,48 +0,0 @@
-package projectzulu.common.core;
-
-
-/**
- * For usage see: {@link Pair}
- */
-public class PairFullShortName implements Comparable> {
- private final K fullName;
- private final V shortName;
-
- public static PairFullShortName createPair(K fullName, V shortName) {
- return new PairFullShortName(fullName, shortName);
- }
-
- public PairFullShortName(K fullName, V shortName) {
- this.fullName = fullName;
- this.shortName = shortName;
- }
-
- public K getFullName() {
- return fullName;
- }
-
- public V getShortName() {
- return shortName;
- }
-
- @Override
- public boolean equals(Object object){
- if (! (object instanceof PairFullShortName)) { return false; }
- PairFullShortName pair = (PairFullShortName)object;
- return fullName.equals(pair.fullName) && shortName.equals(pair.shortName);
- }
-
- @Override
- public int hashCode(){
- return 7 * fullName.hashCode() + 13 * shortName.hashCode();
- }
-
- @Override
- public int compareTo(PairFullShortName otherPair) {
- if(otherPair.equals(this)){
- return 0;
- }else{
- return this.getShortName().compareTo(otherPair.getShortName());
- }
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/c0377cf6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/c0377cf6c42100141fce95f06aba7e85
deleted file mode 100644
index 9ff4333..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/c0377cf6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.ngb.projectzulu.common.core;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import com.ngb.projectzulu.common.blocks.GuiAnimalName;
-import com.ngb.projectzulu.common.blocks.tombstone.GuiTombstone;
-import com.ngb.projectzulu.common.blocks.tombstone.TileEntityTombstone;
-import com.ngb.projectzulu.common.blocks.universalpot.ContainerUniversalFlowerPot;
-import com.ngb.projectzulu.common.blocks.universalpot.GuiContainerUniversalFlowerPot;
-import com.ngb.projectzulu.common.blocks.universalpot.TileEntityUniversalFlowerPot;
-import com.ngb.projectzulu.common.dungeon.GuiLimitedMobSpawner;
-import com.ngb.projectzulu.common.dungeon.TileEntityLimitedMobSpawner;
-import com.ngb.projectzulu.common.potion.brewingstands.ContainerBrewingStandSingle;
-import com.ngb.projectzulu.common.potion.brewingstands.GuiBrewingStandSingle;
-import com.ngb.projectzulu.common.potion.brewingstands.TileEntityBrewingBase;
-import cpw.mods.fml.common.network.IGuiHandler;
-
-public class ZuluGuiHandler implements IGuiHandler {
-
- @Override
- public Object getServerGuiElement(int guiID, EntityPlayer player, World world, int x, int y, int z) {
-
- TileEntity tileEntityServer;
- switch (GuiID.getGuiIDByID(guiID)) {
- case FlowerPot:
- tileEntityServer = world.getTileEntity(x, y, z);
- if (tileEntityServer instanceof TileEntityUniversalFlowerPot) {
- return new ContainerUniversalFlowerPot(player.inventory,
- (TileEntityUniversalFlowerPot) tileEntityServer);
- }
- case BrewingStand:
- tileEntityServer = world.getTileEntity(x, y, z);
- if (tileEntityServer instanceof TileEntityBrewingBase) {
- return new ContainerBrewingStandSingle(player.inventory, (TileEntityBrewingBase) tileEntityServer);
- }
- case Unknown:
- throw new IllegalStateException("GuiID cannot be Found" + guiID);
- default:
- break;
- }
- return null;
-
- }
-
- @Override
- public Object getClientGuiElement(int guiID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity tileEntityClient;
- switch (GuiID.getGuiIDByID(guiID)) {
- case Tombstone:
- tileEntityClient = world.getTileEntity(x, y, z);
- if (tileEntityClient instanceof TileEntityTombstone) {
- return new GuiTombstone((TileEntityTombstone) tileEntityClient);
- }
- break;
- case FlowerPot:
- tileEntityClient = world.getTileEntity(x, y, z);
- if (tileEntityClient instanceof TileEntityUniversalFlowerPot) {
- return new GuiContainerUniversalFlowerPot(player.inventory,
- (TileEntityUniversalFlowerPot) tileEntityClient);
- }
- break;
- case AnimalName:
- return new GuiAnimalName(world, player, x);
- case MobSpawner:
- tileEntityClient = world.getTileEntity(x, y, z);
- if (tileEntityClient instanceof TileEntityLimitedMobSpawner) {
- return new GuiLimitedMobSpawner((TileEntityLimitedMobSpawner) tileEntityClient);
- }
- case BrewingStand:
- tileEntityClient = world.getTileEntity(x, y, z);
- if (tileEntityClient instanceof TileEntityBrewingBase) {
- return new GuiBrewingStandSingle(player.inventory, (TileEntityBrewingBase) tileEntityClient);
- }
- case Unknown:
- throw new IllegalStateException("GuiID cannot be Found" + guiID);
- }
-
- return null;
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e002cf00c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e002cf00c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 03bb0cc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e002cf00c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entity;
-
-import net.minecraft.world.World;
-import projectzulu.common.core.DefaultProps;
-
-public class EntityHorseGrey extends EntityHorseBase {
-
- public EntityHorseGrey(World par1World) {
- super(par1World);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e0e1a6a1c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e0e1a6a1c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 000e3a3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e0e1a6a1c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,168 +0,0 @@
-package projectzulu.common.mobs.entityai;
-
-import java.util.Random;
-
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.Vec3;
-import projectzulu.common.mobs.entity.EntityGenericCreature;
-
-public class RandomPositionGenerator
-{
- /**
- * used to store a driection when the user passes a point to move towards or away from. WARNING: NEVER THREAD SAFE.
- * MULTIPLE findTowards and findAway calls, will share this var
- */
- private static Vec3 staticVector = Vec3.createVectorHelper(0.0D, 0.0D, 0.0D);
-
- /**
- * finds a random target within par1(x,z) and par2 (y) blocks
- */
- public static Vec3 findRandomTarget(EntityGenericCreature par0EntityCreature, int par1, int par2) {
- return findRandomTargetBlock(par0EntityCreature, par1, par2, (Vec3)null);
- }
-
- /**
- * finds a random target within par1(x,z) and par2 (y) blocks in the direction of the point par3
- */
- public static Vec3 findRandomTargetBlockTowards(EntityGenericCreature par0EntityCreature, int par1, int par2, Vec3 par3Vec3) {
- staticVector.xCoord = par3Vec3.xCoord - par0EntityCreature.posX;
- staticVector.yCoord = par3Vec3.yCoord - par0EntityCreature.posY;
- staticVector.zCoord = par3Vec3.zCoord - par0EntityCreature.posZ;
- return findRandomTargetBlock(par0EntityCreature, par1, par2, staticVector);
- }
-
- /**
- * finds a random target within par1(x,z) and par2 (y) blocks in the reverse direction of the point par3
- */
- public static Vec3 findRandomTargetBlockAwayFrom(EntityGenericCreature par0EntityCreature, int par1, int par2, Vec3 par3Vec3) {
- staticVector.xCoord = par0EntityCreature.posX - par3Vec3.xCoord;
- staticVector.yCoord = par0EntityCreature.posY - par3Vec3.yCoord;
- staticVector.zCoord = par0EntityCreature.posZ - par3Vec3.zCoord;
- return findRandomTargetBlock(par0EntityCreature, par1, par2, staticVector);
- }
-
- /**
- * finds a random target within par1(x,z) and par2 (y) blocks trending towards desired height level above ground
- */
- public static Vec3 flyRandomlyTowardHeightLevel(EntityGenericCreature par0EntityCreature, int par1, int par2, int heightLevel) {
- return flyToRandomTargetBlockAtHeight(par0EntityCreature, par1, par2, (Vec3)null, heightLevel);
- }
-
- /**
- * searches 10 blocks at random in a within par1(x,z) and par2 (y) distance, ignores those not in the direction of
- * par3Vec3, then points to the tile for which creature.getBlockPathWeight returns the highest number
- */
- private static Vec3 findRandomTargetBlock(EntityGenericCreature par0EntityCreature, int par1, int par2, Vec3 par3Vec3) {
- Random var4 = par0EntityCreature.getRNG();
- boolean var5 = false;
- int var6 = 0;
- int var7 = 0;
- int var8 = 0;
- float var9 = -99999.0F;
- boolean var10;
-
- if (par0EntityCreature.hasHome()) {
- double var11 = (double)(par0EntityCreature.getHomePosition().getDistanceSquared(MathHelper.floor_double(par0EntityCreature.posX), MathHelper.floor_double(par0EntityCreature.posY), MathHelper.floor_double(par0EntityCreature.posZ)) + 4.0F);
- double var13 = (double)(par0EntityCreature.getMaximumHomeDistance() + (float)par1);
- var10 = var11 < var13 * var13;
- }
- else {
- var10 = false;
- }
-
- for (int var16 = 0; var16 < 10; ++var16) {
- int var12 = var4.nextInt(2 * par1) - par1;
- int var17 = var4.nextInt(2 * par2) - par2;
- int var14 = var4.nextInt(2 * par1) - par1;
-
- if (par3Vec3 == null || (double)var12 * par3Vec3.xCoord + (double)var14 * par3Vec3.zCoord >= 0.0D) {
- var12 += MathHelper.floor_double(par0EntityCreature.posX);
- var17 += MathHelper.floor_double(par0EntityCreature.posY);
- var14 += MathHelper.floor_double(par0EntityCreature.posZ);
-
- if (!var10 || par0EntityCreature.isWithinHomeDistance(var12, var17, var14)) {
- float var15 = par0EntityCreature.getBlockPathWeight(var12, var17, var14);
-
- if (var15 > var9) {
- var9 = var15;
- var6 = var12;
- var7 = var17;
- var8 = var14;
- var5 = true;
- }
- }
- }
- }
-
- if (var5) {
- //return par0EntityCreature.worldObj.getWorldVec3Pool().getVecFromPool((double)var6, (double)var7, (double)var8);
- return Vec3.createVectorHelper((double)var6, (double)var7, (double)var8);
- }
- else {
- return null;
- }
- }
-
- /**
- * searches 10 blocks at random in a within par1(x,z) and par2 (y) distance, ignores those not in the direction of
- * par3Vec3, then points to the tile for which creature.getBlockPathWeight returns the highest number
- */
- private static Vec3 flyToRandomTargetBlockAtHeight(EntityGenericCreature entity, int par1, int par2, Vec3 par3Vec3, int heightLevel) {
- Random var4 = entity.getRNG();
- boolean var5 = false;
- int var6 = 0;
- int var7 = 0;
- int var8 = 0;
- float var9 = -99999.0F;
- boolean var10;
-
- if (entity.hasHome()) {
- double var11 = (double)(entity.getHomePosition().getDistanceSquared(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ)) + 4.0F);
- double var13 = (double)(entity.getMaximumHomeDistance() + (float)par1);
- var10 = var11 < var13 * var13;
- }
- else {
- var10 = false;
- }
-
- for (int var16 = 0; var16 < 10; ++var16) {
- int var12 = var4.nextInt(2 * par1) - par1;
- int var17;
- if(entity.posY > entity.worldObj.getPrecipitationHeight( (int)entity.posX, (int)entity.posZ) + heightLevel*1.25){
- var17 = var4.nextInt(2 * par2) - par2*3/2;
- }else if(entity.posY < entity.worldObj.getPrecipitationHeight( (int)entity.posX, (int)entity.posZ) + heightLevel){
- var17 = var4.nextInt(2 * par2) - par2/2;
- }else{
- var17 = var4.nextInt(2 * par2) - par2;
- }
-
- int var14 = var4.nextInt(2 * par1) - par1;
-
- if (par3Vec3 == null || (double)var12 * par3Vec3.xCoord + (double)var14 * par3Vec3.zCoord >= 0.0D) {
- var12 += MathHelper.floor_double(entity.posX);
- var17 += MathHelper.floor_double(entity.posY);
- var14 += MathHelper.floor_double(entity.posZ);
-
- if (!var10 || entity.isWithinHomeDistance(var12, var17, var14)) {
- float var15 = entity.getBlockPathWeight(var12, var17, var14);
-
- if (var15 > var9) {
- var9 = var15;
- var6 = var12;
- var7 = var17;
- var8 = var14;
- var5 = true;
- }
- }
- }
- }
-
- if (var5) {
- //return entity.worldObj.getWorldVec3Pool().getVecFromPool((double)var6, (double)var7, (double)var8);
- return Vec3.createVectorHelper((double)var6, (double)var7, (double)var8);
- }
- else {
- return null;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/f135dffdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/f135dffdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 8ca455e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/f135dffdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ItemGenerics;
-import projectzulu.common.core.itemblockdeclaration.ItemDeclaration;
-import projectzulu.common.potion.brewingstands.PotionIngredients;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class GenericCraftingItemsDeclaration extends ItemDeclaration {
-
- public GenericCraftingItemsDeclaration() {
- super("GenericCraftingItems1");
- }
-
- @Override
- protected boolean createItem() {
- ItemGenerics itemGenerics = (ItemGenerics) new ItemGenerics();
- ItemList.genericCraftingItems = Optional.of(itemGenerics);
- PotionIngredients.addIngredientProperties(itemGenerics, itemGenerics);
- return true;
- }
-
- @Override
- protected void registerItem() {
- Item item = ItemList.genericCraftingItems.get();
- OreDictionary.registerOre("foodSalt", new ItemStack(item, 1, ItemGenerics.Properties.Salt.meta()));
- GameRegistry.registerItem(item, name);
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/00ba98f9c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/00ba98f9c42100141fce95f06aba7e85
deleted file mode 100644
index 2626abb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/00ba98f9c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,527 +0,0 @@
-package com.ngb.projectzulu.common;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.logging.Level;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.item.EntityXPOrb;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.DamageSource;
-import net.minecraft.world.GameRules;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-import net.minecraftforge.event.entity.living.LivingDeathEvent;
-import net.minecraftforge.event.entity.player.PlayerDropsEvent;
-import net.minecraftforge.event.world.WorldEvent;
-import com.ngb.projectzulu.common.api.BlockList;
-import com.ngb.projectzulu.common.blocks.tombstone.TileEntityTombstone;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.ObfuscationHelper;
-import com.ngb.projectzulu.common.core.ProjectZuluLog;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DeathGamerules {
- int maxDropXP = 100;
- int percKeptXp = 0;
-
- int armorDeathDamage = 0;
- int inventoryDeathDamage = 0;
- int hotbarDeathDamage = 0;
-
- int armorDropDamage = 0;
- int inventoryDropDamage = 0;
- int hotbarDropDamage = 0;
-
- int armorDropChance = 100;
- int inventoryDropChance = 100;
- int hotbarDropChance = 100;
-
- int armorMaxDrop = 0;
- int inventoryMaxDrop = 0;
- int hotbarMaxDrop = 0;
-
- boolean tombstoneOnDeath = true;
- boolean tombstoneAbsorbDrops = true;
- boolean doDropEvent = true;
-
- boolean keepInventoryDefault = false;
- boolean dropArmorDefault = false;
- boolean dropInventoryDefault = false;
- boolean dropHotbarDefault = false;
- boolean dropXPDefault = false;
- private ExperienceRedistributor redistributor;
- private ItemBlacklist itemBlacklist;
-
- public DeathGamerules() {
- redistributor = new ExperienceRedistributor();
- FMLCommonHandler.instance().bus().register(redistributor);
- }
-
- public DeathGamerules loadConfiguration(File modConfigDirectory) {
- itemBlacklist = new ItemBlacklist();
- Configuration config = new Configuration(new File(modConfigDirectory, DefaultProps.configDirectory
- + DefaultProps.defaultConfigFile));
- config.load();
- itemBlacklist.loadFromConfig(config);
- tombstoneOnDeath = config.get("General Controls", "Drop Tombstone On Death", tombstoneOnDeath).getBoolean(
- tombstoneOnDeath);
- tombstoneAbsorbDrops = config.get("General Controls", "Tombstone Absorb Drops", tombstoneAbsorbDrops)
- .getBoolean(tombstoneAbsorbDrops);
- doDropEvent = config.get("General Controls", "doDropEvent", doDropEvent).getBoolean(doDropEvent);
-
- String category = "General Controls.gamerule_settings";
- maxDropXP = config
- .get(category + ".Experience", "maxDropXP", 100,
- "Maximum amount XP dropped on Death. The rest is lost if not kept via percKeptXp. 100 is vanilla default")
- .getInt(100);
- keepInventoryDefault = config.get(category, "keepInventoryDefault", false,
- "The Default settings for the keepInventory gamerule").getBoolean(false);
- Property keptXpProperty = config.get(category + ".Experience", "percKeptXp", 0,
- "Percentage of XP (minus dropped amount) kept with the player on respawn.");
- percKeptXp = keptXpProperty.getInt();
- if (percKeptXp < 0 || percKeptXp > 100) {
- percKeptXp = percKeptXp < 0 ? 0 : percKeptXp > 100 ? 100 : percKeptXp;
- keptXpProperty.set(percKeptXp);
- }
- dropArmorDefault = config.get(category + ".Armor", "isEnabledDefault", false,
- "The Default settings for the dropArmor gamerule").getBoolean(false);
- dropInventoryDefault = config.get(category + ".Inventory", "isEnabledDefault", false,
- "The Default settings for the dropInventory gamerule").getBoolean(false);
- dropHotbarDefault = config.get(category + ".Hotbar", "isEnabledDefault", false,
- "The Default settings for the dropHotbar gamerule").getBoolean(false);
- dropXPDefault = config.get(category + ".Experience", "isEnabledDefault", false,
- "The Default settings for the dropXP gamerule").getBoolean(false);
-
- armorDeathDamage = handlePropMinMax(config.get(category + ".Armor", "armorDeathDamage", 0,
- "Percentage of Max durability dealth on Death to armor slot items"), 0, 0, 100);
- inventoryDeathDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDeathDamage", 0,
- "Percentage of Max durability dealth on Death to inventory slot items"), 0, 0, 100);
- hotbarDeathDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDeathDamage", 0,
- "Percentage of Max durability dealth on Death to hotbar slot items"), 0, 0, 100);
-
- armorDropDamage = handlePropMinMax(config.get(category + ".Armor", "armorDropDamage", 0,
- "Percentage of Max durability dealth on Drop to armor slot items"), 0, 0, 100);
- inventoryDropDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropDamage", 0,
- "Percentage of Max durability dealth on Drop to inventory slot items"), 0, 0, 100);
- hotbarDropDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropDamage", 0,
- "Percentage of Max durability dealth on Drop to hotbar slot items"), 0, 0, 100);
-
- armorDropChance = handlePropMinMax(config.get(category + ".Armor", "armorDropChance", 100,
- "Chance that each armor slot item will drop on death"), 100, 0, 100);
- inventoryDropChance = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropChance", 100,
- "Chance that each inventory slot item will drop on death"), 100, 0, 100);
- hotbarDropChance = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropChance", 100,
- "Chance that each hotbar slot item will drop on death"), 100, 0, 100);
-
- armorMaxDrop = handlePropMinMax(config.get(category + ".Armor", "armorMaxDrop", 0,
- "Max number of armor slot items that can drop on death."), 0, 0, null);
- inventoryMaxDrop = handlePropMinMax(config.get(category + ".Inventory", "inventoryMaxDrop", 0,
- "Max number of inventory slot items that can drop on death"), 0, 0, null);
- hotbarMaxDrop = handlePropMinMax(config.get(category + ".Hotbar", "hotbarMaxDrop", 0,
- "Max number of hotbar slot items that can drop on death"), 0, 0, null);
- config.save();
- return this;
- }
-
- private int handlePropMinMax(Property prop, int value, Integer min, Integer max) {
- value = prop.getInt(value);
- if (min != null && value < min) {
- prop.set(min);
- value = min;
- } else if (max != null && value > max) {
- prop.set(max);
- value = max;
- }
- return value;
- }
-
- @SubscribeEvent
- public void worldLoad(WorldEvent.Load event) {
- GameRules gameRule = event.world.getGameRules();
- if (createGameruleIfAbsent(gameRule, "pzKeepInventory", keepInventoryDefault)) {
- gameRule.setOrCreateGameRule("keepInventory", Boolean.toString(keepInventoryDefault));
- }
- createGameruleIfAbsent(gameRule, "dropInventory", dropInventoryDefault);
- createGameruleIfAbsent(gameRule, "dropHotbar", dropHotbarDefault);
- createGameruleIfAbsent(gameRule, "dropArmor", dropArmorDefault);
- createGameruleIfAbsent(gameRule, "dropXP", dropXPDefault);
- }
-
- private boolean createGameruleIfAbsent(GameRules gameRule, String gameruleName, boolean value) {
- boolean added = false;
- if (!gameRule.hasRule(gameruleName)) {
- gameRule.addGameRule(gameruleName, Boolean.toString(value));
- added = true;
- }
- ProjectZuluLog.info("Gamerule %s is set to %s", gameruleName, gameRule.getGameRuleBooleanValue(gameruleName));
- return added;
- }
-
- @SubscribeEvent
- public void onPlayerDeath(LivingDeathEvent event) {
- if (event.entity instanceof EntityPlayerMP) {
- GameRules gameRules = event.entity.worldObj.getGameRules();
- boolean dropInventory = gameRules.getGameRuleBooleanValue("dropInventory");
- boolean dropHotbar = gameRules.getGameRuleBooleanValue("dropHotbar");
- boolean dropArmor = gameRules.getGameRuleBooleanValue("dropArmor");
- boolean dropXP = gameRules.getGameRuleBooleanValue("dropXP");
-
- EntityPlayer player = (EntityPlayer) event.entity;
-
- TileEntityTombstone tombstone = tombstoneOnDeath ? placeTombstone(player) : null;
- if (tombstone != null) {
- tombstone.setSignString(event.source.func_151519_b((EntityPlayer) event.entity).toString());
- }
-
- if (!dropInventory && !dropHotbar && !dropArmor && !dropXP) {
- return;
- }
-
- player.captureDrops = true;
- player.capturedDrops.clear();
-
- /* Get items/XP to drop and clear them from Player */
- int xpDropped = 0;
- if (dropXP) {
- if (!player.worldObj.isRemote) {
- xpDropped = player.experienceTotal;
- xpDropped = xpDropped > maxDropXP ? maxDropXP : xpDropped;
- int keptXp = (player.experienceTotal - xpDropped) * percKeptXp / 100;
- redistributor.addExpereince(player, keptXp >= 0 ? keptXp : 0);
- player.experienceLevel = 0;
- player.experienceTotal = 0;
- player.experience = 0;
- }
- }
-
- List itemsToDrop = new ArrayList();
- if (dropArmor) {
- itemsToDrop.addAll(dropArmor(player));
- }
-
- if (dropInventory) {
- itemsToDrop.addAll(dropInventory(player));
- }
-
- if (dropHotbar) {
- itemsToDrop.addAll(dropHotbar(player));
- }
-
- dropItems(player, itemsToDrop);
- boolean isCancelled = false;
- if (doDropEvent) {
- PlayerDropsEvent dropEvent = createPlayerDropEvent(player, event.source, player.capturedDrops);
- isCancelled = MinecraftForge.EVENT_BUS.post(dropEvent);
- }
- player.captureDrops = false;
- if (!isCancelled) {
- /* Handler actually Dropping Items or Placing them in Tombstone */
- if (tombstoneAbsorbDrops && tombstone != null) {
- for (EntityItem entityItem : player.capturedDrops) {
- tombstone.addDrop(entityItem.getEntityItem());
- }
- tombstone.experience = xpDropped;
- } else {
- if (tombstoneAbsorbDrops) {
- ProjectZuluLog.warning("Tombstone could not be placed so items dropping normally.");
- }
- while (xpDropped > 0) {
- int j = EntityXPOrb.getXPSplit(xpDropped);
- xpDropped -= j;
- player.worldObj.spawnEntityInWorld(new EntityXPOrb(player.worldObj, player.posX, player.posY,
- player.posZ, j));
- }
- for (EntityItem item : player.capturedDrops) {
- player.joinEntityItemWithWorld(item);
- }
- }
- } else {
- ProjectZuluLog.warning("Player drop event was cancelled, so items will not be dropped per convention."
- + "Results may not desireable, consider disabling 'doDropEvent' in the config.");
- }
- }
- }
-
- private void dropItems(EntityPlayer player, List drops) {
- for (ItemStack itemDrop : drops) {
- player.inventory.player.dropPlayerItemWithRandomChoice(itemDrop, true);
- }
- }
-
- private PlayerDropsEvent createPlayerDropEvent(EntityPlayer player, DamageSource damageSource,
- ArrayList drops) {
- int recentlyHit;
- try {
- recentlyHit = ObfuscationHelper.getCatchableFieldFromReflection("field_70718_bc", EntityLivingBase.class,
- player, Integer.class);
- } catch (NoSuchFieldException e) {
- recentlyHit = ObfuscationHelper.getFieldFromReflection("recentlyHit", EntityLivingBase.class, player,
- Integer.class);
- }
- return new PlayerDropsEvent(player, damageSource, player.capturedDrops, recentlyHit > 0);
- }
-
- private TileEntityTombstone placeTombstone(EntityPlayer player) {
- Optional chunkCoordinate = findValidTombstoneLocation(player);
- if (chunkCoordinate.isPresent()) {
- /* Place a Tombstone */
- player.worldObj.setBlock(chunkCoordinate.get().posX, chunkCoordinate.get().posY,
- chunkCoordinate.get().posZ, BlockList.tombstone.get());
- TileEntity tileEntity = player.worldObj.getTileEntity(chunkCoordinate.get().posX,
- chunkCoordinate.get().posY, chunkCoordinate.get().posZ);
- StringBuilder sb = new StringBuilder();
- sb.append("Tombstone summoned to mark the 'passing' of ").append(player.getCommandSenderName()).append(" at [");
- sb.append(chunkCoordinate.get().posX).append(", ");
- sb.append(chunkCoordinate.get().posY).append(", ");
- sb.append(chunkCoordinate.get().posZ).append("]");
- player.addChatMessage(new ChatComponentText(sb.toString()));
- if (tileEntity != null && tileEntity instanceof TileEntityTombstone) {
- ProjectZuluLog.debug(Level.INFO, sb.toString());
- return (TileEntityTombstone) tileEntity;
- }
- }
- ProjectZuluLog.warning("Failed to find location to place tombstone at player location {X:%s, Y:%s, Z:%s}",
- player.posX, player.posY, player.posZ);
- return null;
- }
-
- private Optional findValidTombstoneLocation(EntityPlayer player) {
- final int maxRadius = 100;
- /** Search an increasing square box (only check edge) for a valid location */
- for (int radius = 0; radius < maxRadius; radius++) {
- List validLocations = new ArrayList();
- validLocations.addAll(searchXPlaneAt(-radius, radius, player));
- validLocations.addAll(searchXPlaneAt(radius, radius, player));
- validLocations.addAll(searchZPlaneAt(-radius, radius, player));
- validLocations.addAll(searchZPlaneAt(radius, radius, player));
- validLocations.addAll(searchYPlaneAt(-radius, radius, player));
- validLocations.addAll(searchYPlaneAt(radius, radius, player));
- ChunkCoordinates closestPoint = null;
- float bestDistance = 0;
- for (ChunkCoordinates chunkCoordinates : validLocations) {
- if (closestPoint != null) {
- float distance = chunkCoordinates.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- if (distance < bestDistance) {
- bestDistance = distance;
- closestPoint = chunkCoordinates;
- }
- } else {
- closestPoint = chunkCoordinates;
- bestDistance = closestPoint.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- }
- }
- if (closestPoint != null) {
- return Optional.of(closestPoint);
- }
- }
- return Optional.absent();
- }
-
- private List searchXPlaneAt(int xOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchZPlaneAt(int zOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchYPlaneAt(int yOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private boolean isLocationValid(EntityPlayer player, int posX, int posY, int posZ) {
- if (player.worldObj.isAirBlock(posX, posY, posZ) && player.worldObj.getBlock(posX, posY - 1, posZ).isOpaqueCube()) {
- return true;
- }
- return false;
- }
-
- private List dropArmor(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.armorInventory.length];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
-
- shuffleArray(placeArray, player.worldObj.rand);
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.armorInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((armorMaxDrop == 0 || countDrops < armorMaxDrop)
- && (armorDropChance - player.worldObj.rand.nextInt(100) >= 1)) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? armorDeathDamage + armorDropDamage : armorDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.armorInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.armorInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private List dropInventory(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- if (player.inventory.mainInventory.length > 8) {
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.mainInventory.length - 9];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i + 9;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((inventoryMaxDrop == 0 || countDrops < inventoryMaxDrop)
- && inventoryDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? inventoryDeathDamage + inventoryDropDamage : inventoryDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- }
- return itemsToDrop;
- }
-
- private List dropHotbar(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- int inventorySize = player.inventory.mainInventory.length > 9 ? 9 : player.inventory.mainInventory.length;
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[inventorySize];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((hotbarMaxDrop == 0 || countDrops < hotbarMaxDrop)
- && hotbarDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? hotbarDeathDamage + hotbarDropDamage : hotbarDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private void shuffleArray(int[] array, Random random) {
- for (int i = array.length - 1; i >= 0; i--) {
- int index = random.nextInt(i + 1);
- int a = array[index];
- array[index] = array[i];
- array[i] = a;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/10e461d53720001413909a661a93f408 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/10e461d53720001413909a661a93f408
deleted file mode 100644
index ad94c6d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/10e461d53720001413909a661a93f408
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.example.soulmod;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-
-@Mod(modid = SoulmodT1.MODID, version = SoulmodT1.VERSION)
-public class SoulmodT1
-{
- public static final String MODID = "soulmodt1";
- public static final String VERSION = "1.0b";
-
- @EventHandler
- public void init(FMLInitializationEvent event)
- {
- GameRegistry.addRecipe(new ItemStack(Items.apple,4),
- new Object[]{
- "AA",
- "AA",
- 'A', Blocks.cobblestone
- });
-
- GameRegistry.addRecipe(new ItemStack(Items.dye, 2, 15), new Object[]{
- "AB ",
- "AAC",
- "A ",
- 'A', Blocks.cobblestone, 'B', Blocks.dirt, 'C', new ItemStack(Items.dye, 1, 1)
- });
-
- GameRegistry.addRecipe(new ItemStack(Item.diamond, 2), new Object[] {
- "DDD", "DDD", "DDD", 'D', Blocks.dirt });
-
- GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, 1), new Object[]
- {
- new ItemStack(Items.dye, 1, 1), Items.apple
- });
-
- GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 1), new ItemStack(Items.dye, 1, 11), 0.1F);
- }
-
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/114fd3fdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/114fd3fdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 306b828..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/114fd3fdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.block.Block;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.core.itemblockdeclaration.BlockDeclaration;
-import projectzulu.common.potion.brewingstands.BlockBrewingStandSingle;
-import projectzulu.common.potion.brewingstands.RenderBrewingStandSingle;
-import projectzulu.common.potion.brewingstands.TileEntityBrewingSingle;
-import projectzulu.common.potion.brewingstands.TileEntityBrewingStandRenderer;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.client.registry.ClientRegistry;
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class BrewingStandSingleDeclaration extends BlockDeclaration {
-
- private int renderID = -1;
-
- public BrewingStandSingleDeclaration() {
- super("BrewingStandSingle");
- }
-
- @Override
- protected void preCreateLoadConfig(Configuration config) {
- renderID = config.get("Do Not Touch", "Brewing Stand Single Render ID", renderID).getInt(renderID);
- renderID = renderID == -1 ? RenderingRegistry.getNextAvailableRenderId() : renderID;
- }
-
- @Override
- protected boolean createBlock() {
- BlockList.brewingStandSingle = Optional.of(new BlockBrewingStandSingle(renderID).setBlockName("brewingsingle")
- .setBlockTextureName(DefaultProps.blockKey + ":brewingsingle"));
- return true;
- }
-
- @Override
- protected void registerBlock() {
- Block block = BlockList.brewingStandSingle.get();
- GameRegistry.registerBlock(block, name.toLowerCase());
- GameRegistry.registerTileEntity(TileEntityBrewingSingle.class, "TileEntityBrewingSingle");
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- protected void clientRegisterBlock() {
- RenderingRegistry.registerBlockHandler(renderID, new RenderBrewingStandSingle());
- ProjectZuluLog.info("Brewing Stand Single Render ID Registed to %s", renderID);
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrewingSingle.class,
- new TileEntityBrewingStandRenderer());
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/3066e5ffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/3066e5ffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 1dbf0a3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/3066e5ffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.item.Item;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.core.DefaultProps;
-
-public class ItemCoconutShell extends Item {
-
- public ItemCoconutShell(boolean full3D, String name) {
- super();
- maxStackSize = 12;
- setMaxDamage(5);
- this.setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- bFull3D = full3D;
- setUnlocalizedName(name.toLowerCase());
- setTextureName(DefaultProps.blockKey + ":" + name.toLowerCase());
- }
-
- public int getMetadata(int par1) {
- return par1;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/3202e0e4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/3202e0e4c42100141fce95f06aba7e85
deleted file mode 100644
index 1f01f77..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/3202e0e4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,112 +0,0 @@
-package projectzulu.common.dungeon.spawner.tag.keys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.world.World;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.dungeon.spawner.tag.ParsingHelper;
-import projectzulu.common.dungeon.spawner.tag.TypeValuePair;
-import projectzulu.common.dungeon.spawner.tag.settings.OptionalSettings.Operand;
-
-public class KeyParserLiquid extends KeyParserBase {
-
- public KeyParserLiquid(Key key) {
- super(key, true, KeyType.CHAINABLE);
- }
-
- @Override
- public boolean parseChainable(String parseable, ArrayList parsedChainable,
- ArrayList operandvalue) {
-
- boolean isInverted = false;
- if (isInverted(parseable)) {
- isInverted = true;
- }
-
- String[] pieces = parseable.split(",");
- Operand operand = parseOperand(pieces);
- TypeValuePair typeValue = null;
-
- if (pieces.length == 2 || pieces.length == 3) {
- int rangeX, rangeY, rangeZ;
- rangeX = rangeY = rangeZ = 0;
- String[] rangePieces = pieces[1].split("/");
- if (rangePieces.length == 3) {
- rangeX = ParsingHelper.parseFilteredInteger(rangePieces[0], 0, key.key + "BlockRangeX");
- rangeY = ParsingHelper.parseFilteredInteger(rangePieces[1], 0, key.key + "BlockRangeY");
- rangeZ = ParsingHelper.parseFilteredInteger(rangePieces[2], 0, key.key + "BlockRangeZ");
- } else if (rangePieces.length == 1) {
- rangeX = ParsingHelper.parseFilteredInteger(rangePieces[0], 0, key.key + "BlockRangeX");
- rangeY = rangeX;
- rangeZ = rangeX;
- } else {
- ProjectZuluLog.severe("Error Parsing Range of %s. Invalid Argument Length of %s.", key.key,
- rangePieces.length);
- }
-
- if (pieces.length == 3) {
- String[] offsetPieces = pieces[2].split("/");
- int offsetX = ParsingHelper.parseFilteredInteger(offsetPieces[0], 0, key.key + "OffsetX");
- int offsetY = ParsingHelper.parseFilteredInteger(offsetPieces[1], 0, key.key + "OffsetY");
- int offsetZ = ParsingHelper.parseFilteredInteger(offsetPieces[2], 0, key.key + "OffsetZ");
- typeValue = new TypeValuePair(key, new Object[] { isInverted, rangeX, rangeY, rangeZ, offsetX, offsetY,
- offsetZ });
- } else {
- typeValue = new TypeValuePair(key, new Object[] { isInverted, rangeX, rangeY, rangeZ });
- }
- } else {
- ProjectZuluLog.severe("Error Parsing %s Block Parameter. Invalid Argument Length of %s.", key.key,
- pieces.length);
- return false;
- }
-
- if (typeValue != null && typeValue.getValue() != null) {
- parsedChainable.add(typeValue);
- operandvalue.add(operand);
- return true;
- }
- return false;
- }
-
- @Override
- public boolean parseValue(String parseable, HashMap valueCache) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isValidLocation(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord,
- TypeValuePair typeValuePair, HashMap valueCache) {
-
- Object[] values = (Object[]) typeValuePair.getValue();
- boolean isInverted = (Boolean) values[0];
-
- if (values.length == 4 || values.length == 7) {
- int rangeX = (Integer) values[1];
- int rangeY = (Integer) values[2];
- int rangeZ = (Integer) values[3];
- int offsetX, offsetY, offsetZ;
- offsetX = offsetY = offsetZ = 0;
- if (values.length == 7) {
- offsetX = (Integer) values[4];
- offsetY = (Integer) values[5];
- offsetZ = (Integer) values[6];
- }
-
- for (int i = -rangeX; i <= rangeX; i++) {
- for (int k = -rangeZ; k <= rangeZ; k++) {
- for (int j = -rangeY; j <= rangeY; j++) {
- boolean isLiquid = world
- .getBlock(xCoord + offsetX + i, yCoord + offsetY + j, zCoord + offsetZ + k)
- .getMaterial().isLiquid();
- if (!isInverted && isLiquid || isInverted && !isLiquid) {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/5065ed78009e00141ce0d62fbd2fd1cf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/5065ed78009e00141ce0d62fbd2fd1cf
deleted file mode 100644
index 1f9bf7e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/5065ed78009e00141ce0d62fbd2fd1cf
+++ /dev/null
@@ -1,209 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entity;
-
-import java.util.EnumSet;
-
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.ai.EntityAILookIdle;
-import net.minecraft.entity.ai.EntityAISwimming;
-import net.minecraft.entity.ai.EntityAIWatchClosest;
-import net.minecraft.entity.passive.IAnimals;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-
-import com.stek101.projectzulu.common.api.CustomEntityList;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.mobs.EntityAFightorFlight;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIFollowParent;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIMate;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIMoveTowardsRestriction;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIPanic;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAITempt;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIWander;
-
-public class EntityMonkey extends EntityGenericAnimal implements IAnimals{
- //private EntityAIArrowAttack aiRockAttack = new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F);
- private EntityAFightorFlight EAFF;
- private CustomEntityList entityEntry;
- private float aggroLevel;
- private double aggroRange;
- private boolean throwRock = false;
- private int throwCooldown = 6 * 20;
- private int throwTimer = 100;
- private int stage = 1;
-
- public EntityMonkey(World par1World) {
- super(par1World);
- setSize(1.4f, 0.9f);
- this.setPosition(this.posX, this.posY, this.posZ);
- this.entityEntry = CustomEntityList.getByName(EntityList.getEntityString(this));
-
- /* Check if aggroLevel and aggroRange have valid values to activate AFoF */
- if (entityEntry != null && entityEntry.modData.get().entityProperties != null) {
- this.aggroLevel = entityEntry.modData.get().entityProperties.aggroLevel;
- this.aggroRange = entityEntry.modData.get().entityProperties.aggroRange;
- }
-
- if (Math.round(this.aggroRange) != 0) {
- EAFF = new EntityAFightorFlight().setEntity(this, worldObj, this.aggroLevel, this.aggroRange);
- }
-
- getNavigator().setAvoidsWater(true);
- tasks.addTask(0, new EntityAISwimming(this));
- tasks.addTask(1, new EntityAIPanic(this, 1.0f));
- tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0f, false));
- tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 16.0F));
- tasks.addTask(4, new EntityAILookIdle(this));
- tasks.addTask(5, new EntityAIMate(this, 0.8f));
- tasks.addTask(6, new EntityAITempt(this, 0.9f, Items.bread, false));
- tasks.addTask(7, new EntityAIFollowParent(this, 0.9f));
- tasks.addTask(8, new EntityAIWander(this, 0.8f, 120));
- tasks.addTask(9, new EntityAIMoveTowardsRestriction(this, 1.0f));
-
- targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, false));
- targetTasks.addTask(2,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
-
- }
-
- @Override
- protected void entityInit()
- {
- super.entityInit();
- this.dataWatcher.addObject(16, new Byte((byte)0));
- }
-
- /**
- * Updates the WatchableObject (Byte) created in entityInit(), setting it to 0x01 if par1 is true or 0x00 if it is
- * false.
- */
- public void setBesideClimbableBlock(boolean p_70839_1_)
- {
- byte b0 = this.dataWatcher.getWatchableObjectByte(16);
-
- if (p_70839_1_)
- {
- b0 = (byte)(b0 | 1);
- }
- else
- {
- b0 &= -2;
- }
-
- this.dataWatcher.updateObject(16, Byte.valueOf(b0));
- }
-
- /**
- * returns true if this entity is by a ladder, false otherwise
- */
- @Override
- public boolean isOnLadder()
- {
- return this.isBesideClimbableBlock();
- }
-
- /**
- * Returns true if the WatchableObject (Byte) is 0x01 otherwise returns false. The WatchableObject is updated using
- * setBesideClimableBlock.
- */
- public boolean isBesideClimbableBlock()
- {
- return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
- }
-
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (Math.round(this.aggroRange) != 0) {
- EAFF.updateEntityAFF(worldObj, Items.apple);
- }
-
- /* If Shoot Timer is 0, tell Entity its Allowed to Shoot a Rock*/
- if (throwTimer == 0) {
- this.throwRock = true;
- this.throwTimer = this.throwCooldown;
-
- //EntityPlayer targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 32.0D);
- if (this.angerLevel > 0){
- if (this.throwRock == true && !worldObj.isRemote) {
- this.throwRockAtTarget();
- this.throwRock = false;
- }
- }
- }
-
- this.throwTimer = Math.max(this.throwTimer - 1, 0);
- }
-
- @Override
- public int getTotalArmorValue() {
- return 1;
- }
-
- /**
- * Returns the sound this mob makes while it's alive.
- */
- @Override
- protected String getLivingSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "monkeylivingsound";
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "monkeyhurtsound";
- }
-
- @Override
- public int getTalkInterval() {
- return 160;
- }
-
- @Override
- public boolean isValidBreedingItem(ItemStack itemStack) {
- if (itemStack != null && itemStack.getItem() == Items.bread) {
- this.setAngerLevel(0);
- this.setFleeTick(0);
- return true;
-
- } else {
- return super.isValidBreedingItem(itemStack);
- }
- }
-
- @Override
- protected void updateAITick() {
- super.updateAITick();
- this.setBesideClimbableBlock(this.isCollidedHorizontally);
- }
-
- private void throwRockAtTarget() {
- EntityPlayer targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 32.0D);
-
- if (targetedEntity != null) {
- EntityThrowingRock entityTR = new EntityThrowingRock(this.worldObj, this);
- double d0 = targetedEntity.posX - this.posX;
- double d1 = targetedEntity.posY + (double)targetedEntity.getEyeHeight() - 1.100000023841858D - entityTR.posY;
- double d2 = targetedEntity.posZ - this.posZ;
- float f1 = MathHelper.sqrt_double(d0 * d0 + d2 * d2) * 0.2F;
- entityTR.setThrowableHeading(d0, d1 + (double)f1, d2, 1.6F, 12.0F);
- this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
- this.worldObj.spawnEntityInWorld(entityTR);
- }
- }
-
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/50906201c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/50906201c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index e6e39b2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/50906201c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.ngb.projectzulu.common.mobs.renders;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.entity.Entity;
-import net.minecraft.util.ResourceLocation;
-import projectzulu.common.mobs.entity.EntityGenericAnimal;
-
-public class RenderGenericHorse extends RenderGenericLiving {
-
- public final ResourceLocation saddledTexture;
-
- public RenderGenericHorse(ModelBase modelBase, float shadowSize, ResourceLocation wildTexture,
- ResourceLocation saddledTexture) {
- super(modelBase, shadowSize, wildTexture);
- this.saddledTexture = saddledTexture;
- }
-
- @Override
- protected ResourceLocation getEntityTexture(Entity entity) {
- if (entity instanceof EntityGenericAnimal) {
- EntityGenericAnimal animal = (EntityGenericAnimal) entity;
- if (animal.getSaddled()) {
- return saddledTexture;
- }
- }
- return livingTexture;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/61f63ef8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/61f63ef8c42100141fce95f06aba7e85
deleted file mode 100644
index 204f7c9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/61f63ef8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.ngb.projectzulu.common.temperature;
-
-import net.minecraft.entity.player.EntityPlayer;
-
-/**
- * Interface which marks object as a Temperature Armor
- * Methods will automatically be called in TemperatureTicker by every nearby player
- */
-public interface ITempArmor {
-
- /**
- * Factor that adds to the current Player Temp for when the Item is Equipped
- * Applied in the form TempFinal = TempInitial + TempAddition
- * Design Directive: Should be used for non-environment/short term effects: i.e. eating items that would instantly effect temperature
- * @param player
- * @param playerTemp
- * @param playerLocationTemp
- * @return Float of 0 if no effect is desired, Float TempAddition otherwise.
- */
- public float getAddToPlayTempOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp);
-
- /**
- * Factor that adds to the current Location Temp for when the Item is Equipped
- * Applied in the form TempFinal = TempInitial + TempAddition3
- * Design Directive: Should be used for environment/long term effects: i.e. sitting in a sauna would increase temperature over time
- * @param player
- * @param playerTemp
- * @param playerLocationTemp
- * @return Float of 0 if no effect is desired, Float TempAddition otherwise
- */
- public float getAddToLocTempOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp);
-
- /**
- * Factor that adds to the current Heat Transfer Rate for when the Item is Equipped
- * Applied in the form HeatTransferRate += RateAddition
- * @param player
- * @param playerTemp
- * @param playerLocationTemp
- * @param currentHeatRate
- * @return Float of 0 if no effect is desired, Float RateAddition otherwise
- */
- public float getAddToHeatTransferOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp, float currentHeatRate);
-
- /**
- * Boolean that sets whether the "fast" heat transfer is used. If true (or set to true by other item), will override AddToHEatTransfer Effects
- * Applied in the form HeatTransferRate += RateAddition
- * Design Directive: Should be used to sparingly. Always
- * @param player
- * @param playerTemp
- * @param playerLocationTemp
- * @param currentHeatRate
- * @return false for normal speed, true for fast
- */
- public boolean getBooleanCauseFastHeatTransferOnEquip(EntityPlayer player, float playerTemp, float playerLocationTemp, float currentHeatRate);
-
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/7022da9dc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/7022da9dc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 5c5f1b6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/7022da9dc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,32 +0,0 @@
-package projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.block.Block;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.blocks.BlockAloeVera;
-import projectzulu.common.blocks.ItemAloeVera;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.itemblockdeclaration.BlockDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class AloeVeraDeclaration extends BlockDeclaration {
-
- public AloeVeraDeclaration() {
- super("AloeVera");
- }
-
- @Override
- protected boolean createBlock() {
- BlockList.aloeVera = Optional.of((new BlockAloeVera()).setBlockName(name.toLowerCase()).setBlockTextureName(
- DefaultProps.blockKey + ":" + name.toLowerCase()));
- return true;
- }
-
- @Override
- public void registerBlock() {
- Block block = BlockList.aloeVera.get();
- GameRegistry.registerBlock(block, ItemAloeVera.class, name.toLowerCase());
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/708430a0a99b0014146ffb65627d3cc9 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/708430a0a99b0014146ffb65627d3cc9
deleted file mode 100644
index 59b02de..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/708430a0a99b0014146ffb65627d3cc9
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entitydefaults;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-
-import com.stek101.projectzulu.common.api.CustomMobData;
-import com.stek101.projectzulu.common.api.ItemList;
-import com.stek101.projectzulu.common.core.ConfigHelper;
-import com.stek101.projectzulu.common.core.ItemGenerics;
-import com.stek101.projectzulu.common.core.entitydeclaration.EntityProperties;
-import com.stek101.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.stek101.projectzulu.common.mobs.entity.EntityRabbit;
-import com.stek101.projectzulu.common.mobs.models.ModelRabbit;
-import com.stek101.projectzulu.common.mobs.renders.RenderGenericLivingMT;
-import com.stek101.projectzulu.common.mobs.renders.RenderWrapper;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class RabbitDeclaration extends SpawnableDeclaration {
- private final List entityTextures = new ArrayList ();
-
- public RabbitDeclaration() {
- super("Rabbit", 21, EntityRabbit.class, EnumCreatureType.creature);
- setSpawnProperties(15, 100, 2, 4);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 1);
-
- eggColor1 = (239 << 16) + (179 << 8) + 83;
- eggColor2 = (237 << 16) + (208 << 8) + 166;
-
- entityTextures.add("textures/rabbit0.png");
- entityTextures.add("textures/rabbit1.png");
- entityTextures.add("textures/rabbit2.png");
- entityTextures.add("textures/rabbit3.png");
- entityTextures.add("textures/rabbit4.png");
- entityTextures.add("textures/rabbit5.png");
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.SmallHeart.meta(), 4);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.RabbitsFoot.meta(), 8);
- customMobData.entityProperties = new EntityProperties(5f, 1.0f, 0.3f, 100f, 0.0f, 32.0f, 1.0f, 10D).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- //return new RenderGenericLiving(new ModelRabbit(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- // "textures/rabbit.png"));
- return new RenderGenericLivingMT(new ModelRabbit(), 0.5f, entityTextures);
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.plains.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.savanna.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.birchForest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.birchForestHills.biomeName);
- defaultBiomesToSpawn.add("Autumn Woods");
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
-
- HashSet nonFrozenForest = new HashSet();
- nonFrozenForest.addAll(typeToArray(Type.FOREST));
- nonFrozenForest.addAll(typeToArray(Type.PLAINS));
- nonFrozenForest.addAll(typeToArray(Type.SAVANNA));
- nonFrozenForest.removeAll(typeToArray(Type.SNOWY));
- defaultBiomesToSpawn.addAll(nonFrozenForest);
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/a223949ec52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/a223949ec52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 9f68851..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/a223949ec52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,45 +0,0 @@
-package projectzulu.common.dungeon.spawner.tag.keys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.world.World;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.dungeon.spawner.tag.TypeValuePair;
-import projectzulu.common.dungeon.spawner.tag.settings.OptionalSettings.Operand;
-
-public class KeyParserModSpawn extends KeyParserBase {
-
- public KeyParserModSpawn(Key key) {
- super(key, true, KeyType.CHAINABLE);
- }
-
- @Override
- public boolean parseChainable(String parseable, ArrayList parsedChainable,
- ArrayList operandvalue) {
- String[] pieces = parseable.split(",");
- Operand operand = parseOperand(pieces);
- if (pieces.length == 1) {
- parsedChainable.add(new TypeValuePair(key, isInverted(parseable)));
- operandvalue.add(operand);
- return true;
- } else {
- ProjectZuluLog.severe("Error Parsing Needs %s parameter. Invalid Argument Length.", key.key);
- return false;
- }
- }
-
- @Override
- public boolean parseValue(String parseable, HashMap valueCache) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isValidLocation(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord,
- TypeValuePair typeValuePair, HashMap valueCache) {
- boolean isInverted = (Boolean) typeValuePair.getValue();
- boolean canSpawn = entity.getCanSpawnHere();
- return isInverted ? canSpawn : !canSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/c028bb9dc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/c028bb9dc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index af2b6f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/c028bb9dc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,122 +0,0 @@
-package projectzulu.common.blocks.heads;
-
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import projectzulu.common.api.BlockList;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class ItemMobHeads extends ItemBlock {
-
- public ItemMobHeads(Block mobHeads) {
- super(mobHeads);
- this.setCreativeTab(CreativeTabs.tabDecorations);
- setMaxDamage(0);
- setHasSubtypes(true);
- maxStackSize = 8;
- }
-
- // @Override
- // @SideOnly(Side.CLIENT)
- // public IIcon getIconFromDamage(int par1) {
- // return Block.blocksList[this.itemID].getIcon(2, par1);
- // }
-
- /**
- * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
- * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
- */
- @Override
- public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4,
- int par5, int par6, int par7, float par8, float par9, float par10) {
- if (par7 == 0) {
- return false;
- } else if (!par3World.getBlock(par4, par5, par6).getMaterial().isSolid()) {
- return false;
- } else {
- if (par7 == 1) {
- ++par5;
- }
-
- if (par7 == 2) {
- --par6;
- }
-
- if (par7 == 3) {
- ++par6;
- }
-
- if (par7 == 4) {
- --par4;
- }
-
- if (par7 == 5) {
- ++par4;
- }
-
- if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) {
- return false;
- } else if (!BlockList.mobHeads.get().canPlaceBlockAt(par3World, par4, par5, par6)) {
- return false;
- } else if (BlockList.mobHeads.isPresent()) {
- par3World.setBlock(par4, par5, par6, BlockList.mobHeads.get(), par7, 3);
- int var11 = 0;
-
- if (par7 == 1) {
- var11 = MathHelper.floor_double((double) (par2EntityPlayer.rotationYaw * 16.0F / 360.0F) + 0.5D) & 15;
- }
-
- TileEntity var12 = par3World.getTileEntity(par4, par5, par6);
-
- if (var12 != null && var12 instanceof TileEntityMobHeads) {
- String var13 = "";
-
- if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("SkullOwner")) {
- var13 = par1ItemStack.getTagCompound().getString("SkullOwner");
- }
-
- ((TileEntityMobHeads) var12).setSkullType(par1ItemStack.getItemDamage(), var13);
- ((TileEntityMobHeads) var12).setRotation(var11);
- /* Was Used to Summon wither For Block Skulls */
- // ((BlockSkull)Block.field_82512_cj).func_82529_a(par3World, par4, par5, par6,
- // (TileEntitySkull)var12);
- }
-
- --par1ItemStack.stackSize;
- return true;
- } else {
- return false;
- }
- }
- }
-
- /**
- * Returns the metadata of the block which this Item (ItemBlock) can place
- */
- public int getMetadata(int par1) {
- return par1;
- }
-
- /*
- * for every block, you need a name. it doesn't matter, really. its just so all your blocks wont have the same name.
- * delete this part and all your blocks have the same name.
- */
- @Override
- public String getUnlocalizedName(ItemStack itemstack) {
- return itemstack.getItem().getUnlocalizedName() + "."
- + BlockMobHeads.Head.getByMeta(itemstack.getItemDamage()).toString().toLowerCase();
- }
-
- @Override
- public IIcon getIconFromDamage(int par1) {
- return field_150939_a.getIcon(1, par1);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/e02b5a01c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/e02b5a01c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 7bcccd5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/14/e02b5a01c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.ngb.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.common.mobs.entity.EntityRabbit;
-
-public class ModelRabbit extends ModelBase {
- ModelRenderer body;
- ModelRenderer queue;
- ModelRenderer neck;
- ModelRenderer leg1;
- ModelRenderer leg2;
- ModelRenderer LEGRIGROT;
- ModelRenderer LEGLEFROT;
- ModelRenderer HEADROT;
- private ModelRenderer EARLEFROT;
- private ModelRenderer EARRIGROT;
-
- public ModelRabbit() {
- textureWidth = 32;
- textureHeight = 32;
- setTextureOffset("LEGRIGROT.thigh2", 22, 18);
- setTextureOffset("LEGRIGROT.leg4", 20, 26);
- setTextureOffset("LEGLEFROT.thigh1", 8, 18);
- setTextureOffset("LEGLEFROT.leg3", 8, 26);
- setTextureOffset("HEADROT.head", 19, 5);
- setTextureOffset("HEADROT.nose", 23, 11);
- setTextureOffset("EARLEFROT.ear1", 27, 1);
- setTextureOffset("EARRIGROT.ear2", 19, 1);
-
- body = new ModelRenderer(this, 0, 0);
- body.addBox(-2F, -2F, -4F, 4, 4, 5);
- body.setRotationPoint(0F, 21F, 3F);
- body.setTextureSize(32, 32);
- body.mirror = true;
- setRotation(body, 0F, 0F, 0F);
- queue = new ModelRenderer(this, 0, 18);
- queue.addBox(-1F, -1F, 0F, 2, 2, 1);
- queue.setRotationPoint(0F, 22F, 4F);
- queue.setTextureSize(32, 32);
- queue.mirror = true;
- setRotation(queue, 0F, 0F, 0F);
- neck = new ModelRenderer(this, 0, 11);
- neck.addBox(-2F, -2F, -6F, 4, 2, 2);
- neck.setRotationPoint(0F, 21F, 3F);
- neck.setTextureSize(32, 32);
- neck.mirror = true;
- setRotation(neck, 0F, 0F, 0F);
- leg1 = new ModelRenderer(this, 0, 28);
- leg1.addBox(-2F, 0F, -1F, 1, 3, 1);
- leg1.setRotationPoint(0F, 21F, -2F);
- leg1.setTextureSize(32, 32);
- leg1.mirror = true;
- setRotation(leg1, 0F, 0F, 0F);
- leg2 = new ModelRenderer(this, 4, 28);
- leg2.addBox(1F, 0F, -1F, 1, 3, 1);
- leg2.setRotationPoint(0F, 21F, -2F);
- leg2.setTextureSize(32, 32);
- leg2.mirror = true;
- setRotation(leg2, 0F, 0F, 0F);
- LEGRIGROT = new ModelRenderer(this, "LEGRIGROT");
- LEGRIGROT.setRotationPoint(2.5F, 21F, 2.5F);
- setRotation(LEGRIGROT, 0F, 0F, 0F);
- LEGRIGROT.mirror = true;
- LEGRIGROT.addBox("thigh2", -0.5F, -1F, -2.5F, 1, 3, 4);
- LEGRIGROT.addBox("leg4", -0.5F, 2F, -3.5F, 1, 1, 5);
- LEGLEFROT = new ModelRenderer(this, "LEGLEFROT");
- LEGLEFROT.setRotationPoint(-2.5F, 21F, 2.5F);
- setRotation(LEGLEFROT, 0F, 0F, 0F);
- LEGLEFROT.mirror = true;
- LEGLEFROT.addBox("thigh1", -0.5F, -1F, -2.5F, 1, 3, 4);
- LEGLEFROT.addBox("leg3", -0.5F, 2F, -3.5F, 1, 1, 5);
- HEADROT = new ModelRenderer(this, "HEADROT");
- HEADROT.setRotationPoint(0F, 19F, -2.5F);
- setRotation(HEADROT, 0F, 0F, 0F);
- HEADROT.mirror = true;
- HEADROT.addBox("head", -1.5F, -3F, -1F, 3, 3, 3);
- HEADROT.addBox("nose", -0.5F, -1F, -1.5F, 1, 1, 1);
- EARLEFROT = new ModelRenderer(this, "EARLEFROT");
- EARLEFROT.setRotationPoint(0F, 0F, 0F);
- setRotation(EARLEFROT, -0.5585054F, -0.4363323F, 0F);
- EARLEFROT.mirror = true;
- EARLEFROT.addBox("ear1", -0.5F, -6F, -0.5F, 1, 3, 1);
- HEADROT.addChild(EARLEFROT);
- EARRIGROT = new ModelRenderer(this, "EARRIGROT");
- EARRIGROT.setRotationPoint(0F, 0F, 0F);
- setRotation(EARRIGROT, -0.5585054F, 0.4363323F, 0F);
- EARRIGROT.mirror = true;
- EARRIGROT.addBox("ear2", -0.6F, -6F, -0.5F, 1, 3, 1);
- HEADROT.addChild(EARRIGROT);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- if (this.isChild) {
- float field_78145_x = 0.0f;
- float field_78145_j = 4.0F;
- float field_78145_z = 0.0F;
-
- float var8 = 2.0F;
- float head_scale_Render = 0.95f;
-
- GL11.glPushMatrix();
- GL11.glTranslatef(field_78145_x * f5, field_78145_j * f5, field_78145_z * f5);
- HEADROT.render(f5 * head_scale_Render);
- GL11.glPopMatrix();
-
- GL11.glPushMatrix();
- GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
- GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
- body.render(f5);
- queue.render(f5);
- neck.render(f5);
- leg1.render(f5);
- leg2.render(f5);
- LEGRIGROT.render(f5);
- LEGLEFROT.render(f5);
- GL11.glPopMatrix();
-
- } else {
- body.render(f5);
- queue.render(f5);
- neck.render(f5);
- leg1.render(f5);
- leg2.render(f5);
- LEGRIGROT.render(f5);
- LEGLEFROT.render(f5);
- HEADROT.render(f5);
- }
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
- EntityRabbit var5 = (EntityRabbit) par1EntityLiving;
-
- if (!var5.onGround) {
-
- } else {
- /* Walking On The Ground */
- leg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.8F * par3;
- leg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f + (float) Math.PI) * 1.8F * par3;
-
- LEGLEFROT.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.8F * par3;
- LEGLEFROT.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.8F * par3;
- }
- super.setLivingAnimations(par1EntityLiving, par2, par3, par4);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- HEADROT.rotateAngleX = Math.min(Math.max(f4, -15), +15) * (float) (Math.PI / 180f);
- HEADROT.rotateAngleY = Math.min(Math.max(f3, -45), +45) * (float) (Math.PI / 180f);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/200b52a1c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/200b52a1c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 33368cc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/200b52a1c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,44 +0,0 @@
-package projectzulu.common.mobs.entity;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import cpw.mods.fml.common.Loader;
-
-public class EntityBlackBear extends EntityBear {
-
- public EntityBlackBear(World par1World) {
- super(par1World);
- setSize(1.0f, 1.35f);
- tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0f, false));
- }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return super.isValidLocation(world, xCoord, yCoord, zCoord)
- && worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- /**
- * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
- */
- @Override
- public int getTotalArmorValue() {
- return 2;
- }
-
- @Override
- public void onUpdate() {
- super.onUpdate();
- }
-
- @Override
- protected void dropRareDrop(int par1) {
- if (Loader.isModLoaded(DefaultProps.BlocksModId) && BlockList.mobHeads.isPresent()) {
- entityDropItem(new ItemStack(BlockList.mobHeads.get(), 1, 3), 1);
- }
- super.dropRareDrop(par1);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/206f8bf5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/206f8bf5c42100141fce95f06aba7e85
deleted file mode 100644
index b792e21..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/206f8bf5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Items;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import com.ngb.projectzulu.common.api.CustomMobData;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.core.ConfigHelper;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.ItemGenerics;
-import com.ngb.projectzulu.common.core.entitydeclaration.EntityProperties;
-import com.ngb.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.ngb.projectzulu.common.mobs.entity.EntityFox;
-import com.ngb.projectzulu.common.mobs.models.ModelFox;
-import com.ngb.projectzulu.common.mobs.renders.RenderTameable;
-import com.ngb.projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class FoxDeclaration extends SpawnableDeclaration {
-
- public FoxDeclaration() {
- super("Fox", 9, EntityFox.class, EnumCreatureType.creature);
- setSpawnProperties(10, 100, 1, 3);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 2);
-
- eggColor1 = (204 << 16) + (132 << 8) + 22;
- eggColor2 = (224 << 16) + (224 << 8) + 224;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- Items.beef, 0, 5);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.furPelt, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, ItemList.scrapMeat, 0, 15);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.SmallHeart.meta(), 4);
- customMobData.entityProperties = new EntityProperties(12f, 2.0f, 0.3f, 100f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderTameable(new ModelFox(), 0.5f, new ResourceLocation(DefaultProps.mobKey, "fox.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.taiga.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.taigaHills.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Mountain Taiga");
- defaultBiomesToSpawn.add("Pine Forest");
- defaultBiomesToSpawn.add("Rainforest");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Snow Forest");
- defaultBiomesToSpawn.add("Snowy Rainforest");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
- defaultBiomesToSpawn.addAll(typeToArray(Type.FOREST));
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/213ffc9fc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/213ffc9fc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 0302188..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/213ffc9fc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,97 +0,0 @@
-package projectzulu.common.world2.buildingmanager;
-
-import java.awt.Point;
-
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.core.terrain.TerrainFeature.FeatureDirection;
-import projectzulu.common.world2.MazeCell;
-import projectzulu.common.world2.architect.ArchitectLabyrinth;
-import projectzulu.common.world2.randomizer.Randomizer;
-import projectzulu.common.world2.randomizer.WalledMazeRandomizer;
-
-public class BuildingManagerLabyrinth extends BuildingManagerBase {
-
- public ArchitectLabyrinth architect;
- public Randomizer randomizer;
-
- MazeCell[][] labyrinth;
- MazeCell[][] stairs;
-
- public BuildingManagerLabyrinth(World world, ChunkCoordinates startingPos, FeatureDirection direction) {
- super(world);
- architect = new ArchitectLabyrinth(world);
- randomizer = new WalledMazeRandomizer(world);
-
- int xCells = 15;
- int zCells = 15;
- int cellSize = 3;
- int cellHeight = 5;
-
- int stairZCells = MathHelper.ceiling_float_int(15f / cellHeight);
- int stairCellSize = cellSize + 2;
- int stairCellHeight = stairCellSize * 2;
-
- startingPos = calcTranslatedPosition(direction, startingPos, xCells * cellSize, zCells * cellSize
- + stairZCells * stairCellSize, cellHeight);
-
- stairs = new MazeCell[1][stairZCells];
- for (int i = 0; i < stairs.length; i++) {
- for (int j = 0; j < stairs[0].length; j++) {
- stairs[i][j] = new MazeCell(stairCellSize, stairCellHeight, new ChunkCoordinates(startingPos.posX - 1
- + stairCellSize * i + cellSize * (xCells / 2), startingPos.posY + 1 + stairCellSize
- * (stairs[0].length - 1 - j), startingPos.posZ + stairCellSize * j));
- }
- }
-
- labyrinth = new MazeCell[xCells][zCells];
- for (int i = 0; i < labyrinth.length; i++) {
- for (int j = 0; j < labyrinth[0].length; j++) {
- labyrinth[i][j] = new MazeCell(cellSize, cellHeight, new ChunkCoordinates(startingPos.posX + cellSize
- * i, startingPos.posY, startingPos.posZ + stairCellSize * stairs[0].length + cellSize * j));
- }
- }
- }
-
- @Override
- protected void randomizeCells() {
- randomizer.randomize(labyrinth);
- }
-
- @Override
- protected void assignBlueprints(int pass, int maxPasses) {
- if (pass == maxPasses) {
- for (int cellX = 0; cellX < labyrinth.length; cellX++) {
- for (int cellZ = 0; cellZ < labyrinth[0].length; cellZ++) {
- architect.assignBlueprint(labyrinth, new Point(cellX, cellZ), pass, maxPasses);
- }
- }
-
- for (int cellX = 0; cellX < stairs.length; cellX++) {
- for (int cellZ = 0; cellZ < stairs[0].length; cellZ++) {
- architect.assignStairs(stairs, new Point(cellX, cellZ), pass, maxPasses);
- }
- }
- }
- }
-
- @Override
- protected void construct() {
- ProjectZuluLog.info("construct");
- for (int cellX = 0; cellX < labyrinth.length; cellX++) {
- for (int cellZ = 0; cellZ < labyrinth[0].length; cellZ++) {
- MazeCell currentCell = labyrinth[cellX][cellZ];
- processCellPieces(currentCell, architect);
- }
- }
-
- for (int cellX = 0; cellX < stairs.length; cellX++) {
- for (int cellZ = 0; cellZ < stairs[0].length; cellZ++) {
- MazeCell currentCell = stairs[cellX][cellZ];
- processCellPieces(currentCell, architect);
- }
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/60945fffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/60945fffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 2bb03ac..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/60945fffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,147 +0,0 @@
-package com.ngb.projectzulu.common.world2.blueprint;
-
-import java.awt.Point;
-import java.util.Random;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import projectzulu.common.world.CellIndexDirection;
-import projectzulu.common.world.dataobjects.BlockWithMeta;
-import projectzulu.common.world2.MazeCell;
-
-public class BPSetStairs implements BlueprintSet, Blueprint {
-
- BlockWithMeta floorblock;
-
- public BPSetStairs() {
- floorblock = new BlockWithMeta(Blocks.sandstone);
- }
-
- @Override
- public String getIdentifier() {
- return "stairs";
- }
-
- @Override
- public int getWeight() {
- return 0;
- }
-
- public boolean attemptAssignBlueprint(MazeCell[][] bottomFloor, MazeCell[][] topFloor, Point buildCoords,
- Random rand) {
- if (topFloor[buildCoords.x][buildCoords.y].rawState == 0
- && topFloor[buildCoords.x][buildCoords.y + 1].rawState >= 0
- ) {
- Point botCoords = convertCellCoords(buildCoords.x, buildCoords.y, topFloor, bottomFloor);
- if (bottomFloor[botCoords.x][botCoords.y - 1].rawState == 0
- && bottomFloor[botCoords.x][botCoords.y].rawState == 1
- && bottomFloor[botCoords.x][botCoords.y + 1].rawState == 1) {
- if (rand.nextInt(1) == 0) {
- topFloor[buildCoords.x][buildCoords.y].setBuildingProperties(getIdentifier() + "-top_1",
- CellIndexDirection.Middle);
- topFloor[buildCoords.x][buildCoords.y].rawState = -1;
- topFloor[buildCoords.x][buildCoords.y + 1].setBuildingProperties(getIdentifier() + "-top_2",
- CellIndexDirection.Middle);
- topFloor[buildCoords.x][buildCoords.y + 1].rawState = -1;
-
- bottomFloor[botCoords.x][botCoords.y].setBuildingProperties(getIdentifier() + "-bottom_1",
- CellIndexDirection.Middle);
- bottomFloor[botCoords.x][botCoords.y].rawState = -1;
- bottomFloor[botCoords.x][botCoords.y + 1].setBuildingProperties(getIdentifier() + "-bottom_2",
- CellIndexDirection.Middle);
- bottomFloor[botCoords.x][botCoords.y + 1].rawState = -1;
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Gets the Cell coords in the DestinationCells that coorspond to the same physical location as the in the origin
- * cell. Only considers XZ Plane.
- *
- * @param coords
- * @param originCells
- * @param destinCells
- * @return
- */
- private Point convertCellCoords(int originX, int originY, MazeCell[][] originCells, MazeCell[][] destinCells) {
- ChunkCoordinates chunkCoords = originCells[originX][originY].initialPos;
- for (int i = 0; i < destinCells.length; i++) {
- for (int j = 0; j < destinCells[0].length; j++) {
- if (chunkCoords.posX == destinCells[i][j].initialPos.posX
- && chunkCoords.posZ == destinCells[i][j].initialPos.posZ) {
- return new Point(i, j);
- }
- }
- }
- return new Point(-1, -1);
- }
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight,
- CellIndexDirection cellIndexDirection, Random random, String buildingID) {
- String[] subIndex = buildingID.split("-")[1].split("_");
-
- if (subIndex[0].equalsIgnoreCase("bottom")) {
- return getBottomStairBlock(piecePos, cellSize, cellHeight, cellIndexDirection, random,
- Integer.parseInt(subIndex[1]));
- } else if (subIndex[0].equalsIgnoreCase("top")) {
- return getTopStairBlock(piecePos, cellSize, cellHeight, cellIndexDirection, random,
- Integer.parseInt(subIndex[1]));
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- public BlockWithMeta getBottomStairBlock(ChunkCoordinates piecePos, int cellSize, int cellHeight,
- CellIndexDirection cellIndexDirection, Random random, int index) {
- index = index - 1;
- if (piecePos.posY == 0) {
- return new BlockWithMeta(Blocks.sandstone);
- }
-
- if (piecePos.posX == 0) {
- if (piecePos.posY > (piecePos.posZ + 1) + index * cellSize) {
- return new BlockWithMeta(Blocks.air);
- } else if (piecePos.posY == (piecePos.posZ + 1) + index * cellSize) {
- return new BlockWithMeta(Blocks.sandstone_stairs, 2);
- } else {
- return new BlockWithMeta(Blocks.sandstone);
- }
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- public BlockWithMeta getTopStairBlock(ChunkCoordinates piecePos, int cellSize, int cellHeight,
- CellIndexDirection cellIndexDirection, Random random, int index) {
- boolean requiresStairs = index != 1;
- index = index + (cellSize - cellHeight - 2);
- if (piecePos.posY == 0) {
- if (piecePos.posX != 0) {
- return new BlockWithMeta(Blocks.sandstone);
- } else if (requiresStairs && piecePos.posY == (piecePos.posZ + 1) + index) {
- return new BlockWithMeta(Blocks.sandstone_stairs, 2);
- } else if (requiresStairs && piecePos.posY < (piecePos.posZ + 1) + index) {
- return new BlockWithMeta(Blocks.sandstone);
- }
- }
- return new BlockWithMeta(Blocks.air);
- }
-
- @Override
- public boolean assignCellsWithBlueprints(MazeCell[][] cells, Point buildCoords, Random random) {
- return false;
- }
-
- @Override
- public boolean isApplicable(MazeCell[][] cells, Point buildCoords, Random random) {
- return false;
- }
-
- @Override
- public BlockWithMeta getBlockFromBlueprint(ChunkCoordinates piecePos, int cellSize, int cellHeight, Random random,
- CellIndexDirection cellIndexDirection) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/80bf58e6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/80bf58e6c42100141fce95f06aba7e85
deleted file mode 100644
index f24f6e3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/80bf58e6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,24 +0,0 @@
-package projectzulu.common.world.dataobjects;
-
-import java.util.Random;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.world.World;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.blocks.BlockPalmTreeSapling;
-
-public class BlockWithPalmTree extends BlockWithMeta {
-
- public BlockWithPalmTree() {
- super(Blocks.air, 0, 1);
- }
-
- @Override
- public void placeBlock(World world, ChunkCoordinates position, Random random) {
- if (BlockList.palmTreeSapling.isPresent()) {
- ((BlockPalmTreeSapling) BlockList.palmTreeSapling.get()).growTree(world, position.posX, position.posY,
- position.posZ, random);
- }
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/c146b2f7c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/c146b2f7c42100141fce95f06aba7e85
deleted file mode 100644
index e818227..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/c146b2f7c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.ngb.projectzulu.common.blocks.heads;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-
-public class ModelGorillaHead extends ModelBase{
-
- ModelRenderer HEADROT;
-
- public ModelGorillaHead()
- {
- textureWidth = 64;
- textureHeight = 64;
- setTextureOffset("HEADROT.head", 38, 17);
- setTextureOffset("HEADROT.ear1", 0, 0);
- setTextureOffset("HEADROT.ear2", 0, 4);
- setTextureOffset("HEADROT.nose", 47, 32);
-
- HEADROT = new ModelRenderer(this, "HEADROT");
- HEADROT.setRotationPoint(0F, 23F, 0F);
- setRotation(HEADROT, 0F, 0F, 0F);
- HEADROT.mirror = true;
- HEADROT.addBox("head", -3.5F, -7F, -3F, 7, 8, 6);
- HEADROT.addBox("ear1", -4.5F, -6F, -1F, 1, 2, 1);
- HEADROT.addBox("ear2", 3.5F, -6F, -1F, 1, 2, 1);
- HEADROT.addBox("nose", -2F, -3F, -4F, 4, 4, 1);
- }
-
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
- {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- HEADROT.render(f5);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z)
- {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
-
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity){
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- HEADROT.rotateAngleY = f3 / (180F / (float)Math.PI);
- }
-
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/d17c77f6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/d17c77f6c42100141fce95f06aba7e85
deleted file mode 100644
index 769f476..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/d17c77f6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.ngb.projectzulu.common.dungeon;
-
-import java.util.Random;
-
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import com.ngb.projectzulu.common.ProjectZulu_Core;
-import com.ngb.projectzulu.common.core.GuiID;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class BlockLimitedMobSpawner extends BlockContainer {
-
- public BlockLimitedMobSpawner() {
- super(Material.rock);
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- }
-
- /**
- * Drops the block items with a specified chance of dropping the specified items
- */
- @Override
- public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) {
- super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
- int var8 = 15 + par1World.rand.nextInt(15) + par1World.rand.nextInt(15);
- this.dropXpOnBlockBreak(par1World, par2, par3, par4, var8);
- }
-
- @Override
- public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer player, int par6,
- float par7, float par8, float par9) {
- if (player instanceof EntityPlayer && ((EntityPlayer) player).capabilities.isCreativeMode) {
- ((EntityPlayer) player).openGui(ProjectZulu_Core.modInstance, GuiID.MobSpawner.getID(), par1World, par2,
- par3, par4);
- return true;
- }
- return super.onBlockActivated(par1World, par2, par3, par4, player, par6, par7, par8, par9);
- }
-
- /**
- * 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;
- }
-
- @Override
- public TileEntity createNewTileEntity(World var1, int var2) {
- return new TileEntityLimitedMobSpawner();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/e07fe1fdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/e07fe1fdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index cecf04c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/e07fe1fdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.blocks.ItemZuluArmor;
-import projectzulu.common.core.itemblockdeclaration.ItemSetDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class GoldScaleArmorDeclaration extends ItemSetDeclaration {
-
- public final int renderIndex;
-
- public GoldScaleArmorDeclaration(int renderIndex) {
- super(new String[] { "GoldScaleHelmet", "GoldScaleChest", "GoldScaleLegs", "GoldScaleBoots" });
- this.renderIndex = renderIndex;
- }
-
- @Override
- protected boolean createItem(int partIndex) {
- Item item = new ItemZuluArmor(ProjectZulu_Core.goldScaleMaterial, renderIndex, partIndex,
- name[partIndex].toLowerCase());
-
- switch (partIndex) {
- case 0:
- ItemList.goldScaleArmorHead = Optional.of(item);
- return true;
- case 1:
- ItemList.goldScaleArmorChest = Optional.of(item);
- return true;
- case 2:
- ItemList.goldScaleArmorLeg = Optional.of(item);
- return true;
- case 3:
- ItemList.goldScaleArmorBoots = Optional.of(item);
- return true;
- }
- return false;
- }
-
- @Override
- protected void registerItem(int partIndex) {
- Item item = null;
- switch (partIndex) {
- case 0:
- item = ItemList.goldScaleArmorHead.get();
- break;
- case 1:
- item = ItemList.goldScaleArmorChest.get();
- break;
- case 2:
- item = ItemList.goldScaleArmorLeg.get();
- break;
- case 3:
- item = ItemList.goldScaleArmorBoots.get();
- break;
- }
- GameRegistry.registerItem(item, name[partIndex]);
-
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f0c5c9e5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f0c5c9e5c42100141fce95f06aba7e85
deleted file mode 100644
index 59a1459..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f0c5c9e5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,46 +0,0 @@
-package projectzulu.common.potion.brewingstands;
-
-import java.util.HashMap;
-
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-public class PotionIngredients {
-
- public static interface IngredientProperty {
- public abstract boolean isIngredient(ItemStack ingredient);
- }
-
- public static class OverrideIngredient implements IngredientProperty {
- boolean isIngredient = true;
-
- @Override
- public boolean isIngredient(ItemStack ingredient) {
- return isIngredient;
- }
- }
-
- private static HashMap- ingredientProperties = new HashMap
- ();
-
- static {
- addIngredientProperties(Items.feather, new OverrideIngredient());
- }
-
- public static void addIngredientProperties(Item item, IngredientProperty ingredientProperty) {
- ingredientProperties.put(item, ingredientProperty);
- }
-
- public static boolean isPotionIngredient(ItemStack ingredient) {
- if (ingredient == null) {
- return false;
- }
-
- IngredientProperty property = ingredientProperties.get(ingredient.getItem());
- if (property != null) {
- return property.isIngredient(ingredient);
- } else {
- return ingredient != null ? ingredient.getItem().isPotionIngredient(ingredient) : false;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f16f06fac42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f16f06fac42100141fce95f06aba7e85
deleted file mode 100644
index 99dd85f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f16f06fac42100141fce95f06aba7e85
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.block.Block;
-import com.ngb.projectzulu.common.api.BlockList;
-import com.ngb.projectzulu.common.blocks.BlockNightBloom;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.itemblockdeclaration.BlockDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class NightBloomDeclaration extends BlockDeclaration {
-
- public NightBloomDeclaration() {
- super("NightBloom");
- }
-
- @Override
- protected boolean createBlock() {
- BlockList.nightBloom = Optional.of(new BlockNightBloom().setBlockName(name.toLowerCase())
- .setBlockTextureName(DefaultProps.blockKey + ":" + name.toLowerCase()));
- return true;
- }
-
- @Override
- protected void registerBlock() {
- Block block = BlockList.nightBloom.get();
- GameRegistry.registerBlock(block, name.toLowerCase());
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f17c61e7c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f17c61e7c42100141fce95f06aba7e85
deleted file mode 100644
index b3fbd64..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f17c61e7c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,154 +0,0 @@
-package projectzulu.common.core;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
-import net.minecraftforge.event.entity.living.LivingHurtEvent;
-import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.mobs.entity.EntityTreeEnt;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import net.minecraft.util.Vec3;
-
-public class EventHookContainerClass {
- // zLevel is protected float copied from GUI along with drawTexturedModelRect
- protected float zLevel = 0.0F;
- boolean nearBossTriggered = false;
-
- Random classRand = new Random();
-
- @SubscribeEvent
- public void onPlayerUpdateStarve(LivingUpdateEvent event) {
- World worldObj = event.entity.worldObj;
- if (worldObj != null && event.entity != null && event.entity instanceof EntityPlayer) {
-
- EntityPlayer thePlayer = (EntityPlayer) event.entity;
-
- int var1 = MathHelper.floor_double(thePlayer.posX);
- int var2 = MathHelper.floor_double(thePlayer.boundingBox.minY);
- int var3 = MathHelper.floor_double(thePlayer.posZ);
- BiomeGenBase currentBiome = worldObj.getBiomeGenForCoords(var1, var3);
- boolean isDesertSun = worldObj.canBlockSeeTheSky(var1, var2, var3) && worldObj.isDaytime() == true
- && (currentBiome == BiomeGenBase.desert || currentBiome == BiomeGenBase.desertHills);
-
- /* Armor Effect Only Occurs When Block/Item Package is Installed */
- if (!thePlayer.capabilities.isCreativeMode && isDesertSun == true
- && Loader.isModLoaded(DefaultProps.BlocksModId)) {
- float exhaustion = 0.0032f;
- switch (worldObj.difficultySetting) {
- case PEACEFUL:
- exhaustion = 0.0f;
- break;
- case EASY:
- exhaustion = 0.0032f * 1;
- break;
- case NORMAL:
- exhaustion = 0.0032f * 2;
- break;
- case HARD:
- exhaustion = 0.0032f * 3;
- default:
- break;
- }
-
- for (int i = 0; i < 4; i++) {
- if (thePlayer.inventory.armorInventory[i] == null) {
- exhaustion -= (exhaustion - exhaustion * 0.4) / 4f;
- break;
- }
- }
- thePlayer.addExhaustion(Math.max(exhaustion, 0));
- }
- }
- }
-
- /* Armor Effect Only Occurs When Block/Item Package is Installed */
- @SubscribeEvent
- public void cactusArmorDamage(LivingHurtEvent event) {
- if (Loader.isModLoaded(DefaultProps.BlocksModId) && event.entity != null
- && event.entity instanceof EntityPlayer && event.source.getSourceOfDamage() instanceof EntityLiving) {
- EntityPlayer hurtEntity = (EntityPlayer) event.entity;
- EntityLiving attackingEntity = (EntityLiving) event.source.getSourceOfDamage();
- if (attackingEntity != null && event.source.getDamageType() == "mob") {
-
- double cactusDamage = 0;
- if (hurtEntity.inventory.armorInventory[3] != null && ItemList.cactusArmorHead.isPresent()
- && hurtEntity.inventory.armorInventory[3].getItem() == ItemList.cactusArmorHead.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[2] != null && ItemList.cactusArmorChest.isPresent()
- && hurtEntity.inventory.armorInventory[2].getItem() == ItemList.cactusArmorChest.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[1] != null && ItemList.cactusArmorLeg.isPresent()
- && hurtEntity.inventory.armorInventory[1].getItem() == ItemList.cactusArmorLeg.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[0] != null && ItemList.cactusArmorBoots.isPresent()
- && hurtEntity.inventory.armorInventory[0].getItem() == ItemList.cactusArmorBoots.get()) {
- cactusDamage += 0.5;
- }
-
- if (cactusDamage > 0) {
- attackingEntity.attackEntityFrom(DamageSource.causeThornsDamage(hurtEntity),
- MathHelper.ceiling_double_int(cactusDamage));
- }
-
- }
- }
- }
-
- /**
- * Used to Notify nearby Treeents they should be attacking this Player. Triggered by the Player breaking Wood Only
- * notifies TreeEnts that are looking at the Player
- */
- @SubscribeEvent
- public void treeEntDefendForest(BreakSpeed event) {
- if (Loader.isModLoaded(DefaultProps.MobsModId)) {
- if (event.entity != null && event.entity instanceof EntityPlayer
- && (event.block == Blocks.log || event.block == Blocks.log2)) {
- EntityPlayer player = (EntityPlayer) (event.entity);
- World worldObj = player.worldObj;
- AxisAlignedBB playerBounding = player.boundingBox.copy();
- playerBounding = playerBounding.expand(24, 24, 24);
- List listOfTreeEnts = player.worldObj
- .getEntitiesWithinAABB(EntityTreeEnt.class, playerBounding);
- if (!listOfTreeEnts.isEmpty()) {
- Iterator entIterator = listOfTreeEnts.iterator();
- while (entIterator.hasNext()) {
- Entity entity = (Entity) entIterator.next();
- if (((EntityTreeEnt) entity).getAngerLevel() <= 0
- && worldObj.rayTraceBlocks(
- // worldObj.getWorldVec3Pool().getVecFromPool(player.posX,
- // player.posY + player.getEyeHeight(), player.posZ),
- Vec3.createVectorHelper((double)player.posX, (double)player.posY + player.getEyeHeight(), (double)player.posZ),
- // worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY,
- // entity.posZ)
- Vec3.createVectorHelper((double)entity.posX, (double)entity.posY, (double) entity.posZ)
- ) == null) {
- if (!worldObj.isRemote) {
- ((EntityTreeEnt) entity).setAttackTarget(player);
- }
- ((EntityTreeEnt) entity).setAngerLevel(60);
- }
- }
- }
- }
- }
-
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f1c4dcfdc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f1c4dcfdc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 99444c0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/f1c4dcfdc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.item.Item;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.blocks.ItemZuluArmor;
-import projectzulu.common.core.itemblockdeclaration.ItemSetDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class DiamondScaleArmorDeclaration extends ItemSetDeclaration {
-
- public final int renderIndex;
-
- public DiamondScaleArmorDeclaration(int renderIndex) {
- super(new String[] { "DiamondScaleHelmet", "DiamondScaleChest", "DiamondScaleLegs", "DiamondScaleBoots" });
- this.renderIndex = renderIndex;
- }
-
- @Override
- protected boolean createItem(int partIndex) {
- Item item = new ItemZuluArmor(ProjectZulu_Core.diamondScaleMaterial, renderIndex, partIndex,
- name[partIndex].toLowerCase());
-
- switch (partIndex) {
- case 0:
- ItemList.diamondScaleArmorHead = Optional.of(item);
- return true;
- case 1:
- ItemList.diamondScaleArmorChest = Optional.of(item);
- return true;
- case 2:
- ItemList.diamondScaleArmorLeg = Optional.of(item);
- return true;
- case 3:
- ItemList.diamondScaleArmorBoots = Optional.of(item);
- return true;
- }
- return false;
- }
-
- @Override
- protected void registerItem(int partIndex) {
- Item item = null;
- switch (partIndex) {
- case 0:
- item = ItemList.diamondScaleArmorHead.get();
- break;
- case 1:
- item = ItemList.diamondScaleArmorChest.get();
- break;
- case 2:
- item = ItemList.diamondScaleArmorLeg.get();
- break;
- case 3:
- item = ItemList.diamondScaleArmorBoots.get();
- break;
- }
- GameRegistry.registerItem(item, name[partIndex]);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00b7645beb9d00141ce0d62fbd2fd1cf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00b7645beb9d00141ce0d62fbd2fd1cf
deleted file mode 100644
index b375699..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00b7645beb9d00141ce0d62fbd2fd1cf
+++ /dev/null
@@ -1,238 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entity;
-
-import java.util.EnumSet;
-import java.util.Iterator;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.ai.EntityAIWatchClosest;
-import net.minecraft.entity.passive.IAnimals;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.EnumSkyBlock;
-import net.minecraft.world.World;
-
-import com.stek101.projectzulu.common.api.BlockList;
-import com.stek101.projectzulu.common.api.CustomEntityList;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.mobs.EntityAFightorFlight;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIFlyingWander;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIStayStill;
-
-import cpw.mods.fml.common.Loader;
-
-public class EntityPZBat extends EntityGenericAnimal implements IAnimals {
- int stayStillTimer = 0;
- private EntityAFightorFlight EAFF;
- private float aggroLevel;
- private double aggroRange;
- boolean manyVultures = false;
- private int maxTargetHealthToAttack = (Integer) CustomEntityList.getByEntity(this).modData.get().customData
- .get("maxTargetHealth");
- float curiosity = 0;
- int ticksToCheckAbilities = 3;
-
- public EntityPZBat(World par1World) {
- super(par1World);
- // noClip = true;
- //this.setSize(0.5f, 0.5f);
-
- float moveSpeed = 0.22f;
- CustomEntityList entityEntry = CustomEntityList.getByName(EntityList.getEntityString(this));
- if (entityEntry != null && entityEntry.modData.get().entityProperties != null) {
- // TODO: Switch to this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).getAttributeValue()???
- moveSpeed = entityEntry.modData.get().entityProperties.moveSpeed;
- this.aggroLevel = entityEntry.modData.get().entityProperties.aggroLevel;
- this.aggroRange = entityEntry.modData.get().entityProperties.aggroRange;
- }
-
- if (Math.round(this.aggroRange) != 0) {
- EAFF = new EntityAFightorFlight().setEntity(this, worldObj, this.aggroLevel, this.aggroRange);
- }
-
- this.maxFlightHeight = 7;
- this.getNavigator().setAvoidsWater(true);
- this.tasks.addTask(2, new EntityAIStayStill(this, EntityStates.posture));
- this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0f, false));
- this.tasks.addTask(4, new EntityAIFlyingWander(this, (float) moveSpeed));
- this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 16.0F));
-
- targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, false));
- targetTasks.addTask(2,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
- }
-
- @Override
- public boolean defaultGrounded() {
- return false;
- }
-
- /**
- * Called when the mob is falling. Calculates and applies fall damage.
- */
- @Override
- protected void fall(float par1) {
- }
-
- /**
- * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
- * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
- */
- @Override
- protected void updateFallState(double par1, boolean par3) {
- }
-
- @Override
- public int getTotalArmorValue() {
- return 1;
- }
-
- /**
- * Returns the sound this mob makes while it's alive.
- */
- @Override
- protected String getLivingSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "birdhurt";
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "bird";
- }
-
- @Override
- public int getTalkInterval() {
- return 120;
- }
-
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (Math.round(this.aggroRange) != 0) {
- EAFF.updateEntityAFF(worldObj);
- }
- }
-
- /**
- * Plays step sound at given x, y, z for the entity
- */
- @Override
- protected void func_145780_a(int xCoord, int yCoord, int zCoord, Block stepBlock) {
- this.worldObj.playSoundAtEntity(this, "sounds.birdplop", 1.0F, 1.0F);
- }
-
- @Override
- public boolean isValidBreedingItem(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public void updateAIState() {
- if (stayStillTimer > 0) {
- entityState = EntityStates.posture;
- } else {
- super.updateAIState();
- }
- }
-
- @Override
- protected void updateAITasks() {
- super.updateAITasks();
-
- if (ticksExisted % ticksToCheckAbilities == 0) {
-
- /* Check if their is a nearby Player to Follow */
- EntityPlayer nearbyPlayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 100.0D);
- if (nearbyPlayer != null) {
- int distToTargetXZ = (int) Math.sqrt(Math.pow(nearbyPlayer.posX - this.posX, 2)
- + Math.pow(nearbyPlayer.posZ - this.posZ, 2));
- if (distToTargetXZ < 16) {
- curiosity = 140;
- }
- }
- shouldFollow = curiosity > 0 ? true : false;
- curiosity = Math.max(curiosity - ticksToCheckAbilities, 0);
-
- /*
- * Assuming we're following a Player, check if We Should Attack by Comparing number of Nearby Vultures to
- * the Health of our Target
- */
- Entity targetedEntity = nearbyPlayer;
- if (curiosity > 0 && targetedEntity != null) {
- int nearbyVultures = 0;
- AxisAlignedBB var15 = this.boundingBox.copy();
- var15 = var15.expand(10, 10, 10);
- List nearbyEntities = this.worldObj.getEntitiesWithinAABB(EntityVulture.class, var15);
- if (nearbyEntities != null && !nearbyEntities.isEmpty()) {
- Iterator var10 = nearbyEntities.iterator();
-
- while (var10.hasNext()) {
- Entity var4 = (Entity) var10.next();
- if (var4 instanceof EntityVulture
- && (((EntityVulture) var4).getEntityState() == EntityStates.following || ((EntityVulture) var4)
- .getEntityState() == EntityStates.attacking)) {
- nearbyVultures += 1;
- }
- }
- }
- if (((EntityLivingBase) targetedEntity).getHealth() < maxTargetHealthToAttack
- && ((EntityLivingBase) targetedEntity).getHealth() < nearbyVultures * 4) {
- setAngerLevel(400);
- }
- }
- }
- }
-
- /**
- * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
- * prevent them from trampling crops
- */
- @Override
- protected boolean canTriggerWalking() {
- return false;
- }
-
- // @Override
- // protected boolean isValidLightLevel(World world, int xCoord, int yCoord, int zCoord) {
- // return this.worldObj.getSavedLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord) < 1;
- // }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- // @Override
- // protected void dropRareDrop(int par1) {
- // if (Loader.isModLoaded(DefaultProps.BlocksModId) && BlockList.mobHeads.isPresent()) {
- // entityDropItem(new ItemStack(BlockList.mobHeads.get(), 1, 0), 1);
- // }
- // super.dropRareDrop(par1);
- // }
-
- @Override
- public boolean attackEntityAsMob(Entity entity) {
- boolean success = super.attackEntityAsMob(entity);
- if (entity instanceof EntityLiving) {
- ((EntityLiving)entity).addPotionEffect(new PotionEffect(Potion.poison.id, 40, 1));
- success = true;
- }
- return success;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/12709a9fc52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/12709a9fc52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 0abb40e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/12709a9fc52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,29 +0,0 @@
-package projectzulu.common.potion.subitem;
-
-import net.minecraft.item.Item;
-import net.minecraft.potion.Potion;
-import projectzulu.common.api.PotionList;
-
-import com.google.common.base.Optional;
-
-public class SubItemPotionIncendiary extends SubItemPotionGeneric {
-
- public SubItemPotionIncendiary(Item itemID, int subID) {
- super(itemID, subID, "potion.incendiary");
- setSubItemBounds(1, 1, 4, 2);
-// setEffectScale(20 * 5, 20 * 5, 20 * 10, 20 * 1, 2);
- setEffectScale(0, 0, 0, 0, 2);
-
- /* Invert Regular Potion Names as Incendiary "Duration" is useless "Power" controls how long a Fire is Set */
- strengthPrefixes = new String[] { "", "Extended", "Prolonged", "Continuous" };
- durationPrefixes = new String[] { "", "Thickened", "Strengthened", "Fortified" };
-
- durationPostfixes = new String[] { "", "of Thickness", "of Strength", "of Fortification" };
- strengthPostfixes = new String[] { "", "Extended", "Prolonged", "Continuous" };
- }
-
- @Override
- Optional extends Potion> getPotion() {
- return PotionList.incendiary;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/20bfbff8c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/20bfbff8c42100141fce95f06aba7e85
deleted file mode 100644
index 9c90ca6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/20bfbff8c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,182 +0,0 @@
-package com.ngb.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import org.lwjgl.opengl.GL11;
-
-import com.ngb.projectzulu.common.mobs.entity.EntityBear;
-import com.ngb.projectzulu.common.mobs.entity.EntityBlackBear;
-import com.ngb.projectzulu.common.mobs.entity.EntityBrownBear;
-
-public class ModelBear extends ModelBase {
- ModelRenderer HEADROT;
- ModelRenderer BODYROT;
- private ModelRenderer LEG1ROT2;
- private ModelRenderer LEG1ROT;
- private ModelRenderer LEG2ROT2;
- private ModelRenderer LEG2ROT;
- private ModelRenderer LEG3ROT2;
- private ModelRenderer LEG3ROT;
- private ModelRenderer LEG4ROT2;
- private ModelRenderer LEG4ROT;
- private ModelRenderer TAILROT;
-
- public ModelBear(float heightToRaise) {
- textureWidth = 128;
- textureHeight = 64;
- setTextureOffset("HEADROT.head", 58, 0);
- setTextureOffset("HEADROT.cuff", 58, 16);
- setTextureOffset("HEADROT.earl", 69, 12);
- setTextureOffset("HEADROT.earr", 75, 12);
- setTextureOffset("HEADROT.nose", 58, 12);
- setTextureOffset("BODYROT.body", 2, 0);
- setTextureOffset("LEG1ROT2.leg1top", 0, 29);
- setTextureOffset("LEG1ROT.leg1", 16, 29);
- setTextureOffset("LEG2ROT2.leg2top", 0, 29);
- setTextureOffset("LEG2ROT.leg2", 16, 29);
- setTextureOffset("LEG3ROT2.leg3top", 0, 29);
- setTextureOffset("LEG3ROT.leg3", 16, 29);
- setTextureOffset("LEG4ROT2.leg4top", 0, 29);
- setTextureOffset("LEG4ROT.leg4", 16, 29);
- setTextureOffset("TAILROT.tail", 32, 29);
-
- HEADROT = new ModelRenderer(this, "HEADROT");
- HEADROT.setRotationPoint(1F, 9F - heightToRaise, -6F);
- setRotation(HEADROT, 0F, 0F, 0F);
- HEADROT.mirror = true;
- HEADROT.addBox("head", -3.5F, -3F, -5F, 7, 6, 5);
- HEADROT.addBox("cuff", -2F, 3F, -3F, 4, 1, 3);
- HEADROT.addBox("earl", -4F, -5F, -3F, 2, 2, 1);
- HEADROT.addBox("earr", 2F, -5F, -3F, 2, 2, 1);
- HEADROT.addBox("nose", -1.5F, 0F, -7F, 3, 2, 2);
- BODYROT = new ModelRenderer(this, "BODYROT");
- BODYROT.setRotationPoint(0F, 9F - heightToRaise, -7F);
- setRotation(BODYROT, 0F, 0F, 0F);
- BODYROT.mirror = true;
- BODYROT.addBox("body", -5F, -5F, 1F, 12, 12, 16);
- LEG1ROT2 = new ModelRenderer(this, "LEG1ROT2");
- LEG1ROT2.setRotationPoint(-3F, 7F, 15F);
- setRotation(LEG1ROT2, 0F, 0F, 0F);
- LEG1ROT2.mirror = true;
- LEG1ROT2.addBox("leg1top", -2F, 0F, -2F, 4, 3, 4);
- LEG1ROT = new ModelRenderer(this, "LEG1ROT");
- LEG1ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG1ROT, 0F, 0F, 0F);
- LEG1ROT.mirror = true;
- LEG1ROT.addBox("leg1", -2F, 0F, -2F, 4, 5, 4);
- LEG1ROT2.addChild(LEG1ROT);
- BODYROT.addChild(LEG1ROT2);
- LEG2ROT2 = new ModelRenderer(this, "LEG2ROT2");
- LEG2ROT2.setRotationPoint(5F, 7F, 15F);
- setRotation(LEG2ROT2, 0F, 0F, 0F);
- LEG2ROT2.mirror = true;
- LEG2ROT2.addBox("leg2top", -2F, 0F, -2F, 4, 3, 4);
- LEG2ROT = new ModelRenderer(this, "LEG2ROT");
- LEG2ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG2ROT, 0F, 0F, 0F);
- LEG2ROT.mirror = true;
- LEG2ROT.addBox("leg2", -2F, 0F, -2F, 4, 5, 4);
- LEG2ROT2.addChild(LEG2ROT);
- BODYROT.addChild(LEG2ROT2);
- LEG3ROT2 = new ModelRenderer(this, "LEG3ROT2");
- LEG3ROT2.setRotationPoint(-3F, 7F, 3F);
- setRotation(LEG3ROT2, 0F, 0F, 0F);
- LEG3ROT2.mirror = true;
- LEG3ROT2.addBox("leg3top", -2F, 0F, -2F, 4, 3, 4);
- LEG3ROT = new ModelRenderer(this, "LEG3ROT");
- LEG3ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG3ROT, 0F, 0F, 0F);
- LEG3ROT.mirror = true;
- LEG3ROT.addBox("leg3", -2F, 0F, -2F, 4, 5, 4);
- LEG3ROT2.addChild(LEG3ROT);
- BODYROT.addChild(LEG3ROT2);
- LEG4ROT2 = new ModelRenderer(this, "LEG4ROT2");
- LEG4ROT2.setRotationPoint(5F, 7F, 3F);
- setRotation(LEG4ROT2, 0F, 0F, 0F);
- LEG4ROT2.mirror = true;
- LEG4ROT2.addBox("leg4top", -2F, 0F, -2F, 4, 3, 4);
- LEG4ROT = new ModelRenderer(this, "LEG4ROT");
- LEG4ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG4ROT, 0F, 0F, 0F);
- LEG4ROT.mirror = true;
- LEG4ROT.addBox("leg4", -2F, 0F, -2F, 4, 5, 4);
- LEG4ROT2.addChild(LEG4ROT);
- BODYROT.addChild(LEG4ROT2);
- TAILROT = new ModelRenderer(this, "TAILROT");
- TAILROT.setRotationPoint(1F, 2F, 17F);
- setRotation(TAILROT, 0F, 0F, 0F);
- TAILROT.mirror = true;
- TAILROT.addBox("tail", -1.5F, -1.5F, 0F, 3, 3, 1);
- BODYROT.addChild(TAILROT);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- if (this.isChild) {
- float field_78145_g = 8.0F;
- float field_78151_h = 4.0F;
- float field_78145_j = 0.0f;
- float var8 = 2.0F;
- float var9 = 1.0f;
-
- if (entity instanceof EntityBlackBear) {
- var8 = 2.0F;
- var9 = 1.2f;
- field_78145_g = 4.0f;
- field_78151_h = 5.0f;
- field_78145_j = -0.8f;
- } else if (entity instanceof EntityBrownBear) {
- var8 = 2.5F;
- field_78145_j = -0.55f;
- } else {
- var8 = 3.0F;
- var9 = 0.7f;
- field_78145_j = -0.3f;
- }
- GL11.glPushMatrix();
- GL11.glTranslatef(field_78145_j * f5, field_78145_g * f5, field_78151_h * f5);
- HEADROT.render(f5 * var9);
- GL11.glPopMatrix();
-
- GL11.glPushMatrix();
- GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
- GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
- BODYROT.render(f5);
- GL11.glPopMatrix();
- } else {
- HEADROT.render(f5);
- BODYROT.render(f5);
- }
-
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
- EntityBear var5 = (EntityBear) par1EntityLiving;
- LEG1ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.2F * par3;
- LEG3ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.2F * par3;
- LEG2ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f + (float) Math.PI) * 1.2F * par3;
- LEG4ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f + (float) Math.PI) * 1.2F * par3;
- super.setLivingAnimations(par1EntityLiving, par2, par3, par4);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- HEADROT.rotateAngleX = Math.min(Math.max(f4, -15), +15) * (float) (Math.PI / 180f);
- HEADROT.rotateAngleY = Math.min(Math.max(f3, -45), +45) * (float) (Math.PI / 180f);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/2121eaffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/2121eaffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index e06c031..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/2121eaffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemReed;
-import projectzulu.common.ProjectZulu_Core;
-
-public class ItemUniversalFlowerPot extends ItemReed {
-
- public ItemUniversalFlowerPot(Block block) {
- super(block);
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- setUnlocalizedName(block.getUnlocalizedName());
- setTextureName("flower_pot");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/301029fec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/301029fec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 7cece5f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/301029fec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,150 +0,0 @@
-package com.ngb.projectzulu.common.core;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
-import net.minecraftforge.event.entity.living.LivingHurtEvent;
-import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.mobs.entity.EntityTreeEnt;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class EventHookContainerClass {
- // zLevel is protected float copied from GUI along with drawTexturedModelRect
- protected float zLevel = 0.0F;
- boolean nearBossTriggered = false;
-
- Random classRand = new Random();
-
- @SubscribeEvent
- public void onPlayerUpdateStarve(LivingUpdateEvent event) {
- World worldObj = event.entity.worldObj;
- if (worldObj != null && event.entity != null && event.entity instanceof EntityPlayer) {
-
- EntityPlayer thePlayer = (EntityPlayer) event.entity;
-
- int var1 = MathHelper.floor_double(thePlayer.posX);
- int var2 = MathHelper.floor_double(thePlayer.boundingBox.minY);
- int var3 = MathHelper.floor_double(thePlayer.posZ);
- BiomeGenBase currentBiome = worldObj.getBiomeGenForCoords(var1, var3);
- boolean isDesertSun = worldObj.canBlockSeeTheSky(var1, var2, var3) && worldObj.isDaytime() == true
- && (currentBiome == BiomeGenBase.desert || currentBiome == BiomeGenBase.desertHills);
-
- /* Armor Effect Only Occurs When Block/Item Package is Installed */
- if (!thePlayer.capabilities.isCreativeMode && isDesertSun == true
- && Loader.isModLoaded(DefaultProps.BlocksModId)) {
- float exhaustion = 0.0032f;
- switch (worldObj.difficultySetting) {
- case PEACEFUL:
- exhaustion = 0.0f;
- break;
- case EASY:
- exhaustion = 0.0032f * 1;
- break;
- case NORMAL:
- exhaustion = 0.0032f * 2;
- break;
- case HARD:
- exhaustion = 0.0032f * 3;
- default:
- break;
- }
-
- for (int i = 0; i < 4; i++) {
- if (thePlayer.inventory.armorInventory[i] == null) {
- exhaustion -= (exhaustion - exhaustion * 0.4) / 4f;
- break;
- }
- }
- thePlayer.addExhaustion(Math.max(exhaustion, 0));
- }
- }
- }
-
- /* Armor Effect Only Occurs When Block/Item Package is Installed */
- @SubscribeEvent
- public void cactusArmorDamage(LivingHurtEvent event) {
- if (Loader.isModLoaded(DefaultProps.BlocksModId) && event.entity != null
- && event.entity instanceof EntityPlayer && event.source.getSourceOfDamage() instanceof EntityLiving) {
- EntityPlayer hurtEntity = (EntityPlayer) event.entity;
- EntityLiving attackingEntity = (EntityLiving) event.source.getSourceOfDamage();
- if (attackingEntity != null && event.source.getDamageType() == "mob") {
-
- double cactusDamage = 0;
- if (hurtEntity.inventory.armorInventory[3] != null && ItemList.cactusArmorHead.isPresent()
- && hurtEntity.inventory.armorInventory[3].getItem() == ItemList.cactusArmorHead.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[2] != null && ItemList.cactusArmorChest.isPresent()
- && hurtEntity.inventory.armorInventory[2].getItem() == ItemList.cactusArmorChest.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[1] != null && ItemList.cactusArmorLeg.isPresent()
- && hurtEntity.inventory.armorInventory[1].getItem() == ItemList.cactusArmorLeg.get()) {
- cactusDamage += 0.5;
- }
- if (hurtEntity.inventory.armorInventory[0] != null && ItemList.cactusArmorBoots.isPresent()
- && hurtEntity.inventory.armorInventory[0].getItem() == ItemList.cactusArmorBoots.get()) {
- cactusDamage += 0.5;
- }
-
- if (cactusDamage > 0) {
- attackingEntity.attackEntityFrom(DamageSource.causeThornsDamage(hurtEntity),
- MathHelper.ceiling_double_int(cactusDamage));
- }
-
- }
- }
- }
-
- /**
- * Used to Notify nearby Treeents they should be attacking this Player. Triggered by the Player breaking Wood Only
- * notifies TreeEnts that are looking at the Player
- */
- @SubscribeEvent
- public void treeEntDefendForest(BreakSpeed event) {
- if (Loader.isModLoaded(DefaultProps.MobsModId)) {
- if (event.entity != null && event.entity instanceof EntityPlayer
- && (event.block == Blocks.log || event.block == Blocks.log2)) {
- EntityPlayer player = (EntityPlayer) (event.entity);
- World worldObj = player.worldObj;
- AxisAlignedBB playerBounding = player.boundingBox.copy();
- playerBounding = playerBounding.expand(24, 24, 24);
- List listOfTreeEnts = player.worldObj
- .getEntitiesWithinAABB(EntityTreeEnt.class, playerBounding);
- if (!listOfTreeEnts.isEmpty()) {
- Iterator entIterator = listOfTreeEnts.iterator();
- while (entIterator.hasNext()) {
- Entity entity = (Entity) entIterator.next();
- if (((EntityTreeEnt) entity).getAngerLevel() <= 0
- && worldObj.rayTraceBlocks(
- worldObj.getWorldVec3Pool().getVecFromPool(player.posX,
- player.posY + player.getEyeHeight(), player.posZ),
- worldObj.getWorldVec3Pool().getVecFromPool(entity.posX, entity.posY,
- entity.posZ)) == null) {
- if (!worldObj.isRemote) {
- ((EntityTreeEnt) entity).setAttackTarget(player);
- }
- ((EntityTreeEnt) entity).setAngerLevel(60);
- }
- }
- }
- }
- }
-
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/603187f8339d001411accd8c5614e9d3 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/603187f8339d001411accd8c5614e9d3
deleted file mode 100644
index 2fc0b6c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/603187f8339d001411accd8c5614e9d3
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-
-import com.stek101.projectzulu.common.api.CustomMobData;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.core.entitydeclaration.EntityProperties;
-import com.stek101.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.stek101.projectzulu.common.mobs.entity.EntityBloomDoom;
-import com.stek101.projectzulu.common.mobs.models.ModelBloomDoom;
-import com.stek101.projectzulu.common.mobs.renders.RenderGenericIdle;
-import com.stek101.projectzulu.common.mobs.renders.RenderWrapper;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class BloomDoomDeclaration extends SpawnableDeclaration {
- //private final List entityTextures = new ArrayList ();
-
- public BloomDoomDeclaration() {
- super("BloomDoom", 64, EntityBloomDoom.class, EnumCreatureType.creature);
- setSpawnProperties(10, 5, 1, 1);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 1);
-
- eggColor1 = (133 << 16) + (233 << 8) + 0;
- eggColor2 = (101 << 16) + (200 << 8) + 143;
-
- // entityTextures.add("textures/beetlebs1.png");
- // entityTextures.add("textures/beetlebs2.png");
- // entityTextures.add("textures/beetlebs3.png");
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- //ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, Items.feather, 0, 8);
- customMobData.entityProperties = new EntityProperties(15f, 3.0f, 0.25f).createFromConfig(config, mobName);
- //customMobData.entityProperties = new EntityProperties(15f, 3.0f, 0.3f, 0.0f, 0.0f, 32.0f, 50f, 16D).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- //return new RenderGenericLiving(new ModelBloomDoom(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- // "textures/bloomdoom.png"));
-
- return new RenderGenericIdle(new ModelBloomDoom(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "textures/bloomdoom0.png"), new ResourceLocation(DefaultProps.mobKey, "textures/bloomdoomidle0.png"));
-
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add("Autumn Woods");
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
-
- HashSet nonFrozenForest = new HashSet();
- nonFrozenForest.addAll(typeToArray(Type.FOREST));
- nonFrozenForest.addAll(typeToArray(Type.PLAINS));
- nonFrozenForest.removeAll(typeToArray(Type.FROZEN));
- defaultBiomesToSpawn.addAll(nonFrozenForest);
-
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/71def1fec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/71def1fec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 4b704b5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/71def1fec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,182 +0,0 @@
-package com.ngb.projectzulu.common.mobs.models;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.util.MathHelper;
-
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.common.mobs.entity.EntityBear;
-import projectzulu.common.mobs.entity.EntityBlackBear;
-import projectzulu.common.mobs.entity.EntityBrownBear;
-
-public class ModelBear extends ModelBase {
- ModelRenderer HEADROT;
- ModelRenderer BODYROT;
- private ModelRenderer LEG1ROT2;
- private ModelRenderer LEG1ROT;
- private ModelRenderer LEG2ROT2;
- private ModelRenderer LEG2ROT;
- private ModelRenderer LEG3ROT2;
- private ModelRenderer LEG3ROT;
- private ModelRenderer LEG4ROT2;
- private ModelRenderer LEG4ROT;
- private ModelRenderer TAILROT;
-
- public ModelBear(float heightToRaise) {
- textureWidth = 128;
- textureHeight = 64;
- setTextureOffset("HEADROT.head", 58, 0);
- setTextureOffset("HEADROT.cuff", 58, 16);
- setTextureOffset("HEADROT.earl", 69, 12);
- setTextureOffset("HEADROT.earr", 75, 12);
- setTextureOffset("HEADROT.nose", 58, 12);
- setTextureOffset("BODYROT.body", 2, 0);
- setTextureOffset("LEG1ROT2.leg1top", 0, 29);
- setTextureOffset("LEG1ROT.leg1", 16, 29);
- setTextureOffset("LEG2ROT2.leg2top", 0, 29);
- setTextureOffset("LEG2ROT.leg2", 16, 29);
- setTextureOffset("LEG3ROT2.leg3top", 0, 29);
- setTextureOffset("LEG3ROT.leg3", 16, 29);
- setTextureOffset("LEG4ROT2.leg4top", 0, 29);
- setTextureOffset("LEG4ROT.leg4", 16, 29);
- setTextureOffset("TAILROT.tail", 32, 29);
-
- HEADROT = new ModelRenderer(this, "HEADROT");
- HEADROT.setRotationPoint(1F, 9F - heightToRaise, -6F);
- setRotation(HEADROT, 0F, 0F, 0F);
- HEADROT.mirror = true;
- HEADROT.addBox("head", -3.5F, -3F, -5F, 7, 6, 5);
- HEADROT.addBox("cuff", -2F, 3F, -3F, 4, 1, 3);
- HEADROT.addBox("earl", -4F, -5F, -3F, 2, 2, 1);
- HEADROT.addBox("earr", 2F, -5F, -3F, 2, 2, 1);
- HEADROT.addBox("nose", -1.5F, 0F, -7F, 3, 2, 2);
- BODYROT = new ModelRenderer(this, "BODYROT");
- BODYROT.setRotationPoint(0F, 9F - heightToRaise, -7F);
- setRotation(BODYROT, 0F, 0F, 0F);
- BODYROT.mirror = true;
- BODYROT.addBox("body", -5F, -5F, 1F, 12, 12, 16);
- LEG1ROT2 = new ModelRenderer(this, "LEG1ROT2");
- LEG1ROT2.setRotationPoint(-3F, 7F, 15F);
- setRotation(LEG1ROT2, 0F, 0F, 0F);
- LEG1ROT2.mirror = true;
- LEG1ROT2.addBox("leg1top", -2F, 0F, -2F, 4, 3, 4);
- LEG1ROT = new ModelRenderer(this, "LEG1ROT");
- LEG1ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG1ROT, 0F, 0F, 0F);
- LEG1ROT.mirror = true;
- LEG1ROT.addBox("leg1", -2F, 0F, -2F, 4, 5, 4);
- LEG1ROT2.addChild(LEG1ROT);
- BODYROT.addChild(LEG1ROT2);
- LEG2ROT2 = new ModelRenderer(this, "LEG2ROT2");
- LEG2ROT2.setRotationPoint(5F, 7F, 15F);
- setRotation(LEG2ROT2, 0F, 0F, 0F);
- LEG2ROT2.mirror = true;
- LEG2ROT2.addBox("leg2top", -2F, 0F, -2F, 4, 3, 4);
- LEG2ROT = new ModelRenderer(this, "LEG2ROT");
- LEG2ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG2ROT, 0F, 0F, 0F);
- LEG2ROT.mirror = true;
- LEG2ROT.addBox("leg2", -2F, 0F, -2F, 4, 5, 4);
- LEG2ROT2.addChild(LEG2ROT);
- BODYROT.addChild(LEG2ROT2);
- LEG3ROT2 = new ModelRenderer(this, "LEG3ROT2");
- LEG3ROT2.setRotationPoint(-3F, 7F, 3F);
- setRotation(LEG3ROT2, 0F, 0F, 0F);
- LEG3ROT2.mirror = true;
- LEG3ROT2.addBox("leg3top", -2F, 0F, -2F, 4, 3, 4);
- LEG3ROT = new ModelRenderer(this, "LEG3ROT");
- LEG3ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG3ROT, 0F, 0F, 0F);
- LEG3ROT.mirror = true;
- LEG3ROT.addBox("leg3", -2F, 0F, -2F, 4, 5, 4);
- LEG3ROT2.addChild(LEG3ROT);
- BODYROT.addChild(LEG3ROT2);
- LEG4ROT2 = new ModelRenderer(this, "LEG4ROT2");
- LEG4ROT2.setRotationPoint(5F, 7F, 3F);
- setRotation(LEG4ROT2, 0F, 0F, 0F);
- LEG4ROT2.mirror = true;
- LEG4ROT2.addBox("leg4top", -2F, 0F, -2F, 4, 3, 4);
- LEG4ROT = new ModelRenderer(this, "LEG4ROT");
- LEG4ROT.setRotationPoint(0F, 3F, 0F);
- setRotation(LEG4ROT, 0F, 0F, 0F);
- LEG4ROT.mirror = true;
- LEG4ROT.addBox("leg4", -2F, 0F, -2F, 4, 5, 4);
- LEG4ROT2.addChild(LEG4ROT);
- BODYROT.addChild(LEG4ROT2);
- TAILROT = new ModelRenderer(this, "TAILROT");
- TAILROT.setRotationPoint(1F, 2F, 17F);
- setRotation(TAILROT, 0F, 0F, 0F);
- TAILROT.mirror = true;
- TAILROT.addBox("tail", -1.5F, -1.5F, 0F, 3, 3, 1);
- BODYROT.addChild(TAILROT);
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- if (this.isChild) {
- float field_78145_g = 8.0F;
- float field_78151_h = 4.0F;
- float field_78145_j = 0.0f;
- float var8 = 2.0F;
- float var9 = 1.0f;
-
- if (entity instanceof EntityBlackBear) {
- var8 = 2.0F;
- var9 = 1.2f;
- field_78145_g = 4.0f;
- field_78151_h = 5.0f;
- field_78145_j = -0.8f;
- } else if (entity instanceof EntityBrownBear) {
- var8 = 2.5F;
- field_78145_j = -0.55f;
- } else {
- var8 = 3.0F;
- var9 = 0.7f;
- field_78145_j = -0.3f;
- }
- GL11.glPushMatrix();
- GL11.glTranslatef(field_78145_j * f5, field_78145_g * f5, field_78151_h * f5);
- HEADROT.render(f5 * var9);
- GL11.glPopMatrix();
-
- GL11.glPushMatrix();
- GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
- GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
- BODYROT.render(f5);
- GL11.glPopMatrix();
- } else {
- HEADROT.render(f5);
- BODYROT.render(f5);
- }
-
- }
-
- @Override
- public void setLivingAnimations(EntityLivingBase par1EntityLiving, float par2, float par3, float par4) {
- EntityBear var5 = (EntityBear) par1EntityLiving;
- LEG1ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.2F * par3;
- LEG3ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f) * 1.2F * par3;
- LEG2ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f + (float) Math.PI) * 1.2F * par3;
- LEG4ROT2.rotateAngleX = MathHelper.cos(par2 * 0.6662F * 2f + (float) Math.PI) * 1.2F * par3;
- super.setLivingAnimations(par1EntityLiving, par2, par3, par4);
- }
-
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity par7Entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, par7Entity);
- HEADROT.rotateAngleX = Math.min(Math.max(f4, -15), +15) * (float) (Math.PI / 180f);
- HEADROT.rotateAngleY = Math.min(Math.max(f3, -45), +45) * (float) (Math.PI / 180f);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/80868c01c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/80868c01c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 53a4c86..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/80868c01c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.ngb.projectzulu.common.potion.subitem;
-
-import net.minecraft.item.Item;
-import net.minecraft.potion.Potion;
-import projectzulu.common.api.PotionList;
-
-import com.google.common.base.Optional;
-
-public class SubItemPotionSlowfall extends SubItemPotionGeneric {
-
- public SubItemPotionSlowfall(Item itemID, int subID) {
- super(itemID, subID, "potion.slowfall");
- setSubItemBounds(4, 4, 4, 0);
- setEffectScale(20 * 20, 20 * 5, 14, 10, 2);
- }
-
- @Override
- Optional extends Potion> getPotion() {
- return PotionList.slowfall;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/8135f2e5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/8135f2e5c42100141fce95f06aba7e85
deleted file mode 100644
index f2e6415..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/8135f2e5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,21 +0,0 @@
-package projectzulu.common.potion.subitem;
-
-import net.minecraft.item.Item;
-import net.minecraft.potion.Potion;
-import projectzulu.common.api.PotionList;
-
-import com.google.common.base.Optional;
-
-public class SubItemPotionHarm extends SubItemPotionGeneric {
-
- public SubItemPotionHarm(Item itemID, int subID) {
- super(itemID, subID, "potion.harm2");
- setSubItemBounds(4, 1, 4, 0);
- setEffectScale(20 * 10, 20 * 5, 16, 10, 2);
- }
-
- @Override
- Optional extends Potion> getPotion() {
- return PotionList.harm2;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/90e8c2f7c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/90e8c2f7c42100141fce95f06aba7e85
deleted file mode 100644
index 5b1639e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/90e8c2f7c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,108 +0,0 @@
-package com.ngb.projectzulu.common.blocks;
-
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.ChatAllowedCharacters;
-import net.minecraft.world.World;
-
-import org.lwjgl.input.Keyboard;
-
-import com.ngb.projectzulu.common.ProjectZulu_Core;
-import com.ngb.projectzulu.common.mobs.entity.EntityGenericTameable;
-import com.ngb.projectzulu.common.mobs.packets.PacketNameSync;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-@SideOnly(Side.CLIENT)
-public class GuiAnimalName extends GuiScreen {
- /**
- * This String is just a local copy of the characters allowed in text rendering of minecraft.
- */
- private static final char[] allowedCharacters = ChatAllowedCharacters.allowedCharacters;
-
- /** The title string that is displayed in the top-center of the screen. */
- protected String screenTitle = "Entity Name:";
-
- /** Counts the number of screen updates. */
- private int updateCounter;
-
- /** The number of the line that is being edited. */
- private int editLine = 0;
-
- World world;
- EntityPlayer player;
- /* ID of Entity to be Named */
- int entityID;
- public String entityName = "";
-
- public GuiAnimalName(World world, EntityPlayer player, int entityID) {
- this.world = world;
- this.player = player;
- this.entityID = entityID;
- entityName = ((EntityGenericTameable) world.getEntityByID(entityID)).getUsername();
- }
-
- /**
- * Adds the buttons (and other controls) to the screen in question.
- */
- public void initGui() {
- this.buttonList.clear();
- Keyboard.enableRepeatEvents(true);
- this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 120, "Done"));
- // this.entitySign.setEditable(false);
- }
-
- /**
- * Called when the screen is unloaded. Used to disable keyboard repeat events
- */
- public void onGuiClosed() {
- Keyboard.enableRepeatEvents(false);
- PacketNameSync packet = new PacketNameSync().setPacketData(entityID, entityName);
- ProjectZulu_Core.getPipeline().sendToServer(packet);
- }
-
- /**
- * Called from the main game loop to update the screen.
- */
- public void updateScreen() {
- ++this.updateCounter;
- }
-
- /**
- * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
- */
- protected void actionPerformed(GuiButton par1GuiButton) {
- if (par1GuiButton.enabled) {
- if (par1GuiButton.id == 0) {
- this.mc.displayGuiScreen((GuiScreen) null);
- }
- }
- }
-
- /**
- * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
- */
- protected void keyTyped(char par1, int par2) {
- if (par2 == 14 && this.entityName.length() > 0) {
- this.entityName = this.entityName.substring(0, this.entityName.length() - 1);
- }
-
- if (allowedCharacters[par1] >= 0 && this.entityName.length() < 10) {
- this.entityName = this.entityName + par1;
- }
- }
-
- /**
- * Draws the screen and all the components in it.
- */
- public void drawScreen(int par1, int par2, float par3) {
- this.drawDefaultBackground();
-
- this.drawCenteredString(fontRendererObj, this.screenTitle, this.width / 2, 40, 16777215);
- this.drawCenteredString(fontRendererObj, this.entityName, this.width / 2, 40 + fontRendererObj.FONT_HEIGHT,
- 16777215);
-
- super.drawScreen(par1, par2, par3);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/a114b8ffc72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/a114b8ffc72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 034b47f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/a114b8ffc72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.ngb.projectzulu.common.blocks.itemblockdeclarations;
-
-import net.minecraft.block.Block;
-import net.minecraftforge.common.config.Configuration;
-import projectzulu.common.api.BlockList;
-import projectzulu.common.blocks.BlockCampfire;
-import projectzulu.common.blocks.ItemCampFire;
-import projectzulu.common.blocks.RenderCampFire;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ProjectZuluLog;
-import projectzulu.common.core.itemblockdeclaration.BlockDeclaration;
-
-import com.google.common.base.Optional;
-
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class CampfireDeclaration extends BlockDeclaration {
-
- private int renderID = -1;
-
- public CampfireDeclaration() {
- super("Campfire");
- }
-
- @Override
- protected void preCreateLoadConfig(Configuration config) {
- renderID = config.get("Do Not Touch", "Campfire Render ID", renderID).getInt(renderID);
- renderID = renderID == -1 ? RenderingRegistry.getNextAvailableRenderId() : renderID;
- }
-
- @Override
- protected boolean createBlock() {
- BlockList.campfire = Optional.of(new BlockCampfire(renderID).setBlockName(name.toLowerCase())
- .setBlockTextureName(DefaultProps.blockKey + ":" + name.toLowerCase()));
- return true;
- }
-
- @Override
- protected void registerBlock() {
- Block block = BlockList.campfire.get();
- GameRegistry.registerBlock(block, ItemCampFire.class, name.toLowerCase());
- }
-
- @Override
- protected void clientRegisterBlock() {
- RenderingRegistry.registerBlockHandler(renderID, new RenderCampFire());
- ProjectZuluLog.info("Campfire Render ID Registed to %s", renderID);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/c0ad15f6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/c0ad15f6c42100141fce95f06aba7e85
deleted file mode 100644
index 7a0214d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/c0ad15f6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,321 +0,0 @@
-package com.ngb.projectzulu.common.dungeon;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.audio.PositionedSoundRecord;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.gui.GuiTextField;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.util.Point;
-
-import com.ngb.projectzulu.common.core.DefaultProps;
-
-import com.google.common.base.CharMatcher;
-
-public class SpawnerFields implements DataFields {
- private boolean isEnabled = true;
-
- private GuiTextField minSpawnDelay;
- private GuiTextField maxSpawnDelay;
- private GuiTextField maxToSpawn;
- private GuiTextField requiredPlayerRange;
- private GuiTextField maxNearbyEntities;
-
- private GuiTextField spawnRangeVertical;
- private GuiTextField spawnRangeHorizontal;
-
- private GuiTextField spawnOffsetX;
- private GuiTextField spawnOffsetY;
- private GuiTextField spawnOffsetZ;
-
- private GuiButton toggleDebug;
- private GuiButton resetDebug;
-
- private GuiLimitedMobSpawner parent;
-
- SpawnerFields(GuiLimitedMobSpawner parent) {
- this.parent = parent;
- }
-
- public static final ResourceLocation CREATURE_GUI = new ResourceLocation(DefaultProps.dungeonKey,
- "creaturelistgui.png");
-
- @Override
- public DataFields createFields(Minecraft mc, int screenWidth, int screenHeight, Point backgroundSize) {
- minSpawnDelay = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize,
- new Point(177, 22 + 2), new Point(20, 14), minSpawnDelay != null ? minSpawnDelay.getText() : "");
- maxSpawnDelay = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize,
- new Point(201, 22 + 2), new Point(20, 14), maxSpawnDelay != null ? maxSpawnDelay.getText() : "");
-
- requiredPlayerRange = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize,
- new Point(201, 39 + 2), new Point(39, 14), requiredPlayerRange != null ? requiredPlayerRange.getText()
- : "");
-
- maxToSpawn = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize, new Point(
- 201, 58), new Point(20, 14), maxToSpawn != null ? maxToSpawn.getText() : "");
- maxNearbyEntities = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize,
- new Point(201, 58 + 17), new Point(39, 14), maxNearbyEntities != null ? maxNearbyEntities.getText()
- : "");
-
- spawnRangeVertical = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize,
- new Point(201, 58 + 17 * 2), new Point(20, 14),
- spawnRangeVertical != null ? spawnRangeVertical.getText() : "");
- spawnRangeHorizontal = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize,
- new Point(177, 58 + 17 * 2), new Point(20, 14),
- spawnRangeHorizontal != null ? spawnRangeHorizontal.getText() : "");
-
- spawnOffsetX = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize, new Point(
- 177, 58 + 17 * 3), new Point(20, 14), spawnOffsetX != null ? spawnOffsetX.getText() : "");
- spawnOffsetZ = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize, new Point(
- 201, 58 + 17 * 3), new Point(20, 14), spawnOffsetZ != null ? spawnOffsetZ.getText() : "");
- spawnOffsetY = setupTextField(mc.fontRenderer, new Point(screenWidth, screenHeight), backgroundSize, new Point(
- 201, 58 + 17 * 4), new Point(20, 14), spawnOffsetY != null ? spawnOffsetY.getText() : "");
-
- toggleDebug = new GuiButton(1, (screenWidth - backgroundSize.getX()) / 2 + 5,
- (screenHeight - backgroundSize.getY()) / 2 + 175, 70, 20, "Toggle Debug");
- resetDebug = new GuiButton(1, (screenWidth - backgroundSize.getX()) / 2 + 151,
- (screenHeight - backgroundSize.getY()) / 2 + 175, 70, 20, "Reset Debug");
-
- return this;
- }
-
- private GuiTextField setupTextField(FontRenderer fontRenderer, Point screenSize, Point backgroundSize,
- Point position, Point boxSize, String text) {
- GuiTextField newTextField = new GuiTextField(fontRenderer, (screenSize.getX() - backgroundSize.getX()) / 2
- + position.getX(), (screenSize.getY() - backgroundSize.getY()) / 2 + position.getY(), boxSize.getX(),
- boxSize.getY());
- newTextField.setText(text);
- newTextField.setTextColor(-1);
- newTextField.setDisabledTextColour(-1);
- newTextField.setEnableBackgroundDrawing(false);
- newTextField.setMaxStringLength(3);
- return newTextField;
- }
-
- @Override
- public void loadFromTileEntity(TileEntityLimitedMobSpawner limitedMobSpawner, int elementID) {
- minSpawnDelay.setText(Integer.toString(limitedMobSpawner.getMinSpawnDelay() / 20));
- maxSpawnDelay.setText(Integer.toString(limitedMobSpawner.getMaxSpawnDelay() / 20));
- maxToSpawn.setText(Integer.toString(limitedMobSpawner.getMaxSpawnableEntities()));
- requiredPlayerRange.setText(Integer.toString(limitedMobSpawner.getRequriedPLayerRange()));
- maxNearbyEntities.setText(Integer.toString(limitedMobSpawner.getMaxNearbyEntities()));
- spawnRangeHorizontal.setText(Integer.toString(limitedMobSpawner.getSpawnRangeHorizontal()));
- spawnRangeVertical.setText(Integer.toString(limitedMobSpawner.getSpawnRangeVertial()));
- spawnOffsetX.setText(Integer.toString(limitedMobSpawner.spawnRangeOffsetX));
- spawnOffsetY.setText(Integer.toString(limitedMobSpawner.spawnRangeOffsetY));
- spawnOffsetZ.setText(Integer.toString(limitedMobSpawner.spawnRangeOffsetZ));
- }
-
- @Override
- public void saveToTileEntity(TileEntityLimitedMobSpawner limitedMobSpawner) {
- limitedMobSpawner.setMinMaxSpawnDelay(Integer.parseInt(minSpawnDelay.getText()) * 20,
- Integer.parseInt(maxSpawnDelay.getText()) * 20);
- limitedMobSpawner.setMaxSpawnableEntities(Integer.parseInt(maxToSpawn.getText()));
- limitedMobSpawner.setRequiredPlayerRange(Integer.parseInt(requiredPlayerRange.getText()));
- limitedMobSpawner.setMaxNearbyEntities(Integer.parseInt(maxNearbyEntities.getText()));
- limitedMobSpawner.setSpawnRangeHorizontal(Integer.parseInt(spawnRangeHorizontal.getText()));
- limitedMobSpawner.setSpawnRangeVertical(Integer.parseInt(spawnRangeVertical.getText()));
- limitedMobSpawner.spawnRangeOffsetX = Integer.parseInt(spawnOffsetX.getText());
- limitedMobSpawner.spawnRangeOffsetY = Integer.parseInt(spawnOffsetY.getText());
- limitedMobSpawner.spawnRangeOffsetZ = Integer.parseInt(spawnOffsetZ.getText());
- }
-
- @Override
- public void setIsEnabled(boolean isEnabled) {
- this.isEnabled = isEnabled;
- }
-
- @Override
- public boolean isEnabled() {
- return isEnabled;
- }
-
- @Override
- public boolean keyboardInput(char keyChar, int keyID) {
- if (isEnabled) {
- return correctIfInvalid(minSpawnDelay, keyChar, keyID) || correctIfInvalid(maxSpawnDelay, keyChar, keyID)
- || correctIfInvalid(maxToSpawn, keyChar, keyID)
- || correctIfInvalid(maxNearbyEntities, keyChar, keyID)
- || correctIfInvalid(requiredPlayerRange, keyChar, keyID)
- || correctIfInvalid(spawnRangeVertical, keyChar, keyID)
- || correctIfInvalid(spawnRangeHorizontal, keyChar, keyID)
- || correctIfInvalid(spawnOffsetX, "-0123456789", keyChar, keyID)
- || correctIfInvalid(spawnOffsetZ, "-0123456789", keyChar, keyID)
- || correctIfInvalid(spawnOffsetY, "-0123456789", keyChar, keyID);
- }
- return false;
- }
-
- private boolean correctIfInvalid(GuiTextField guiTextField, char keyChar, int keyID) {
- return correctIfInvalid(guiTextField, "0123456789", keyChar, keyID);
- }
-
- private boolean correctIfInvalid(GuiTextField guiTextField, String retainable, char keyChar, int keyID) {
- if (guiTextField.textboxKeyTyped(keyChar, keyID)) {
- String originalString = guiTextField.getText();
- String numericString = CharMatcher.anyOf(retainable).retainFrom(guiTextField.getText())
- .replaceAll("^0*", "");
- if (!originalString.equals(numericString)) {
- guiTextField.setText(numericString);
- }
- if (guiTextField.getText().length() == 0) {
- guiTextField.setText("0");
- }
- return true;
- }
- return false;
- }
-
- @Override
- public void mouseClicked(GuiLimitedMobSpawner spawnerGUI, Minecraft mc, int par1, int par2, int par3) {
- if (isEnabled) {
- minSpawnDelay.mouseClicked(par1, par2, par3);
- maxSpawnDelay.mouseClicked(par1, par2, par3);
- maxToSpawn.mouseClicked(par1, par2, par3);
- maxNearbyEntities.mouseClicked(par1, par2, par3);
- requiredPlayerRange.mouseClicked(par1, par2, par3);
- spawnRangeVertical.mouseClicked(par1, par2, par3);
- spawnRangeHorizontal.mouseClicked(par1, par2, par3);
- spawnOffsetX.mouseClicked(par1, par2, par3);
- spawnOffsetZ.mouseClicked(par1, par2, par3);
- spawnOffsetY.mouseClicked(par1, par2, par3);
-
- if (par3 == 0 && toggleDebug.mousePressed(mc, par1, par2)) {
- if (parent.limitedMobSpawner.isDebugEnabled()) {
- parent.limitedMobSpawner.setDebugMode(new NBTTagCompound());
- parent.limitedMobSpawner.syncToServer();
- } else {
- NBTTagCompound tagToSave = new NBTTagCompound();
- parent.limitedMobSpawner.writeToNBT(tagToSave);
- parent.limitedMobSpawner.setDebugMode(tagToSave);
- parent.limitedMobSpawner.syncToServer();
- }
- mc.getSoundHandler().playSound(
- PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
- }
- if (par3 == 0 && resetDebug.mousePressed(mc, par1, par2)) {
- if (parent.limitedMobSpawner.isDebugEnabled()) {
- parent.limitedMobSpawner.loadDebugNBT();
- parent.limitedMobSpawner.setDebugMode(new NBTTagCompound());
- parent.limitedMobSpawner.syncToServer();
- parent.loadGuiFromTileEntity();
- }
- mc.getSoundHandler().playSound(
- PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
- }
- }
- }
-
- @Override
- public void mouseHover(int par1, int par2, int par3) {
- if (isEnabled) {
-
- }
- }
-
- @Override
- public void render(Minecraft mc, int par1, int par2, float par3, Point screenSize, Point backgroundSize) {
- if (isEnabled) {
- if (parent.limitedMobSpawner.isDebugEnabled()) {
- toggleDebug.enabled = false;
- toggleDebug.drawButton(mc, par1, par2);
- toggleDebug.enabled = true;
- } else {
- toggleDebug.drawButton(mc, par1, par2);
- }
-
- resetDebug.drawButton(mc, par1, par2);
-
- /* Draw Raw Text */
- mc.fontRenderer.drawString("Spawn Delay [Min / Max]", (screenSize.getX() - backgroundSize.getX()) / 2 + 46,
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26, 4210752); // White: 16777215
- mc.fontRenderer.drawString("Player Activation Range", (screenSize.getX() - backgroundSize.getX()) / 2 + 46,
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26 + 17, 4210752);
- mc.fontRenderer.drawString("Maximum To Spawn", (screenSize.getX() - backgroundSize.getX()) / 2 + 46,
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26 + 17 * 2, 4210752);
- mc.fontRenderer.drawString("Maximum Nearby", (screenSize.getX() - backgroundSize.getX()) / 2 + 46,
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26 + 17 * 3, 4210752);
-
- mc.fontRenderer.drawString("Spawn Range [Hor/Ver]", (screenSize.getX() - backgroundSize.getX()) / 2 + 46,
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26 + 17 * 4, 4210752);
- mc.fontRenderer.drawString("Spawn Offset [X / Z]", (screenSize.getX() - backgroundSize.getX()) / 2 + 46,
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26 + 17 * 5, 4210752);
- mc.fontRenderer.drawString(
- "[Y]",
- (screenSize.getX() - backgroundSize.getX()) / 2 + 46
- + mc.fontRenderer.getStringWidth("Spawn Offset X / "),
- (screenSize.getY() - backgroundSize.getY()) / 2 + 26 + 17 * 6, 4210752);
-
- /* Draw TextBox Background Objects */
- mc.renderEngine.bindTexture(CREATURE_GUI);
- // int textureID = mc.renderEngine.getTexture(DefaultProps.dungeonDiretory+"creaturelistgui.png");
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- // mc.renderEngine.bindTexture(textureID); //TODO: Commented
-
- Point smallBoxImageLocation = new Point(154, 0);
- Point smallBoxSize = new Point(22, 14);
- Point verySmallBoxSize = new Point(22 - 7, 14);
- drawBackgroundBox(new Point(175, 21), screenSize, backgroundSize, smallBoxImageLocation, smallBoxSize);
- drawBackgroundBox(new Point(199, 21), screenSize, backgroundSize, smallBoxImageLocation, smallBoxSize);
- drawBackgroundBox(new Point(199, 21 + 17), screenSize, backgroundSize, smallBoxImageLocation, smallBoxSize);
-
- drawBackgroundBox(new Point(199, 21 + 17 * 2), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
- drawBackgroundBox(new Point(199, 21 + 17 * 3), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
-
- drawBackgroundBox(new Point(175, 21 + 17 * 4), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
- drawBackgroundBox(new Point(199, 21 + 17 * 4), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
-
- drawBackgroundBox(new Point(199, 21 + 17 * 6), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
- drawBackgroundBox(new Point(175, 21 + 17 * 5), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
- drawBackgroundBox(new Point(199, 21 + 17 * 5), screenSize, backgroundSize, smallBoxImageLocation,
- smallBoxSize);
-
- /* Draw Interactive Text Boxes */
- minSpawnDelay.drawTextBox();
- maxSpawnDelay.drawTextBox();
- maxToSpawn.drawTextBox();
- maxNearbyEntities.drawTextBox();
- requiredPlayerRange.drawTextBox();
- spawnRangeVertical.drawTextBox();
- spawnRangeHorizontal.drawTextBox();
- spawnOffsetX.drawTextBox();
- spawnOffsetZ.drawTextBox();
- spawnOffsetY.drawTextBox();
- }
- }
-
- private void drawBackgroundBox(Point position, Point screenSize, Point backgroundSize, Point imageLocation,
- Point imageSize) {
- int xCoord = (screenSize.getX() - backgroundSize.getX()) / 2 + position.getX();
- int yCoord = (screenSize.getY() - backgroundSize.getY()) / 2 + position.getY();
- this.drawTexturedModalRect(xCoord, yCoord, imageLocation.getX(), imageLocation.getY(), imageSize.getX(),
- imageSize.getY());
- }
-
- /**
- * Draws a textured rectangle at the stored z-value. Args: x, y, u, v, width, height
- */
- public void drawTexturedModalRect(int par1, int par2, int par3, int par4, int par5, int par6) {
- float var7 = 0.00390625F;
- float var8 = 0.00390625F;
- float zLevel = 0;
- Tessellator var9 = Tessellator.instance;
- var9.startDrawingQuads();
- var9.addVertexWithUV(par1 + 0, par2 + par6, zLevel, (par3 + 0) * var7, (par4 + par6) * var8);
- var9.addVertexWithUV(par1 + par5, par2 + par6, zLevel, (par3 + par5) * var7, (par4 + par6) * var8);
- var9.addVertexWithUV(par1 + par5, par2 + 0, zLevel, (par3 + par5) * var7, (par4 + 0) * var8);
- var9.addVertexWithUV(par1 + 0, par2 + 0, zLevel, (par3 + 0) * var7, (par4 + 0) * var8);
- var9.draw();
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/d2e07ca0c52100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/d2e07ca0c52100141a6cb1c64d7b6ba1
deleted file mode 100644
index 5a1797e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/d2e07ca0c52100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,297 +0,0 @@
-package projectzulu.common.blocks.spike;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import projectzulu.common.ProjectZulu_Core;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ItemGenerics;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class BlockSpikes extends Block {
-
- public static final String[] imageSuffix = new String[] { "", "_poison", "_sticky" };
- @SideOnly(Side.CLIENT)
- private IIcon[] icons;
- public final int renderID;
-
- public BlockSpikes(int renderID) {
- super(Material.iron);
- setCreativeTab(ProjectZulu_Core.projectZuluCreativeTab);
- disableStats();
- setBlockBounds(0f, 0.0F, 0.0f, 1.0f, 0.5f, 1.0f);
- setHardness(0.5F);
- setStepSound(Block.soundTypeMetal);
- this.renderID = renderID;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public IIcon getIcon(int par1, int par2) {
- if (par2 <= 5) {
- return icons[0];
- } else if (par2 > 5 && par2 <= 11) {
- return icons[1];
- } else {
- return icons[2];
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister par1IconRegister) {
- this.icons = new IIcon[imageSuffix.length];
- for (int i = 0; i < this.icons.length; ++i) {
- this.icons[i] = par1IconRegister.registerIcon(getTextureName() + imageSuffix[i]);
- }
- }
-
- @Override
- public void setBlockBoundsBasedOnState(IBlockAccess par1iBlockAccess, int par2, int par3, int par4) {
- if (par1iBlockAccess.getBlock(par2, par3 - 1, par4) == Blocks.fence
- || par1iBlockAccess.getBlock(par2, par3 - 1, par4) == Blocks.nether_brick_fence) {
- this.setBlockBounds(0.375f, 0.0F, 0.375f, 0.625f, 0.4f, 0.625f);
-
- } else if (par1iBlockAccess.getBlock(par2, par3 - 1, par4) == Blocks.iron_bars) {
-
- boolean isNegZ = canThisPaneConnectToThisBlockID(par1iBlockAccess.getBlock(par2, par3 - 1, par4 - 1));
- boolean isPosZ = canThisPaneConnectToThisBlockID(par1iBlockAccess.getBlock(par2, par3 - 1, par4 + 1));
- boolean isNegX = canThisPaneConnectToThisBlockID(par1iBlockAccess.getBlock(par2 - 1, par3 - 1, par4));
- boolean isPosX = canThisPaneConnectToThisBlockID(par1iBlockAccess.getBlock(par2 + 1, par3 - 1, par4));
-
- float minX = !isNegX ? 0.4f : 0.0f;
- float maxX = !isPosX ? 0.6f : 1.0f;
- float minZ = !isNegZ ? 0.4f : 0.0f;
- float maxZ = !isPosZ ? 0.6f : 1.0f;
-
- if (!isNegZ && !isPosZ && !isNegX && !isPosX) {
- this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 0.4f, 1.0f);
- } else {
- this.setBlockBounds(minX, 0.0f, minZ, maxX, 0.4f, maxZ);
- }
-
- } else {
- switch (par1iBlockAccess.getBlockMetadata(par2, par3, par4)) {
- case 0:
- this.setBlockBounds(0f, 0.0F, 0.0f, 1.0f, 0.5f, 1.0f);
- break;
- case 1:
- this.setBlockBounds(0.0f, 0.0F, 0.0f, 0.5f, 1.0f, 1.0f);
- break;
- case 2:
- this.setBlockBounds(0.0f, 0.0F, 0.0f, 1.0f, 1.0f, 0.5f);
- break;
- case 3:
- this.setBlockBounds(0.5f, 0.0F, 0.0f, 1.0f, 1.0f, 1.0f);
- break;
- case 4:
- this.setBlockBounds(0f, 0.0F, 0.5f, 1.0f, 1.0f, 1.0f);
- break;
- case 5:
- this.setBlockBounds(0f, 0.5F, 0.0f, 1.0f, 1.0f, 1.0f);
- break;
-
- case 6:
- this.setBlockBounds(0f, 0.0F, 0.0f, 1.0f, 0.5f, 1.0f);
- break;
- case 7:
- this.setBlockBounds(0.0f, 0.0F, 0.0f, 0.5f, 1.0f, 1.0f);
- break;
- case 8:
- this.setBlockBounds(0.0f, 0.0F, 0.0f, 1.0f, 1.0f, 1.0f);
- break;
- case 9:
- this.setBlockBounds(0.5f, 0.0F, 0.0f, 1.0f, 1.0f, 1.0f);
- break;
- case 10:
- this.setBlockBounds(0f, 0.0F, 0.5f, 1.0f, 1.0f, 1.0f);
- break;
- case 11:
- this.setBlockBounds(0f, 0.5F, 0.0f, 1.0f, 1.0f, 1.0f);
- break;
-
- default:
- break;
- }
- }
-
- }
-
- @Override
- public int getRenderType() {
- return renderID;
- }
-
- @Override
- public boolean isOpaqueCube() {
- return false;
- }
-
- @Override
- public boolean renderAsNormalBlock() {
- 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
- public int quantityDropped(Random random) {
- return 1;
- }
-
- /**
- * checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
- */
- @Override
- public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) {
- return this.canPlaceBlockAt(par1World, par2, par3, par4);
- }
-
- @Override
- public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) {
-
- if (par5Entity instanceof EntityLiving
- && ((par5Entity.prevPosY > par3 + this.maxY * 0.9f && par5Entity.posY < par3 + this.maxY * 0.9f)
- || (par5Entity.prevPosX > par2 + 0.5 && par5Entity.posX < par2 + 0.5) || (par5Entity.prevPosZ > par4 + 0.5 && par5Entity.posZ < par4 + 0.5))) {
- /* Check if Spikes are Poison, If So Also Apply Posion with Damage */
- if (par1World.getBlockMetadata(par2, par3, par4) > 5 && par1World.getBlockMetadata(par2, par3, par4) < 12) {
- ((EntityLiving) par5Entity).addPotionEffect(new PotionEffect(Potion.poison.id, 40, 1));
- }
- if (par1World.getBlockMetadata(par2, par3, par4) > 11) {
- ((EntityLiving) par5Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 40, 4));
- }
- par5Entity.attackEntityFrom(DamageSource.generic, 2);
- }
-
- super.onEntityCollidedWithBlock(par1World, par2, par3, par4, par5Entity);
- }
-
- @Override
- public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer,
- int par6, float par7, float par8, float par9) {
-
- /* Check if Item is Poison Droplet, is so Make Poisonous */
- if (par5EntityPlayer.inventory.getCurrentItem() != null
- && ItemList.genericCraftingItems.isPresent()
- && par5EntityPlayer.inventory.getCurrentItem().getItem() == ItemList.genericCraftingItems.get()
- && par5EntityPlayer.inventory.getCurrentItem().getItemDamage() == ItemGenerics.Properties.PoisonDroplet
- .meta()
- && (par1World.getBlockMetadata(par2, par3, par4) < 6 || par1World.getBlockMetadata(par2, par3, par4) > 11)) {
-
- /* Consume if Not Creative */
- if (!par5EntityPlayer.capabilities.isCreativeMode) {
- par5EntityPlayer.inventory.getCurrentItem().stackSize = par5EntityPlayer.inventory.getCurrentItem().stackSize - 1;
- }
-
- /* If not Poison (meta<6) increase by 6, if sticky(>11) reduce by 6 */
- if (par1World.getBlockMetadata(par2, par3, par4) < 6) {
- par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) + 6, 3);
- } else {
- par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) - 6, 3);
- }
- }
-
- /* Check if Item is Sticky Droplet, is so Make Sticky */
- if (par5EntityPlayer.inventory.getCurrentItem() != null
- && par5EntityPlayer.inventory.getCurrentItem().getItem() == Items.slime_ball
- && (par1World.getBlockMetadata(par2, par3, par4) < 12)) {
-
- /* Consume if Not Creative */
- if (!par5EntityPlayer.capabilities.isCreativeMode) {
- par5EntityPlayer.inventory.getCurrentItem().stackSize = par5EntityPlayer.inventory.getCurrentItem().stackSize - 1;
- }
-
- /* If not Poison or Sticky (meta<6) increase by 12, if Poison(>6 & <11) increase by 6 */
- if (par1World.getBlockMetadata(par2, par3, par4) < 6) {
- par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) + 12, 3);
- } else {
- par1World.setBlock(par2, par3, par4, this, par1World.getBlockMetadata(par2, par3, par4) + 6, 3);
- }
- }
- return super.onBlockActivated(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9);
- }
-
- /**
- * Copied from BlockPane (Iron Fence). Gets passed in the blockID of the block adjacent and supposed to return true
- * if its allowed to connect to the type of blockID passed in. Args: blockID
- */
- private final boolean canThisPaneConnectToThisBlockID(Block block) {
- return block.isOpaqueCube() || block == Blocks.iron_bars || block == Blocks.glass;
- }
-
- /**
- * Used to Set Metadata as the block is placed called before onBlockPlacedBy by ItemBlock and ItemReed was called
- * void updateBlockMetadata was called int func_85104 ~1.4.5 - 1.4.6 was called int onBlockPlaced ~1.4.7
- */
- @Override
- public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7,
- float par8, int par9) {
- int var9 = par1World.getBlockMetadata(par2, par3, par4);
- if (par5 == 1 && this.canPlaceSpikeOn(par1World, par2, par3 - 1, par4)) {
- var9 = 0;
- }
-
- if (par5 == 2 && this.canPlaceSpikeOn(par1World, par2, par3, par4 + 1)) {
- var9 = 4;
- }
-
- if (par5 == 3 && this.canPlaceSpikeOn(par1World, par2, par3, par4 - 1)) {
- var9 = 2;
- }
-
- if (par5 == 4 && this.canPlaceSpikeOn(par1World, par2 + 1, par3, par4)) {
- var9 = 3;
- }
-
- if (par5 == 5 && this.canPlaceSpikeOn(par1World, par2 - 1, par3, par4)) {
- var9 = 1;
- }
- if (par5 == 0 && this.canPlaceSpikeOn(par1World, par2, par3 + 1, par4)) {
- var9 = 5;
- }
-
- return var9;
- }
-
- /**
- * Determines if a torch can be placed on the top surface of this block. Useful for creating your own block that
- * torches can be on, such as fences.
- *
- * @param world The current world
- * @param x X Position
- * @param y Y Position
- * @param z Z Position
- * @return True to allow the torch to be placed
- */
- public boolean canPlaceSpikeOn(World world, int x, int y, int z) {
- if (World.doesBlockHaveSolidTopSurface(world, x, y, z)) {
- return true;
- } else {
- Block id = world.getBlock(x, y, z);
- return id == Blocks.glass || id == Blocks.piston || id == Blocks.piston_extension
- || id == Blocks.piston_head || id == Blocks.sticky_piston;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e093aefec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e093aefec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index a58e5dd..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e093aefec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entity;
-
-import java.util.EnumSet;
-
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.world.World;
-import projectzulu.common.api.CustomEntityList;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import projectzulu.common.mobs.entityai.EntityAIFlyingWander;
-import projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import projectzulu.common.mobs.entityai.EntityAIWander;
-
-public class EntityPelican extends EntityGenericAnimal {
-
- public EntityPelican(World par1World) {
- super(par1World);
- this.setSize(1.5f, 1.4f);
-
- float moveSpeed = 0.22f;
- CustomEntityList entityEntry = CustomEntityList.getByName(EntityList.getEntityString(this));
- if (entityEntry != null && entityEntry.modData.get().entityProperties != null) {
- // TODO: Switch to this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).getAttributeValue()???
- moveSpeed = entityEntry.modData.get().entityProperties.moveSpeed;
- }
-
- this.maxFlightHeight = 15;
- this.getNavigator().setAvoidsWater(true);
- this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0f, false, 2f * 2f));
- this.tasks.addTask(6, new EntityAIFlyingWander(this, moveSpeed));
- this.tasks.addTask(9, new EntityAIWander(this, 1.0f, 120));
-
- this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, false));
- this.targetTasks.addTask(2,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
- }
-
- @Override
- public boolean defaultGrounded() {
- return false;
- }
-
- /**
- * Called when the mob is falling. Calculates and applies fall damage.
- */
- @Override
- protected void fall(float par1) {
- }
-
- /**
- * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
- * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
- */
- @Override
- protected void updateFallState(double par1, boolean par3) {
- }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- /**
- * Returns the sound this mob makes while it's alive.
- */
- @Override
- protected String getLivingSound() {
- return DefaultProps.coreKey + ":" + DefaultProps.entitySounds + "pelicanliving";
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.coreKey + ":" + DefaultProps.entitySounds + "pelicanhurt";
- }
-
- @Override
- protected void updateAITasks() {
-
- /* Handle Landing */
- if (!isEntityGrounded() && worldObj.isAirBlock((int) this.posX, (int) this.posY - 1, (int) this.posZ)
- && rand.nextInt(200) == 0 && !worldObj.isRemote) {
- this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
- }
-
- /* Handle Takeoff */
- if (isEntityGrounded() && rand.nextInt(800) == 0 && !worldObj.isRemote) {
- this.dataWatcher.updateObject(17, Byte.valueOf((byte) 0));
- }
- /* Take Off If Falling Off Cliff */
- if (isEntityGrounded() && !worldObj.isRemote
- && worldObj.isAirBlock((int) this.posX, (int) this.posY - 1, (int) this.posZ)
- && worldObj.isAirBlock((int) this.posX, (int) this.posY - 2, (int) this.posZ)
- && worldObj.isAirBlock((int) this.posX, (int) this.posY - 3, (int) this.posZ)) {
- this.dataWatcher.updateObject(17, Byte.valueOf((byte) 0));
- }
- super.updateAITasks();
- }
-
- /**
- * Will return how many at most can spawn in a chunk at once.
- */
- @Override
- public int getMaxSpawnedInChunk() {
- return 3;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e0a1f300c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e0a1f300c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 1be34fb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e0a1f300c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,157 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entityai;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.entity.ai.EntityAIBase;
-import net.minecraft.entity.item.EntityXPOrb;
-import net.minecraft.world.World;
-import projectzulu.common.mobs.entity.EntityGenericBreedable;
-
-public class EntityAIMate extends EntityAIBase
-{
- private EntityGenericBreedable theAnimal;
- World theWorld;
- private EntityGenericBreedable targetMate;
-
- /**
- * Delay preventing a baby from spawning immediately when two mate-able animals find each other.
- */
- int spawnBabyDelay = 0;
-
- /** The speed the creature moves at during mating behavior. */
- float moveSpeed;
-
- boolean shouldHop = false;
- int slimeJumpDelay = 0;
-
- public EntityAIMate(EntityGenericBreedable par1EntityAnimal, float par2) {
- this.theAnimal = par1EntityAnimal;
- this.theWorld = par1EntityAnimal.worldObj;
- this.moveSpeed = par2;
- this.setMutexBits(3);
- }
- public EntityAIMate(EntityGenericBreedable par1EntityAnimal, float par2, boolean shouldHop) {
- this(par1EntityAnimal, par2);
- this.shouldHop = shouldHop;
- }
- /**
- * Returns whether the EntityAIBase should begin execution.
- */
- public boolean shouldExecute() {
- if (!this.theAnimal.isInLove()) {
- return false;
- }
- else {
- this.targetMate = this.getNearbyMate();
- return this.targetMate != null;
- }
- }
-
- /**
- * Returns whether an in-progress EntityAIBase should continue executing
- */
- public boolean continueExecuting()
- {
- if(shouldHop){
- tryToHop();
- }
- return this.targetMate.isEntityAlive() && this.targetMate.isInLove() && this.spawnBabyDelay < 60;
- }
-
- /**
- * Resets the task
- */
- public void resetTask()
- {
- this.targetMate = null;
- this.spawnBabyDelay = 0;
- }
-
- /**
- * Updates the task
- */
- public void updateTask()
- {
- this.theAnimal.getLookHelper().setLookPositionWithEntity(this.targetMate, 10.0F, (float)this.theAnimal.getVerticalFaceSpeed());
- this.theAnimal.getNavigator().tryMoveToEntityLiving(this.targetMate, this.moveSpeed);
- ++this.spawnBabyDelay;
-
- if(shouldHop){
- tryToHop();
- }
-
- if (this.spawnBabyDelay == 60)
- {
- this.spawnBaby();
- }
- }
-
- /**
- * Loops through nearby animals and finds another animal of the same type that can be mated with. Returns the first
- * valid mate found.
- */
- private EntityGenericBreedable getNearbyMate() {
- float var1 = 8.0F;
- List var2 = this.theWorld.getEntitiesWithinAABB(this.theAnimal.getClass(), this.theAnimal.boundingBox.expand((double)var1, (double)var1, (double)var1));
- Iterator var3 = var2.iterator();
- EntityGenericBreedable var4;
-
- do {
- if (!var3.hasNext()) {
- return null;
- }
-
- var4 = (EntityGenericBreedable)var3.next();
- }
- while (!this.theAnimal.canMateWith(var4));
-
- return var4;
- }
-
- /**
- * Spawns a baby animal of the same type.
- */
- private void spawnBaby() {
- EntityGenericBreedable var1 = this.theAnimal.getBabyAnimalEntity(this.targetMate);
-
- if (var1 != null) {
- this.theAnimal.setGrowingAge(6000);
- this.targetMate.setGrowingAge(6000);
- this.theAnimal.resetInLove();
- this.targetMate.resetInLove();
- var1.setGrowingAge(-24000);
- var1.setLocationAndAngles(this.theAnimal.posX, this.theAnimal.posY, this.theAnimal.posZ, 0.0F, 0.0F);
- this.theWorld.spawnEntityInWorld(var1);
- Random var2 = this.theAnimal.getRNG();
-
- for (int var3 = 0; var3 < 7; ++var3) {
- double var4 = var2.nextGaussian() * 0.02D;
- double var6 = var2.nextGaussian() * 0.02D;
- double var8 = var2.nextGaussian() * 0.02D;
- this.theWorld.spawnParticle("heart", this.theAnimal.posX + (double)(var2.nextFloat() * this.theAnimal.width * 2.0F) - (double)this.theAnimal.width, this.theAnimal.posY + 0.5D + (double)(var2.nextFloat() * this.theAnimal.height), this.theAnimal.posZ + (double)(var2.nextFloat() * this.theAnimal.width * 2.0F) - (double)this.theAnimal.width, var4, var6, var8);
- }
-
- this.theWorld.spawnEntityInWorld(new EntityXPOrb(this.theWorld, this.theAnimal.posX, this.theAnimal.posY, this.theAnimal.posZ, var2.nextInt(4) + 1));
- }
- }
- public void tryToHop(){
- if (theAnimal.onGround && this.slimeJumpDelay-- <= 0){
- this.slimeJumpDelay = this.getJumpDelay();
-
- theAnimal.getJumpHelper().setJumping();
- theAnimal.getNavigator().setSpeed(moveSpeed);
- }
- else{
- theAnimal.getNavigator().setSpeed(0);
- }
- }
-
- /**
- * Gets the amount of time the slime needs to wait between jumps.
- */
- protected int getJumpDelay(){
- return theAnimal.getRNG().nextInt(20) + 10;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e0eb4cfec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e0eb4cfec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index 8249e3d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/e0eb4cfec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.ngb.projectzulu.common.dungeon.packets;
-
-import ibxm.Player;
-import io.netty.channel.ChannelHandlerContext;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import projectzulu.common.core.PZPacket;
-import projectzulu.common.dungeon.TileEntityLimitedMobSpawner;
-
-public class PacketMobSpawner extends PacketDataStream {
- int entityIDtoSync;
- private int posX;
- private int posY;
- private int posZ;
- private NBTTagCompound customData;
-
- public PacketMobSpawner setPacketData(int xPos, int yPos, int zPos, NBTTagCompound customData) {
- this.posX = xPos;
- this.posY = yPos;
- this.posZ = zPos;
- this.customData = customData;
- return this;
- }
-
- @Override
- protected void writeData(ChannelHandlerContext ctx, DataOutputStream buffer) throws IOException {
- buffer.writeInt(posX);
- buffer.writeInt(posY);
- buffer.writeInt(posZ);
- writeNBTTagCompound(customData, buffer);
- }
-
- @Override
- protected void readData(ChannelHandlerContext ctx, DataInputStream buffer) throws IOException {
- posX = buffer.readInt();
- posY = buffer.readInt();
- posZ = buffer.readInt();
- customData = readNBTTagCompound(buffer);
- }
-
- @Override
- public void handleClientSide(EntityPlayer player) {
- World world = player.getEntityWorld();
- TileEntity tileEntity = world.getTileEntity(posX, posY, posZ);
- if (tileEntity != null && tileEntity instanceof TileEntityLimitedMobSpawner) {
- tileEntity.readFromNBT(customData);
- ((TileEntityLimitedMobSpawner) tileEntity).forceUpdate();
- }
- }
-
- @Override
- public void handleServerSide(EntityPlayer player) {
- World world = player.getEntityWorld();
- TileEntity tileEntity = world.getTileEntity(posX, posY, posZ);
- if (tileEntity != null && tileEntity instanceof TileEntityLimitedMobSpawner) {
- tileEntity.readFromNBT(customData);
- ((TileEntityLimitedMobSpawner) tileEntity).forceUpdate();
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/f0a5f551979a00141f13f9c36e449edd b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/f0a5f551979a00141f13f9c36e449edd
deleted file mode 100644
index 02738ff..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/f0a5f551979a00141f13f9c36e449edd
+++ /dev/null
@@ -1,590 +0,0 @@
-package com.stek101.projectzulu.common;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.logging.Level;
-
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.item.EntityXPOrb;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.DamageSource;
-import net.minecraft.world.GameRules;
-import net.minecraftforge.common.config.Configuration;
-import net.minecraftforge.common.config.Property;
-import net.minecraftforge.event.entity.player.PlayerDropsEvent;
-import net.minecraftforge.event.world.WorldEvent;
-
-import com.google.common.base.Optional;
-import com.stek101.projectzulu.common.api.BlockList;
-import com.stek101.projectzulu.common.blocks.tombstone.TileEntityTombstone;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.core.ObfuscationHelper;
-import com.stek101.projectzulu.common.core.ProjectZuluLog;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DeathGamerules {
- int maxDropXP = 100;
- int percKeptXp = 0;
-
- int armorDeathDamage = 0;
- int inventoryDeathDamage = 0;
- int hotbarDeathDamage = 0;
-
- int armorDropDamage = 0;
- int inventoryDropDamage = 0;
- int hotbarDropDamage = 0;
-
- int armorDropChance = 100;
- int inventoryDropChance = 100;
- int hotbarDropChance = 100;
-
- int armorMaxDrop = 0;
- int inventoryMaxDrop = 0;
- int hotbarMaxDrop = 0;
-
- boolean tombstoneOnDeath = true;
- boolean tombstoneAbsorbDrops = true;
- boolean doDropEvent = true;
-
- boolean keepInventoryDefault = false;
- boolean dropArmorDefault = false;
- boolean dropInventoryDefault = false;
- boolean dropHotbarDefault = false;
- boolean dropXPDefault = false;
-
- /*boolean dropInventory = false;
- boolean dropHotbar = false;
- boolean dropArmor = false;
- boolean dropXP = false;*/
-
-
- private ExperienceRedistributor redistributor;
- private ItemBlacklist itemBlacklist;
-
- public DeathGamerules() {
- redistributor = new ExperienceRedistributor();
- FMLCommonHandler.instance().bus().register(redistributor);
- }
-
- public DeathGamerules loadConfiguration(File modConfigDirectory) {
- itemBlacklist = new ItemBlacklist();
- Configuration config = new Configuration(new File(modConfigDirectory, DefaultProps.configDirectory
- + DefaultProps.defaultConfigFile));
- config.load();
- itemBlacklist.loadFromConfig(config);
-
- tombstoneOnDeath = config.get("General Controls", "Drop Tombstone On Death", tombstoneOnDeath).getBoolean(
- tombstoneOnDeath);
- tombstoneAbsorbDrops = config.get("General Controls", "Tombstone Absorb Drops", tombstoneAbsorbDrops)
- .getBoolean(tombstoneAbsorbDrops);
- doDropEvent = config.get("General Controls", "doDropEvent", doDropEvent).getBoolean(doDropEvent);
-
- String category = "General Controls.gamerule_settings";
- maxDropXP = config
- .get(category + ".Experience", "maxDropXP", 100,
- "Maximum amount XP dropped on Death. The rest is lost if not kept via percKeptXp. 100 is vanilla default")
- .getInt(100);
- keepInventoryDefault = config.get(category, "keepInventoryDefault", false,
- "The Default settings for the keepInventory gamerule").getBoolean(false);
- Property keptXpProperty = config.get(category + ".Experience", "percKeptXp", 0,
- "Percentage of XP (minus dropped amount) kept with the player on respawn.");
- percKeptXp = keptXpProperty.getInt();
- if (percKeptXp < 0 || percKeptXp > 100) {
- percKeptXp = percKeptXp < 0 ? 0 : percKeptXp > 100 ? 100 : percKeptXp;
- keptXpProperty.set(percKeptXp);
- }
- dropArmorDefault = config.get(category + ".Armor", "isEnabledDefault", false,
- "The Default settings for the dropArmor gamerule").getBoolean(false);
- dropInventoryDefault = config.get(category + ".Inventory", "isEnabledDefault", false,
- "The Default settings for the dropInventory gamerule").getBoolean(false);
- dropHotbarDefault = config.get(category + ".Hotbar", "isEnabledDefault", false,
- "The Default settings for the dropHotbar gamerule").getBoolean(false);
- dropXPDefault = config.get(category + ".Experience", "isEnabledDefault", false,
- "The Default settings for the dropXP gamerule").getBoolean(false);
-
- armorDeathDamage = handlePropMinMax(config.get(category + ".Armor", "armorDeathDamage", 0,
- "Percentage of Max durability dealth on Death to armor slot items"), 0, 0, 100);
- inventoryDeathDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDeathDamage", 0,
- "Percentage of Max durability dealth on Death to inventory slot items"), 0, 0, 100);
- hotbarDeathDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDeathDamage", 0,
- "Percentage of Max durability dealth on Death to hotbar slot items"), 0, 0, 100);
-
- armorDropDamage = handlePropMinMax(config.get(category + ".Armor", "armorDropDamage", 0,
- "Percentage of Max durability dealth on Drop to armor slot items"), 0, 0, 100);
- inventoryDropDamage = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropDamage", 0,
- "Percentage of Max durability dealth on Drop to inventory slot items"), 0, 0, 100);
- hotbarDropDamage = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropDamage", 0,
- "Percentage of Max durability dealth on Drop to hotbar slot items"), 0, 0, 100);
-
- armorDropChance = handlePropMinMax(config.get(category + ".Armor", "armorDropChance", 100,
- "Chance that each armor slot item will drop on death"), 100, 0, 100);
- inventoryDropChance = handlePropMinMax(config.get(category + ".Inventory", "inventoryDropChance", 100,
- "Chance that each inventory slot item will drop on death"), 100, 0, 100);
- hotbarDropChance = handlePropMinMax(config.get(category + ".Hotbar", "hotbarDropChance", 100,
- "Chance that each hotbar slot item will drop on death"), 100, 0, 100);
-
- armorMaxDrop = handlePropMinMax(config.get(category + ".Armor", "armorMaxDrop", 0,
- "Max number of armor slot items that can drop on death."), 0, 0, null);
- inventoryMaxDrop = handlePropMinMax(config.get(category + ".Inventory", "inventoryMaxDrop", 0,
- "Max number of inventory slot items that can drop on death"), 0, 0, null);
- hotbarMaxDrop = handlePropMinMax(config.get(category + ".Hotbar", "hotbarMaxDrop", 0,
- "Max number of hotbar slot items that can drop on death"), 0, 0, null);
- config.save();
- return this;
- }
-
- private int handlePropMinMax(Property prop, int value, Integer min, Integer max) {
- value = prop.getInt(value);
- if (min != null && value < min) {
- prop.set(min);
- value = min;
- } else if (max != null && value > max) {
- prop.set(max);
- value = max;
- }
- return value;
- }
-
- @SubscribeEvent
- public void worldLoad(WorldEvent.Load event) {
- GameRules gameRule = event.world.getGameRules();
-
- // if (createGameruleIfAbsent(gameRule, "pzKeepInventory", keepInventoryDefault)) {
- // System.out.println("******** pzKeepInventory rule is not present, creating it.....");
- //
- // gameRule.setOrCreateGameRule("keepInventory", Boolean.toString(keepInventoryDefault));
- // }
-
- //createGameruleIfAbsent(gameRule, "dropInventory", dropInventoryDefault);
- //createGameruleIfAbsent(gameRule, "dropHotbar", dropHotbarDefault);
- //createGameruleIfAbsent(gameRule, "dropArmor", dropArmorDefault);
- //createGameruleIfAbsent(gameRule, "dropXP", dropXPDefault);
- gameRule.setOrCreateGameRule("keepInventory", Boolean.toString(keepInventoryDefault));
- gameRule.setOrCreateGameRule("dropInventory", String.valueOf(dropInventoryDefault));
- gameRule.setOrCreateGameRule("dropHotbar", String.valueOf(dropHotbarDefault));
- gameRule.setOrCreateGameRule("dropArmor", String.valueOf(dropArmorDefault));
- gameRule.setOrCreateGameRule("dropXP", String.valueOf(dropXPDefault));
- }
-
- private boolean createGameruleIfAbsent(GameRules gameRule, String gameruleName, boolean value) {
- boolean added = false;
- if (!gameRule.hasRule(gameruleName)) {
- gameRule.addGameRule(gameruleName, Boolean.toString(value));
- added = true;
- }
- ProjectZuluLog.info("Gamerule %s is set to %s", gameruleName, gameRule.getGameRuleBooleanValue(gameruleName));
- return added;
- }
-
- @SubscribeEvent
- public void onPlayerDeath(PlayerDropsEvent event) {
- ArrayList drops = event.drops;
- int minDistance = 0;
- Optional> tombStoneBlock = BlockList.tombstone;
-
- if (tombStoneBlock.isPresent()) {
- if (event.entity instanceof EntityPlayerMP) {
- GameRules gameRules = event.entity.worldObj.getGameRules();
-
- boolean dropInventory = gameRules.getGameRuleBooleanValue("dropInventory");
- boolean dropHotbar = gameRules.getGameRuleBooleanValue("dropHotbar");
- boolean dropArmor = gameRules.getGameRuleBooleanValue("dropArmor");
- boolean dropXP = gameRules.getGameRuleBooleanValue("dropXP");
-
- String tombmsg ="";
- EntityPlayer player = (EntityPlayer) event.entity;
-
- if (event.source.isExplosion()) {
- minDistance = 10;
- }
-
- TileEntityTombstone tombstone = tombstoneOnDeath ? placeTombstone(player, minDistance) : null;
-
- if (tombstone != null) {
- //tombstone.setSignString(event.source.func_151519_b((EntityPlayer) event.entity).toString());
- tombstone.setSignString("HERE LIES " + event.source.func_151519_b((EntityPlayer) event.entity).getUnformattedTextForChat().toUpperCase());
- }
-
- /* Tombstone will not add drops */
- if (!dropInventory && !dropHotbar && !dropArmor && !dropXP) {
- return;
- }
-
- player.captureDrops = true;
- //player.capturedDrops.clear();
-
- /* Get items/XP to drop and clear them from Player */
- int xpDropped = 0;
-
- if (dropXP) {
- if (!player.worldObj.isRemote) {
- if (maxDropXP + percKeptXp > 100){
- ProjectZuluLog.warning("Warning : The total of MaxDropXP and percKeptXP is greater than 100. Resetting to default");
- maxDropXP = 100;
- percKeptXp = 0;
- }
- //xpDropped = player.experienceTotal;
- System.out.println("total player xp on death : " + player.experienceTotal);
-
- xpDropped = (int) (player.experienceTotal * ((float) maxDropXP/100));
-
- System.out.println("total player xp to drop : " + xpDropped );
- System.out.println("subtotal player xp minus xpDropped : " + (player.experienceTotal - xpDropped));
- System.out.println("player kepXp percent : " + ((float) percKeptXp / 100));
-
- int keptXp = (int) ((player.experienceTotal - xpDropped) * ((float) percKeptXp / 100));
- //xpDropped = xpDropped > maxDropXP ? maxDropXP : xpDropped;
-
- System.out.println("total player xp to keep : " + keptXp );
-
- redistributor.addExperience(player, keptXp >= 0 ? keptXp : 0);
- player.experienceLevel = 0;
- player.experienceTotal = 0;
- player.experience = 0;
- }
- }
-
- List itemsToDrop = new ArrayList();
-
- if (dropArmor) {
- itemsToDrop.addAll(dropArmor(player));
- }
-
- if (dropInventory) {
- itemsToDrop.addAll(dropInventory(player));
- }
-
- if (dropHotbar) {
- itemsToDrop.addAll(dropHotbar(player));
- }
-
- dropItems(player, itemsToDrop);
-
- boolean isCancelled = false;
-
- // Need to understand this lines more but so far feature repair is working...
- // if (doDropEvent) {
- // PlayerDropsEvent dropEvent = createPlayerDropEvent(player, event.source, player.capturedDrops);
- // isCancelled = MinecraftForge.EVENT_BUS.post(dropEvent);
- // }
-
- player.captureDrops = false;
- if (!isCancelled) {
- /* Handler actually Dropping Items or Placing them in Tombstone */
- if (tombstoneAbsorbDrops && tombstone != null) {
- for (EntityItem entityItem : player.capturedDrops) {
- tombstone.addDrop(entityItem.getEntityItem());
- }
- tombstone.experience = xpDropped;
- player.capturedDrops.clear();
- } else {
- if (tombstoneAbsorbDrops) {
- System.out.println("Tombstone could not be placed so items dropping normally.");
- ProjectZuluLog.warning("Tombstone could not be placed so items dropping normally.");
- }
- while (xpDropped > 0) {
- int j = EntityXPOrb.getXPSplit(xpDropped);
- xpDropped -= j;
- player.worldObj.spawnEntityInWorld(new EntityXPOrb(player.worldObj, player.posX, player.posY,
- player.posZ, j));
- }
- for (EntityItem item : player.capturedDrops) {
- player.joinEntityItemWithWorld(item);
- }
- }
- } else {
- System.out.println("Tombstone drop event cancelled");
- ProjectZuluLog.warning("Player drop event was cancelled, so items will not be dropped per convention."
- + "Results may not desireable, consider disabling 'doDropEvent' in the config.");
- }
- }
- }
- }
-
- private void dropItems(EntityPlayer player, List drops) {
- for (ItemStack itemDrop : drops) {
- player.inventory.player.dropPlayerItemWithRandomChoice(itemDrop, true);
- }
- }
-
- private PlayerDropsEvent createPlayerDropEvent(EntityPlayer player, DamageSource damageSource,
- ArrayList drops) {
- int recentlyHit;
- try {
- recentlyHit = ObfuscationHelper.getCatchableFieldFromReflection("field_70718_bc", EntityLivingBase.class,
- player, Integer.class);
- } catch (NoSuchFieldException e) {
- recentlyHit = ObfuscationHelper.getFieldFromReflection("recentlyHit", EntityLivingBase.class, player,
- Integer.class);
- }
- return new PlayerDropsEvent(player, damageSource, player.capturedDrops, recentlyHit > 0);
- }
-
- private TileEntityTombstone placeTombstone(EntityPlayer player, int minDistance) {
- Optional chunkCoordinate = findValidTombstoneLocation(player, minDistance);
- if (chunkCoordinate.isPresent()) {
- /* Place a Tombstone */
- player.worldObj.setBlock(chunkCoordinate.get().posX, chunkCoordinate.get().posY,
- chunkCoordinate.get().posZ, BlockList.tombstone.get());
- TileEntity tileEntity = player.worldObj.getTileEntity(chunkCoordinate.get().posX,
- chunkCoordinate.get().posY, chunkCoordinate.get().posZ);
- StringBuilder sb = new StringBuilder();
- sb.append("A tombstone has been set to mark the 'passing' of ").append(player.getCommandSenderName()).append(" at [");
- sb.append(chunkCoordinate.get().posX).append(", ");
- sb.append(chunkCoordinate.get().posY).append(", ");
- sb.append(chunkCoordinate.get().posZ).append("]");
- player.addChatMessage(new ChatComponentText(sb.toString()));
- if (tileEntity != null && tileEntity instanceof TileEntityTombstone) {
- ProjectZuluLog.debug(Level.INFO, sb.toString());
- return (TileEntityTombstone) tileEntity;
- }
- }
- ProjectZuluLog.warning("Failed to find location to place tombstone at player location {X:%s, Y:%s, Z:%s}",
- player.posX, player.posY, player.posZ);
- return null;
- }
-
- private Optional findValidTombstoneLocation(EntityPlayer player, int minDistance) {
- final int maxRadius = 100;
-
- /** Search an increasing square box (only check edge) for a valid location */
- for (int radius = minDistance; radius < maxRadius; radius++) {
- List validLocations = new ArrayList();
- validLocations.addAll(searchXPlaneAt(-radius, radius, player));
- validLocations.addAll(searchXPlaneAt(radius, radius, player));
- validLocations.addAll(searchZPlaneAt(-radius, radius, player));
- validLocations.addAll(searchZPlaneAt(radius, radius, player));
- validLocations.addAll(searchYPlaneAt(-radius, radius, player));
- validLocations.addAll(searchYPlaneAt(radius, radius, player));
- ChunkCoordinates closestPoint = null;
-
- float bestDistance = 0;
-
- for (ChunkCoordinates chunkCoordinates : validLocations) {
- if (closestPoint != null) {
- float distance = chunkCoordinates.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- if (distance < bestDistance) {
- bestDistance = distance;
- closestPoint = chunkCoordinates;
- }
- } else {
- closestPoint = chunkCoordinates;
- bestDistance = closestPoint.getDistanceSquared((int) player.posX, (int) player.posY,
- (int) player.posZ);
- }
- }
- if (closestPoint != null) {
- return Optional.of(closestPoint);
- }
- }
- return Optional.absent();
- }
-
- private List searchXPlaneAt(int xOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchZPlaneAt(int zOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int yOffset = -radius; yOffset <= radius; yOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private List searchYPlaneAt(int yOffset, int radius, EntityPlayer player) {
- List matches = new ArrayList();
- for (int xOffset = -radius; xOffset <= radius; xOffset++) {
- for (int zOffset = -radius; zOffset <= radius; zOffset++) {
- ChunkCoordinates chunkCoordinates = new ChunkCoordinates((int) (player.posX + xOffset),
- (int) (player.posY + yOffset), (int) (player.posZ + zOffset));
- if (isLocationValid(player, chunkCoordinates.posX, chunkCoordinates.posY, chunkCoordinates.posZ)) {
- matches.add(chunkCoordinates);
- }
- }
- }
- return matches;
- }
-
- private boolean isLocationValid(EntityPlayer player, int posX, int posY, int posZ) {
- if ((player.worldObj.isAirBlock(posX, posY, posZ) || player.worldObj.getBlock(posX, posY, posZ).getMaterial().isReplaceable()) && player.worldObj.getBlock(posX, posY - 1, posZ).isOpaqueCube()
- && !player.worldObj.getBlock(posX, posY, posZ).getMaterial().equals(Material.water))
- {
- return true;
- }
- return false;
- }
-
- private List dropArmor(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.armorInventory.length];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
-
- shuffleArray(placeArray, player.worldObj.rand);
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.armorInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((armorMaxDrop == 0 || countDrops < armorMaxDrop)
- && (armorDropChance - player.worldObj.rand.nextInt(100) >= 1)) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? armorDeathDamage + armorDropDamage : armorDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.armorInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.armorInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private List dropInventory(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- if (player.inventory.mainInventory.length > 8) {
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[player.inventory.mainInventory.length - 9];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i + 9;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
-
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
-
- boolean shouldDrop = false;
- if ((inventoryMaxDrop == 0 || countDrops < inventoryMaxDrop)
- && inventoryDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
-
- int percentDamage = shouldDrop ? inventoryDeathDamage + inventoryDropDamage : inventoryDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
- }
- }
- return itemsToDrop;
- }
-
- private List dropHotbar(EntityPlayer player) {
- List itemsToDrop = new ArrayList();
-
- int inventorySize = player.inventory.mainInventory.length > 9 ? 9 : player.inventory.mainInventory.length;
- /* Array to determine the order the inventory array is processed. */
- int[] placeArray = new int[inventorySize];
- for (int i = 0; i < placeArray.length; i++) {
- placeArray[i] = i;
- }
- shuffleArray(placeArray, player.worldObj.rand);
-
- int countDrops = 0;
- for (int i = 0; i < placeArray.length; ++i) {
- int slot = placeArray[i];
- ItemStack itemStack = player.inventory.mainInventory[slot];
- if (itemStack == null || itemBlacklist.isItemBlacklisted(itemStack)) {
- continue;
- }
- boolean shouldDrop = false;
- if ((hotbarMaxDrop == 0 || countDrops < hotbarMaxDrop)
- && hotbarDropChance - player.worldObj.rand.nextInt(100) >= 1) {
- shouldDrop = true;
- }
- int percentDamage = shouldDrop ? hotbarDeathDamage + hotbarDropDamage : hotbarDeathDamage;
- percentDamage = percentDamage > 100 ? 100 : percentDamage;
- itemStack.attemptDamageItem(itemStack.getMaxDamage() * percentDamage / 100, player.worldObj.rand);
-
- boolean itemDestroyed = itemStack.isItemStackDamageable()
- && itemStack.getItemDamage() > itemStack.getMaxDamage();
- if (itemDestroyed) {
- player.inventory.mainInventory[slot] = null;
- }
-
- if (shouldDrop) {
- if (!itemDestroyed) {
- itemsToDrop.add(itemStack);
- }
- player.inventory.mainInventory[slot] = null;
- countDrops++;
- }
-
- }
- return itemsToDrop;
- }
-
- private void shuffleArray(int[] array, Random random) {
- for (int i = array.length - 1; i >= 0; i--) {
- int index = random.nextInt(i + 1);
- int a = array[index];
- array[index] = array[i];
- array[i] = a;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/f14e43fec72100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/f14e43fec72100141a6cb1c64d7b6ba1
deleted file mode 100644
index cf75075..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/f14e43fec72100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,367 +0,0 @@
-package com.ngb.projectzulu.common.dungeon;
-
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.ResourceLocation;
-
-import org.lwjgl.input.Mouse;
-import org.lwjgl.opengl.GL11;
-
-import projectzulu.common.core.DefaultProps;
-
-public abstract class GuiScrollingList {
- private final Minecraft client;
- protected final int listWidth;
- protected final int listHeight;
- protected final int top;
- protected final int bottom;
- private final int right;
- protected final int left;
- protected final int slotHeight;
- private int scrollUpActionId;
- private int scrollDownActionId;
- protected int mouseX;
- protected int mouseY;
- private float initialMouseClickY = -2.0F;
- private float scrollFactor;
- private float scrollDistance;
- private int selectedIndex = -1;
- private long lastClickTime = 0L;
- private boolean field_25123_p = true;
- private boolean field_27262_q;
- private int field_27261_r;
- public static ResourceLocation background = new ResourceLocation(DefaultProps.dungeonKey, "customspawnerbackground.png");
-
- public GuiScrollingList(Minecraft client, int width, int height, int top, int bottom, int left, int entryHeight) {
- this.client = client;
- this.listWidth = width;
- this.listHeight = height;
- this.top = top;
- this.bottom = bottom;
- this.slotHeight = entryHeight;
- this.left = left;
- this.right = width + this.left;
- }
-
- public void func_27258_a(boolean p_27258_1_) {
- this.field_25123_p = p_27258_1_;
- }
-
- protected void func_27259_a(boolean p_27259_1_, int p_27259_2_) {
- this.field_27262_q = p_27259_1_;
- this.field_27261_r = p_27259_2_;
-
- if (!p_27259_1_) {
- this.field_27261_r = 0;
- }
- }
-
- protected abstract int getSize();
-
- protected abstract void elementClicked(int index, boolean doubleClick);
-
- protected abstract boolean isSelected(int index);
-
- protected int getContentHeight() {
- return this.getSize() * this.slotHeight + this.field_27261_r;
- }
-
- protected abstract void drawBackground();
-
- protected abstract void drawSlot(int var1, int var2, int var3, int var4, Tessellator var5);
-
- protected void func_27260_a(int p_27260_1_, int p_27260_2_, Tessellator p_27260_3_) {
- }
-
- protected void func_27255_a(int p_27255_1_, int p_27255_2_) {
- }
-
- protected void func_27257_b(int p_27257_1_, int p_27257_2_) {
- }
-
- public int func_27256_c(int p_27256_1_, int p_27256_2_) {
- int var3 = this.left + 1;
- int var4 = this.left + this.listWidth - 7;
- int var5 = p_27256_2_ - this.top - this.field_27261_r + (int) this.scrollDistance - 4;
- int var6 = var5 / this.slotHeight;
- return p_27256_1_ >= var3 && p_27256_1_ <= var4 && var6 >= 0 && var5 >= 0 && var6 < this.getSize() ? var6 : -1;
- }
-
- public void registerScrollButtons(List p_22240_1_, int p_22240_2_, int p_22240_3_) {
- this.scrollUpActionId = p_22240_2_;
- this.scrollDownActionId = p_22240_3_;
- }
-
- private void applyScrollLimits() {
- int var1 = this.getContentHeight() - (this.bottom - this.top - 4);
-
- if (var1 < 0) {
- var1 /= 2;
- }
-
- if (this.scrollDistance < 0.0F) {
- this.scrollDistance = 0.0F;
- }
-
- if (this.scrollDistance > var1) {
- this.scrollDistance = var1;
- }
- }
-
- public void actionPerformed(GuiButton button) {
- if (button.enabled) {
- if (button.id == this.scrollUpActionId) {
- this.scrollDistance -= this.slotHeight * 2 / 3;
- this.initialMouseClickY = -2.0F;
- this.applyScrollLimits();
- } else if (button.id == this.scrollDownActionId) {
- this.scrollDistance += this.slotHeight * 2 / 3;
- this.initialMouseClickY = -2.0F;
- this.applyScrollLimits();
- }
- }
- }
-
- public void drawScreen(int mouseX, int mouseY, float p_22243_3_) {
- this.mouseX = mouseX;
- this.mouseY = mouseY;
- this.drawBackground();
- int listLength = this.getSize();
- int scrollBarXStart = this.left + this.listWidth - 6;
- int scrollBarXEnd = scrollBarXStart + 6;
- int boxLeft = this.left;
- int boxRight = scrollBarXStart - 1;
- int var10;
- int var11;
- int var13;
- int var19;
-
- if (Mouse.isButtonDown(0)) {
- if (this.initialMouseClickY == -1.0F) {
- boolean var7 = true;
-
- if (mouseY >= this.top && mouseY <= this.bottom) {
- var10 = mouseY - this.top - this.field_27261_r + (int) this.scrollDistance - 4;
- var11 = var10 / this.slotHeight;
-
- if (mouseX >= boxLeft && mouseX <= boxRight && var11 >= 0 && var10 >= 0 && var11 < listLength) {
- boolean var12 = var11 == this.selectedIndex
- && System.currentTimeMillis() - this.lastClickTime < 250L;
- this.elementClicked(var11, var12);
- this.selectedIndex = var11;
- this.lastClickTime = System.currentTimeMillis();
- } else if (mouseX >= boxLeft && mouseX <= boxRight && var10 < 0) {
- this.func_27255_a(mouseX - boxLeft, mouseY - this.top + (int) this.scrollDistance - 4);
- var7 = false;
- }
-
- if (mouseX >= scrollBarXStart && mouseX <= scrollBarXEnd) {
- this.scrollFactor = -1.0F;
- var19 = this.getContentHeight() - (this.bottom - this.top - 4);
-
- if (var19 < 1) {
- var19 = 1;
- }
-
- var13 = (int) ((float) ((this.bottom - this.top) * (this.bottom - this.top)) / (float) this
- .getContentHeight());
-
- if (var13 < 32) {
- var13 = 32;
- }
-
- if (var13 > this.bottom - this.top - 8) {
- var13 = this.bottom - this.top - 8;
- }
-
- this.scrollFactor /= (float) (this.bottom - this.top - var13) / (float) var19;
- } else {
- this.scrollFactor = 1.0F;
- }
-
- if (var7) {
- this.initialMouseClickY = mouseY;
- } else {
- this.initialMouseClickY = -2.0F;
- }
- } else {
- this.initialMouseClickY = -2.0F;
- }
- } else if (this.initialMouseClickY >= 0.0F) {
- this.scrollDistance -= (mouseY - this.initialMouseClickY) * this.scrollFactor;
- this.initialMouseClickY = mouseY;
- }
- } else {
- while (Mouse.next()) {
- int var16 = Mouse.getEventDWheel();
-
- if (var16 != 0) {
- if (var16 > 0) {
- var16 = -1;
- } else if (var16 < 0) {
- var16 = 1;
- }
-
- this.scrollDistance += var16 * this.slotHeight / 2;
- }
- }
-
- this.initialMouseClickY = -1.0F;
- }
-
- this.applyScrollLimits();
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glDisable(GL11.GL_FOG);
- Tessellator var18 = Tessellator.instance;
- client.renderEngine.bindTexture(getBackgroundTexture());
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- float var17 = 32.0F;
- var18.startDrawingQuads();
- var18.setColorOpaque_I((160 << 16) + (145 << 8) + 114); // 2105376 // //Inv SLot Grey: (139 << 16) + (139 << 8)
- // + 139
- var18.addVertexWithUV(this.left, this.bottom, 0.0D, this.left / var17,
- (this.bottom + (int) this.scrollDistance) / var17);
- var18.addVertexWithUV(this.right, this.bottom, 0.0D, this.right / var17,
- (this.bottom + (int) this.scrollDistance) / var17);
- var18.addVertexWithUV(this.right, this.top, 0.0D, this.right / var17,
- (this.top + (int) this.scrollDistance) / var17);
- var18.addVertexWithUV(this.left, this.top, 0.0D, this.left / var17,
- (this.top + (int) this.scrollDistance) / var17);
- var18.draw();
- // boxRight = this.listWidth / 2 - 92 - 16;
- var10 = this.top + 4 - (int) this.scrollDistance;
-
- if (this.field_27262_q) {
- this.func_27260_a(boxRight, var10, var18);
- }
-
- int var14;
-
- for (var11 = 0; var11 < listLength; ++var11) {
- var19 = var10 + var11 * this.slotHeight + this.field_27261_r;
- var13 = this.slotHeight - 4;
-
- if (var19 <= this.bottom && var19 + var13 >= this.top) {
- if (this.field_25123_p && this.isSelected(var11)) {
- var14 = boxLeft;
- int var15 = boxRight;
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glDisable(GL11.GL_TEXTURE_2D);
- var18.startDrawingQuads();
- var18.setColorOpaque_I(8421504);
- var18.addVertexWithUV(var14, var19 + var13 + 2, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(var15, var19 + var13 + 2, 0.0D, 1.0D, 1.0D);
- var18.addVertexWithUV(var15, var19 - 2, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(var14, var19 - 2, 0.0D, 0.0D, 0.0D);
- var18.setColorOpaque_I(0);
- var18.addVertexWithUV(var14 + 1, var19 + var13 + 1, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(var15 - 1, var19 + var13 + 1, 0.0D, 1.0D, 1.0D);
- var18.addVertexWithUV(var15 - 1, var19 - 1, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(var14 + 1, var19 - 1, 0.0D, 0.0D, 0.0D);
- var18.draw();
- GL11.glEnable(GL11.GL_TEXTURE_2D);
- }
-
- this.drawSlot(var11, boxRight, var19, var13, var18);
- }
- }
-
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- byte var20 = 4;
- // this.overlayBackground(0, this.top, 255, 255);
- // this.overlayBackground(this.bottom, this.listHeight, 255, 255);
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GL11.glDisable(GL11.GL_ALPHA_TEST);
- GL11.glShadeModel(GL11.GL_SMOOTH);
- GL11.glDisable(GL11.GL_TEXTURE_2D);
- var18.startDrawingQuads();
- var18.setColorRGBA_I(0, 0);
- var18.addVertexWithUV(this.left, this.top + var20, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(this.right, this.top + var20, 0.0D, 1.0D, 1.0D);
- var18.setColorRGBA_I(0, 255);
- var18.addVertexWithUV(this.right, this.top, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(this.left, this.top, 0.0D, 0.0D, 0.0D);
- var18.draw();
- var18.startDrawingQuads();
- var18.setColorRGBA_I(0, 255);
- var18.addVertexWithUV(this.left, this.bottom, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(this.right, this.bottom, 0.0D, 1.0D, 1.0D);
- var18.setColorRGBA_I(0, 0);
- var18.addVertexWithUV(this.right, this.bottom - var20, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(this.left, this.bottom - var20, 0.0D, 0.0D, 0.0D);
- var18.draw();
- var19 = this.getContentHeight() - (this.bottom - this.top - 4);
-
- if (var19 > 0) {
- var13 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
-
- if (var13 < 32) {
- var13 = 32;
- }
-
- if (var13 > this.bottom - this.top - 8) {
- var13 = this.bottom - this.top - 8;
- }
-
- var14 = (int) this.scrollDistance * (this.bottom - this.top - var13) / var19 + this.top;
-
- if (var14 < this.top) {
- var14 = this.top;
- }
-
- var18.startDrawingQuads();
- var18.setColorRGBA_I(0, 255);
- var18.addVertexWithUV(scrollBarXStart, this.bottom, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(scrollBarXEnd, this.bottom, 0.0D, 1.0D, 1.0D);
- var18.addVertexWithUV(scrollBarXEnd, this.top, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(scrollBarXStart, this.top, 0.0D, 0.0D, 0.0D);
- var18.draw();
- var18.startDrawingQuads();
- var18.setColorRGBA_I(8421504, 255);
- var18.addVertexWithUV(scrollBarXStart, var14 + var13, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(scrollBarXEnd, var14 + var13, 0.0D, 1.0D, 1.0D);
- var18.addVertexWithUV(scrollBarXEnd, var14, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(scrollBarXStart, var14, 0.0D, 0.0D, 0.0D);
- var18.draw();
- var18.startDrawingQuads();
- var18.setColorRGBA_I(12632256, 255);
- var18.addVertexWithUV(scrollBarXStart, var14 + var13 - 1, 0.0D, 0.0D, 1.0D);
- var18.addVertexWithUV(scrollBarXEnd - 1, var14 + var13 - 1, 0.0D, 1.0D, 1.0D);
- var18.addVertexWithUV(scrollBarXEnd - 1, var14, 0.0D, 1.0D, 0.0D);
- var18.addVertexWithUV(scrollBarXStart, var14, 0.0D, 0.0D, 0.0D);
- var18.draw();
- }
-
- this.func_27257_b(mouseX, mouseY);
- GL11.glEnable(GL11.GL_TEXTURE_2D);
- GL11.glShadeModel(GL11.GL_FLAT);
- GL11.glEnable(GL11.GL_ALPHA_TEST);
- GL11.glDisable(GL11.GL_BLEND);
- }
-
- protected ResourceLocation getBackgroundTexture() {
- return background;
- }
-
- private void overlayBackground(int p_22239_1_, int p_22239_2_, int p_22239_3_, int p_22239_4_) {
- Tessellator var5 = Tessellator.instance;
- client.renderEngine.bindTexture(getBackgroundTexture());
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- float var6 = 32.0F;
- int leftOffset = 300;
- var5.startDrawingQuads();
- var5.setColorRGBA_I(4210752, p_22239_4_);
- var5.addVertexWithUV(0D + leftOffset, p_22239_2_, 0.0D, 0.0D, p_22239_2_ / var6);
- var5.addVertexWithUV((double) this.listWidth + 30 + leftOffset, p_22239_2_, 0.0D,
- (this.listWidth + 30) / var6, p_22239_2_ / var6);
- var5.setColorRGBA_I(4210752, p_22239_3_);
- var5.addVertexWithUV((double) this.listWidth + 30 + leftOffset, p_22239_1_, 0.0D,
- (this.listWidth + 30) / var6, p_22239_1_ / var6);
- var5.addVertexWithUV(0.0D + leftOffset, p_22239_1_, 0.0D, 0.0D, p_22239_1_ / var6);
- var5.draw();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/209cbcf6c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/209cbcf6c42100141fce95f06aba7e85
deleted file mode 100644
index 28ea15e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/209cbcf6c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.ngb.com.ngb.projectzulu.common;
-
-public class CommonProxyProjectZulu {
-
- public int addArmor(String armor) {
- return 0;
- }
-
- public void bossHealthTicker() {
- }
-
- public void registerModelsAndRender() {
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/300ee9f7c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/300ee9f7c42100141fce95f06aba7e85
deleted file mode 100644
index 3393d15..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/300ee9f7c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.ngb.projectzulu.common.world2.randomizer;
-
-import java.awt.Point;
-import java.util.Random;
-
-import com.ngb.projectzulu.common.world2.MazeCell;
-import com.ngb.projectzulu.common.world2.architect.ArchitectBase;
-
-public class SelectedFewRandomizer extends Randomizer {
-
- Random random;
- int maxSelected;
- int selectionChance;
- boolean allowTouching;
-
- public SelectedFewRandomizer(Random random, int maxSelected, int selectionChance, boolean allowTouching) {
- this.random = random;
- this.maxSelected = maxSelected;
- this.selectionChance = selectionChance;
- this.allowTouching = allowTouching;
- }
-
- @Override
- public void randomize(MazeCell[][] cells) {
- int[] indexes = new int[cells.length * cells[0].length];
- for (int i = 0; i < indexes.length; i++) {
- indexes[i] = i;
- }
- shuffleArray(indexes);
-
- int count = 0;
- for (int index : indexes) {
- int i = (int) (index / cells[0].length);
- int k = index % cells[0].length;
- if (random.nextInt(100) <= selectionChance
- && (allowTouching || ArchitectBase.isTouchingAmount(cells, new Point(i, k), 0, 0, true, 1))) {
- cells[i][k].rawState = 1;
- count++;
- if (maxSelected > -1 && count >= maxSelected) {
- return;
- }
- }
- }
- }
-
- private void shuffleArray(int[] array) {
- Random random = new Random();
- for (int i = array.length - 1; i >= 0; i--) {
- int index = random.nextInt(i + 1);
- /* Simple swap */
- int tempValue = array[index];
- array[index] = array[i];
- array[i] = tempValue;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/30d281f5c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/30d281f5c42100141fce95f06aba7e85
deleted file mode 100644
index 2397aa4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/30d281f5c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.ngb.projectzulu.common.mobs.entitydefaults;
-
-import java.util.HashSet;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-import com.ngb.projectzulu.common.api.CustomMobData;
-import com.ngb.projectzulu.common.api.ItemList;
-import com.ngb.projectzulu.common.core.ConfigHelper;
-import com.ngb.projectzulu.common.core.DefaultProps;
-import com.ngb.projectzulu.common.core.ItemGenerics;
-import com.ngb.projectzulu.common.core.entitydeclaration.EntityProperties;
-import com.ngb.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.ngb.projectzulu.common.mobs.entity.EntityHornBill;
-import com.ngb.projectzulu.common.mobs.models.ModelHornBill;
-import com.ngb.projectzulu.common.mobs.renders.RenderGenericLiving;
-import com.ngb.projectzulu.common.mobs.renders.RenderWrapper;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class HornbillDeclaration extends SpawnableDeclaration {
-
- public HornbillDeclaration() {
- super("Horn Bill", 36, EntityHornBill.class, EnumCreatureType.ambient);
- setSpawnProperties(10, 25, 1, 1);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 2);
-
- eggColor1 = (26 << 16) + (19 << 8) + 15;
- eggColor2 = (199 << 16) + (33 << 8) + 14;
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, Items.chicken, 0, 10);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, Items.feather, 0, 8);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.SmallHeart.meta(), 4);
- ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData,
- ItemList.genericCraftingItems, ItemGenerics.Properties.Talon.meta(), 4);
- customMobData.entityProperties = new EntityProperties(20f, 4.0f, 0.22f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- return new RenderGenericLiving(new ModelHornBill(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "hornbill.png"));
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.jungle.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.jungleHills.biomeName);
- defaultBiomesToSpawn.add("Mini Jungle");
- defaultBiomesToSpawn.add("Extreme Jungle");
- defaultBiomesToSpawn.addAll(typeToArray(Type.JUNGLE));
- return defaultBiomesToSpawn;
- }
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/71419101c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/71419101c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index a920d9e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/71419101c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.ngb.projectzulu.common;
-
-import java.io.File;
-
-import projectzulu.common.core.CustomEntityManager;
-import projectzulu.common.core.DefaultProps;
-import projectzulu.common.core.ItemBlockManager;
-import projectzulu.common.core.terrain.FeatureGenerator;
-import projectzulu.common.mobs.entitydefaults.AlligatorDeclaration;
-import projectzulu.common.mobs.entitydefaults.ArmadilloDeclaration;
-import projectzulu.common.mobs.entitydefaults.BearBlackDeclaration;
-import projectzulu.common.mobs.entitydefaults.BearBrownDeclaration;
-import projectzulu.common.mobs.entitydefaults.BearPolarDeclaration;
-import projectzulu.common.mobs.entitydefaults.BeaverDeclaration;
-import projectzulu.common.mobs.entitydefaults.BlueFinchDeclaration;
-import projectzulu.common.mobs.entitydefaults.BoarDeclaration;
-import projectzulu.common.mobs.entitydefaults.CentipedeDeclaration;
-import projectzulu.common.mobs.entitydefaults.EagleDeclaration;
-import projectzulu.common.mobs.entitydefaults.ElephantDeclaration;
-import projectzulu.common.mobs.entitydefaults.FollowerDeclaration;
-import projectzulu.common.mobs.entitydefaults.FoxDeclaration;
-import projectzulu.common.mobs.entitydefaults.FrogDeclaration;
-import projectzulu.common.mobs.entitydefaults.GiraffeDeclaration;
-import projectzulu.common.mobs.entitydefaults.GorillaDeclaration;
-import projectzulu.common.mobs.entitydefaults.GreenFinchDeclaration;
-import projectzulu.common.mobs.entitydefaults.HauntedArmorDeclaration;
-import projectzulu.common.mobs.entitydefaults.HornbillDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseBeigeDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseBlackDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseBrownDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseDarkBlackDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseDarkBrownDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseGreyDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseRandomDeclaration;
-import projectzulu.common.mobs.entitydefaults.HorseWhiteDeclaration;
-import projectzulu.common.mobs.entitydefaults.LizardDeclaration;
-import projectzulu.common.mobs.entitydefaults.LizardSpitDeclaration;
-import projectzulu.common.mobs.entitydefaults.MammothDeclaration;
-import projectzulu.common.mobs.entitydefaults.MimicDeclaration;
-import projectzulu.common.mobs.entitydefaults.MinotaurDeclaration;
-import projectzulu.common.mobs.entitydefaults.MummyDeclaration;
-import projectzulu.common.mobs.entitydefaults.OstrichDeclaration;
-import projectzulu.common.mobs.entitydefaults.PelicanDeclaration;
-import projectzulu.common.mobs.entitydefaults.PenguinDeclaration;
-import projectzulu.common.mobs.entitydefaults.PharaohDeclaration;
-import projectzulu.common.mobs.entitydefaults.RabbitDeclaration;
-import projectzulu.common.mobs.entitydefaults.RedFinchDeclaration;
-import projectzulu.common.mobs.entitydefaults.RhinoDeclaration;
-import projectzulu.common.mobs.entitydefaults.SandwormDeclaration;
-import projectzulu.common.mobs.entitydefaults.TreeEntDeclaration;
-import projectzulu.common.mobs.entitydefaults.VultureDeclaration;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.Mod.Instance;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.event.FMLServerStartedEvent;
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
-
-public class ProjectZulu_Mobs extends BaseModule {
-
- @Override
- public String getIdentifier() {
- return DefaultProps.MobsModId;
- }
-
- @Override
- public void registration(CustomEntityManager manager) {
- manager.addEntity(new ArmadilloDeclaration(), new SandwormDeclaration(), new LizardDeclaration(),
- new LizardSpitDeclaration(), new PharaohDeclaration(), new MummyDeclaration(),
- new VultureDeclaration(), new TreeEntDeclaration(), new MammothDeclaration(), new FoxDeclaration(),
- new BoarDeclaration(), new MimicDeclaration(), new AlligatorDeclaration(), new FrogDeclaration(),
- new PenguinDeclaration(), new BeaverDeclaration(), new BearBlackDeclaration(),
- new BearBrownDeclaration(), new BearPolarDeclaration(), new OstrichDeclaration(),
- new RhinoDeclaration(), new RabbitDeclaration(), new RedFinchDeclaration(),
- new GreenFinchDeclaration(), new BlueFinchDeclaration(), new GorillaDeclaration(),
- new GiraffeDeclaration(), new ElephantDeclaration(), new HorseBeigeDeclaration(),
- new HorseBlackDeclaration(), new HorseBrownDeclaration(), new HorseDarkBlackDeclaration(),
- new HorseDarkBrownDeclaration(), new HorseGreyDeclaration(), new HorseWhiteDeclaration(),
- new EagleDeclaration(), new HornbillDeclaration(), new PelicanDeclaration(), new MinotaurDeclaration(),
- new HauntedArmorDeclaration(), new CentipedeDeclaration(), new FollowerDeclaration(),
- new HorseRandomDeclaration());
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/8023138d619c00141eb99f8dbeb9f10c b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/8023138d619c00141eb99f8dbeb9f10c
deleted file mode 100644
index cbae878..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/8023138d619c00141eb99f8dbeb9f10c
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entitydefaults;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Items;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraftforge.common.BiomeDictionary.Type;
-import net.minecraftforge.common.config.Configuration;
-
-import com.stek101.projectzulu.common.api.CustomMobData;
-import com.stek101.projectzulu.common.core.ConfigHelper;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.core.entitydeclaration.EntityProperties;
-import com.stek101.projectzulu.common.core.entitydeclaration.SpawnableDeclaration;
-import com.stek101.projectzulu.common.mobs.entity.EntityBeetleAS;
-import com.stek101.projectzulu.common.mobs.entity.EntityBeetleBS;
-import com.stek101.projectzulu.common.mobs.entity.EntityBloomDoom;
-import com.stek101.projectzulu.common.mobs.models.ModelBeetleAS;
-import com.stek101.projectzulu.common.mobs.models.ModelBeetleBS;
-import com.stek101.projectzulu.common.mobs.models.ModelBloomDoom;
-import com.stek101.projectzulu.common.mobs.models.ModelFishA;
-import com.stek101.projectzulu.common.mobs.models.ModelSandWorm;
-import com.stek101.projectzulu.common.mobs.renders.RenderGenericIdle;
-import com.stek101.projectzulu.common.mobs.renders.RenderGenericLiving;
-import com.stek101.projectzulu.common.mobs.renders.RenderGenericLivingMT;
-import com.stek101.projectzulu.common.mobs.renders.RenderWrapper;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class BloomDoomDeclaration extends SpawnableDeclaration {
- //private final List entityTextures = new ArrayList ();
-
- public BloomDoomDeclaration() {
- super("BloomDoom", 64, EntityBloomDoom.class, EnumCreatureType.creature);
- setSpawnProperties(10, 5, 1, 1);
- setRegistrationProperties(128, 3, true);
- setDropAmount(0, 1);
-
- eggColor1 = (133 << 16) + (233 << 8) + 0;
- eggColor2 = (101 << 16) + (200 << 8) + 143;
-
- // entityTextures.add("textures/beetlebs1.png");
- // entityTextures.add("textures/beetlebs2.png");
- // entityTextures.add("textures/beetlebs3.png");
- }
-
- @Override
- public void outputDataToList(Configuration config, CustomMobData customMobData) {
- //ConfigHelper.configDropToMobData(config, "MOB CONTROLS." + mobName, customMobData, Items.feather, 0, 8);
- customMobData.entityProperties = new EntityProperties(15f, 3.0f, 0.20f).createFromConfig(config, mobName);
- super.outputDataToList(config, customMobData);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public RenderWrapper getEntityrender(Class extends EntityLivingBase> entityClass) {
- //return new RenderGenericLiving(new ModelBloomDoom(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- // "textures/bloomdoom.png"));
-
- return new RenderGenericIdle(new ModelBloomDoom(), 0.5f, new ResourceLocation(DefaultProps.mobKey,
- "textures/bloomdoom0.png"), new ResourceLocation(DefaultProps.mobKey, "textures/bloomdoomidle.png"));
-
- }
-
- @Override
- public HashSet getDefaultBiomesToSpawn() {
- HashSet defaultBiomesToSpawn = new HashSet();
- defaultBiomesToSpawn.add(BiomeGenBase.forest.biomeName);
- defaultBiomesToSpawn.add(BiomeGenBase.forestHills.biomeName);
- defaultBiomesToSpawn.add("Autumn Woods");
- defaultBiomesToSpawn.add("Birch Forest");
- defaultBiomesToSpawn.add("Forested Hills");
- defaultBiomesToSpawn.add("Forested Island");
- defaultBiomesToSpawn.add("Green Hills");
- defaultBiomesToSpawn.add("Redwood Forest");
- defaultBiomesToSpawn.add("Lush Redwoods");
- defaultBiomesToSpawn.add("Temperate Rainforest");
- defaultBiomesToSpawn.add("Woodlands");
-
- HashSet nonFrozenForest = new HashSet();
- nonFrozenForest.addAll(typeToArray(Type.FOREST));
- nonFrozenForest.addAll(typeToArray(Type.PLAINS));
- nonFrozenForest.removeAll(typeToArray(Type.FROZEN));
- defaultBiomesToSpawn.addAll(nonFrozenForest);
-
- return defaultBiomesToSpawn;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/80efe975729b0014146ffb65627d3cc9 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/80efe975729b0014146ffb65627d3cc9
deleted file mode 100644
index 1b39354..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/80efe975729b0014146ffb65627d3cc9
+++ /dev/null
@@ -1,963 +0,0 @@
-package com.stek101.projectzulu.common.mobs.entity;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.util.EnumSet;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.ai.EntityAILookIdle;
-import net.minecraft.entity.ai.EntityAISwimming;
-import net.minecraft.entity.ai.EntityAIWatchClosest;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.AnimalChest;
-import net.minecraft.inventory.IInvBasic;
-import net.minecraft.inventory.InventoryBasic;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.living.EnderTeleportEvent;
-
-import com.stek101.projectzulu.common.ProjectZulu_Core;
-import com.stek101.projectzulu.common.api.CustomEntityList;
-import com.stek101.projectzulu.common.core.DefaultProps;
-import com.stek101.projectzulu.common.core.packets.PZPacketTameParticle;
-import com.stek101.projectzulu.common.mobs.EntityAFightorFlight;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIAttackOnCollide;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIFollowParent;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIHurtByTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIMate;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAINearestAttackableTarget;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIPanic;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAITempt;
-import com.stek101.projectzulu.common.mobs.entityai.EntityAIWander;
-
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-
-public class EntityCamel extends EntityGenericAnimal implements IInvBasic {
-
- private EntityAFightorFlight EAFF;
- private CustomEntityList entityEntry;
- private float aggroLevel;
- private double aggroRange;
- public boolean camelSaddled;
- public AnimalChest camelChest;
- private static final int[] armorValues = new int[] {0, 5, 7, 11};
- private boolean animalChested;
- protected float jumpPower = 0.0f;
- protected boolean mountJumping;
- public boolean mountJump = false;
- private World parWorld;
- private int field_110285_bP;
-
- public EntityCamel(World par1World) {
- super(par1World);
- setSize(1.6f, 1.8f);
- //animalChested = true;
- this.setChested(false);
- this.setSaddled(false);
- this.camelSaddled = false;
- this.parWorld = par1World;
- this.setPosition(this.posX, this.posY, this.posZ);
- this.entityEntry = CustomEntityList.getByName(EntityList.getEntityString(this));
-
- /* Check if aggroLevel and aggroRange have valid values to activate AFoF */
- if (entityEntry != null && entityEntry.modData.get().entityProperties != null) {
- this.aggroLevel = entityEntry.modData.get().entityProperties.aggroLevel;
- this.aggroRange = entityEntry.modData.get().entityProperties.aggroRange;
- }
-
- if (Math.round(this.aggroRange) != 0) {
- EAFF = new EntityAFightorFlight().setEntity(this, worldObj, this.aggroLevel, this.aggroRange);
- }
-
- getNavigator().setAvoidsWater(true);
- tasks.addTask(0, new EntityAISwimming(this));
- tasks.addTask(1, new EntityAIPanic(this, 1.0f));
- tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0f, false));
- tasks.addTask(3, new EntityAILookIdle(this));
- tasks.addTask(5, new EntityAIMate(this, 0.8f));
- tasks.addTask(6, new EntityAITempt(this, 0.9f, Items.water_bucket, false));
- tasks.addTask(7, new EntityAIFollowParent(this, 0.9f));
- tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
- tasks.addTask(9, new EntityAIWander(this, 0.8f, 120));
-
- targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, false));
- targetTasks.addTask(2,
- new EntityAINearestAttackableTarget(this, EnumSet.of(EntityStates.attacking, EntityStates.looking),
- EntityPlayer.class, 16.0F, 0, true));
- this.createCamelChest();
- }
-
- @Override
- protected void entityInit()
- {
- super.entityInit();
- this.dataWatcher.addObject(22, Integer.valueOf(0)); //mount armor
- this.dataWatcher.addObject(26, Integer.valueOf(0)); //chested aka saddle bags
- }
-
- @Override
- protected boolean isValidLocation(World world, int xCoord, int yCoord, int zCoord) {
- return worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord);
- }
-
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (Math.round(this.aggroRange) != 0) {
- EAFF.updateEntityAFF(worldObj, Items.water_bucket);
- }
- }
-
- /**
- * Returns the sound this mob makes while it's alive.
- */
- @Override
- protected String getLivingSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "camellivingsound";
- }
-
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- @Override
- protected String getHurtSound() {
- return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "camelhurtsound";
- }
-
- @Override
- public int getTalkInterval() {
- return 160;
- }
-
- @Override
- public boolean isValidBreedingItem(ItemStack itemStack) {
- if (itemStack != null && itemStack.getItem() == Item.getItemFromBlock(Blocks.leaves)) {
- this.setAngerLevel(0);
- this.setFleeTick(0);
- return true;
-
- } else {
- return super.isValidBreedingItem(itemStack);
- }
- }
-
- @Override
- public boolean isValidTamingItem(ItemStack itemStack) {
- if (itemStack == null) {
- return false;
- }
-
- if (itemStack.getItem() == Items.water_bucket) {
- return true;
- }
- return super.isValidTamingItem(itemStack);
- }
-
- @Override
- public boolean isRideable() {
- return true;
- }
-
- private void createCamelChest()
- {
- AnimalChest animalchest = this.camelChest;
- this.camelChest = new AnimalChest("CamelChest", 17);
- this.camelChest.func_110133_a(this.getCommandSenderName());
-
- if (animalchest != null)
- {
- animalchest.func_110132_b((IInvBasic) this);
- int i = Math.min(animalchest.getSizeInventory(), this.camelChest.getSizeInventory());
-
- for (int j = 0; j < i; ++j)
- {
- ItemStack itemstack = animalchest.getStackInSlot(j);
-
- if (itemstack != null)
- {
- this.camelChest.setInventorySlotContents(j, itemstack.copy());
- }
- }
- animalchest = null;
- }
-
- this.camelChest.func_110134_a((IInvBasic) this);
- }
-
- public void func_146086_d(ItemStack p_146086_1_)
- {
- this.dataWatcher.updateObject(22, Integer.valueOf(this.getCamelArmorIndex(p_146086_1_)));
- //this.func_110230_cF();
- }
-
- /**
- * 0 = iron, 1 = gold, 2 = diamond
- */
- private int getCamelArmorIndex(ItemStack p_110260_1_)
- {
- if (p_110260_1_ == null)
- {
- return 0;
- }
- else
- {
- Item item = p_110260_1_.getItem();
- return item == Items.iron_horse_armor ? 1 : (item == Items.golden_horse_armor ? 2 : (item == Items.diamond_horse_armor ? 3 : 0));
- }
- }
-
- public void setCamelSaddled(boolean p_110251_1_)
- {
- //this.setHorseWatchableBoolean(4, p_110251_1_);
- this.setSaddled(true);
- }
-
- /**
- * Called by InventoryBasic.onInventoryChanged() on a array that is never filled.
- */
- @Override
- public void onInventoryChanged(InventoryBasic p_76316_1_)
- {
- int i = this.getMountArmorValue();
- boolean flag = this.isCamelSaddled();
- //this.func_110232_cE();
-
- if (this.ticksExisted > 20)
- {
- if (!(p_76316_1_.getStackInSlot(0) == null)) {
- if (p_76316_1_.getStackInSlot(0).getItem() ==Items.saddle){
- this.setSaddled(true);
- this.playSound("mob.horse.leather", 0.5F, 1.0F);
- }
- }else
- {
- this.setSaddled(false);
- }
-
- if (i == 0 && i != this.getMountArmorValue())
- {
- this.playSound("mob.horse.armor", 0.5F, 1.0F);
- }
- else if (i != this.getMountArmorValue())
- {
- this.playSound("mob.horse.armor", 0.5F, 1.0F);
- }
- }
- }
-
- public boolean isCamelSaddled()
- {
- return this.getSaddled();
- }
-
-/* public boolean isChested()
- {
- return this.animalChested;
- }*/
-
- public int getMountArmorValue()
- {
- return this.dataWatcher.getWatchableObjectInt(22);
- }
-
-
-/* public EntityGenericAgeable createChild(EntityGenericAgeable p_90011_1_) {
- //EntityCamel entity = (EntityCamel)p_90011_1_;
- EntityCamel entityCamel1 = new EntityCamel(this.worldObj);
- return entityCamel1;
- //return null;
- }*/
-
- /**
- * Called when the entity is attacked.
- */
- @Override
- public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
- {
- Entity entity = p_70097_1_.getEntity();
- return this.riddenByEntity != null && this.riddenByEntity.equals(entity) ? false : super.attackEntityFrom(p_70097_1_, p_70097_2_);
- }
-
- /**
- * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
- */
- @Override
- public int getTotalArmorValue()
- {
- //return armorValues[this.getMountArmorValue()];
- return 2;
- }
-
- public void dropChests()
- {
- if (!this.worldObj.isRemote && this.isChested())
- {
- this.dropItem(Item.getItemFromBlock(Blocks.chest), 1);
- this.setChested(false);
- }
- }
-
- /* public void setChested(boolean p_110207_1_)
- {
- this.animalChested = p_110207_1_;
- }*/
-
- @Override
- public boolean shouldNotifySimilar(EntityPlayer attackingPlayer) {
- return true;
- }
-
- /**
- * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
- */
- @Override
- public boolean interact(EntityPlayer p_70085_1_)
- {
- ItemStack itemstack = p_70085_1_.inventory.getCurrentItem();
-
- if(this.isTamed()){
- if (itemstack != null && itemstack.getItem() == Items.spawn_egg)
- {
- return super.interact(p_70085_1_);
- }
-
- else
- if (this.isAdultCamel() && p_70085_1_.isSneaking())
- {
- this.openGUI(p_70085_1_);
- return true;
- }
- else if (this.isAdultCamel() && this.riddenByEntity != null)
- {
- return super.interact(p_70085_1_);
- }
- else if (itemstack != null && this.isValidBreedingItem(itemstack))
- {
- return super.interact(p_70085_1_);
- }
- else
- {
- if (itemstack != null)
- {
- boolean flag = false;
-
- // if (this.func_110259_cr())
- // {
- byte b0 = -1;
-
- if (itemstack.getItem() == Items.stick)
- {
- b0 = 1;
- }
-
- /* if (itemstack.getItem() == Items.iron_horse_armor)
- {
- b0 = 1;
- }
- else if (itemstack.getItem() == Items.golden_horse_armor)
- {
- b0 = 2;
- }
- else if (itemstack.getItem() == Items.diamond_horse_armor)
- {
- b0 = 3;
- }*/
-
- if (b0 >= 0)
- {
- this.openGUI(p_70085_1_);
- return true;
- }
- // }
-
- if (!flag )
- {
- float f = 0.0F;
- short short1 = 0;
- byte b1 = 0;
-
- if (itemstack.getItem() == Items.wheat)
- {
- f = 2.0F;
- short1 = 60;
- b1 = 3;
- }
- else if (itemstack.getItem() == Items.sugar)
- {
- f = 1.0F;
- short1 = 30;
- b1 = 3;
- }
- else if (itemstack.getItem() == Items.bread)
- {
- f = 7.0F;
- short1 = 180;
- b1 = 3;
- }
- else if (Block.getBlockFromItem(itemstack.getItem()) == Blocks.hay_block)
- {
- f = 20.0F;
- short1 = 180;
- }
- else if (itemstack.getItem() == Items.apple)
- {
- f = 3.0F;
- short1 = 60;
- b1 = 3;
- }
- else if (itemstack.getItem() == Items.golden_carrot)
- {
- f = 4.0F;
- short1 = 60;
- b1 = 5;
-
- if (this.isTamed() && this.getGrowingAge() == 0)
- {
- flag = true;
- //this.func_146082_f(p_70085_1_);
- }
- }
- else if (itemstack.getItem() == Items.golden_apple) {
-
- f = 10.0F;
- short1 = 240;
- b1 = 10;
-
- if (this.isTamed() && this.getGrowingAge() == 0)
- {
- flag = true;
- //this.func_146082_f(p_70085_1_);
- }
- }
-
- if (this.getHealth() < this.getMaxHealth() && f > 0.0F)
- {
- this.heal(f);
- flag = true;
- }
-
- /*if (!this.isAdultHorse() && short1 > 0)
- {
- this.addGrowth(short1);
- flag = true;
- }*/
-
- /*if (b1 > 0 && (flag || !this.isTamed()))
- {
- flag = true;
- this.increaseTemper(b1);
- }*/
-
- if (flag)
- {
- this.worldObj.playSoundAtEntity(this, "eating", 1.0F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
- }
- }
-
- if (!flag && !this.isChested() && itemstack.getItem() == Item.getItemFromBlock(Blocks.chest))
- {
- this.setChested(true);
- this.playSound("mob.chickenplop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
- flag = true;
- this.createCamelChest();
- }
-
- if (!flag && this.func_110253_bW() && !this.isCamelSaddled() && itemstack.getItem() == Items.saddle)
- {
- this.openGUI(p_70085_1_);
- return true;
- }
-
- if (flag)
- {
- if (!p_70085_1_.capabilities.isCreativeMode && --itemstack.stackSize == 0)
- {
- p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack)null);
- }
-
- return true;
- }
- }
-
- if (this.func_110253_bW() && this.riddenByEntity == null)
- {
- if (itemstack != null && itemstack.interactWithEntity(p_70085_1_, this))
- {
- return true;
- }
- else
- {
- this.func_110237_h(p_70085_1_);
- return true;
- }
- }
- else
- {
- return super.interact(p_70085_1_);
- }
- }
- }
- else if (itemstack != null && itemstack.getItem() == Items.saddle )
- {
- return false;
- }
- else if (itemstack != null && itemstack.getItem() == Item.getItemFromBlock(Blocks.chest))
- {
- return false;
- }
- else if(itemstack != null && this.isValidTamingItem(itemstack)) {
- if (!p_70085_1_.capabilities.isCreativeMode){
- p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem,
- new ItemStack(Items.bucket));
- }
-
- if (itemstack.stackSize <= 0){
- p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack)null);
- }
-
- if(!worldObj.isRemote){
- boolean tameEffectSuccess = false;
-
- if(rand.nextInt(3) == 0){
- this.setTamed(true);
- this.setAttackTarget((EntityLiving)null);
- this.setHealth(getMaxHealth());
- this.setOwner(p_70085_1_.getCommandSenderName());
- setEntityTamed(getDefaultEntityName());
- tameEffectSuccess = true;
- }
-
- /* Send Tame Effect Packet */
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- DataOutputStream data = new DataOutputStream(bytes);
- /* Write PacketID into Packet */
- try {
- data.writeInt(5);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- /* Write Temperature Into Packet */
- try {
- data.writeInt(getEntityId());
- data.writeBoolean(tameEffectSuccess);
- } catch (Exception e) {
- e.printStackTrace();
- }
- PZPacketTameParticle message = new PZPacketTameParticle().setPacketData(getEntityId(), tameEffectSuccess);
- ProjectZulu_Core.packetHandler.sendToAllAround(message, new TargetPoint(dimension, posX, posY, posZ, 10));
- }
- return true;
- }
- if(super.interact(p_70085_1_)){
- return true;
- }
-
- return false;
- }
-
- public boolean isAdultCamel()
- {
- return !this.isChild();
- }
-
- public void openGUI(EntityPlayer player)
- {
- if (!this.worldObj.isRemote && (this.riddenByEntity == null || this.riddenByEntity == player) && this.isTamed())
- {
- this.camelChest.func_110133_a(this.getCommandSenderName());
- if (player.inventory == null){
- }
-
- if (this.camelChest == null) {
- }
- player.openGui(ProjectZulu_Core.modInstance, 5, player.worldObj, this.getEntityId(), 0, 0);
- }
- }
-
- /**
- * Gets the name of this command sender (usually username, but possibly "Rcon")
- */
- public String getCommandSenderName()
- {
- //if (this.hasCustomNameTag())
- //{
- return this.getCustomNameTag();
- //}
-
- }
-
- public boolean func_110253_bW()
- {
- return this.isAdultCamel();
- }
-
- private void func_110237_h(EntityPlayer p_110237_1_)
- {
- p_110237_1_.rotationYaw = this.rotationYaw;
- p_110237_1_.rotationPitch = this.rotationPitch;
-
- if (!this.worldObj.isRemote)
- {
- p_110237_1_.mountEntity(this);
- }
- }
-
- public static boolean func_146085_a(Item p_146085_0_)
- {
- return p_146085_0_ == Items.iron_horse_armor || p_146085_0_ == Items.golden_horse_armor || p_146085_0_ == Items.diamond_horse_armor;
- }
-
- /**
- * (abstract) Protected helper method to write subclass entity data to NBT.
- */
- @Override
- public void writeEntityToNBT(NBTTagCompound p_70014_1_)
- {
- super.writeEntityToNBT(p_70014_1_);
- p_70014_1_.setBoolean("ChestedCamel", this.isChested());
-
- if (this.isChested())
- {
- NBTTagList nbttaglist = new NBTTagList();
-
- for (int i = 2; i < this.camelChest.getSizeInventory(); ++i)
- {
- ItemStack itemstack = this.camelChest.getStackInSlot(i);
-
- if (itemstack != null)
- {
- NBTTagCompound nbttagcompound1 = new NBTTagCompound();
- nbttagcompound1.setByte("Slot", (byte)i);
- itemstack.writeToNBT(nbttagcompound1);
- nbttaglist.appendTag(nbttagcompound1);
- }
- }
-
- p_70014_1_.setTag("Items", nbttaglist);
- }
-
- if (this.camelChest.getStackInSlot(1) != null)
- {
- p_70014_1_.setTag("ArmorItem", this.camelChest.getStackInSlot(1).writeToNBT(new NBTTagCompound()));
- }
-
- if (this.camelChest.getStackInSlot(0) != null)
- {
- p_70014_1_.setTag("SaddleItem", this.camelChest.getStackInSlot(0).writeToNBT(new NBTTagCompound()));
- }
- }
-
- /**
- * (abstract) Protected helper method to read subclass entity data from NBT.
- */
- @Override
- public void readEntityFromNBT(NBTTagCompound p_70037_1_)
- {
- super.readEntityFromNBT(p_70037_1_);
- this.setChested(p_70037_1_.getBoolean("ChestedCamel"));
-
- if (this.isChested())
- {
- NBTTagList nbttaglist = p_70037_1_.getTagList("Items", 10);
- this.createCamelChest();
-
- for (int i = 0; i < nbttaglist.tagCount(); ++i)
- {
- NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
- int j = nbttagcompound1.getByte("Slot") & 255;
-
- if (j >= 2 && j < this.camelChest.getSizeInventory())
- {
- this.camelChest.setInventorySlotContents(j, ItemStack.loadItemStackFromNBT(nbttagcompound1));
- }
- }
- }
-
- ItemStack itemstack;
-
- /* if (p_70037_1_.hasKey("ArmorItem", 10))
- {
- itemstack = ItemStack.loadItemStackFromNBT(p_70037_1_.getCompoundTag("ArmorItem"));
-
- if (itemstack != null && func_146085_a(itemstack.getItem()))
- {
- this.camelChest.setInventorySlotContents(1, itemstack);
- }
- }*/
-
- if (p_70037_1_.hasKey("SaddleItem", 10))
- {
- itemstack = ItemStack.loadItemStackFromNBT(p_70037_1_.getCompoundTag("SaddleItem"));
-
- if (itemstack != null && itemstack.getItem() == Items.saddle)
- {
- this.camelChest.setInventorySlotContents(0, itemstack);
- }
- }
- else if (p_70037_1_.getBoolean("Saddle"))
- {
- this.camelChest.setInventorySlotContents(0, new ItemStack(Items.saddle));
- }
- }
-
- /**
- * Moves the entity based on the specified heading. Args: strafe, forward
- */
- @Override
- public void moveEntityWithHeading(float moveStrafe, float moveForward)
- {
-
- if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityLivingBase
- && this.getSaddled())
- {
- // Apply Rider Movement:
- EntityLivingBase rider = (EntityLivingBase)this.riddenByEntity;
-
- this.prevRotationYaw = this.rotationYaw = rider.rotationYaw;
- this.rotationPitch = rider.rotationPitch * 0.5F;
- this.setRotation(this.rotationYaw, this.rotationPitch);
- this.rotationYawHead = this.renderYawOffset = this.rotationYaw;
- moveStrafe = ((EntityLivingBase)rider).moveStrafing * 0.5F;
- moveForward = ((EntityLivingBase)rider).moveForward;
-
- // Jumping Controls:
- if(!this.isMountJumping() && this.onGround) {
- if(this.riddenByEntity instanceof EntityPlayer) {
- EntityPlayer player = (EntityPlayer)this.riddenByEntity;
- //ExtendedPlayer playerExt = ExtendedPlayer.getForPlayer(player);
- if(this.mountJump)
- this.startJumping();
- }
- }
-
- // Jumping Behaviour:
- if(this.getJumpPower() > 0.0F && !this.isMountJumping() && this.onGround) {
- this.motionY = this.getMountJumpHeight() * (double)this.getJumpPower();
- if(this.isPotionActive(Potion.jump))
- this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
- this.setMountJumping(true);
- this.isAirBorne = true;
- if(moveForward > 0.0F) {
- float f2 = MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F);
- float f3 = MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F);
- this.motionX += (double)(-0.4F * f2 * this.jumpPower);
- this.motionZ += (double)(0.4F * f3 * this.jumpPower);
- }
- if(!this.worldObj.isRemote)
- this.playSound("mob.horse.jump", 0.4F, 1.0F);
- this.setJumpPower(0);
- }
- //this.jumpMovementFactor = (float)(this.getAIMoveSpeed() * this.getGlideScale());
- this.stepHeight = 1.0F;
- this.jumpMovementFactor = this.getAIMoveSpeed() * 0.1F;
-
- // Apply Movement:
- if(!this.worldObj.isRemote) {
- this.setAIMoveSpeed((float)this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue());
- super.moveEntityWithHeading(moveStrafe, moveForward);
- }
-
- // Clear Jumping:
- if(this.onGround) {
- this.setJumpPower(0);
- this.setMountJumping(false);
- this.mountJump = false;
- }
-
- // Animate Limbs:
- this.prevLimbSwingAmount = this.limbSwingAmount;
- double d0 = this.posX - this.prevPosX;
- double d1 = this.posZ - this.prevPosZ;
- float f4 = MathHelper.sqrt_double(d0 * d0 + d1 * d1) * 4.0F;
- if (f4 > 1.0F)
- f4 = 1.0F;
- this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F;
- this.limbSwing += this.limbSwingAmount;
- }
- else
- {
- this.stepHeight = 0.5F;
- this.jumpMovementFactor = 0.02F;
- super.moveEntityWithHeading(moveStrafe, moveForward);
- }
- }
-
- /**
- * returns true if all the conditions for steering the entity are met. For pigs, this is true if it is being ridden
- * by a player and the player is holding a carrot-on-a-stick
- */
- @Override
- public boolean canBeSteered()
- {
- return false;
- }
-
- /**
- * Called when the mob's health reaches 0.
- */
- @Override
- public void onDeath(DamageSource p_70645_1_)
- {
- super.onDeath(p_70645_1_);
-
- if (!this.worldObj.isRemote)
- {
- this.dropChestItems();
- }
- }
-
- public void dropChestItems()
- {
- this.dropItemsInChest(this, this.camelChest);
- this.dropChests();
- }
-
- private void dropItemsInChest(Entity p_110240_1_, AnimalChest p_110240_2_)
- {
- if (p_110240_2_ != null && !this.worldObj.isRemote)
- {
- for (int i = 0; i < p_110240_2_.getSizeInventory(); ++i)
- {
- ItemStack itemstack = p_110240_2_.getStackInSlot(i);
-
- if (itemstack != null)
- {
- this.entityDropItem(itemstack, 0.0F);
- }
- }
- }
- }
-
- /**
- * Returns true if this entity should push and be pushed by other entities when colliding.
- */
- @Override
- public boolean canBePushed()
- {
- return this.riddenByEntity == null;
- }
-
- @Override
- public double getMountedYOffset() {
- return 2.6f;
- }
-
- // ========== Jumping Start ==========
- public void startJumping() {
- this.setJumpPower();
- }
-
- // ========== Jump Power ==========
- public void setJumpPower(int power) {
- if(power < 0)
- power = 0;
- if(power > 99)
- power = 99;
- if(power < 90)
- this.jumpPower = 1.0F * ((float)power / 89.0F);
- else
- this.jumpPower = 1.0F + (1.0F * ((float)(power - 89) / 10.0F));
- }
-
- public void setJumpPower() {
- this.setJumpPower(89);
- }
-
- public float getJumpPower() {
- return this.jumpPower;
- }
-
- // ========== Gliding ==========
- public double getGlideScale() {
- return 0.1F;
- }
-
- // ========== Jumping ==========
- public double getMountJumpHeight() {
- return 0.5D;
- }
-
- public boolean isMountJumping() {
- return this.mountJumping;
- }
-
- public void setMountJumping(boolean set) {
- this.mountJumping = set;
- }
-
- public void setMountJump(){
- this.mountJump = true;
- }
-
- private boolean getCamelWatchableBoolean(int p_110233_1_)
- {
- return (this.dataWatcher.getWatchableObjectInt(26) & p_110233_1_) != 0;
- }
-
- private void setCamelWatchableBoolean(int p_110208_1_, boolean p_110208_2_)
- {
- int j = this.dataWatcher.getWatchableObjectInt(26);
-
- if (p_110208_2_)
- {
- this.dataWatcher.updateObject(26, Integer.valueOf(j | p_110208_1_));
- }
- else
- {
- this.dataWatcher.updateObject(26, Integer.valueOf(j & ~p_110208_1_));
- }
- }
-
- public boolean isChested()
- {
- return this.getCamelWatchableBoolean(8);
- }
-
- public void setChested(boolean p_110207_1_)
- {
- this.setCamelWatchableBoolean(8, p_110207_1_);
- }
-
- public void riderDismount(){
- if (!this.worldObj.isRemote)
- {
- if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayerMP)
- {
- EntityPlayerMP entityplayermp = (EntityPlayerMP)this.riddenByEntity;
-
- if (entityplayermp.playerNetServerHandler.func_147362_b().isChannelOpen() && entityplayermp.worldObj == this.worldObj)
- {
- EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
- if (!MinecraftForge.EVENT_BUS.post(event))
- { // Don't indent to lower patch size
- // if (this.getThrower().isRiding())
- // {
- // this.getThrower().mountEntity((Entity)null);
- // }
-
- this.riddenByEntity.setPosition(this.posX + 1, this.posY + 1, this.posZ);
- this.riddenByEntity.fallDistance = 0.0F;
- this.riddenByEntity.attackEntityFrom(DamageSource.fall, event.attackDamage);
- }
- }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/91dcb9e4c42100141fce95f06aba7e85 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/91dcb9e4c42100141fce95f06aba7e85
deleted file mode 100644
index 6947281..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/91dcb9e4c42100141fce95f06aba7e85
+++ /dev/null
@@ -1,122 +0,0 @@
-package projectzulu.common.dungeon.commands;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.command.CommandBase;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.command.NumberInvalidException;
-import net.minecraft.command.PlayerNotFoundException;
-import net.minecraft.command.WrongUsageException;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.server.MinecraftServer;
-
-public class CommandPlaceBlock extends CommandBase {
- @Override
- public String getCommandName() {
- return "placeblock";
- }
-
- /**
- * Return the required permission level for this command.
- */
- @Override
- public int getRequiredPermissionLevel() {
- return 2;
- }
-
- /**
- * Command stringArgs : /placeblock [targetPlayer] [blockID] Command stringArgs == 2: /placeblock @p
- * blockID Command stringArgs == 3: /placeblock @p blockID Command stringArgs == 5: /placeblock @p blockID
- * Command stringArgs == 6: /placeblock @p blockID
- */
- @Override
- public void processCommand(ICommandSender commandSender, String[] stringArgs) {
- if (stringArgs.length < 2) {
- throw new WrongUsageException("commands.placeblock.usage", new Object[0]);
- } else {
- int targetX = 0;
- int targetY = 0;
- int targetZ = 0;
- int blockMeta = 0;
- EntityPlayerMP targetPlayer = getPlayer(commandSender, stringArgs[0]);
- if (targetPlayer == null) {
- throw new PlayerNotFoundException();
- }
-
- Block blockToPlace = Block.getBlockFromName(stringArgs[1]);
- if (blockToPlace == null) {
- throw new WrongUsageException("commands.placeblock.noblock", new Object[0]);
- }
-
- if (stringArgs.length == 3 || stringArgs.length == 6) {
- blockMeta = parseIntBounded(commandSender, stringArgs[2], 0, 4095);
- }
-
- if (stringArgs.length == 2 || stringArgs.length == 3) {
- targetX = (int) targetPlayer.posX;
- targetY = (int) targetPlayer.posY;
- targetZ = (int) targetPlayer.posZ;
- } else if (stringArgs.length == 5 || stringArgs.length == 6) {
- int indexOfPos = stringArgs.length - 3;
- targetX = (int) parsePosition(commandSender, targetPlayer.posX, stringArgs[indexOfPos++]);
- targetY = (int) parsePositionWithBounds(commandSender, targetPlayer.posY, stringArgs[indexOfPos++], 0,
- 0);
- targetZ = (int) parsePosition(commandSender, targetPlayer.posZ, stringArgs[indexOfPos++]);
- }
-
- targetPlayer.worldObj.setBlock(targetX, targetY, targetZ, blockToPlace, blockMeta, 3);
- }
- }
-
- @Override
- public String getCommandUsage(ICommandSender par1ICommandSender) {
- return "commands.spawnentity.usage";
- }
-
- /**
- * Adds the strings available in this command to the given list of tab completion options.
- */
- @Override
- public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) {
- return par2ArrayOfStr.length != 1 && par2ArrayOfStr.length != 2 ? null : getListOfStringsMatchingLastWord(
- par2ArrayOfStr, MinecraftServer.getServer().getAllUsernames());
- }
-
- private double parsePosition(ICommandSender commandSender, double currentPos, String stringDouble) {
- return this.parsePositionWithBounds(commandSender, currentPos, stringDouble, -30000000, 30000000);
- }
-
- private double parsePositionWithBounds(ICommandSender commandSender, double currentPos, String stringDouble,
- int lowerLimit, int upperLimit) {
- boolean isRelativeCoords = stringDouble.startsWith("~");
- double targetPos = isRelativeCoords ? currentPos : 0.0D;
-
- if (!isRelativeCoords || stringDouble.length() > 1) {
- boolean hasDecimal = stringDouble.contains(".");
-
- if (isRelativeCoords) {
- stringDouble = stringDouble.substring(1);
- }
-
- targetPos += parseDouble(commandSender, stringDouble);
-
- if (!hasDecimal && !isRelativeCoords) {
- targetPos += 0.5D;
- }
- }
-
- if (lowerLimit != 0 || upperLimit != 0) {
- if (targetPos < lowerLimit) {
- throw new NumberInvalidException("commands.generic.double.tooSmall", new Object[] {
- Double.valueOf(targetPos), Integer.valueOf(lowerLimit) });
- }
-
- if (targetPos > upperLimit) {
- throw new NumberInvalidException("commands.generic.double.tooBig", new Object[] {
- Double.valueOf(targetPos), Integer.valueOf(upperLimit) });
- }
- }
- return targetPos;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/a09f8001c82100141a6cb1c64d7b6ba1 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/a09f8001c82100141a6cb1c64d7b6ba1
deleted file mode 100644
index 0a66870..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/17/a09f8001c82100141a6cb1c64d7b6ba1
+++ /dev/null
@@ -1,290 +0,0 @@
-package com.ngb.projectzulu.common.potion.subitem;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityPotion;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.World;
-import projectzulu.common.api.ItemList;
-import projectzulu.common.core.ItemGenerics.Properties;
-import projectzulu.common.potion.EntityPZPotion;
-import projectzulu.common.potion.PotionParser;
-
-import com.google.common.base.Optional;
-
-public abstract class SubItemPotionGeneric extends SubItemPotion {
-
- protected int maxLevel = 2;
- protected int maxDuration = 2;
- protected int maxPower = 2;
- /* Forms This Potion can Take. 0 = Regular and Splash, 1 == Regular Only, 2 == Only Splash */
- protected int type = 2;
-
- protected int initialTicks = 0;
- protected int ticksPerLevel = 10;
- protected int durationScale = 12;
- protected int durationSpread = 10;
- protected int powerPerLevel = 1;
-
- protected String[] strengthPrefixes = new String[] { "", "Thickened", "Strengthened", "Fortified" };
- protected String[] durationPrefixes = new String[] { "", "Extended", "Prolonged", "Continuous" };
-
- protected String[] durationPostfixes = new String[] { "", "of Extended", "of Prolonged", "of Continuous" };
- protected String[] strengthPostfixes = new String[] { "", "Thickness", "Strength", "Fortification" };
-
- enum TYPE {
- CHEMICAL, POWER, DURATION, TIER, SPLASH, NONE;
- }
-
- SubItemPotionGeneric(Item item, int subID, String baseName) {
- super(item, subID, baseName);
- }
-
- @Override
- public void register() {
-
- }
-
- @Override
- public final ItemStack getPotionResult(ItemStack ingredient, ItemStack brewingStack) {
- switch (getIngredientType(ingredient, brewingStack)) {
- case POWER: {
- int power = PotionParser.readPower(brewingStack.getItemDamage());
- int duration = PotionParser.readDuration(brewingStack.getItemDamage());
- int metaDamage = brewingStack.getItemDamage();
- if (power < maxPower - 1) {
- if (duration > 0) {
- metaDamage = PotionParser.setDuration(duration - 1, metaDamage);
- }
- return new ItemStack(brewingStack.getItem(), brewingStack.stackSize, PotionParser.setPower(power + 1,
- metaDamage));
- }
- break;
- }
- case DURATION: {
- int power = PotionParser.readPower(brewingStack.getItemDamage());
- int duration = PotionParser.readDuration(brewingStack.getItemDamage());
- int metaDamage = brewingStack.getItemDamage();
- if (duration < maxDuration - 1) {
- if (power > 0) {
- metaDamage = PotionParser.setPower(power - 1, metaDamage);
- }
- return new ItemStack(brewingStack.getItem(), brewingStack.stackSize, PotionParser.setDuration(
- duration + 1, metaDamage));
- }
- break;
- }
- case TIER: {
- int level = PotionParser.readLevel(brewingStack.getItemDamage());
- int power = PotionParser.readPower(brewingStack.getItemDamage());
- int duration = PotionParser.readDuration(brewingStack.getItemDamage());
- int metaDamage = brewingStack.getItemDamage();
- if (level < maxLevel - 1) {
- if (power > 0) {
- metaDamage = PotionParser.setPower(power - 1, metaDamage);
- }
- if (duration > 0) {
- metaDamage = PotionParser.setDuration(duration - 1, metaDamage);
- }
- return new ItemStack(brewingStack.getItem(), brewingStack.stackSize, PotionParser.setLevel(level + 1,
- metaDamage));
- }
- break;
- }
- case CHEMICAL: {
- return getChemicalPotionResult(ingredient, brewingStack);
- }
- case SPLASH: {
- if (!PotionParser.isSplash(brewingStack.getItemDamage())) {
- return new ItemStack(brewingStack.getItem(), brewingStack.stackSize, PotionParser.setSplash(brewingStack
- .getItemDamage()));
- }
- break;
- }
- case NONE:
- break;
- }
- return super.getPotionResult(ingredient, brewingStack);
- }
-
- protected ItemStack getChemicalPotionResult(ItemStack ingredient, ItemStack brewingStack) {
- return null;
- }
-
- protected TYPE getIngredientType(ItemStack ingredient, ItemStack brewingStack) {
- if (ingredient.getItem() == Items.redstone) {
- return TYPE.POWER;
- } else if (ingredient.getItem() == Items.glowstone_dust) {
- return TYPE.DURATION;
- } else if (ingredient.getItem() == Items.gunpowder) {
- return TYPE.SPLASH;
- } else if (ItemList.genericCraftingItems.isPresent()
- && ingredient.getItem() == ItemList.genericCraftingItems.get()
- && ingredient.getItemDamage() == Properties.ShinyBauble.meta) {
- return TYPE.TIER;
- }
- return TYPE.NONE;
- }
-
- protected void setSubItemBounds(int maxLevel, int maxDuration, int maxPower, int type) {
- this.maxLevel = maxLevel;
- this.maxDuration = maxDuration;
- this.maxPower = maxPower;
- this.type = type;
- }
-
- protected void setEffectScale(int initialTicks, int ticksPerLevel, int durationScale, int durationSpread,
- int powerPerLevel) {
- this.initialTicks = initialTicks;
- this.ticksPerLevel = ticksPerLevel;
- this.durationScale = durationScale;
- this.durationSpread = durationSpread;
- this.powerPerLevel = powerPerLevel;
- }
-
- abstract Optional extends Potion> getPotion();
-
- @Override
- public String getDisplayName(ItemStack itemStack) {
- int level = PotionParser.readLevel(itemStack.getItemDamage());
- int duration = PotionParser.readDuration(itemStack.getItemDamage());
- int power = PotionParser.readPower(itemStack.getItemDamage());
- String nameBuilder = "";
-
- /* Check For Prefix */
- if (power <= 0 && duration > 0) {
- nameBuilder = nameBuilder + durationPrefixes[duration] + " ";
- } else if (power > 0 && duration <= 0) {
- nameBuilder = nameBuilder + strengthPrefixes[power] + " ";
- }
-
- /* Add Potion Name */
- nameBuilder = nameBuilder + StatCollector.translateToLocal(baseName).trim() + " Potion";
-
- /* Check for Postfix */
- if (power > 0 && duration > 0) {
- nameBuilder = nameBuilder + " " + durationPostfixes[duration] + " " + strengthPostfixes[power];
- }
- if (level > 0) {
- nameBuilder = nameBuilder + " ";
- for (int i = 1; i <= level; i++) {
- nameBuilder = nameBuilder + "I";
- }
- }
- return nameBuilder;
- }
-
- @Override
- public boolean hasPotionEffects(ItemStack itemStack) {
- return true;
- }
-
- @Override
- public List