Compare commits

...
64 Commits
Author SHA1 Message Date
Harald Korneliussen 6523b26038 Fixes mooshroom infusion crash (#136) 2026-10-25 10:49:27 +01:00
Edgar Su 5a6b05f13c fix liquefaction focus not making lava (#147) 2026-10-03 20:23:20 -05:00
micvog 51763e0f80 Fix Synthskin draining Nutrition while the hunger bar is full (#148) 2026-09-30 14:03:11 +00:00
Martin Robertz 21ab790045 update+gradle+bs+deps+gitignore
fix curse auto uploader
2026-09-18 00:28:41 +02:00
f42bcf230b Fix cloned mob item dupe (#122)
Co-authored-by: tiffit <10173431+tiffit@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: Nikolay S. <nicksitnikov@gmail.com>
2026-09-07 19:33:28 +00:00
Martin Robertz e985a0c763 update+bs+deps 2026-09-06 19:21:48 +02:00
Mykhailo Balakerandkoolkrafter5 d9867a343e Fix Ethereal Shard ClassCastException upon being jared (#141)
Co-authored-by: koolkrafter5 <creepersrgreen@gmail.com>
2026-09-06 19:06:11 +02:00
Ableytner ec0a44d6dd Display Warded Syringe with correct NBT data in NEI (#137) 2026-07-31 19:37:21 +02:00
tiffit b2186e92f9 Move pocket plane generation back to main server thread (#134) 2026-07-11 14:30:28 +02:00
koolkrafter5 f619f97928 Fix null wand components (#126) 2026-05-25 16:52:22 +02:00
thehoblit f542637140 Fix golem dupe (#125) 2026-05-21 23:44:47 -07:00
Eldrinn-Elantey 23469f5e5b Simplify BlockGatewayPortal switch expressions (#124) 2026-05-16 16:47:10 +02:00
Eldrinn-Elantey c1730a50d9 replace magic numbers with named constants and fix exception handling (#120) 2026-05-15 22:28:59 +02:00
Eldrinn-Elantey 1ef8e16e9c Fix stabilizer restoring hungry node type when second stabilizer is still active (#121) 2026-05-14 14:36:08 -07:00
Eldrinn-Elanteyandthehoblit a084621884 Clean up decompiler artifacts in TileVortex files (#117)
Co-authored-by: thehoblit <thehoblit@gmail.com>
2026-05-14 11:29:50 -07:00
Eldrinn-Elantey f4f7e27bca Fix remaining gateway portal texture bugs (#119) 2026-05-14 11:18:30 -07:00
Eldrinn-Elanteyandthehoblit db3f4e0cba Fix vortex flicker on chunk reload and stabilizer sync (#116)
Co-authored-by: thehoblit <thehoblit@gmail.com>
2026-05-14 09:43:40 -07:00
Eldrinn-Elantey 2768e1b1eb Fix player orientation on pocket plane portal exit (#115) 2026-05-14 08:47:30 -07:00
Eldrinn-Elantey 0a54bd5465 Fix pocket plane keystone binding, portal bugs and world saving (#114) 2026-05-14 01:07:38 -04:00
Alexdoru 892f8941e2 Fix two world leaks (#110) 2026-04-22 18:11:09 +00:00
ROBERT-PARKOURCIVILIZATIONGOD 5b04ae1082 Fix NPE in generatePocketPlane during async vortex creation (#111) 2026-04-22 13:03:35 -05:00
Martin Robertz 1dc5f139e5 update+gradle+bs+deps 2026-04-06 11:42:04 +02:00
Ranzu ad2c1bcc5f Corrected guis bounds (#109) 2026-04-05 23:18:54 +02:00
UltraProdigy 8546cab959 Optimize Images & Workflow (#108) 2026-03-16 08:47:43 +00:00
Yoshy f69e39227e fix typos (#105) 2026-01-28 06:25:37 -05:00
Caedis 06def1b332 Synth Node now consumes the entire stack of essense instead of 1 (#102) 2025-11-22 11:37:31 +01:00
Aerindor of Arcane a351ef46b4 Potion ID configs Added [Issue #97] (#99) 2025-11-12 06:35:20 +00:00
koolkrafter5andRecursivePineapple 33cc4943a7 Improved Dispenser Functionality (#94)
Co-authored-by: RecursivePineapple <recursive_pineapple@proton.me>
2025-11-12 05:09:09 +00:00
Martin Robertz 5f37e3aa3d update 2025-10-25 17:28:20 +02:00
DarkShadow44 7eb409820b Fix nullpointer crash when exploding Alchemite (#100) 2025-10-25 17:03:57 +02:00
Martin Robertz ce27ffd52d update 2025-10-16 10:48:22 +02:00
551cdf4a93 Soul Beacon Event Handler Cleanup (#93)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-12 23:36:36 +02:00
Martin Robertz 5a14114583 update 2025-10-02 01:51:49 +02:00
Martin Robertz fc0cc6a074 update 2025-09-22 18:36:53 +02:00
Aerindor of Arcane 47c06267c1 Add client-side vortex sound in TileVortex (#96) 2025-09-22 11:55:29 +02:00
Alexdoru 76258cd038 Cache Tessellator#instance in local var (#92) 2025-07-18 12:48:17 -07:00
Maya 2ee312ccd1 update 2025-07-04 13:13:21 -06:00
Abdiel Kavash 5c7028c645 Fix Illumine Lens interaction with other sources of night vision. (#91) 2025-07-04 13:13:12 -06:00
Martin Robertz e94bc0d510 update 2025-05-16 22:08:54 +02:00
Caedis 8a84cfcd4d Replace Baubles with Baubles Expanded (#86) 2025-05-13 14:22:03 +02:00
Maya 52bd07d4c4 update 2025-04-08 22:56:28 -05:00
Glease b75095d013 fix missing draw call and missing texture bind (#84) 2025-04-08 22:56:20 -05:00
Martin Robertz 0c4a02cd0e update 2025-01-19 20:39:09 +01:00
b7b9c9a9b5 Fixes Liquefaction Focus (#72)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
2025-01-19 06:45:19 +00:00
Martin Robertz c9db9f26d1 update 2025-01-03 22:12:58 +01:00
glowredman 15532b7fd0 Add Localizations (#82) 2025-01-02 17:47:17 +00:00
Martin Robertz e510cd9915 update 2024-11-23 16:48:30 +01:00
chochem 531fedbe37 make thaumic horizons listen to its config (#79) 2024-11-20 12:39:46 +01:00
Maya 6f9e5faafe add issue templates 2024-11-11 04:54:26 -06:00
Martin Robertz 43e607e578 update 2024-11-08 00:41:42 +01:00
Abdiel Kavash 4db45f94b6 Fix setDead() if mob is not dead yet. (#78) 2024-11-05 11:25:08 +01:00
NotAPenguin 2d57926762 Update gt and rename (#76) 2024-09-03 17:05:06 +02:00
Raven Szewczyk 7f42969bb8 Switch decompiler constants to their named variants (#70)
Just ran `./gradlew applyDecompilerCleanupToMain` to make the code more readable
2024-05-06 12:37:05 +02:00
Martin Robertz b290dba600 update 2024-05-06 09:13:07 +02:00
くぁーりぃ ec59afb3a8 add missing BlendFunc (#69) 2024-05-06 06:36:40 +02:00
Martin Robertz 8026516a3b update 2024-04-18 20:47:37 +02:00
Alastors 6676a54693 fix for gt6 (#67) 2024-04-18 15:38:25 +02:00
Jason Mitchell a63c0ab6ed Update BS (#66) 2024-03-20 08:18:33 -07:00
Raven Szewczyk 73e77b70db [ci skip] upgraded build system 2024-02-04 20:02:22 +00:00
Martin Robertz ca1827a47b update bs+deps 2024-01-12 20:56:46 +01:00
Raven Szewczyk b2377724f4 [ci skip] upgraded build system 2024-01-08 21:29:48 +00:00
bombcar 7a22b94592 Correct name application for Nightmare (#62)
* update dependencies

* fix name
2023-12-20 19:29:42 +01:00
Martin Robertz 382234cc72 update gradle + bes+ deps 2023-12-17 00:06:15 +01:00
Ethryan 975c987d81 New lens textures (#61)
* Baseline

* Warp lenses

* Update voidmetal frame
2023-12-16 23:26:48 +01:00
402 changed files with 2481 additions and 3537 deletions

No files matched your search

+62
View File
@@ -0,0 +1,62 @@
name: Report Bug
description: "Report a bug."
body:
- type: markdown
attributes:
value: "A bug/crash report with sufficient information and logs to reproduce and track down."
- type: input
id: discord
attributes:
label: Your GTNH Discord Username
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
placeholder: "Example: Fake#1234"
- type: input
id: version
attributes:
label: Mod Version
description: "What version of the Mod are you using?"
placeholder: "Example: 1.0.0"
validations:
required: true
- type: textarea
id: report
attributes:
label: Bug Report
description: "Relevant information, as well as relevant logs attached such as `logs/fml-client-latest.log."
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
validations:
required: true
- type: dropdown
id: java
attributes:
label: Java Version
description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version.
options:
- Java 8
- Java 9
- Java 11
- Java 17
- Java 19
- Java 20
- Java 21
- Other (Please Specify)
validations:
required: true
- type: textarea
id: modlist
attributes:
label: Mod List or GTNH Pack Version
description: "List of mods, ideally a minimal reproducible set (can be retrieved from latest.log). If using GTNH please indicate pack version and any changed mods, not the entire modlist."
placeholder: "List of mods or GTNH Pack version goes here"
validations:
required: true
- type: checkboxes
id: final
attributes:
label: Final Checklist
description: Certify that you read things
options:
- label: "I have searched the issues and haven't found a similar issue."
required: true
@@ -0,0 +1,28 @@
name: Feature Request
description: "Request a feature."
body:
- type: markdown
attributes:
value: "Please use this form to request features. We ask you check if it was already requested though"
- type: input
id: discord
attributes:
label: Your GTNH Discord Username
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
placeholder: "Example: Wumpus#1234"
- type: textarea
id: request
attributes:
label: Feature Request
description: "Relevant information, as well as relevant images"
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
validations:
required: true
- type: checkboxes
id: final
attributes:
label: Final Checklist
description: Certify that you read things
options:
- label: "I have searched the issues and haven't found a similar issue."
required: true
+17
View File
@@ -0,0 +1,17 @@
name: Optimize images
on:
pull_request:
branches: [ master, main, release/** ]
paths:
- "**/*.png"
push:
branches: [ master, main, release/** ]
paths:
- "**/*.png"
jobs:
optimize-images:
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
secrets: inherit
+2
View File
@@ -27,5 +27,7 @@ whitelist.json
*.iws
src/main/resources/mixins.*.json
*.bat
*.sh
*.DS_Store
!gradlew.bat
layout.json
+2 -1620
View File
File diff suppressed because it is too large. Load diff
+4 -3
View File
@@ -1,9 +1,10 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:Baubles:1.0.1.16:dev')
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.24-GTNH:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.91:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.54.168:dev') {transitive = false}
runtimeOnlyNonPublishable('com.github.GTNewHorizons:AspectRecipeIndex:1.1.5:dev')
}
+187 -41
View File
@@ -1,90 +1,174 @@
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
# LOCAL to test local config updates.
gtnh.settings.blowdryerTag = 0.2.0
# Human-readable mod name, available for mcmod.info population.
modName = ThaumicHorizons
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
# Conventionally lowercase.
modId = ThaumicHorizons
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = com.kentington.thaumichorizons
# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
# Whether to use modGroup as the maven publishing group.
# When false, com.github.GTNewHorizons is used.
useModGroupForPublishing = false
# Will update your build.gradle automatically whenever an update is available
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
channel = stable
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
mappingsVersion = 12
# Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a default username for testing your mod. You can always override this per-run by running
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = Developer
# Enables using modern java syntax (up to version 17) via Jabel, while still targetting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = true
# Enables modern Java syntax support. Valid values:
# - false: No modern syntax, Java 8 only
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
# - modern: Native modern Java bytecode, no downgrading
enableModernJavaSyntax = jabel
# Define a source file of your project with:
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
# and should *not* be used in most situations. -1 disables this.
# forceToolchainVersion = -1
# Target JVM version for JVM Downgrader bytecode downgrading.
# Only used when enableModernJavaSyntax = jvmDowngrader
# downgradeTargetVersion = 8
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
# Classes will be available in META-INF/versions/N/ for each version N in this list.
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
# jvmDowngraderMultiReleaseVersions = 21,25
# Specifies how JVM Downgrader API stubs are provided. Options:
# - shade: Shade minimized stubs into the jar
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
# - external: Another dependency provides stubs (no constraint, no warning)
# - (empty): Warning reminding you to configure stubs
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
# jvmDowngraderStubsProvider =
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = true
# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass =
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION
# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =
# [DEPRECATED] Mod name replacement token.
gradleTokenModName =
# [DEPRECATED] Mod Group replacement token.
gradleTokenGroupName =
# [DEPRECATED]
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
# version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = ThaumicHorizons.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenGroupName =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
apiPackage =
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
# There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
# Mixin classes will have access to "main" classes, but not the other way around.
separateMixinSourceSet =
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
# Specify the package that contains all of your Mixins. The package must exist or
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
# it must match with this or the build will fail.
mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
# responsibility to check the license and request permission for distribution if required.
usesShadowedDependencies = false
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter.
#customArchiveBaseName =
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId = 227914
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
# list of strings, with the acceptable keys being(case does not matter):
# cursemaven
# modrinth
excludeWellKnownRepositories =
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project id of the other mod.
curseForgeRelations = requiredDependency:thaumcraft
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
usesMavenPublishing = true
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
# Maven repository to publish the mod to.
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
#
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish on Modrinth.
# Leave this empty if you don't want to publish to Modrinth.
modrinthProjectId = 1wDWP1tN
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
@@ -92,6 +176,68 @@ modrinthProjectId = 1wDWP1tN
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
modrinthRelations =
# modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
#
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId = 227914
# Comma-separated supported CurseForge environments: client, server (case-insensitive).
# Use client or server for mods that only support one environment. Defaults to client,server.
# These tags describe where the mod can run, not whether installation is required on both sides.
curseForgeEnvironments = client,server
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
curseForgeRelations = requiredDependency\:thaumcraft
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# projects. New projects should not use this parameter.
# customArchiveBaseName =
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
# runClientWorkingDirectory = run/client
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
# runServerWorkingDirectory = run/server
# Optional parameter to have the build automatically fail if an illegal version is used.
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
# The check is ONLY performed if the version is a git tag.
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
# versionPattern =
# Uncomment to prevent the source code from being published.
# noPublishedSources = true
# Uncomment this to disable Spotless checks.
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
# disableCheckstyle = true
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
# (force use delegated build).
# This is meant to be set in $HOME/.gradle/gradle.properties.
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
# Whether IDEA should run spotless checks when pressing the Build button.
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true
# Non-GTNH properties
org.gradle.configuration-cache = true
org.gradle.parallel = true
+12
View File
@@ -0,0 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9064f22734b42ac03e85df04b632e167/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/4d0277c49991306ac78048580fe34bcf/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a9fa3b809e484a1e1ac4308a5dda661a/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/aa99913fa6d767d899ffc96082da01ca/redirect
toolchainVersion=25
Binary file not shown.
+4 -1
View File
@@ -1,6 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+20 -17
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,10 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
# gradlew start up script for POSIX generated by Gradle.
#
# Important for running:
#
@@ -27,7 +29,7 @@
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
# ksh gradlew
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,7 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -111,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -130,10 +132,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -141,7 +146,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -149,7 +154,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -166,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -198,16 +202,15 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
Vendored
+24 -34
View File
@@ -13,16 +13,18 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem gradlew startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Set local scope for the variables, and ensure extensions are enabled
setlocal EnableExtensions
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@@ -43,13 +45,13 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
"%COMSPEC%" /c exit 1
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
@@ -57,36 +59,24 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
"%COMSPEC%" /c exit 1
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
@rem Execute gradlew
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
:exitWithErrorLevel
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5 -10
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
}
}
gradlePluginPortal()
@@ -17,12 +17,7 @@ pluginManagement {
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.31'
}
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
@@ -5,6 +5,8 @@
package com.kentington.thaumichorizons.client;
import java.awt.Color;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
@@ -27,7 +29,9 @@ import net.minecraft.item.Item;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.WorldEvent;
import com.kentington.thaumichorizons.client.audio.VortexSound;
import com.kentington.thaumichorizons.client.fx.FXSonic;
import com.kentington.thaumichorizons.client.gui.GuiBloodInfuser;
import com.kentington.thaumichorizons.client.gui.GuiCase;
@@ -163,6 +167,7 @@ import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import thaumcraft.api.wands.IWandTriggerManager;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXBurst;
@@ -181,6 +186,7 @@ public class ClientProxy extends CommonProxy {
@Override
public void registerHandlers() {
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(ThaumicHorizons.instance.renderEventHandler);
final IResourceManager resourceManager = Minecraft.getMinecraft().getResourceManager();
if (resourceManager instanceof IReloadableResourceManager) {
@@ -195,6 +201,7 @@ public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
// spotless:off
ClientRegistry.bindTileEntitySpecialRenderer(TileNodeMonitor.class, new TileNodeMonitorRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileSyntheticNode.class, new TileEtherealShardRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileVisDynamo.class, new TileVisDynamoRender());
@@ -206,8 +213,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileVatMatrix.class, new TileVatMatrixRender(0));
ClientRegistry.bindTileEntitySpecialRenderer(TileBloodInfuser.class, new TileBloodInfuserRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileSoulBeacon.class, new TileSoulBeaconRender());
ClientRegistry
.bindTileEntitySpecialRenderer(TileTransductionAmplifier.class, new TileTransductionAmplifierRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileTransductionAmplifier.class, new TileTransductionAmplifierRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileRecombinator.class, new TileRecombinatorRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileVortexStabilizer.class, new TileVortexStabilizerRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileVortex.class, new TileVortexRender());
@@ -217,61 +223,29 @@ public class ClientProxy extends CommonProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityAlchemitePrimed.class, new RenderAlchemitePrimed());
RenderingRegistry.registerEntityRenderingHandler(EntitySyringe.class, new RenderSyringe());
RenderingRegistry.registerEntityRenderingHandler(EntityBlastPhial.class, new BlastPhialRender());
RenderingRegistry
.registerEntityRenderingHandler(EntityChocolateCow.class, new RenderChocolateCow(new ModelCow(), 0.7f));
RenderingRegistry.registerEntityRenderingHandler(
EntityOrePig.class,
new RenderOreBoar(new ModelPig(), new ModelPig(0.5f), 0.7f));
RenderingRegistry.registerEntityRenderingHandler(
EntityGuardianPanther.class,
new RenderGuardianPanther(new ModelOcelot(), 1.0f));
RenderingRegistry
.registerEntityRenderingHandler(EntityFamiliar.class, new RenderFamiliar(new ModelFamiliar(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntityGravekeeper.class,
new RenderGravekeeper(new ModelOcelot(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntityGoldChicken.class,
new RenderGoldChicken(new ModelChicken(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntityScholarChicken.class,
new RenderScholarChicken(new ModelChicken(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntityTaintPig.class,
new RenderTaintfeeder(new ModelPig(), new ModelPig(0.5f), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntityNetherHound.class,
new RenderNetherHound(new ModelWolf(), new ModelWolf(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntitySeawolf.class,
new RenderSeawolf(new ModelWolf(), new ModelWolf(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(
EntityLunarWolf.class,
new RenderLunarWolf(new ModelWolf(), new ModelWolf(), 0.5f));
RenderingRegistry
.registerEntityRenderingHandler(EntityGolemTH.class, new RenderGolemTH(new ModelGolemTH(false)));
RenderingRegistry
.registerEntityRenderingHandler(EntityEndersteed.class, new RenderEndersteed(new ModelHorse(), 0.75f));
RenderingRegistry
.registerEntityRenderingHandler(EntityNightmare.class, new RenderNightmare(new ModelHorse(), 0.75f));
RenderingRegistry.registerEntityRenderingHandler(EntityChocolateCow.class, new RenderChocolateCow(new ModelCow(), 0.7f));
RenderingRegistry.registerEntityRenderingHandler(EntityOrePig.class, new RenderOreBoar(new ModelPig(), new ModelPig(0.5f), 0.7f));
RenderingRegistry.registerEntityRenderingHandler(EntityGuardianPanther.class, new RenderGuardianPanther(new ModelOcelot(), 1.0f));
RenderingRegistry.registerEntityRenderingHandler(EntityFamiliar.class, new RenderFamiliar(new ModelFamiliar(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityGravekeeper.class, new RenderGravekeeper(new ModelOcelot(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityGoldChicken.class, new RenderGoldChicken(new ModelChicken(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityScholarChicken.class, new RenderScholarChicken(new ModelChicken(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityTaintPig.class, new RenderTaintfeeder(new ModelPig(), new ModelPig(0.5f), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityNetherHound.class, new RenderNetherHound(new ModelWolf(), new ModelWolf(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntitySeawolf.class, new RenderSeawolf(new ModelWolf(), new ModelWolf(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityLunarWolf.class, new RenderLunarWolf(new ModelWolf(), new ModelWolf(), 0.5f));
RenderingRegistry.registerEntityRenderingHandler(EntityGolemTH.class, new RenderGolemTH(new ModelGolemTH(false)));
RenderingRegistry.registerEntityRenderingHandler(EntityEndersteed.class, new RenderEndersteed(new ModelHorse(), 0.75f));
RenderingRegistry.registerEntityRenderingHandler(EntityNightmare.class, new RenderNightmare(new ModelHorse(), 0.75f));
RenderingRegistry.registerEntityRenderingHandler(EntityBoatGreatwood.class, new RenderBoatGreatwood());
RenderingRegistry.registerEntityRenderingHandler(EntityBoatThaumium.class, new RenderBoatThaumium());
RenderingRegistry.registerEntityRenderingHandler(
EntityMeatSlime.class,
new RenderMeatSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(
EntityMercurialSlime.class,
new RenderMercurialSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(
EntityVoltSlime.class,
new RenderVoltSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(
EntityMedSlime.class,
new RenderMedSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(EntityMeatSlime.class, new RenderMeatSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(EntityMercurialSlime.class, new RenderMercurialSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(EntityVoltSlime.class, new RenderVoltSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(EntityMedSlime.class, new RenderMedSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
RenderingRegistry.registerEntityRenderingHandler(EntitySheeder.class, new RenderSheeder());
RenderingRegistry.registerEntityRenderingHandler(EntitySoul.class, new RenderSoul());
RenderingRegistry
.registerEntityRenderingHandler(EntityLightningBoltFinite.class, new RenderLightningBoltFinite());
RenderingRegistry.registerEntityRenderingHandler(EntityLightningBoltFinite.class, new RenderLightningBoltFinite());
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemSyringeBloodSample, new ItemSyringeRender());
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemSyringeHuman, new ItemSyringeRender());
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemSyringeEmpty, new ItemSyringeRender());
@@ -279,6 +253,7 @@ public class ClientProxy extends CommonProxy {
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemCorpseEffigy, new ItemCorpseEffigyRender());
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemInjector, new ItemInjectorRender());
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemWandCastingDisposable, new ItemWandRenderer());
// spotless:on
}
@Override
@@ -555,4 +530,62 @@ public class ClientProxy extends CommonProxy {
1.0f,
0.1f);
}
private final Map<TileCoord, VortexSound> activeVortexSounds = new HashMap<>();
@SubscribeEvent
public void onWorldUnload(WorldEvent.Unload event) {
if (event.world.isRemote) {
activeVortexSounds.clear();
ThaumicHorizons.instance.renderEventHandler.thingsThatSparkle.clear();
}
}
@Override
public void playVortexSound(TileVortex tile) {
if (tile == null || tile.isInvalid() || tile.getWorldObj() == null) return;
TileCoord pos = new TileCoord(tile.xCoord, tile.yCoord, tile.zCoord);
if (activeVortexSounds.containsKey(pos)) return;
VortexSound sound = new VortexSound(tile);
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
activeVortexSounds.put(pos, sound);
}
@Override
public void stopVortexSound(TileVortex tile) {
if (tile == null) return;
TileCoord pos = new TileCoord(tile.xCoord, tile.yCoord, tile.zCoord);
VortexSound sound = activeVortexSounds.remove(pos);
if (sound != null) {
sound.markDone();
}
}
// Inner class to replace BlockPos for 1.7.10
private static class TileCoord {
final int x, y, z;
TileCoord(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof TileCoord)) return false;
TileCoord other = (TileCoord) o;
return this.x == other.x && this.y == other.y && this.z == other.z;
}
@Override
public int hashCode() {
return x * 31 * 31 + y * 31 + z;
}
}
}
@@ -0,0 +1,48 @@
package com.kentington.thaumichorizons.client.audio;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.MovingSound;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
public class VortexSound extends MovingSound {
private final TileEntity tile;
public VortexSound(TileEntity tile) {
super(new ResourceLocation("thaumichorizons:vortex"));
this.tile = tile;
this.repeat = true;
this.field_147665_h = 0;
this.volume = 1.0F;
}
// Let me know if update needs to be cached or if that's a good idea or not for performance.
@Override
public void update() {
if (tile == null || tile.isInvalid() || tile.getWorldObj() == null) {
this.donePlaying = true;
return;
}
// follow tile
this.xPosF = tile.xCoord + 0.5F;
this.yPosF = tile.yCoord + 0.5F;
this.zPosF = tile.zCoord + 0.5F;
// distance-based volume
EntityPlayer p = Minecraft.getMinecraft().thePlayer;
if (p != null) {
double dist = p.getDistance(this.xPosF, this.yPosF, this.zPosF);
this.volume = Math.max(0.0F, 1.0F / (1.0F + (float) (dist / 8.0F)));
}
}
public void markDone() {
this.donePlaying = true;
}
}
@@ -4,6 +4,7 @@
package com.kentington.thaumichorizons.client.fx;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
@@ -36,8 +37,9 @@ public class FXContainment extends EntityFX {
this.noClip = true;
}
public void renderParticle(final Tessellator p_70539_1_, final float p_70539_2_, final float p_70539_3_,
public void renderParticle(final Tessellator tessellator, final float p_70539_2_, final float p_70539_3_,
final float p_70539_4_, final float p_70539_5_, final float p_70539_6_, final float p_70539_7_) {
tessellator.draw();
final long nt = System.nanoTime();
final long time = nt / 50000000L;
final int frame = (int) time % 16;
@@ -48,40 +50,42 @@ public class FXContainment extends EntityFX {
UtilsFX.bindTexture(FXContainment.portaltex);
GL11.glPushMatrix();
GL11.glDepthMask(false);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
final float f6 = 3.0f * this.particleScale;
final float f7 = (float) (this.posX - FXContainment.interpPosX);
final float f8 = (float) (this.posY - FXContainment.interpPosY);
final float f9 = (float) (this.posZ - FXContainment.interpPosZ);
p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, 0.1f);
p_70539_1_.addVertexWithUV(
tessellator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, 0.1f);
tessellator.addVertexWithUV(
f7 - p_70539_3_ * f6 - p_70539_6_ * f6,
f8 - p_70539_4_ * f6,
f9 - p_70539_5_ * f6 - p_70539_7_ * f6,
f2,
f4);
p_70539_1_.addVertexWithUV(
tessellator.addVertexWithUV(
f7 - p_70539_3_ * f6 + p_70539_6_ * f6,
f8 + p_70539_4_ * f6,
f9 - p_70539_5_ * f6 + p_70539_7_ * f6,
f3,
f4);
p_70539_1_.addVertexWithUV(
tessellator.addVertexWithUV(
f7 + p_70539_3_ * f6 + p_70539_6_ * f6,
f8 + p_70539_4_ * f6,
f9 + p_70539_5_ * f6 + p_70539_7_ * f6,
f3,
f5);
p_70539_1_.addVertexWithUV(
tessellator.addVertexWithUV(
f7 + p_70539_3_ * f6 - p_70539_6_ * f6,
f8 - p_70539_4_ * f6,
f9 + p_70539_5_ * f6 - p_70539_7_ * f6,
f2,
f5);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(UtilsFX.getParticleTexture());
tessellator.startDrawingQuads();
}
public int getFXLayer() {
@@ -69,9 +69,9 @@ public class FXSonic extends EntityFX {
final float f3, final float f4, final float f5) {
tessellator.draw();
GL11.glPushMatrix();
GL11.glDisable(2884);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
if (model == null) {
model = AdvancedModelLoader.loadModel(FXSonic.MODEL);
}
@@ -93,8 +93,8 @@ public class FXSonic extends EntityFX {
GL11.glScaled(0.5, 0.5, -0.5);
GL11.glColor4f(0.0f, b, b, 1.0f);
model.renderAll();
GL11.glDisable(3042);
GL11.glEnable(2884);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(UtilsFX.getParticleTexture());
tessellator.startDrawingQuads();
@@ -76,13 +76,13 @@ public class GuiBloodInfuser extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
final int p_146976_3_) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guibloodinfuser.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
@@ -90,7 +90,7 @@ public class GuiBloodInfuser extends GuiContainer {
this.drawEssentiaSelected();
this.drawAspectList();
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guibloodinfuser.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
if (this.canScrollLeft()) {
@@ -234,7 +234,7 @@ public class GuiBloodInfuser extends GuiContainer {
--this.flashTimer;
this.drawFlash();
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
@@ -419,10 +419,10 @@ public class GuiBloodInfuser extends GuiContainer {
void drawQuestionMark(final int x, final int y, final Color color) {
final Minecraft mc = Minecraft.getMinecraft();
GL11.glPushMatrix();
GL11.glDisable(2896);
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glPushMatrix();
mc.renderEngine.bindTexture(new ResourceLocation("thaumcraft", "textures/aspects/_unknown.png"));
GL11.glColor4f(color.getRed() / 255.0f, color.getGreen() / 255.0f, color.getBlue() / 255.0f, 0.8f);
@@ -435,10 +435,10 @@ public class GuiBloodInfuser extends GuiContainer {
var9.addVertexWithUV(x + 0.0, y + 0.0, this.zLevel, 0.0, 0.0);
var9.draw();
GL11.glPopMatrix();
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glAlphaFunc(516, 0.1f);
GL11.glEnable(2896);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
@@ -25,17 +25,17 @@ public class GuiCase extends GuiContainer {
final int z) {
super(new ContainerCase(par1InventoryPlayer, world, x, y, z));
this.blockSlot = par1InventoryPlayer.currentItem;
this.xSize = 175;
this.ySize = 232;
this.xSize = 176;
this.ySize = 233;
}
protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
UtilsFX.bindTexture("textures/gui/gui_focuspouch.png");
final float t = this.zLevel;
this.zLevel = 200.0f;
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
this.drawTexturedModalRect(8 + this.blockSlot * 18, 209, 240, 0, 16, 16);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
this.zLevel = t;
}
@@ -51,8 +51,8 @@ public class GuiCase extends GuiContainer {
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
}
}
@@ -46,11 +46,11 @@ public class GuiFingers extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
UtilsFX.bindTexture("thaumichorizons", "textures/gui/guifingers.png");
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
ItemWandCasting wand = null;
if (this.tileEntity.getStackInSlot(10) != null
&& this.tileEntity.getStackInSlot(10).getItem() instanceof ItemWandCasting) {
@@ -97,9 +97,9 @@ public class GuiFingers extends GuiContainer {
final float var7 = 0.33f;
GL11.glColor4f(var7, var7, var7, 0.66f);
GuiFingers.itemRender.renderWithColor = false;
GL11.glEnable(2896);
GL11.glEnable(2884);
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GuiFingers.itemRender.renderItemAndEffectIntoGUI(
this.mc.fontRenderer,
this.mc.renderEngine,
@@ -113,8 +113,8 @@ public class GuiFingers extends GuiContainer {
var5 + 160,
var6 + 64);
GuiFingers.itemRender.renderWithColor = true;
GL11.glDisable(3042);
GL11.glDisable(2896);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslatef((float) (var5 + 168), (float) (var6 + 46), 0.0f);
@@ -25,13 +25,13 @@ public class GuiInjector extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
final int p_146976_3_) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guiinjector.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
}
@@ -22,14 +22,14 @@ public class GuiInspiratron extends GuiContainer {
public GuiInspiratron(final InventoryPlayer player, final TileInspiratron tile) {
super(new ContainerInspiratron(player, tile));
this.tile = tile;
this.xSize = 175;
this.xSize = 176;
this.ySize = 219;
}
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
final int p_146976_3_) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guiinspiratron.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
@@ -37,7 +37,7 @@ public class GuiInspiratron extends GuiContainer {
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
final int i1 = this.tile.getTimeRemainingScaled(28);
this.drawTexturedModalRect(var5 + 66, var6 + 102, 176, 158 - i1, 44, i1);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
}
@@ -22,14 +22,14 @@ public class GuiSoulExtractor extends GuiContainer {
public GuiSoulExtractor(final InventoryPlayer player, final TileSoulExtractor tile) {
super(new ContainerSoulExtractor(player, tile));
this.tile = tile;
this.xSize = 175;
this.ySize = 165;
this.xSize = 176;
this.ySize = 166;
}
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
final int p_146976_3_) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guisieve.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
@@ -39,7 +39,7 @@ public class GuiSoulExtractor extends GuiContainer {
final int i1 = this.tile.getTimeRemainingScaled(39);
this.drawTexturedModalRect(var5 + 91, var6 + 58 - i1, 176, 166 - i1, 35, i1);
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
}
@@ -31,13 +31,13 @@ public class GuiSoulforge extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
final int p_146976_3_) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guidynamo.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
@@ -34,7 +34,7 @@ public class GuiVat extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
final int p_146976_3_) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guivat.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
@@ -114,7 +114,7 @@ public class GuiVat extends GuiContainer {
16);
}
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
@@ -43,13 +43,13 @@ public class GuiVisDynamo extends GuiContainer {
protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", "textures/gui/guidynamo.png"));
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
@@ -30,11 +30,13 @@ import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.entities.EntityBoatThaumium;
import com.kentington.thaumichorizons.common.items.lenses.ILens;
import com.kentington.thaumichorizons.common.items.lenses.ItemLensCase;
import com.kentington.thaumichorizons.common.items.lenses.ItemLensFire;
import com.kentington.thaumichorizons.common.items.lenses.LensManager;
import com.kentington.thaumichorizons.common.lib.THKeyHandler;
import com.kentington.thaumichorizons.common.lib.networking.PacketHandler;
@@ -96,8 +98,7 @@ public class RenderEventHandler {
if (LensManager.nightVisionOffTime > 0L
&& (goggles == null || !(goggles.getItem() instanceof IRevealer)
|| goggles.stackTagCompound == null)
&& mc.thePlayer.getActivePotionEffect(Potion.nightVision) != null
&& mc.thePlayer.getActivePotionEffect(Potion.nightVision).getIsAmbient()) {
&& ItemLensFire.isEffectGrantedByLens(mc.thePlayer.getActivePotionEffect(Potion.nightVision))) {
mc.thePlayer.removePotionEffect(Potion.nightVision.id);
LensManager.nightVisionOffTime = 0L;
}
@@ -245,14 +246,14 @@ public class RenderEventHandler {
return;
}
GL11.glPushMatrix();
GL11.glClear(256);
GL11.glMatrixMode(5889);
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glOrtho(0.0, sw, sh, 0.0, 1000.0, 3000.0);
GL11.glMatrixMode(5888);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glTranslatef(0.0f, 0.0f, -2000.0f);
GL11.glDisable(2929);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(false);
GL11.glPushMatrix();
GL11.glTranslated(sw / 2.0, sh / 2.0, 0.0);
@@ -261,9 +262,9 @@ public class RenderEventHandler {
UtilsFX.bindTexture("textures/misc/radial.png");
GL11.glPushMatrix();
GL11.glRotatef(partialTicks + mc.thePlayer.ticksExisted % 720 / 2.0f, 0.0f, 0.0f, 1.0f);
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
UtilsFX.renderQuadCenteredFromTexture(
width * 2.75f * RenderEventHandler.radialHudScale,
0.5f,
@@ -272,15 +273,15 @@ public class RenderEventHandler {
200,
771,
0.5f);
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
UtilsFX.bindTexture("textures/misc/radial2.png");
GL11.glPushMatrix();
GL11.glRotatef(-(partialTicks + mc.thePlayer.ticksExisted % 720 / 2.0f), 0.0f, 0.0f, 1.0f);
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
UtilsFX.renderQuadCenteredFromTexture(
width * 2.55f * RenderEventHandler.radialHudScale,
0.5f,
@@ -289,18 +290,18 @@ public class RenderEventHandler {
200,
771,
0.5f);
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
if (lens != null) {
GL11.glPushMatrix();
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
RenderHelper.enableGUIStandardItemLighting();
final ItemStack item = new ItemStack((Item) lens);
item.stackTagCompound = null;
ri.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, item, -8, -8);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(32826);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
final int mx = (int) (i - sw / 2.0);
final int my = (int) (j - sh / 2.0);
@@ -316,19 +317,19 @@ public class RenderEventHandler {
final float pieSlice = 360.0f / this.fociItem.size();
String key = this.foci.firstKey();
for (int a = 0; a < this.fociItem.size(); ++a) {
final double xx = MathHelper.cos(currentRot / 180.0f * 3.141593f) * width;
final double yy = MathHelper.sin(currentRot / 180.0f * 3.141593f) * width;
final double xx = MathHelper.cos(currentRot / 180.0f * (float) Math.PI) * width;
final double yy = MathHelper.sin(currentRot / 180.0f * (float) Math.PI) * width;
currentRot += pieSlice;
GL11.glPushMatrix();
GL11.glTranslated(xx, yy, 100.0);
GL11.glScalef(this.fociScale.get(key), this.fociScale.get(key), this.fociScale.get(key));
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
RenderHelper.enableGUIStandardItemLighting();
final ItemStack item2 = this.fociItem.get(key).copy();
item2.stackTagCompound = null;
ri.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, item2, -8, -8);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(32826);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
if (!THKeyHandler.radialLock && THKeyHandler.radialActive) {
final int mx2 = (int) (i - sw / 2.0 - xx);
@@ -360,8 +361,8 @@ public class RenderEventHandler {
11);
}
GL11.glDepthMask(true);
GL11.glEnable(2929);
GL11.glDisable(3042);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileBloodInfuser;
@@ -27,7 +28,7 @@ public class BlockBloodInfuserRender extends BlockRenderer implements ISimpleBlo
final TileBloodInfuser tc = new TileBloodInfuser();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileEssentiaDynamo;
@@ -27,7 +28,7 @@ public class BlockEssentiaDynamoRender extends BlockRenderer implements ISimpleB
final TileEssentiaDynamo tc = new TileEssentiaDynamo();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileInspiratron;
@@ -27,7 +28,7 @@ public class BlockInspiratronRender extends BlockRenderer implements ISimpleBloc
final TileInspiratron tc = new TileInspiratron();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -24,8 +24,8 @@ public class BlockJarTHRenderer extends BlockRenderer implements ISimpleBlockRen
public void renderInventoryBlock(final Block block, final int metadata, final int modelID,
final RenderBlocks renderer) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
final IIcon i1 = ((BlockSoulJar) block).iconJarTop;
final IIcon i2 = ((BlockSoulJar) block).iconJarSide;
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileNodeMonitor;
@@ -27,7 +28,7 @@ public class BlockNodeMonitorRender extends BlockRenderer implements ISimpleBloc
final TileNodeMonitor tc = new TileNodeMonitor();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileRecombinator;
@@ -28,7 +29,7 @@ public class BlockRecombinatorRender extends BlockRenderer implements ISimpleBlo
tc.blockType = ThaumicHorizons.blockRecombinator;
tc.blockMetadata = 0;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileSlot;
@@ -28,7 +29,7 @@ public class BlockSlotRender extends BlockRenderer implements ISimpleBlockRender
tc.blockType = ThaumicHorizons.blockSlot;
tc.blockMetadata = 0;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileSoulBeacon;
@@ -27,7 +28,7 @@ public class BlockSoulBeaconRender extends BlockRenderer implements ISimpleBlock
final TileSoulBeacon tc = new TileSoulBeacon();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileSoulExtractor;
@@ -27,7 +28,7 @@ public class BlockSoulSieveRender extends BlockRenderer implements ISimpleBlockR
final TileSoulExtractor tc = new TileSoulExtractor();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileSoulforge;
@@ -27,7 +28,7 @@ public class BlockSoulforgeRender extends BlockRenderer implements ISimpleBlockR
final TileSoulforge tc = new TileSoulforge();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileSpike;
@@ -33,7 +34,7 @@ public class BlockSpikeRenderer extends BlockRenderer implements ISimpleBlockRen
final TileSpike tc = new TileSpike((byte) 1, type);
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileSyntheticNode;
@@ -27,7 +28,7 @@ public class BlockSyntheticNodeRender extends BlockRenderer implements ISimpleBl
final TileSyntheticNode tc = new TileSyntheticNode();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileTransductionAmplifier;
@@ -27,7 +28,7 @@ public class BlockTransductionAmplifierRender extends BlockRenderer implements I
final TileTransductionAmplifier tc = new TileTransductionAmplifier();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileVatMatrix;
@@ -27,7 +28,7 @@ public class BlockVatMatrixRender extends BlockRenderer implements ISimpleBlockR
final TileVatMatrix tc = new TileVatMatrix();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -29,8 +29,9 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
if (boss == null) {
return false;
}
Tessellator.instance.setColorRGBA(255, 255, 255, 192);
Tessellator.instance.setBrightness(241);
final Tessellator tess = Tessellator.instance;
tess.setColorRGBA(255, 255, 255, 192);
tess.setBrightness(241);
renderer.enableAO = false;
final int dx = boss.xCoord - tco.xCoord;
final int dy = boss.yCoord - tco.yCoord;
@@ -42,7 +43,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTR);
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 0.75f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -52,7 +53,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTL);
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -62,7 +63,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTR);
block.setBlockBounds(0.25f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -72,7 +73,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTL);
block.setBlockBounds(0.0f, 0.0f, 0.25f, 0.75f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -82,7 +83,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -90,7 +91,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
block.setBlockBounds(0.0f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -100,7 +101,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceXPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -108,7 +109,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceXNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -122,7 +123,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBR);
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 0.75f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -132,7 +133,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBL);
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -142,7 +143,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBR);
block.setBlockBounds(0.25f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -152,7 +153,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBL);
block.setBlockBounds(0.0f, 0.0f, 0.25f, 0.75f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
@@ -162,7 +163,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -170,7 +171,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
block.setBlockBounds(0.0f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -180,7 +181,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceXPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -188,7 +189,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
renderer.renderFaceXNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
tess.setColorRGBA(255, 255, 255, 255);
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
renderer.setRenderBoundsFromBlock(block);
@@ -23,13 +23,14 @@ public class BlockVatSolidRender implements ISimpleBlockRenderingHandler {
public boolean renderWorldBlock(final IBlockAccess world, final int x, final int y, final int z, final Block block,
final int modelId, final RenderBlocks renderer) {
final Tessellator tess = Tessellator.instance;
if (world.getTileEntity(x, y, z) instanceof final TileVatSlave tco) {
final TileVat boss = tco.getBoss(-1);
if (boss == null) {
return false;
}
Tessellator.instance.setColorOpaque_F(1.0f, 1.0f, 1.0f);
Tessellator.instance.setBrightness(150);
tess.setColorOpaque_F(1.0f, 1.0f, 1.0f);
tess.setBrightness(150);
renderer.enableAO = false;
final int dx = boss.xCoord - tco.xCoord;
final int dy = boss.yCoord - tco.yCoord;
@@ -303,7 +304,7 @@ public class BlockVatSolidRender implements ISimpleBlockRenderingHandler {
}
}
} else if (world.getBlockMetadata(x, y, z) == 7) {
Tessellator.instance.setColorOpaque_F(1.0f, 1.0f, 1.0f);
tess.setColorOpaque_F(1.0f, 1.0f, 1.0f);
renderer.enableAO = false;
renderer.renderFaceYPos(block, x, y, z, ((BlockVatSolid) ThaumicHorizons.blockVatSolid).iconLidCenterTop);
renderer.renderFaceYNeg(block, x, y, z, ((BlockVatSolid) ThaumicHorizons.blockVatSolid).iconInnerCenter);
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileVisDynamo;
@@ -27,7 +28,7 @@ public class BlockVisDynamoRender extends BlockRenderer implements ISimpleBlockR
final TileVisDynamo tc = new TileVisDynamo();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.tiles.TileVortexStabilizer;
@@ -27,7 +28,7 @@ public class BlockVortexStabilizerRender extends BlockRenderer implements ISimpl
final TileVortexStabilizer tc = new TileVortexStabilizer();
tc.blockMetadata = metadata;
TileEntityRendererDispatcher.instance.renderTileEntityAt(tc, 0.0, 0.0, 0.0, 0.0f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -15,6 +15,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
@@ -33,7 +34,7 @@ public class BlastPhialRender extends RenderSnowball {
if (iicon != null) {
GL11.glPushMatrix();
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.5f, 0.5f, 0.5f);
this.bindEntityTexture(p_76986_1_);
final Tessellator tessellator = Tessellator.instance;
@@ -46,7 +47,7 @@ public class BlastPhialRender extends RenderSnowball {
this.func_77026_a(tessellator, iicon);
GL11.glPopMatrix();
GL11.glColor3f(1.0f, 1.0f, 1.0f);
GL11.glDisable(32826);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
}
@@ -53,16 +53,16 @@ public class RenderAlchemitePrimed extends RenderEntity {
this.bindEntityTexture(entity);
this.blockRenderer.renderBlockAsItem(ThaumicHorizons.blockAlchemite, 0, entity.getBrightness(p_76986_9_));
if (entity.fuse / 5 % 2 == 0) {
GL11.glDisable(3553);
GL11.glDisable(2896);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 772);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);
GL11.glColor4f(1.0f, 1.0f, 1.0f, f2);
this.blockRenderer.renderBlockAsItem(ThaumicHorizons.blockAlchemite, 0, 1.0f);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glDisable(3042);
GL11.glEnable(2896);
GL11.glEnable(3553);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
GL11.glPopMatrix();
}
@@ -92,8 +92,8 @@ public class RenderGolemTH extends RenderGolemBase {
final int upgrades = ((EntityGolemTH) entity).upgrades.length;
final float shift = 0.08f;
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
for (int a = 0; a < upgrades; ++a) {
GL11.glPushMatrix();
GL11.glRotatef(180.0f, 1.0f, 0.0f, 0.0f);
@@ -116,7 +116,7 @@ public class RenderGolemTH extends RenderGolemBase {
tessellator2.draw();
GL11.glPopMatrix();
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
} else {
if (pass == 1 && (((EntityGolemTH) entity).getGolemDecoration().length() > 0
@@ -22,10 +22,10 @@ public class RenderLightningBoltFinite extends RenderLightningBolt {
public void doRender(final EntityLightningBoltFinite p_76986_1_, final double p_76986_2_, final double p_76986_4_,
final double p_76986_6_, final float p_76986_8_, final float p_76986_9_) {
final Tessellator tessellator = Tessellator.instance;
GL11.glDisable(3553);
GL11.glDisable(2896);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
final double[] adouble = new double[8];
final double[] adouble2 = new double[8];
double d3 = 0.0;
@@ -102,8 +102,8 @@ public class RenderLightningBoltFinite extends RenderLightningBolt {
}
}
}
GL11.glDisable(3042);
GL11.glEnable(2896);
GL11.glEnable(3553);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
}
@@ -36,12 +36,12 @@ public class RenderLunarWolf extends RenderWolf {
}
final float scale = p_76986_1_.worldObj.getCurrentMoonPhaseFactor() * 3.0f;
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glPushMatrix();
GL11.glDepthMask(false);
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
final int i = p_76986_1_.ticksExisted % 32;
UtilsFX.bindTexture(TileNodeRenderer.nodetex);
UtilsFX.renderFacingStrip(
@@ -56,11 +56,11 @@ public class RenderLunarWolf extends RenderWolf {
i,
p_76986_9_,
11197951);
GL11.glEnable(2884);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDepthMask(true);
GL11.glPopMatrix();
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
@@ -44,8 +44,8 @@ public class RenderSoul extends Render {
final Tessellator tessellator = Tessellator.instance;
GL11.glPushMatrix();
GL11.glDepthMask(false);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
UtilsFX.bindTexture("thaumichorizons", "textures/misc/soul.png");
final int i = entity.ticksExisted % 16;
final float x2 = i / this.size1;
@@ -57,7 +57,7 @@ public class RenderSoul extends Render {
tessellator.addVertexWithUV(f7 + f1 * f6 + f4 * f6, f8 + f2 * f6, f9 + f3 * f6 + f5 * f6, x2, 1.0);
tessellator.addVertexWithUV(f7 + f1 * f6 - f4 * f6, f8 - f2 * f6, f9 + f3 * f6 - f5 * f6, x2, 0.0);
tessellator.draw();
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopMatrix();
}
@@ -37,12 +37,12 @@ public class RenderTaintfeeder extends RenderPig {
final double p_76986_6_, final float p_76986_8_, final float p_76986_9_) {
super.doRender(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glPushMatrix();
GL11.glDepthMask(false);
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
final int i = p_76986_1_.ticksExisted % 32;
UtilsFX.bindTexture(TileNodeRenderer.nodetex);
UtilsFX.renderFacingStrip(
@@ -57,11 +57,11 @@ public class RenderTaintfeeder extends RenderPig {
i,
p_76986_9_,
11197951);
GL11.glEnable(2884);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDepthMask(true);
GL11.glPopMatrix();
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
@@ -90,9 +90,9 @@ public class RenderTaintfeeder extends RenderPig {
}
final float f = (float) Math.sin(Math.toRadians(p_77032_1_.ticksExisted % 45) * 8.0);
this.bindTexture(RenderTaintfeeder.pigEyesTextures);
GL11.glEnable(3042);
GL11.glDisable(3008);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDepthMask(!p_77032_1_.isInvisible());
final char c0 = '\uf0f0';
final int j = c0 % 65536;
@@ -37,8 +37,8 @@ public class RenderWizardCow extends RenderCow {
public void doRender(final EntityWizardCow p_76986_1_, final double p_76986_2_, final double p_76986_4_,
final double p_76986_6_, final float p_76986_8_, final float p_76986_9_) {
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
super.doRender(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
@@ -57,7 +57,7 @@ public class RenderWizardCow extends RenderCow {
RenderWizardCow.cowTypes.get(p_76986_1_.getUniqueID().toString()),
RenderWizardCow.cowMods.get(p_76986_1_.getUniqueID().toString()));
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
}
public void renderMyNode(final double x, final double y, final double z, final EntityLivingBase viewer,
@@ -86,16 +86,16 @@ public class RenderWizardCow extends RenderCow {
}
}
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glDepthMask(false);
if (depthIgnore) {
GL11.glDisable(2929);
GL11.glDisable(GL11.GL_DEPTH_TEST);
}
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
final long time = nt / 5000000L;
final float bscale = 0.25f;
GL11.glPushMatrix();
final float rad = 6.283186f;
final float rad = ((float) Math.PI * 2F);
GL11.glColor4f(1.0f, 1.0f, 1.0f, alpha);
int i = (int) ((nt / 40000000L + x) % frames);
int count = 0;
@@ -108,8 +108,8 @@ public class RenderWizardCow extends RenderCow {
}
average += aspects.getAmount(aspect);
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, aspect.getBlend());
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, aspect.getBlend());
scale = MathHelper.sin(viewer.ticksExisted / (14.0f - count)) * bscale + bscale * 2.0f;
scale = 0.2f + scale * (aspects.getAmount(aspect) / 50.0f);
scale *= size;
@@ -126,7 +126,7 @@ public class RenderWizardCow extends RenderCow {
i,
partialTicks,
aspect.getColor());
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
++count;
if (aspect.getBlend() == 771) {
@@ -135,62 +135,62 @@ public class RenderWizardCow extends RenderCow {
}
average /= aspects.size();
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
i = (int) ((nt / 40000000L + x) % frames);
scale = 0.1f + average / 150.0f;
scale *= size;
int strip = 1;
switch (type) {
case NORMAL -> {
GL11.glBlendFunc(770, 1);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
}
case UNSTABLE -> {
GL11.glBlendFunc(770, 1);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
strip = 6;
angle = 0.0f;
}
case DARK -> {
GL11.glBlendFunc(770, 771);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
strip = 2;
}
case TAINTED -> {
GL11.glBlendFunc(770, 771);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
strip = 5;
}
case HUNGRY -> {
GL11.glBlendFunc(770, 1);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
strip = 4;
}
case PURE -> {
scale *= 0.75f;
GL11.glBlendFunc(770, 1);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
strip = 3;
}
}
GL11.glColor4f(1.0f, 0.0f, 1.0f, alpha);
UtilsFX.renderFacingStrip(x, y, z, angle, scale, alpha, frames, strip, i, partialTicks, 16777215);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glEnable(2884);
GL11.glEnable(GL11.GL_CULL_FACE);
if (depthIgnore) {
GL11.glEnable(2929);
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
GL11.glDepthMask(true);
GL11.glAlphaFunc(516, 0.1f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
} else {
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glDepthMask(false);
final int j = (int) ((nt / 40000000L + x) % frames);
GL11.glColor4f(1.0f, 0.0f, 1.0f, 0.1f);
UtilsFX.renderFacingStrip(x, y, z, 0.0f, 0.5f, 0.1f, frames, 1, j, partialTicks, 16777215);
GL11.glDepthMask(true);
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
}
@@ -77,7 +77,14 @@ public class ItemInjectorRender implements IItemRenderer {
GL11.glRotatef(90.0f, 0.0f, 1.0f, 0.0f);
}
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", this.tx1));
this.injector.render(null, f * 3.1415927f / 16.0f, f * 3.1415927f / 4.0f, (float) rotation, f, 0.0f, 0.125f);
this.injector.render(
null,
f * (float) Math.PI / 16.0f,
f * (float) Math.PI / 4.0f,
(float) rotation,
f,
0.0f,
0.125f);
GL11.glPopMatrix();
}
}
@@ -58,11 +58,11 @@ public class ItemSyringeRender implements IItemRenderer {
} else {
GL11.glTranslated(0.0, -2.75, 0.0);
}
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
UtilsFX.bindTexture(new ResourceLocation("thaumichorizons", this.tx1));
this.syringe.render(null, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.125f, item);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
}
@@ -39,17 +39,17 @@ public class ModelFamiliar extends ModelBase {
this.Body.setRotationPoint(0.0f, 12.0f, -10.0f);
this.Body.setTextureSize(64, 32);
this.Body.mirror = true;
this.setRotation(this.Body, 1.570796f, 0.0f, 0.0f);
this.setRotation(this.Body, ((float) Math.PI / 2F), 0.0f, 0.0f);
(this.Tail1 = new ModelRenderer(this, 0, 15)).addBox(-0.5f, 0.0f, 0.0f, 1, 8, 1);
this.Tail1.setRotationPoint(0.0f, 15.0f, 8.0f);
this.Tail1.setTextureSize(64, 32);
this.Tail1.mirror = true;
this.setRotation(this.Tail1, 1.570796f, 0.0f, 0.0f);
this.setRotation(this.Tail1, ((float) Math.PI / 2F), 0.0f, 0.0f);
(this.Tail2 = new ModelRenderer(this, 4, 15)).addBox(-0.5f, 0.0f, 0.0f, 1, 8, 1);
this.Tail2.setRotationPoint(0.0f, 15.0f, 14.0f);
this.Tail2.setTextureSize(64, 32);
this.Tail2.mirror = true;
this.setRotation(this.Tail2, 1.570796f, 0.0f, 0.0f);
this.setRotation(this.Tail2, ((float) Math.PI / 2F), 0.0f, 0.0f);
(this.LegBackL = new ModelRenderer(this, 8, 13)).addBox(-1.0f, 0.0f, 1.0f, 2, 6, 2);
this.LegBackL.setRotationPoint(1.1f, 18.0f, 5.0f);
this.LegBackL.setTextureSize(64, 32);
@@ -146,40 +146,44 @@ public class ModelFamiliar extends ModelBase {
public void setRotationAngles(final float p_78087_1_, final float p_78087_2_, final float p_78087_3_,
final float p_78087_4_, final float p_78087_5_, final float p_78087_6_, final Entity p_78087_7_) {
this.Main.rotateAngleX = p_78087_5_ / 57.295776f;
this.Main.rotateAngleY = p_78087_4_ / 57.295776f;
this.Nose.rotateAngleX = p_78087_5_ / 57.295776f;
this.Nose.rotateAngleY = p_78087_4_ / 57.295776f;
this.Ear1.rotateAngleX = p_78087_5_ / 57.295776f;
this.Ear1.rotateAngleY = p_78087_4_ / 57.295776f;
this.Ear2.rotateAngleX = p_78087_5_ / 57.295776f;
this.Ear2.rotateAngleY = p_78087_4_ / 57.295776f;
this.HatA.rotateAngleX = p_78087_5_ / 57.295776f;
this.HatA.rotateAngleY = p_78087_4_ / 57.295776f;
this.HatB.rotateAngleX = p_78087_5_ / 57.295776f;
this.HatB.rotateAngleY = p_78087_4_ / 57.295776f;
this.HatC.rotateAngleX = p_78087_5_ / 57.295776f;
this.HatC.rotateAngleY = p_78087_4_ / 57.295776f;
this.HatBuckle.rotateAngleX = p_78087_5_ / 57.295776f;
this.HatBuckle.rotateAngleY = p_78087_4_ / 57.295776f;
this.HatBase.rotateAngleX = p_78087_5_ / 57.295776f;
this.HatBase.rotateAngleY = p_78087_4_ / 57.295776f;
this.Main.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.Main.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.Nose.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.Nose.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.Ear1.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.Ear1.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.Ear2.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.Ear2.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.HatA.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.HatA.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.HatB.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.HatB.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.HatC.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.HatC.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.HatBuckle.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.HatBuckle.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
this.HatBase.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.HatBase.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
if (this.field_78163_i != 3) {
this.Body.rotateAngleX = 1.5707964f;
this.Body.rotateAngleX = ((float) Math.PI / 2F);
if (this.field_78163_i == 2) {
this.LegBackL.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f) * 1.0f * p_78087_2_;
this.LegBackR.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 0.3f) * 1.0f * p_78087_2_;
this.LegFrontL.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f + 0.3f) * 1.0f
this.LegFrontL.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI + 0.3f) * 1.0f
* p_78087_2_;
this.LegFrontR.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f) * 1.0f * p_78087_2_;
this.Tail2.rotateAngleX = 1.7278761f + 0.31415927f * MathHelper.cos(p_78087_1_) * p_78087_2_;
this.LegFrontR.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI) * 1.0f
* p_78087_2_;
this.Tail2.rotateAngleX = 1.7278761f
+ ((float) Math.PI / 10F) * MathHelper.cos(p_78087_1_) * p_78087_2_;
} else {
this.LegBackL.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f) * 1.0f * p_78087_2_;
this.LegBackR.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f) * 1.0f * p_78087_2_;
this.LegFrontL.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f) * 1.0f * p_78087_2_;
this.LegBackR.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI) * 1.0f * p_78087_2_;
this.LegFrontL.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI) * 1.0f
* p_78087_2_;
this.LegFrontR.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f) * 1.0f * p_78087_2_;
if (this.field_78163_i == 1) {
this.Tail2.rotateAngleX = 1.7278761f + 0.7853982f * MathHelper.cos(p_78087_1_) * p_78087_2_;
this.Tail2.rotateAngleX = 1.7278761f
+ ((float) Math.PI / 4F) * MathHelper.cos(p_78087_1_) * p_78087_2_;
} else {
this.Tail2.rotateAngleX = 1.7278761f + 0.47123894f * MathHelper.cos(p_78087_1_) * p_78087_2_;
}
@@ -262,18 +266,18 @@ public class ModelFamiliar extends ModelBase {
tail2.rotationPointY -= 4.0f;
final ModelRenderer tail3 = this.Tail2;
tail3.rotationPointZ += 2.0f;
this.Tail1.rotateAngleX = 1.5707964f;
this.Tail2.rotateAngleX = 1.5707964f;
this.Tail1.rotateAngleX = ((float) Math.PI / 2F);
this.Tail2.rotateAngleX = ((float) Math.PI / 2F);
this.field_78163_i = 0;
} else if (entityocelot.isSprinting()) {
this.Tail2.rotationPointY = this.Tail1.rotationPointY;
final ModelRenderer tail4 = this.Tail2;
tail4.rotationPointZ += 2.0f;
this.Tail1.rotateAngleX = 1.5707964f;
this.Tail2.rotateAngleX = 1.5707964f;
this.Tail1.rotateAngleX = ((float) Math.PI / 2F);
this.Tail2.rotateAngleX = ((float) Math.PI / 2F);
this.field_78163_i = 2;
} else if (entityocelot.isSitting()) {
this.Body.rotateAngleX = 0.7853982f;
this.Body.rotateAngleX = ((float) Math.PI / 4F);
final ModelRenderer body2 = this.Body;
body2.rotationPointY -= 4.0f;
final ModelRenderer body3 = this.Body;
@@ -341,7 +345,7 @@ public class ModelFamiliar extends ModelBase {
legFrontL5.rotationPointZ = n7;
final ModelRenderer legBackL3 = this.LegBackL;
final ModelRenderer legBackR3 = this.LegBackR;
final float n8 = -1.5707964f;
final float n8 = -((float) Math.PI / 2F);
legBackR3.rotateAngleX = n8;
legBackL3.rotateAngleX = n8;
final ModelRenderer legBackL4 = this.LegBackL;
@@ -28,8 +28,8 @@ public class ModelGolemTH extends ModelGolem {
GL11.glColor3f(0.5f + h1, 0.9f + h2, 0.5f + h1);
}
}
this.golemHead.rotateAngleY = par4 / 57.295776f;
this.golemHead.rotateAngleX = par5 / 57.295776f;
this.golemHead.rotateAngleY = par4 / (180F / (float) Math.PI);
this.golemHead.rotateAngleX = par5 / (180F / (float) Math.PI);
this.golemRightLeg.rotateAngleX = -1.5f * this.func_78172_a(par1, 13.0f) * par2;
this.golemLeftLeg.rotateAngleX = 1.5f * this.func_78172_a(par1, 13.0f) * par2;
this.golemRightLeg.rotateAngleY = 0.0f;
@@ -38,8 +38,8 @@ public class ModelGolemTH extends ModelGolem {
this.golemRightArm.rotateAngleZ = 0.0f;
if (core == 6) {
final float s = (1.0f - (0.5f + Math.min(64, ((EntityGolemBase) en).getCarryLimit()) / 128.0f)) * 25.0f;
this.golemLeftArm.rotateAngleZ = s / 57.295776f;
this.golemRightArm.rotateAngleZ = -s / 57.295776f;
this.golemLeftArm.rotateAngleZ = s / (180F / (float) Math.PI);
this.golemRightArm.rotateAngleZ = -s / (180F / (float) Math.PI);
}
}
@@ -92,27 +92,30 @@ public class ModelGuardianPanther extends ModelBase {
public void setRotationAngles(final float p_78087_1_, final float p_78087_2_, final float p_78087_3_,
final float p_78087_4_, final float p_78087_5_, final float p_78087_6_, final Entity p_78087_7_) {
this.ocelotHead.rotateAngleX = p_78087_5_ / 57.295776f;
this.ocelotHead.rotateAngleY = p_78087_4_ / 57.295776f;
this.ocelotHead.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI);
this.ocelotHead.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI);
if (this.field_78163_i != 3) {
this.ocelotBody.rotateAngleX = 1.5707964f;
this.ocelotBody.rotateAngleX = ((float) Math.PI / 2F);
if (this.field_78163_i == 2) {
this.ocelotBackLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f) * 1.0f * p_78087_2_;
this.ocelotBackRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 0.3f) * 1.0f * p_78087_2_;
this.ocelotFrontLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f + 0.3f) * 1.0f
this.ocelotFrontLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI + 0.3f)
* 1.0f
* p_78087_2_;
this.ocelotFrontRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f) * 1.0f
this.ocelotFrontRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI) * 1.0f
* p_78087_2_;
this.ocelotTail2.rotateAngleX = 1.7278761f + 0.31415927f * MathHelper.cos(p_78087_1_) * p_78087_2_;
this.ocelotTail2.rotateAngleX = 1.7278761f
+ ((float) Math.PI / 10F) * MathHelper.cos(p_78087_1_) * p_78087_2_;
} else {
this.ocelotBackLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f) * 1.0f * p_78087_2_;
this.ocelotBackRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f) * 1.0f
this.ocelotBackRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI) * 1.0f
* p_78087_2_;
this.ocelotFrontLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + 3.1415927f) * 1.0f
this.ocelotFrontLeftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f + (float) Math.PI) * 1.0f
* p_78087_2_;
this.ocelotFrontRightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662f) * 1.0f * p_78087_2_;
if (this.field_78163_i == 1) {
this.ocelotTail2.rotateAngleX = 1.7278761f + 0.7853982f * MathHelper.cos(p_78087_1_) * p_78087_2_;
this.ocelotTail2.rotateAngleX = 1.7278761f
+ ((float) Math.PI / 4F) * MathHelper.cos(p_78087_1_) * p_78087_2_;
} else {
this.ocelotTail2.rotateAngleX = 1.7278761f + 0.47123894f * MathHelper.cos(p_78087_1_) * p_78087_2_;
}
@@ -163,18 +166,18 @@ public class ModelGuardianPanther extends ModelBase {
ocelotTail2.rotationPointY -= 4.0f;
final ModelRenderer ocelotTail3 = this.ocelotTail2;
ocelotTail3.rotationPointZ += 2.0f;
this.ocelotTail.rotateAngleX = 1.5707964f;
this.ocelotTail2.rotateAngleX = 1.5707964f;
this.ocelotTail.rotateAngleX = ((float) Math.PI / 2F);
this.ocelotTail2.rotateAngleX = ((float) Math.PI / 2F);
this.field_78163_i = 0;
} else if (entityocelot.isSprinting()) {
this.ocelotTail2.rotationPointY = this.ocelotTail.rotationPointY;
final ModelRenderer ocelotTail4 = this.ocelotTail2;
ocelotTail4.rotationPointZ += 2.0f;
this.ocelotTail.rotateAngleX = 1.5707964f;
this.ocelotTail2.rotateAngleX = 1.5707964f;
this.ocelotTail.rotateAngleX = ((float) Math.PI / 2F);
this.ocelotTail2.rotateAngleX = ((float) Math.PI / 2F);
this.field_78163_i = 2;
} else if (entityocelot.isSitting()) {
this.ocelotBody.rotateAngleX = 0.7853982f;
this.ocelotBody.rotateAngleX = ((float) Math.PI / 4F);
final ModelRenderer ocelotBody2 = this.ocelotBody;
ocelotBody2.rotationPointY -= 4.0f;
final ModelRenderer ocelotBody3 = this.ocelotBody;
@@ -210,7 +213,7 @@ public class ModelGuardianPanther extends ModelBase {
ocelotFrontLeftLeg5.rotationPointZ = n7;
final ModelRenderer ocelotBackLeftLeg3 = this.ocelotBackLeftLeg;
final ModelRenderer ocelotBackRightLeg3 = this.ocelotBackRightLeg;
final float n8 = -1.5707964f;
final float n8 = -((float) Math.PI / 2F);
ocelotBackRightLeg3.rotateAngleX = n8;
ocelotBackLeftLeg3.rotateAngleX = n8;
final ModelRenderer ocelotBackLeftLeg4 = this.ocelotBackLeftLeg;
@@ -45,7 +45,7 @@ public class ModelInjector extends ModelBase {
this.BowR1.setRotationPoint(2.5f, 1.0f, -8.0f);
this.BowR1.setTextureSize(64, 32);
this.BowR1.mirror = true;
this.setRotation(this.BowR1, 0.0f, 3.141593f, 0.0f);
this.setRotation(this.BowR1, 0.0f, (float) Math.PI, 0.0f);
(this.BowL2 = new ModelRenderer(this, 0, 8)).addBox(0.0f, -1.0f, 0.0f, 3, 1, 1);
this.BowL2.setRotationPoint(6.0f, 1.0f, -7.5f);
this.BowL2.setTextureSize(64, 32);
@@ -84,8 +84,8 @@ public class ModelInjector extends ModelBase {
this.BowR2.render(f5);
this.Stock.render(f5);
this.Grip.render(f5);
GL11.glDisable(3553);
GL11.glDisable(2896);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
final Tessellator tessellator = Tessellator.instance;
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(0);
@@ -102,8 +102,8 @@ public class ModelInjector extends ModelBase {
this.BowL2.rotationPointY - 0.9375,
this.BowL2.rotationPointZ + 6.8125 + f3 * 0.125);
tessellator.draw();
GL11.glEnable(2896);
GL11.glEnable(3553);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
this.Thingy.setRotationPoint(
(this.BowR2.rotationPointX + this.BowL2.rotationPointX) / 2.0f,
0.0f,
@@ -121,9 +121,9 @@ public class ModelInjector extends ModelBase {
final float f5, final Entity ent) {
super.setRotationAngles(f, f1, f2, f3, f4, f5, ent);
this.BowL1.rotateAngleY = -f;
this.BowR1.rotateAngleY = f + 3.1415927f;
this.BowR1.rotateAngleY = f + (float) Math.PI;
this.BowL2.rotateAngleY = -0.34906238f - f1;
this.BowR2.rotateAngleY = 3.490655f + f1;
this.Drum.rotateAngleZ = f2 * 2.0f * 3.1415927f / 180.0f;
this.Drum.rotateAngleZ = f2 * 2.0f * (float) Math.PI / 180.0f;
}
}
@@ -49,20 +49,20 @@ public class ItemJarTHRenderer implements IItemRenderer {
if (item.hasTagCompound() && item.stackTagCompound.getBoolean("isSoul")) {
final long nt = System.nanoTime();
UtilsFX.bindTexture("thaumichorizons", ItemJarTHRenderer.tx3);
GL11.glEnable(3042);
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glDisable(2929);
GL11.glDisable(2884);
GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glPushMatrix();
GL11.glTranslated(0.0, 0.4, 0.0);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
UtilsFX.renderAnimatedQuad(0.3f, 0.9f, 16, (int) (nt / 40000000L % 16L), 0.0f, 16777215);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
GL11.glEnable(2884);
GL11.glEnable(2929);
GL11.glDisable(3042);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
} else if (item.hasTagCompound()) {
final TileSoulJar th = new TileSoulJar();
GL11.glPushMatrix();
@@ -71,21 +71,21 @@ public class ItemJarTHRenderer implements IItemRenderer {
final EntityLivingBase viewer = Minecraft.getMinecraft().thePlayer;
th.entity = EntityList.createEntityFromNBT(item.getTagCompound(), viewer.worldObj);
TileEntityRendererDispatcher.instance.renderTileEntityAt(th, 0.0, 0.0, 0.0, 0.0f);
GL11.glBlendFunc(770, 771);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft.getMinecraft().entityRenderer.disableLightmap(0.0);
GL11.glPopMatrix();
}
GL11.glPushMatrix();
GL11.glTranslatef(0.0f, 0.5f, 0.0f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
final RenderBlocks rb = (RenderBlocks) data[0];
rb.useInventoryTint = true;
rb.renderBlockAsItem(ConfigBlocks.blockJar, 0, 1.0f);
GL11.glPopMatrix();
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
}
}
@@ -51,7 +51,7 @@ public class TileCloudRender extends TileEntitySpecialRenderer {
return;
}
final float f1 = 1.0f;
GL11.glAlphaFunc(516, 0.1f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
if (f1 > 0.0f) {
final Tessellator tessellator = Tessellator.instance;
final BiomeGenBase biomegenbase = tco.getWorldObj().getBiomeGenForCoords(tco.xCoord, tco.zCoord);
@@ -62,11 +62,11 @@ public class TileCloudRender extends TileEntitySpecialRenderer {
} else {
this.bindTexture(TileCloudRender.locationSnowPng);
}
GL11.glTexParameterf(3553, 10242, 10497.0f);
GL11.glTexParameterf(3553, 10243, 10497.0f);
GL11.glDisable(2896);
GL11.glDisable(2884);
GL11.glDisable(3042);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0f);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0f);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
final float f2 = tco.getWorldObj().getTotalWorldTime() + p_147500_8_ + tco.xCoord + 16 * tco.zCoord;
@@ -130,8 +130,8 @@ public class TileCloudRender extends TileEntitySpecialRenderer {
tessellator.addVertexWithUV(p_147500_2_ + d4, p_147500_4_, p_147500_6_ + d5, d13, d15);
tessellator.addVertexWithUV(p_147500_2_ + d4, p_147500_4_ - d12, p_147500_6_ + d5, d13, d16);
tessellator.draw();
GL11.glEnable(2896);
GL11.glEnable(3553);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(true);
}
}
@@ -53,9 +53,9 @@ public class TileEssentiaDynamoRender extends TileEntitySpecialRenderer {
}
if (tco.rise >= 0.3f && tco.ticksProvided > 0) {
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
final long nt = System.nanoTime();
UtilsFX.bindTexture(TileEssentiaDynamoRender.tx3);
final int frames = UtilsFX.getTextureAnimationSize(TileEssentiaDynamoRender.tx3);
@@ -71,8 +71,8 @@ public class TileEssentiaDynamoRender extends TileEntitySpecialRenderer {
i,
f,
tco.essentia.getColor());
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
GL11.glPushMatrix();
@@ -18,6 +18,7 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.tiles.TileSyntheticNode;
@@ -80,7 +81,7 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
&& tco.getAspectsBase().getAspects()[0] != null) {
final double offset = 6.283185307179586 / tco.getAspectsBase().size();
int which = 0;
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glDepthMask(false);
for (final Aspect asp2 : tco.getAspectsBase().getAspects()) {
if (asp2 == null) {
@@ -88,8 +89,8 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
}
final Color colo = new Color(asp2.getColor());
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
final double radian = Math.toRadians(tco.rotation);
final double dist = 0.4 + 0.1 * Math.cos(radian);
UtilsFX.renderFacingStrip(
@@ -104,12 +105,12 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
(int) tco.rotation % frames,
f,
colo.getRGB());
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
++which;
}
GL11.glDepthMask(true);
GL11.glAlphaFunc(516, 0.1f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
}
if (tco != null && tco.drainEntity != null && tco.drainCollision != null) {
final Entity drainEntity = tco.drainEntity;
@@ -128,11 +129,11 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
final Vec3 vec3 = Vec3.createVectorHelper(-0.1, -0.1, 0.5);
vec3.rotateAroundX(
-(drainEntity.prevRotationPitch
+ (drainEntity.rotationPitch - drainEntity.prevRotationPitch) * f) * 3.141593f
+ (drainEntity.rotationPitch - drainEntity.prevRotationPitch) * f) * (float) Math.PI
/ 180.0f);
vec3.rotateAroundY(
-(drainEntity.prevRotationYaw + (drainEntity.rotationYaw - drainEntity.prevRotationYaw) * f)
* 3.141593f
* (float) Math.PI
/ 180.0f);
vec3.rotateAroundY(-f2 * 0.01f);
vec3.rotateAroundX(-f2 * 0.015f);
@@ -155,11 +156,9 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
Math.min(iiud, 10) / 10.0f);
GL11.glPopMatrix();
}
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
} catch (Exception ignored) {} finally {
GL11.glPopMatrix();
}
}
@@ -174,10 +173,10 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
final float g = c.getGreen() / 220.0f;
final float b = c.getBlue() / 220.0f;
GL11.glPushMatrix();
GL11.glEnable(2977);
GL11.glEnable(3042);
GL11.glEnable(32826);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_NORMALIZE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glTranslatef(x + 0.5f, (float) (y - 0.15f + 0.10000000149011612 * Math.sin(Math.toRadians(a1))), z + 0.5f);
GL11.glRotatef(a1, 0.0f, 1.0f, 0.0f);
GL11.glRotatef(a2, 1.0f, 0.0f, 0.0f);
@@ -192,8 +191,8 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
GL11.glColor4f(r, g, b, 1.0f);
this.model.render();
GL11.glScalef(1.0f, 1.0f, 1.0f);
GL11.glDisable(32826);
GL11.glDisable(3042);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glPopMatrix();
}
@@ -10,6 +10,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.client.renderer.model.ModelInspiratron;
import com.kentington.thaumichorizons.common.tiles.TileInspiratron;
@@ -34,17 +35,17 @@ public class TileInspiratronRender extends TileEntitySpecialRenderer {
public void renderTileEntityAt(final TileEntity tile, final double x, final double y, final double z,
final float f) {
GL11.glPushMatrix();
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f);
GL11.glRotatef(180.0f, 1.0f, 0.0f, 0.0f);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glPushMatrix();
GL11.glTranslatef(0.0f, -0.125f, 0.0f);
this.renderBrain((TileInspiratron) tile, x, y, z, f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glTranslatef(0.0f, -1.5f, 0.0f);
UtilsFX.bindTexture("thaumichorizons", TileInspiratronRender.tx1);
this.inspiratron.render(null, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0625f);
@@ -57,9 +58,9 @@ public class TileInspiratronRender extends TileEntitySpecialRenderer {
GL11.glTranslatef(0.0f, -0.8f + bob, 0.0f);
if (te != null) {
float f2;
for (f2 = te.rota - te.rotb; f2 < -3.141593f; f2 += 6.283185f) {}
for (f2 = te.rota - te.rotb; f2 < -(float) Math.PI; f2 += ((float) Math.PI * 2F)) {}
final float f3 = te.rotb + f2 * f;
GL11.glRotatef(f3 * 180.0f / 3.141593f, 0.0f, 1.0f, 0.0f);
GL11.glRotatef(f3 * 180.0f / (float) Math.PI, 0.0f, 1.0f, 0.0f);
}
GL11.glRotatef(-90.0f, 0.0f, 1.0f, 0.0f);
UtilsFX.bindTexture("thaumichorizons", "textures/models/brain.png");
@@ -37,13 +37,13 @@ public class TileJarTHRenderer extends TileEntitySpecialRenderer {
if (th.jarTag != null && th.jarTag.getBoolean("isSoul")) {
final long nt = System.nanoTime();
UtilsFX.bindTexture("thaumichorizons", TileJarTHRenderer.tx3);
GL11.glEnable(3042);
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glDisable(2929);
GL11.glDisable(2884);
GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
UtilsFX.renderFacingQuad(
tile.xCoord + 0.5,
tile.yCoord + 0.4,
@@ -55,15 +55,15 @@ public class TileJarTHRenderer extends TileEntitySpecialRenderer {
(int) (nt / 40000000L % 16L),
f,
16777215);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
GL11.glEnable(2884);
GL11.glEnable(2929);
GL11.glDisable(3042);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
return;
}
GL11.glPushMatrix();
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glTranslatef((float) x + 0.5f, (float) y + 0.01f, (float) z + 0.5f);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
this.bindTexture(th.getTexture());
@@ -77,7 +77,7 @@ public class TileJarTHRenderer extends TileEntitySpecialRenderer {
render.doRender(th.entity, 0.0, 0.0, 0.0, 0.0f, f);
}
}
GL11.glEnable(2884);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@@ -11,6 +11,7 @@ import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.tiles.TileNodeMonitor;
@@ -69,10 +70,10 @@ public class TileNodeMonitorRender extends TileEntitySpecialRenderer {
}
UtilsFX.bindTexture("thaumichorizons", TileNodeMonitorRender.tx1);
this.model.renderAll();
GL11.glEnable(2977);
GL11.glEnable(3042);
GL11.glEnable(32826);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_NORMALIZE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
if (tco.switchy) {
UtilsFX.bindTexture("thaumichorizons", TileNodeMonitorRender.tx3);
} else {
@@ -39,8 +39,8 @@ public class TilePortalTHRender extends TileEntitySpecialRenderer {
UtilsFX.bindTexture(TilePortalTHRender.portaltex);
GL11.glPushMatrix();
GL11.glDepthMask(false);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0f, 0.0f, 1.0f, 1.0f);
if (Minecraft.getMinecraft().renderViewEntity instanceof final EntityPlayer player) {
final Tessellator tessellator = Tessellator.instance;
@@ -91,7 +91,7 @@ public class TilePortalTHRender extends TileEntitySpecialRenderer {
.addVertexWithUV(px + v4.xCoord * scale, py + v4.yCoord * scaley, pz + v4.zCoord * scale, f2, f4);
tessellator.draw();
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopMatrix();
}
@@ -42,8 +42,8 @@ public class TileRecombinatorRender extends TileEntitySpecialRenderer {
final int frames = UtilsFX.getTextureAnimationSize(TileRecombinatorRender.tx2);
final int i = (int) ((nt / 40000000L + x) % frames);
UtilsFX.bindTexture("thaumcraft", TileRecombinatorRender.tx2);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glScalef(1.0f, 1.0f, 1.0f);
GL11.glPushMatrix();
UtilsFX.renderFacingQuad(
@@ -73,7 +73,7 @@ public class TileRecombinatorRender extends TileEntitySpecialRenderer {
0.1f,
3);
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
}
GL11.glPopMatrix();
}
@@ -36,15 +36,15 @@ public class TileSoulBeaconRender extends TileEntitySpecialRenderer {
return;
}
final float f1 = tco.func_146002_i();
GL11.glAlphaFunc(516, 0.1f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
if (f1 > 0.0f) {
final Tessellator tessellator = Tessellator.instance;
this.bindTexture(TileSoulBeaconRender.field_147523_b);
GL11.glTexParameterf(3553, 10242, 10497.0f);
GL11.glTexParameterf(3553, 10243, 10497.0f);
GL11.glDisable(2896);
GL11.glDisable(2884);
GL11.glDisable(3042);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0f);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0f);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
final float f2 = tco.getWorldObj().getTotalWorldTime() + p_147500_8_;
@@ -84,7 +84,7 @@ public class TileSoulBeaconRender extends TileEntitySpecialRenderer {
tessellator.addVertexWithUV(p_147500_2_ + d5, p_147500_4_, p_147500_6_ + d6, d14, d16);
tessellator.addVertexWithUV(p_147500_2_ + d5, p_147500_4_ + d13, p_147500_6_ + d6, d14, d17);
tessellator.draw();
GL11.glEnable(3042);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glDepthMask(false);
tessellator.startDrawingQuads();
@@ -119,8 +119,8 @@ public class TileSoulBeaconRender extends TileEntitySpecialRenderer {
tessellator.addVertexWithUV(p_147500_2_ + d18, p_147500_4_, p_147500_6_ + d19, d27, d29);
tessellator.addVertexWithUV(p_147500_2_ + d18, p_147500_4_ + d26, p_147500_6_ + d19, d27, d30);
tessellator.draw();
GL11.glEnable(2896);
GL11.glEnable(3553);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(true);
}
}
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.client.renderer.model.ModelSoulforge;
import com.kentington.thaumichorizons.common.tiles.TileSoulforge;
@@ -31,16 +32,16 @@ public class TileSoulforgeRender extends TileEntitySpecialRenderer {
public void renderTileEntityAt(final TileEntity tile, final double x, final double y, final double z,
final float f) {
GL11.glPushMatrix();
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f);
GL11.glRotatef(180.0f, 1.0f, 0.0f, 0.0f);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glPushMatrix();
GL11.glTranslatef(0.0f, -0.25f, 0.0f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
this.renderBrains((TileSoulforge) tile, x, y, z, f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
GL11.glTranslatef(0.0f, -1.5f, 0.0f);
UtilsFX.bindTexture("thaumichorizons", TileSoulforgeRender.tx1);
@@ -51,8 +52,8 @@ public class TileSoulforgeRender extends TileEntitySpecialRenderer {
final int frames = UtilsFX.getTextureAnimationSize(TileSoulforgeRender.tx2);
final int i = (int) ((nt / 40000000L + x) % frames);
UtilsFX.bindTexture("thaumcraft", TileSoulforgeRender.tx2);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glScalef(1.0f, 1.0f, 1.0f);
GL11.glPushMatrix();
UtilsFX.renderFacingQuad(
@@ -106,7 +107,7 @@ public class TileSoulforgeRender extends TileEntitySpecialRenderer {
f,
16777215);
GL11.glPopMatrix();
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
}
if (((TileSoulforge) tile).souls > 0) {
final double offset = 6.283185307179586 / ((TileSoulforge) tile).souls;
@@ -114,14 +115,14 @@ public class TileSoulforgeRender extends TileEntitySpecialRenderer {
final double radian = Math.toRadians((int) (nt / 40000000L % 360L));
final double dist = 0.1 + 0.1 * Math.cos(radian);
UtilsFX.bindTexture("thaumichorizons", TileSoulforgeRender.tx3);
GL11.glEnable(3042);
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glDisable(2929);
GL11.glDisable(2884);
GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_CULL_FACE);
for (int which = 0; which < ((TileSoulforge) tile).souls; ++which) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
UtilsFX.renderFacingQuad(
tile.xCoord + 0.5 + dist * Math.sin(2.0 * radian + offset * which),
tile.yCoord + 0.85,
@@ -133,12 +134,12 @@ public class TileSoulforgeRender extends TileEntitySpecialRenderer {
(int) (nt / 40000000L % frames),
f,
16777215);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
GL11.glEnable(2884);
GL11.glEnable(2929);
GL11.glDisable(3042);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_BLEND);
}
}
@@ -50,12 +50,12 @@ public class TileVatMatrixRender extends TileEntitySpecialRenderer {
final float f2 = 0.9f;
final float f3 = 0.0f;
final Random random = new Random(245L);
GL11.glDisable(3553);
GL11.glShadeModel(7425);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glDisable(3008);
GL11.glEnable(2884);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDepthMask(false);
GL11.glPushMatrix();
for (int i = 0; i < q; ++i) {
@@ -81,14 +81,14 @@ public class TileVatMatrixRender extends TileEntitySpecialRenderer {
}
GL11.glPopMatrix();
GL11.glDepthMask(true);
GL11.glDisable(2884);
GL11.glDisable(3042);
GL11.glShadeModel(7424);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glEnable(3553);
GL11.glEnable(3008);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_ALPHA_TEST);
RenderHelper.enableStandardItemLighting();
GL11.glBlendFunc(770, 771);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glPopMatrix();
}
@@ -151,9 +151,9 @@ public class TileVatMatrixRender extends TileEntitySpecialRenderer {
}
}
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
for (int a = 0; a < 2; ++a) {
for (int b4 = 0; b4 < 2; ++b4) {
for (int c = 0; c < 2; ++c) {
@@ -197,8 +197,9 @@ public class TileVatMatrixRender extends TileEntitySpecialRenderer {
}
}
}
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glPopMatrix();
GL11.glPopMatrix();
if (vat != null && vat.mode == 2) {
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.client.renderer.model.ModelVat;
@@ -27,7 +28,7 @@ public class TileVatRender extends TileEntitySpecialRenderer {
GL11.glTranslatef((float) x + 0.5f, (float) y - 0.5f, (float) z + 0.5f);
UtilsFX.bindTexture("thaumichorizons", this.tx1);
TileVatRender.model.render(null, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0625f);
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.common.tiles.TileVat;
@@ -41,8 +42,8 @@ public class TileVatSlaveRender extends TileEntitySpecialRenderer {
final float n = 800 - tco.progress;
tco.getClass();
final float scale = n / 800.0f;
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0f, 1.0f, 1.0f, scale);
final Entity p_147936_1_ = tco.getEntityContained();
final double d0 = p_147936_1_.lastTickPosX + (p_147936_1_.posX - p_147936_1_.lastTickPosX) * f;
@@ -62,7 +63,7 @@ public class TileVatSlaveRender extends TileEntitySpecialRenderer {
RenderManager.instance.renderEntitySimple(tco.getEntityContained(), f);
}
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
} else if (tco.mode == 3) {
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
GL11.glTranslatef(
@@ -98,7 +99,7 @@ public class TileVatSlaveRender extends TileEntitySpecialRenderer {
0.0f);
RenderManager.instance.renderEntitySimple(this.stack, f);
}
GL11.glEnable(32826);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
}
@@ -41,9 +41,9 @@ public class TileVisDynamoRender extends TileEntitySpecialRenderer {
final TileVisDynamo tco = (TileVisDynamo) te;
if (tco.rise >= 0.3f && tco.ticksProvided > 0) {
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 1);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
final long nt = System.nanoTime();
UtilsFX.bindTexture(TileVisDynamoRender.tx3);
final int frames = UtilsFX.getTextureAnimationSize(TileVisDynamoRender.tx3);
@@ -59,8 +59,8 @@ public class TileVisDynamoRender extends TileEntitySpecialRenderer {
i,
f,
tco.color.getRGB());
GL11.glDisable(3042);
GL11.glAlphaFunc(516, 0.1f);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
if (tco.drainEntity != null && tco.drainCollision != null) {
@@ -79,11 +79,11 @@ public class TileVisDynamoRender extends TileEntitySpecialRenderer {
final Vec3 vec3 = Vec3.createVectorHelper(-0.1, -0.1, 0.5);
vec3.rotateAroundX(
-(drainEntity.prevRotationPitch
+ (drainEntity.rotationPitch - drainEntity.prevRotationPitch) * f) * 3.141593f
+ (drainEntity.rotationPitch - drainEntity.prevRotationPitch) * f) * (float) Math.PI
/ 180.0f);
vec3.rotateAroundY(
-(drainEntity.prevRotationYaw + (drainEntity.rotationYaw - drainEntity.prevRotationYaw) * f)
* 3.141593f
* (float) Math.PI
/ 180.0f);
vec3.rotateAroundY(-f2 * 0.01f);
vec3.rotateAroundX(-f2 * 0.015f);
@@ -7,13 +7,12 @@ package com.kentington.thaumichorizons.client.renderer.tile;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import org.lwjgl.opengl.GL11;
@@ -23,7 +22,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.client.lib.QuadHelper;
import thaumcraft.client.lib.UtilsFX;
@SideOnly(Side.CLIENT)
@@ -34,25 +32,20 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
public void renderTileEntityAt(final TileEntity tile, final double x, final double y, final double z,
final float partialTicks) {
if (!(tile instanceof final TileVortex node)) {
if (!(tile instanceof final TileVortex node) || !node.clientSynced) {
return;
}
final float size = 10.0f;
final double viewDistance = 64.0;
final EntityLivingBase viewer = Minecraft.getMinecraft().renderViewEntity;
final boolean condition = true;
final boolean depthIgnore = false;
renderNode(
viewer,
viewDistance,
condition,
depthIgnore,
size,
Minecraft.getMinecraft().renderViewEntity,
64.0,
true,
false,
10.0f,
tile.xCoord,
tile.yCoord,
tile.zCoord,
partialTicks,
((TileVortex) tile).aspects,
node.aspects,
node.count,
node.collapsing,
node.beams,
@@ -72,17 +65,20 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
return;
}
float alpha = (float) ((viewDistance - distance) / viewDistance);
// Camera-relative center — avoids float precision loss at large world coords.
final double cx = x + 0.5 - RenderManager.renderPosX;
final double cy = y + 0.5 - RenderManager.renderPosY;
final double cz = z + 0.5 - RenderManager.renderPosZ;
GL11.glPushMatrix();
GL11.glAlphaFunc(516, 0.003921569f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
GL11.glDepthMask(false);
if (depthIgnore) {
GL11.glDisable(2929);
GL11.glDisable(GL11.GL_DEPTH_TEST);
}
GL11.glDisable(2884);
final long time = nt / 5000000L;
GL11.glDisable(GL11.GL_CULL_FACE);
final float bscale = 0.25f;
GL11.glPushMatrix();
final float rad = 6.283186f;
final float rad = ((float) Math.PI * 2F);
GL11.glColor4f(1.0f, 1.0f, 1.0f, alpha);
final int i = (int) ((nt / 40000000L + x) % frames);
int count = 0;
@@ -99,12 +95,12 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
}
average += aspects.getAmount(aspect);
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, aspect.getBlend());
scale = MathHelper.sin(viewer.ticksExisted / (14.0f - count)) * bscale + bscale * 2.0f;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, aspect.getBlend());
scale = 0.4f;
scale *= size;
angle = time % (5000 + 500 * count) / (5000.0f + 500 * count) * rad;
final long periodNs = (5000L + 500L * count) * 5_000_000L;
angle = (float) ((double) (nt % periodNs) / periodNs) * rad;
if (beams < 6 || timeOpen < 50) {
UtilsFX.renderFacingStrip(
x + 0.5,
@@ -132,7 +128,7 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
partialTicks,
aspect.getColor());
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
++count;
if (aspect.getBlend() == 771) {
@@ -141,8 +137,8 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
}
average /= aspects.size();
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0f, 0.0f, 1.0f, alpha);
float corescale = 1.0f;
if (timeOpen < 50 && !collapsing) {
@@ -153,9 +149,9 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
if (!cheat && (beams < 6 || timeOpen < 50)) {
UtilsFX.bindTexture(TileVortexRender.vortextex);
renderVortex(
x + 0.5,
y + 0.5,
z + 0.5,
cx,
cy,
cz,
angle * 20.0f * corescale / (1 + 2 * beams),
scale / 5.0f * corescale,
0.8f,
@@ -176,7 +172,7 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
partialTicks,
16777215);
}
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
if (plane) {
for (Aspect aspect2 : aspects.getAspects()) {
@@ -188,12 +184,12 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
}
average += aspects.getAmount(aspect2);
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
scale = MathHelper.sin(viewer.ticksExisted / (14.0f - count)) * bscale + bscale * 2.0f;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
scale = 0.4f;
scale *= size;
angle = time % (5000 + 500 * count) / (5000.0f + 500 * count) * rad;
final long periodNs2 = (5000L + 500L * count) * 5_000_000L;
angle = (float) ((double) (nt % periodNs2) / periodNs2) * rad;
UtilsFX.renderFacingStrip(
x + 0.5,
y + 0.5,
@@ -206,7 +202,7 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
i,
partialTicks,
aspect2.getColor());
GL11.glDisable(3042);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
++count;
if (aspect2.getBlend() == 771) {
@@ -215,12 +211,12 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
}
}
GL11.glPopMatrix();
GL11.glEnable(2884);
GL11.glEnable(GL11.GL_CULL_FACE);
if (depthIgnore) {
GL11.glEnable(2929);
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
GL11.glDepthMask(true);
GL11.glAlphaFunc(516, 0.1f);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
GL11.glPopMatrix();
}
}
@@ -233,37 +229,29 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
final float arYZ = ActiveRenderInfo.rotationYZ;
final float arXY = ActiveRenderInfo.rotationXY;
final float arXZ = ActiveRenderInfo.rotationXZ;
final EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().renderViewEntity;
final double iPX = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
final double iPY = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
final double iPZ = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTicks;
GL11.glTranslated(-iPX, -iPY, -iPZ);
// Rotate screen-plane basis vectors (H = right, V = up) by angle.
// This avoids Rodrigues rotation around a qvec that shifts with every head movement,
// which caused the vortex to jerk whenever the player moved the camera.
final float cos = MathHelper.cos(angle);
final float sin = MathHelper.sin(angle);
final float hX = cos * arX + sin * arYZ;
final float hY = sin * arXZ;
final float hZ = cos * arZ + sin * arXY;
final float vX = cos * arYZ - sin * arX;
final float vY = cos * arXZ;
final float vZ = cos * arXY - sin * arZ;
tessellator.startDrawingQuads();
tessellator.setBrightness(220);
tessellator.setColorRGBA_I(color, (int) (alpha * 255.0f));
final Vec3 v1 = Vec3
.createVectorHelper(-arX * scale - arYZ * scale, -arXZ * scale, -arZ * scale - arXY * scale);
final Vec3 v2 = Vec3.createVectorHelper(-arX * scale + arYZ * scale, arXZ * scale, -arZ * scale + arXY * scale);
final Vec3 v3 = Vec3.createVectorHelper(arX * scale + arYZ * scale, arXZ * scale, arZ * scale + arXY * scale);
final Vec3 v4 = Vec3.createVectorHelper(arX * scale - arYZ * scale, -arXZ * scale, arZ * scale - arXY * scale);
if (angle != 0.0f) {
final Vec3 pvec = Vec3.createVectorHelper(iPX, iPY, iPZ);
final Vec3 tvec = Vec3.createVectorHelper(px, py, pz);
final Vec3 qvec = pvec.subtract(tvec).normalize();
QuadHelper.setAxis(qvec, angle).rotate(v1);
QuadHelper.setAxis(qvec, angle).rotate(v2);
QuadHelper.setAxis(qvec, angle).rotate(v3);
QuadHelper.setAxis(qvec, angle).rotate(v4);
}
final float f2 = 0.0f;
final float f3 = 1.0f;
final float f4 = 0.0f;
final float f5 = 1.0f;
tessellator.setNormal(0.0f, 0.0f, -1.0f);
tessellator.addVertexWithUV(px + v1.xCoord, py + v1.yCoord, pz + v1.zCoord, f2, f5);
tessellator.addVertexWithUV(px + v2.xCoord, py + v2.yCoord, pz + v2.zCoord, f3, f5);
tessellator.addVertexWithUV(px + v3.xCoord, py + v3.yCoord, pz + v3.zCoord, f3, f4);
tessellator.addVertexWithUV(px + v4.xCoord, py + v4.yCoord, pz + v4.zCoord, f2, f4);
tessellator
.addVertexWithUV(px + (-hX - vX) * scale, py + (-hY - vY) * scale, pz + (-hZ - vZ) * scale, 0.0, 1.0);
tessellator
.addVertexWithUV(px + (-hX + vX) * scale, py + (-hY + vY) * scale, pz + (-hZ + vZ) * scale, 1.0, 1.0);
tessellator.addVertexWithUV(px + (hX + vX) * scale, py + (hY + vY) * scale, pz + (hZ + vZ) * scale, 1.0, 0.0);
tessellator.addVertexWithUV(px + (hX - vX) * scale, py + (hY - vY) * scale, pz + (hZ - vZ) * scale, 0.0, 0.0);
tessellator.draw();
}
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.kentington.thaumichorizons.client.renderer.model.ModelVortexAttenuator;
import com.kentington.thaumichorizons.common.tiles.TileVortexStabilizer;
@@ -27,7 +28,7 @@ public class TileVortexStabilizerRender extends TileEntitySpecialRenderer {
final float p_147500_8_) {
final TileVortexStabilizer te = (TileVortexStabilizer) p_147500_1_;
GL11.glPushMatrix();
GL11.glDisable(2884);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f);
switch (te.blockMetadata) {
case 0 -> {
@@ -60,9 +61,9 @@ public class TileVortexStabilizerRender extends TileEntitySpecialRenderer {
}
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(32826);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
UtilsFX.bindTexture("thaumichorizons", TileVortexStabilizerRender.tx1);
this.model.render(null, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0625f);
@@ -29,6 +29,7 @@ import com.kentington.thaumichorizons.common.tiles.TileSoulExtractor;
import com.kentington.thaumichorizons.common.tiles.TileSoulforge;
import com.kentington.thaumichorizons.common.tiles.TileVat;
import com.kentington.thaumichorizons.common.tiles.TileVisDynamo;
import com.kentington.thaumichorizons.common.tiles.TileVortex;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.IGuiHandler;
@@ -134,4 +135,8 @@ public class CommonProxy implements IGuiHandler {
public void lightningBolt(final World worldObj, final double x, final double y, final double z,
final int boltLength) {}
public void playVortexSound(TileVortex tile) {}
public void stopVortexSound(TileVortex tile) {}
}
@@ -8,16 +8,24 @@ package com.kentington.thaumichorizons.common;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDispenser;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
import net.minecraft.dispenser.BehaviorProjectileDispense;
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.dispenser.IPosition;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.monster.EntityGhast;
@@ -44,7 +52,9 @@ import net.minecraft.item.crafting.ShapelessRecipes;
import net.minecraft.nbt.NBTTagByte;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
@@ -57,6 +67,7 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.google.common.collect.Sets;
import com.kentington.thaumichorizons.client.lib.RenderEventHandler;
import com.kentington.thaumichorizons.common.blocks.BlockAlchemite;
import com.kentington.thaumichorizons.common.blocks.BlockBloodInfuser;
@@ -132,6 +143,7 @@ import com.kentington.thaumichorizons.common.entities.EntitySyringe;
import com.kentington.thaumichorizons.common.entities.EntityTaintPig;
import com.kentington.thaumichorizons.common.entities.EntityVoltSlime;
import com.kentington.thaumichorizons.common.entities.ItemSpawnerEgg;
import com.kentington.thaumichorizons.common.handlers.BehaviorDispenseBoat;
import com.kentington.thaumichorizons.common.items.ItemAmuletMirror;
import com.kentington.thaumichorizons.common.items.ItemBarChocolate;
import com.kentington.thaumichorizons.common.items.ItemBoatGreatwood;
@@ -230,7 +242,7 @@ import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GTOreDictUnificator;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
@@ -473,7 +485,7 @@ public class ThaumicHorizons {
} catch (Exception var8) {
log.error("Thaumic Horizons could not load its configuration file");
} finally {
if (config != null) {
if (config != null && config.hasChanged()) {
config.save();
}
}
@@ -491,10 +503,10 @@ public class ThaumicHorizons {
ROD_CRYSTAL = new WandRod(
"disposable",
250,
null,
new ItemStack(Blocks.bedrock),
99,
new ResourceLocation("thaumichorizons", "textures/models/crystalRod.png"));
CAP_CRYSTAL = new WandCap("disposable", 0.9F, null, 99);
CAP_CRYSTAL = new WandCap("disposable", 0.9F, new ItemStack(Blocks.bedrock), 99);
CAP_CRYSTAL.setTexture(new ResourceLocation("thaumichorizons", "textures/models/crystalCap.png"));
ROD_CRYSTAL.setGlowing(true);
blockSynthNode = new BlockSyntheticNode();
@@ -752,6 +764,7 @@ public class ThaumicHorizons {
proxy.registerHandlers();
proxy.registerRenderers();
FMLCommonHandler.instance().bus().register(instance);
initPotions();
}
@EventHandler
@@ -796,7 +809,6 @@ public class ThaumicHorizons {
shapelessOreDictRecipe(
new ItemStack(ConfigItems.itemTripleMeatTreat),
new Object[] { Items.sugar, itemMeatNugget, ConfigItems.itemNuggetBeef, ConfigItems.itemNuggetFish });
initPotions();
ResearchCategories.registerCategory(
"ThaumicHorizons",
new ResourceLocation("thaumichorizons", "textures/misc/vat.png"),
@@ -2060,7 +2072,62 @@ public class ThaumicHorizons {
8,
4,
new ResourceLocation("thaumichorizons", "textures/misc/pocketplane.png"));
if (!Loader.isModLoaded("gregtech")) {
if (Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi")) {
recipeKeystone = ThaumcraftApi.addInfusionCraftingRecipe(
"pocketPlane",
new ItemStack(itemKeystone),
12,
(new AspectList()).add(Aspect.TRAVEL, 128).add(Aspect.VOID, 64).add(Aspect.EXCHANGE, 48)
.add(Aspect.AURA, 32).add(Aspect.MIND, 16).add(Aspect.ELDRITCH, 64),
new ItemStack(itemPlanarConduit),
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 6),
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
new ItemStack(ConfigItems.itemShard, 1, 6),
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
new ItemStack(ConfigItems.itemShard, 1, 6),
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
new ItemStack(ConfigItems.itemShard, 1, 6),
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L) });
recipeKeystone1 = ThaumcraftApi.addInfusionCraftingRecipe(
"planarKeystone",
new ItemStack(itemKeystone),
9,
(new AspectList()).add(Aspect.TRAVEL, 64).add(Aspect.VOID, 48).add(Aspect.MECHANISM, 32)
.add(Aspect.ELDRITCH, 32),
new ItemStack(Items.ender_eye),
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 6),
new ItemStack(ConfigItems.itemResource, 1, 3),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
new ItemStack(ConfigItems.itemResource, 1, 3),
new ItemStack(ConfigItems.itemShard, 1, 6),
new ItemStack(ConfigItems.itemResource, 1, 3),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
new ItemStack(ConfigItems.itemResource, 1, 3) });
recipeSlot = ThaumcraftApi.addInfusionCraftingRecipe(
"planarKeystone",
new ItemStack(blockSlot),
12,
(new AspectList()).add(Aspect.VOID, 48).add(Aspect.TRAVEL, 64).add(Aspect.AIR, 64)
.add(Aspect.MECHANISM, 32).add(Aspect.ELDRITCH, 64).add(Aspect.MAGIC, 16),
new ItemStack(itemPlanarConduit),
new ItemStack[] { GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L) });
} else {
recipeKeystone = ThaumcraftApi.addInfusionCraftingRecipe(
"pocketPlane",
new ItemStack(itemKeystone),
@@ -2093,60 +2160,6 @@ public class ThaumicHorizons {
new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(Items.gold_ingot),
new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(Items.gold_ingot),
new ItemStack(ConfigItems.itemResource, 1, 16) });
} else {
recipeKeystone = ThaumcraftApi.addInfusionCraftingRecipe(
"pocketPlane",
new ItemStack(itemKeystone),
12,
(new AspectList()).add(Aspect.TRAVEL, 128).add(Aspect.VOID, 64).add(Aspect.EXCHANGE, 48)
.add(Aspect.AURA, 32).add(Aspect.MIND, 16).add(Aspect.ELDRITCH, 64),
new ItemStack(itemPlanarConduit),
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 6),
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
new ItemStack(ConfigItems.itemShard, 1, 6),
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
new ItemStack(ConfigItems.itemShard, 1, 6),
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
new ItemStack(ConfigItems.itemShard, 1, 6),
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L) });
recipeKeystone1 = ThaumcraftApi.addInfusionCraftingRecipe(
"planarKeystone",
new ItemStack(itemKeystone),
9,
(new AspectList()).add(Aspect.TRAVEL, 64).add(Aspect.VOID, 48).add(Aspect.MECHANISM, 32)
.add(Aspect.ELDRITCH, 32),
new ItemStack(Items.ender_eye),
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 6),
new ItemStack(ConfigItems.itemResource, 1, 3),
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
new ItemStack(ConfigItems.itemResource, 1, 3),
new ItemStack(ConfigItems.itemShard, 1, 6),
new ItemStack(ConfigItems.itemResource, 1, 3),
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
new ItemStack(ConfigItems.itemResource, 1, 3) });
recipeSlot = ThaumcraftApi.addInfusionCraftingRecipe(
"planarKeystone",
new ItemStack(blockSlot),
12,
(new AspectList()).add(Aspect.VOID, 48).add(Aspect.TRAVEL, 64).add(Aspect.AIR, 64)
.add(Aspect.MECHANISM, 32).add(Aspect.ELDRITCH, 64).add(Aspect.MAGIC, 16),
new ItemStack(itemPlanarConduit),
new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L) });
}
ThaumcraftApi.addWarpToResearch("pocketPlane", 4);
ThaumcraftApi.addWarpToResearch("planarKeystone", 5);
@@ -3230,7 +3243,7 @@ public class ThaumicHorizons {
critterRecipes.add(
new CreatureInfusionRecipe(
"cowInfusion",
EntityList.getEntityID(new EntityMooshroom(null)),
-EntityList.getEntityID(new EntityMooshroom(null)),
2,
(new AspectList()).add(Aspect.PLANT, 8).add(Aspect.BEAST, 4),
EntityCow.class,
@@ -3630,6 +3643,7 @@ public class ThaumicHorizons {
new ItemStack(Items.dye, 1, 0), new ItemStack(Items.dye, 1, 15) },
10));
addAspectsToAllTheThings();
registerDispenserBehavior();
}
public static CreatureInfusionRecipe getCreatureInfusion(EntityLivingBase entityContained,
@@ -3666,7 +3680,6 @@ public class ThaumicHorizons {
public static void initPotions() {
byte customPotions = 5;
int potionOffset = Potion.potionTypes.length;
boolean start = false;
int var4;
if (potionOffset < 128 - customPotions) {
Potion[] potionTypes = new Potion[potionOffset + customPotions];
@@ -3678,40 +3691,54 @@ public class ThaumicHorizons {
var4 = -1;
}
int visBoostPotionId = potionVisBoostID;
var4 = getNextPotionId(var4);
if (var4 >= 0) {
potionVisBoostID = var4;
PotionVisBoost.instance = new PotionVisBoost(potionVisBoostID, true, 6697847);
PotionVisBoost.init();
if (Potion.potionTypes[visBoostPotionId] != null) {
visBoostPotionId = getNextPotionId(visBoostPotionId);
}
potionVisBoostID = visBoostPotionId;
PotionVisBoost.instance = new PotionVisBoost(potionVisBoostID, true, 6697847);
PotionVisBoost.init();
int visRegenPotionId = potionVisRegenID;
var4 = getNextPotionId(var4);
if (Potion.potionTypes[visRegenPotionId] != null) {
visRegenPotionId = getNextPotionId(visRegenPotionId);
}
var4 = getNextPotionId(var4);
if (var4 >= 0) {
potionVisRegenID = var4;
PotionVisRegen.instance = new PotionVisRegen(potionVisRegenID, true, 5701759);
PotionVisRegen.init();
potionVisRegenID = visRegenPotionId;
PotionVisRegen.instance = new PotionVisRegen(potionVisRegenID, true, 5701759);
PotionVisRegen.init();
int vacuumPotionId = potionVacuumID;
if (Potion.potionTypes[vacuumPotionId] != null) {
vacuumPotionId = getNextPotionId(vacuumPotionId);
}
var4 = getNextPotionId(var4);
if (var4 >= 0) {
potionVacuumID = var4;
PotionVacuum.instance = new PotionVacuum(potionVacuumID, true, 4210752);
PotionVacuum.init();
potionVacuumID = vacuumPotionId;
PotionVacuum.instance = new PotionVacuum(potionVacuumID, true, 4210752);
PotionVacuum.init();
int shockPotionId = potionShockID;
if (Potion.potionTypes[shockPotionId] != null) {
shockPotionId = getNextPotionId(shockPotionId);
}
var4 = getNextPotionId(var4);
if (var4 >= 0) {
potionShockID = var4;
PotionShock.instance = new PotionShock(potionShockID, true, 11513861);
PotionShock.init();
potionShockID = shockPotionId;
PotionShock.instance = new PotionShock(potionShockID, true, 11513861);
PotionShock.init();
int synthesisPotionId = potionSynthesisID;
if (Potion.potionTypes[synthesisPotionId] != null) {
synthesisPotionId = getNextPotionId(synthesisPotionId);
}
var4 = getNextPotionId(var4);
if (var4 >= 0) {
potionSynthesisID = var4;
PotionSynthesis.instance = new PotionSynthesis(potionSynthesisID, false, 3253280);
PotionSynthesis.init();
}
potionSynthesisID = synthesisPotionId;
PotionSynthesis.instance = new PotionSynthesis(potionSynthesisID, false, 3253280);
PotionSynthesis.init();
}
static int getNextPotionId(int start) {
@@ -3888,6 +3915,96 @@ public class ThaumicHorizons {
(new AspectList()).add(Aspect.WEAPON, 3).add(Aspect.BEAST, 3));
}
private static void registerDispenserBehavior() {
BlockDispenser.dispenseBehaviorRegistry
.putObject(Item.getItemFromBlock(blockAlchemite), new BehaviorDefaultDispenseItem() {
@Override
protected ItemStack dispenseStack(IBlockSource dispenser, ItemStack dispensedItem) {
EnumFacing enumfacing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata());
World world = dispenser.getWorld();
int x = dispenser.getXInt() + enumfacing.getFrontOffsetX();
int y = dispenser.getYInt() + enumfacing.getFrontOffsetY();
int z = dispenser.getZInt() + enumfacing.getFrontOffsetZ();
EntityAlchemitePrimed primedAlchemite = new EntityAlchemitePrimed(
world,
x + 0.5F,
y + 0.5F,
z + 0.5F,
null);
world.spawnEntityInWorld(primedAlchemite);
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "game.tnt.primed", 1.0F, 1.0F);
dispensedItem.stackSize--;
return dispensedItem;
}
});
BlockDispenser.dispenseBehaviorRegistry.putObject(itemSyringeInjection, new BehaviorDefaultDispenseItem() {
@Override
public ItemStack dispenseStack(IBlockSource dispenser, ItemStack stack) {
if (!(stack.getItem() instanceof ItemSyringeInjection)) {
return super.dispenseStack(dispenser, stack);
}
World world = dispenser.getWorld();
EnumFacing facing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata());
double spawnX = dispenser.getX() + facing.getFrontOffsetX();
double spawnY = dispenser.getY() + facing.getFrontOffsetY();
double spawnZ = dispenser.getZ() + facing.getFrontOffsetZ();
IProjectile projectile = createProjectile(
(ItemSyringeInjection) stack.getItem(),
stack,
world,
spawnX,
spawnY,
spawnZ);
projectile.setThrowableHeading(
facing.getFrontOffsetX(),
facing.getFrontOffsetY() + 0.1F,
facing.getFrontOffsetZ(),
1.1F, // velocity
6F // inaccuracy
);
world.spawnEntityInWorld((Entity) projectile);
stack.stackSize--;
return stack;
}
private IProjectile createProjectile(ItemSyringeInjection item, ItemStack stack, World world, double x,
double y, double z) {
if (item.isPhial(stack.getItemDamage())) {
return new EntityBlastPhial(world, x, y, z, stack);
} else {
return new EntitySyringe(world, x, y, z, stack.stackTagCompound);
}
}
@Override
protected void playDispenseSound(IBlockSource source) {
source.getWorld().playAuxSFX(1002, source.getXInt(), source.getYInt(), source.getZInt(), 0);
}
});
BlockDispenser.dispenseBehaviorRegistry.putObject(itemEggIncubated, new BehaviorProjectileDispense() {
protected IProjectile getProjectileEntity(World worldIn, IPosition position) {
return new EntityEggIncubated(worldIn, position.getX(), position.getY(), position.getZ());
}
});
BlockDispenser.dispenseBehaviorRegistry.putObject(
itemBoatGreatwood,
new BehaviorDispenseBoat(Collections.singleton(Material.water), EntityBoatGreatwood::new));
BlockDispenser.dispenseBehaviorRegistry.putObject(
itemBoatThaumium,
new BehaviorDispenseBoat(Sets.newHashSet(Material.water, Material.lava), EntityBoatThaumium::new));
}
static IRecipe shapelessOreDictRecipe(ItemStack res, Object[] params) {
ShapelessOreRecipe rec = new ShapelessOreRecipe(res, params);
CraftingManager.getInstance().getRecipeList().add(rec);
@@ -3906,7 +4023,7 @@ public class ThaumicHorizons {
Property alternateBell = config.get("general", "alternateGolemBell", true);
alternateBell.comment = "Enable alternate golemancer\'s bell recipe (in case of mod conflict).";
alternateBell.setRequiresMcRestart(true);
useAlternateBell = true; // alternateBell.getBoolean();
useAlternateBell = alternateBell.getBoolean();
Property enablePocketPlane = config.get("general", "enablePocketPlane", true);
enablePocketPlane.comment = "Enable pocket plane content (currently incomplete - many aspects will not generate the cool stuff they are supposed to). World backups are highly suggested.";
enablePocketPlane.setRequiresMcRestart(true);
@@ -3915,6 +4032,32 @@ public class ThaumicHorizons {
warpedTumorValueProperty.comment = "Points of warp held by warped tumor.";
warpedTumorValueProperty.setRequiresMcRestart(true);
warpedTumorValue = warpedTumorValueProperty.getInt();
Property visboostPotionProperty = config.get("potions", "visboostPotionID", 24);
visboostPotionProperty.comment = "Potion ID for the VisBoost Potion";
visboostPotionProperty.setRequiresMcRestart(true);
potionVisBoostID = visboostPotionProperty.getInt();
Property visregenPotionProperty = config.get("potions", "visregenPotionID", 25);
visregenPotionProperty.comment = "Potion ID for the VisRegen Potion";
visregenPotionProperty.setRequiresMcRestart(true);
potionVisRegenID = visregenPotionProperty.getInt();
Property vacuumPotionProperty = config.get("potions", "vacuumPotionID", 26);
vacuumPotionProperty.comment = "Potion ID for the Vacuum";
vacuumPotionProperty.setRequiresMcRestart(true);
potionVacuumID = vacuumPotionProperty.getInt();
Property shockPotionProperty = config.get("potions", "shockPotionID", 27);
shockPotionProperty.comment = "Potion ID for the Shock Potion";
shockPotionProperty.setRequiresMcRestart(true);
potionShockID = shockPotionProperty.getInt();
Property synthesisPotionProperty = config.get("potions", "synthesisPotionID", 28);
synthesisPotionProperty.comment = "Potion ID for the Sythesis Potion";
synthesisPotionProperty.setRequiresMcRestart(true);
potionSynthesisID = synthesisPotionProperty.getInt();
config.save();
}
@@ -29,6 +29,7 @@ public class BlockAlchemite extends BlockTNT {
this.setBlockName("ThaumicHorizons_alchemite");
this.setBlockTextureName("ThaumicHorizons:alchemite");
this.setCreativeTab(ThaumicHorizons.tabTH);
this.setStepSound(soundTypeGrass); // same place/break sound as TNT
}
public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, final int p_149723_3_,
@@ -1,7 +1,3 @@
//
// Decompiled by Procyon v0.5.30
//
package com.kentington.thaumichorizons.common.blocks;
import java.util.Random;
@@ -81,28 +77,16 @@ public class BlockGatewayPortal extends Block {
if (world.getBlock(x + 1, y, z) == ThaumicHorizons.blockGateway) {
slotZ = z;
switch (md) {
case 6 -> {
slotX = x + 1;
}
case 7 -> {
slotX = x;
}
case 9 -> {
slotX = x - 1;
}
case 6 -> slotX = x + 1;
case 7 -> slotX = x;
case 9 -> slotX = x - 1;
}
} else {
slotX = x;
switch (md) {
case 6 -> {
slotZ = z + 1;
}
case 7 -> {
slotZ = z;
}
case 9 -> {
slotZ = z - 1;
}
case 6 -> slotZ = z + 1;
case 7 -> slotZ = z;
case 9 -> slotZ = z - 1;
}
}
} else {
@@ -117,7 +101,7 @@ public class BlockGatewayPortal extends Block {
}
}
final TileEntity te = world.getTileEntity(slotX, slotY, slotZ);
if (te instanceof TileSlot) {
if (te instanceof TileSlot && ((TileSlot) te).portalOpen) {
((TileSlot) te).destroyPortal();
}
}
@@ -151,313 +135,93 @@ public class BlockGatewayPortal extends Block {
|| world.getBlock(x + 1, y, z) == ThaumicHorizons.blockPortal
|| world.getBlock(x - 1, y, z) == ThaumicHorizons.blockGateway
|| world.getBlock(x - 1, y, z) == ThaumicHorizons.blockPortal;
Label_0410: {
switch (world.getBlockMetadata(x, y, z)) {
case 0 -> {
switch (side) {
case 0 -> {
return this.lapiz;
}
case 1 -> {
return this.stone;
}
case 2 -> {
if (isXAligned) {
return this.CornerTR;
}
return this.stone;
}
case 3 -> {
if (isXAligned) {
return this.CornerTL;
}
return this.stone;
}
case 4 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerTL;
}
case 5 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerTR;
}
default -> {
return this.leftSide(isXAligned, side);
}
}
}
case 1, 2, 3 -> {
return this.leftSide(isXAligned, side);
}
case 4 -> {
switch (side) {
case 0 -> {
return this.stone;
}
case 1 -> {
return this.lapiz;
}
case 2 -> {
if (isXAligned) {
return this.CornerBR;
}
return this.stone;
}
case 3 -> {
if (isXAligned) {
return this.CornerBL;
}
return this.stone;
}
case 4 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerBL;
}
case 5 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerBR;
}
default -> {
break Label_0410;
}
}
}
case 5 -> {
switch (side) {
case 0: {
return this.lapiz;
}
case 1: {
return this.stone;
}
case 2: {
if (isXAligned) {
return this.topR;
}
}
case 3: {
if (isXAligned) {
return this.topL;
}
}
case 4: {
if (!isXAligned) {
return this.topL;
}
}
case 5: {
if (!isXAligned) {
return this.topR;
}
break;
}
}
return this.lapiz;
}
case 6, 7, 9 -> {
return this.bottomSide(isXAligned, side);
}
case 8 -> {
switch (side) {
case 0: {
return this.lapiz;
}
case 1: {
return this.stone;
}
case 2: {
if (isXAligned) {
return this.topL;
}
}
case 3: {
if (isXAligned) {
return this.topR;
}
}
case 4: {
if (!isXAligned) {
return this.topR;
}
}
case 5: {
if (!isXAligned) {
return this.topL;
}
break;
}
}
return this.lapiz;
}
case 10 -> {
switch (side) {
case 0 -> {
return this.stone;
}
case 1 -> {
return this.lapiz;
}
case 2 -> {
if (isXAligned) {
return this.CornerTL;
}
return this.stone;
}
case 3 -> {
if (isXAligned) {
return this.CornerTR;
}
return this.stone;
}
case 4 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerTR;
}
case 5 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerTL;
}
default -> {
return this.rightSide(isXAligned, side);
}
}
}
case 11, 12, 13 -> {
return this.rightSide(isXAligned, side);
}
case 14 -> {
switch (side) {
case 0 -> {
return this.stone;
}
case 1 -> {
return this.lapiz;
}
case 2 -> {
if (isXAligned) {
return this.CornerBL;
}
return this.stone;
}
case 3 -> {
if (isXAligned) {
return this.CornerBR;
}
return this.stone;
}
case 4 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerBR;
}
case 5 -> {
if (isXAligned) {
return this.stone;
}
return this.CornerBL;
}
default -> {
break Label_0410;
}
}
}
}
}
return this.lapiz;
return switch (world.getBlockMetadata(x, y, z)) {
case 0 -> switch (side) {
case 0 -> this.lapiz;
case 1 -> this.stone;
case 2 -> isXAligned ? this.CornerTR : this.stone;
case 3 -> isXAligned ? this.CornerTL : this.stone;
case 4 -> isXAligned ? this.stone : this.CornerTL;
case 5 -> isXAligned ? this.stone : this.CornerTR;
default -> this.leftSide(isXAligned, side);
};
case 1, 2, 3 -> this.leftSide(isXAligned, side);
case 4 -> switch (side) {
case 0 -> this.stone;
case 1 -> this.lapiz;
case 2 -> isXAligned ? this.CornerBR : this.stone;
case 3 -> isXAligned ? this.CornerBL : this.stone;
case 4 -> isXAligned ? this.stone : this.CornerBL;
case 5 -> isXAligned ? this.stone : this.CornerBR;
default -> this.lapiz;
};
case 5 -> switch (side) {
case 0 -> this.lapiz;
case 1 -> this.stone;
case 2 -> isXAligned ? this.topR : this.stone;
case 3 -> isXAligned ? this.topL : this.stone;
case 4 -> isXAligned ? this.stone : this.topL;
case 5 -> isXAligned ? this.stone : this.topR;
default -> this.lapiz;
};
case 6, 7, 9 -> this.bottomSide(isXAligned, side);
case 8 -> switch (side) {
case 0 -> this.lapiz;
case 1 -> this.stone;
case 2 -> isXAligned ? this.topL : this.stone;
case 3 -> isXAligned ? this.topR : this.stone;
case 4 -> isXAligned ? this.stone : this.topR;
case 5 -> isXAligned ? this.stone : this.topL;
default -> this.lapiz;
};
case 10 -> switch (side) {
case 0 -> this.lapiz;
case 1 -> this.stone;
case 2 -> isXAligned ? this.CornerTL : this.stone;
case 3 -> isXAligned ? this.CornerTR : this.stone;
case 4 -> isXAligned ? this.stone : this.CornerTR;
case 5 -> isXAligned ? this.stone : this.CornerTL;
default -> this.rightSide(isXAligned, side);
};
case 11, 12, 13 -> this.rightSide(isXAligned, side);
case 14 -> switch (side) {
case 0 -> this.stone;
case 1 -> this.lapiz;
case 2 -> isXAligned ? this.CornerBL : this.stone;
case 3 -> isXAligned ? this.CornerBR : this.stone;
case 4 -> isXAligned ? this.stone : this.CornerBR;
case 5 -> isXAligned ? this.stone : this.CornerBL;
default -> this.lapiz;
};
default -> this.lapiz;
};
}
IIcon leftSide(final boolean xAligned, final int side) {
if (xAligned) {
switch (side) {
case 2 -> {
return this.R;
}
case 3 -> {
return this.L;
}
case 4 -> {
return this.stone;
}
default -> {
return this.lapiz;
}
}
} else {
switch (side) {
case 2 -> {
return this.stone;
}
case 4 -> {
return this.L;
}
case 5 -> {
return this.R;
}
default -> {
return this.lapiz;
}
}
}
return switch (side) {
case 2 -> xAligned ? this.R : this.stone;
case 3 -> xAligned ? this.L : this.lapiz;
case 4 -> xAligned ? this.stone : this.L;
case 5 -> xAligned ? this.lapiz : this.R;
default -> this.lapiz;
};
}
IIcon rightSide(final boolean xAligned, final int side) {
if (xAligned) {
switch (side) {
case 2 -> {
return this.L;
}
case 3 -> {
return this.R;
}
case 5 -> {
return this.stone;
}
default -> {
return this.lapiz;
}
}
} else {
switch (side) {
case 3 -> {
return this.stone;
}
case 4 -> {
return this.R;
}
case 5 -> {
return this.L;
}
default -> {
return this.lapiz;
}
}
}
return switch (side) {
case 2 -> xAligned ? this.L : this.lapiz;
case 3 -> xAligned ? this.R : this.stone;
case 4 -> xAligned ? this.lapiz : this.R;
case 5 -> xAligned ? this.stone : this.L;
default -> this.lapiz;
};
}
IIcon bottomSide(final boolean xAligned, final int side) {
switch (side) {
case 0 -> {
return this.stone;
}
case 1 -> {
return this.lapiz;
}
default -> {
return this.B;
}
}
return switch (side) {
case 0 -> this.stone;
case 1 -> this.lapiz;
default -> this.B;
};
}
}
@@ -14,6 +14,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import com.kentington.thaumichorizons.common.ThaumicHorizons;
import com.kentington.thaumichorizons.common.lib.GatewayTeleporter;
@@ -83,12 +84,12 @@ public class BlockPortalTH extends BlockBreakable {
public void onEntityCollidedWithBlock(final World world, final int x, final int y, final int z,
final Entity player) {
if (player.ridingEntity == null && player.riddenByEntity == null && player instanceof EntityPlayerMP) {
if (player.timeUntilPortal > 0) {
player.timeUntilPortal = 10;
if (player.ridingEntity == null && player.riddenByEntity == null && player instanceof final EntityPlayerMP playerMP) {
if (playerMP.timeUntilPortal > 0) {
playerMP.timeUntilPortal = 10;
return;
}
player.timeUntilPortal = 10;
playerMP.timeUntilPortal = 10;
int targetX = 0;
int targetY = 0;
int targetZ = 0;
@@ -116,15 +117,21 @@ public class BlockPortalTH extends BlockBreakable {
if (portal.length > 3) targetDim = portal[3];
final MinecraftServer mServer = FMLCommonHandler.instance().getMinecraftServerInstance();
((EntityPlayerMP) player).mcServer.getConfigurationManager().transferPlayerToDimension(
(EntityPlayerMP) player,
final WorldServer targetWorld = mServer.worldServerForDimension(targetDim);
float exitYaw = playerMP.rotationYaw;
// face perpendicular to portal plane, away from portal into the world
if (targetWorld.getTileEntity(targetX, targetY + 2, targetZ) instanceof final TileSlot slotTE) {
exitYaw = slotTE.xAligned ? 0.0f : 270.0f;
}
playerMP.mcServer.getConfigurationManager().transferPlayerToDimension(
playerMP,
targetDim,
new GatewayTeleporter(
mServer.worldServerForDimension(ThaumicHorizons.dimensionPocketId),
targetWorld,
targetX,
targetY,
targetZ,
player.rotationYaw));
exitYaw));
} else {
int slotY = y;
int slotX = x;
@@ -167,8 +174,8 @@ public class BlockPortalTH extends BlockBreakable {
}
}
final MinecraftServer mServer2 = FMLCommonHandler.instance().getMinecraftServerInstance();
((EntityPlayerMP) player).mcServer.getConfigurationManager().transferPlayerToDimension(
(EntityPlayerMP) player,
playerMP.mcServer.getConfigurationManager().transferPlayerToDimension(
playerMP,
ThaumicHorizons.dimensionPocketId,
new GatewayTeleporter(
mServer2.worldServerForDimension(ThaumicHorizons.dimensionPocketId),
@@ -32,6 +32,7 @@ public class BlockSlot extends BlockContainer {
public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int md) {
final TileSlot tco = (TileSlot) world.getTileEntity(x, y, z);
if (tco == null) return;
if (tco.portalOpen) {
tco.destroyPortal();
}
@@ -59,15 +60,20 @@ public class BlockSlot extends BlockContainer {
if (tco.portalOpen) {
tco.destroyPortal();
}
world.markBlockForUpdate(x, y, z);
return true;
} else if (!tco.portalOpen && player.getHeldItem().getItem() instanceof ItemWandCasting) {
tco.makePortal(player);
world.markBlockForUpdate(x, y, z);
return true;
}
} else if (theItem != null && theItem.getItem() == ThaumicHorizons.itemKeystone
&& theItem.stackTagCompound != null) {
tco.insertKeystone(theItem.stackTagCompound.getInteger("dimension"));
--theItem.stackSize;
world.markBlockForUpdate(x, y, z);
return true;
}
world.markBlockForUpdate(x, y, z);
return false;
}
@@ -82,20 +82,19 @@ public class BlockSyntheticNode extends BlockContainer {
return false;
}
public void breakBlock(final World p_149749_1_, final int p_149749_2_, final int p_149749_3_, final int p_149749_4_,
final Block p_149749_5_, final int p_149749_6_) {
final TileSyntheticNode tile = (TileSyntheticNode) p_149749_1_
.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
if (tile != null) {
for (final Aspect asp : tile.getMaxAspects().getAspects()) {
final ItemStack essence = new ItemStack(
ConfigItems.itemWispEssence,
tile.getMaxAspects().getAmount(asp) / 4);
((ItemWispEssence) ConfigItems.itemWispEssence).setAspects(essence, new AspectList().add(asp, 2));
p_149749_1_.spawnEntityInWorld(
new EntityItem(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, essence));
}
public void breakBlock(final World world, final int x, final int y, final int z, final Block block,
final int meta) {
if (!(world.getTileEntity(x, y, z) instanceof TileSyntheticNode tile)) {
super.breakBlock(world, x, y, z, block, meta);
return;
}
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
for (final Aspect asp : tile.getMaxAspects().getAspects()) {
final ItemStack essence = new ItemStack(
ConfigItems.itemWispEssence,
tile.getMaxAspects().getAmount(asp) / 4);
((ItemWispEssence) ConfigItems.itemWispEssence).setAspects(essence, new AspectList().add(asp, 2));
world.spawnEntityInWorld(new EntityItem(world, x, y, z, essence));
}
super.breakBlock(world, x, y, z, block, meta);
}
}
@@ -45,10 +45,10 @@ public class ContainerCase extends Container {
new SlotLimitedByClass(ILens.class, this.input, a, 37 + a % 6 * 18, 51 + a / 6 * 18));
}
this.bindPlayerInventory(iinventory);
if (!par2World.isRemote) {
try {
((InventoryCase) this.input).stackList = ((ItemLensCase) this.pouch.getItem()).getInventory(this.pouch);
} catch (Exception ignored) {}
if (!par2World.isRemote && this.pouch != null
&& this.pouch.getItem() instanceof ItemLensCase lensCase
&& this.input instanceof InventoryCase inv) {
inv.stackList = lensCase.getInventory(this.pouch);
}
this.onCraftMatrixChanged(this.input);
}
@@ -12,31 +12,35 @@ import net.minecraft.world.World;
public class EntityBlastPhial extends EntityPotion {
public EntityBlastPhial(final World p_i1790_1_) {
super(p_i1790_1_);
public EntityBlastPhial(final World world) {
super(world);
}
public EntityBlastPhial(final World p_i1790_1_, final EntityLivingBase p_i1790_2_, final float power,
final ItemStack p_i1790_3_) {
super(p_i1790_1_, p_i1790_2_, p_i1790_3_);
public EntityBlastPhial(final World world, final double x, final double y, final double z, final ItemStack stack) {
super(world, x, y, z, stack);
}
public EntityBlastPhial(final World world, final EntityLivingBase thrower, final float power,
final ItemStack stack) {
super(world, thrower, stack);
this.setSize(0.25f, 0.25f);
this.setSize(0.5f, 0.5f);
this.setLocationAndAngles(
p_i1790_2_.posX,
p_i1790_2_.posY + p_i1790_2_.getEyeHeight(),
p_i1790_2_.posZ,
p_i1790_2_.rotationYaw,
p_i1790_2_.rotationPitch);
this.posX -= MathHelper.cos(this.rotationYaw / 180.0f * 3.1415927f) * 0.16f;
this.posY -= 0.10000000149011612;
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0f * 3.1415927f) * 0.16f;
thrower.posX,
thrower.posY + thrower.getEyeHeight(),
thrower.posZ,
thrower.rotationYaw,
thrower.rotationPitch);
this.posX -= MathHelper.cos(this.rotationYaw / 180.0f * (float) Math.PI) * 0.16f;
this.posY -= 0.1;
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0f * (float) Math.PI) * 0.16f;
this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0f;
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0f * 3.1415927f)
* MathHelper.cos(this.rotationPitch / 180.0f * 3.1415927f);
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0f * 3.1415927f)
* MathHelper.cos(this.rotationPitch / 180.0f * 3.1415927f);
this.motionY = -MathHelper.sin(this.rotationPitch / 180.0f * 3.1415927f);
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0f * (float) Math.PI)
* MathHelper.cos(this.rotationPitch / 180.0f * (float) Math.PI);
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0f * (float) Math.PI)
* MathHelper.cos(this.rotationPitch / 180.0f * (float) Math.PI);
this.motionY = -MathHelper.sin(this.rotationPitch / 180.0f * (float) Math.PI);
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, power * 1.5f, 1.0f);
}
@@ -260,10 +260,10 @@ public class EntityBoatGreatwood extends EntityBoat {
}
if (this.riddenByEntity != null && this.riddenByEntity instanceof final EntityLivingBase entitylivingbase) {
final float f = this.riddenByEntity.rotationYaw + -entitylivingbase.moveStrafing * 90.0f;
this.motionX += -Math.sin(f * 3.1415927f / 180.0f) * this.speedMultiplier
this.motionX += -Math.sin(f * (float)Math.PI / 180.0f) * this.speedMultiplier
* entitylivingbase.moveForward
* 0.05000000074505806;
this.motionZ += Math.cos(f * 3.1415927f / 180.0f) * this.speedMultiplier
this.motionZ += Math.cos(f * (float)Math.PI / 180.0f) * this.speedMultiplier
* entitylivingbase.moveForward
* 0.05000000074505806;
}
@@ -296,10 +296,10 @@ public class EntityBoatThaumium extends EntityBoat {
}
if (this.riddenByEntity != null && this.riddenByEntity instanceof final EntityLivingBase entitylivingbase) {
final float f = this.riddenByEntity.rotationYaw + -entitylivingbase.moveStrafing * 90.0f;
this.motionX += -Math.sin(f * 3.1415927f / 180.0f) * this.speedMultiplier
this.motionX += -Math.sin(f * (float)Math.PI / 180.0f) * this.speedMultiplier
* entitylivingbase.moveForward
* 0.05000000074505806;
this.motionZ += Math.cos(f * 3.1415927f / 180.0f) * this.speedMultiplier
this.motionZ += Math.cos(f * (float)Math.PI / 180.0f) * this.speedMultiplier
* entitylivingbase.moveForward
* 0.05000000074505806;
}
@@ -162,10 +162,8 @@ public class EntityGolemTH extends EntityGolemBase {
this.getNavigator().setAvoidsWater(
this.getGolemTHType() != EnumGolemTHType.ROCK && this.getGolemTHType() != EnumGolemTHType.METAL
&& this.getGolemTHType() != EnumGolemTHType.REDSTONE);
int bonus = 0;
try {
bonus = (this.getGolemDecoration().contains("H") ? 5 : 0);
} catch (Exception ignored) {}
final String decor = this.getGolemDecoration();
final int bonus = decor == null ? 0 : (decor.contains("H") ? 5 : 0);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.getGolemTHType().health + bonus);
return true;
}
@@ -667,10 +665,8 @@ public class EntityGolemTH extends EntityGolemBase {
this.action = 6;
} else if (par1 == 5) {
this.healing = 5;
int bonus = 0;
try {
bonus = (this.getGolemDecoration().contains("H") ? 5 : 0);
} catch (Exception ignored) {}
final String decor = this.getGolemDecoration();
final int bonus = decor == null ? 0 : (decor.contains("H") ? 5 : 0);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.type.health + bonus);
} else if (par1 == 6) {
this.leftArm = 5;
@@ -25,7 +25,7 @@ public class EntityMedSlime extends EntitySlime {
public void setDead() {
final int i = this.getSlimeSize();
if (!this.worldObj.isRemote && i > 1) {
if (!this.worldObj.isRemote && i > 1 && this.getHealth() <= 0.0f) {
for (int j = 2 + this.rand.nextInt(3), k = 0; k < j; ++k) {
final float f = (k % 2 - 0.5f) * i / 4.0f;
final float f2 = (k / 2 - 0.5f) * i / 4.0f;
@@ -123,7 +123,7 @@ public class EntityNightmare extends EntityEndersteed {
if (this.hasCustomNameTag()) {
return this.getCustomNameTag();
}
return StatCollector.translateToLocal("entity.ThaumicHorizons.Nightmare.name");
return StatCollector.translateToLocal("entity.ThaumicHorizons.NightmareTH.name");
}
public void onUpdate() {
@@ -99,7 +99,7 @@ public class EntitySoul extends EntityFlying implements IMob {
this.waypointZ = this.posZ;
}
}
final float n = -(float) Math.atan2(this.motionX, this.motionZ) * 180.0f / 3.141593f;
final float n = -(float) Math.atan2(this.motionX, this.motionZ) * 180.0f / (float) Math.PI;
this.rotationYaw = n;
this.renderYawOffset = n;
}
@@ -39,6 +39,7 @@ import io.netty.buffer.ByteBuf;
public class EntitySyringe extends Entity implements IProjectile, IEntityAdditionalSpawnData {
public int color;
public int canBePickedUp;
public NBTTagCompound effects;
private boolean inGround;
private int field_145791_d;
@@ -50,7 +51,6 @@ public class EntitySyringe extends Entity implements IProjectile, IEntityAdditio
private int ticksInAir;
private int knockbackStrength;
private EntityLivingBase shootingEntity;
private int canBePickedUp;
private byte arrowShake;
private double damage;
@@ -133,19 +133,26 @@ public class EntitySyringe extends Entity implements IProjectile, IEntityAdditio
p_i1756_2_.posZ,
p_i1756_2_.rotationYaw,
p_i1756_2_.rotationPitch);
this.posX -= MathHelper.cos(this.rotationYaw / 180.0f * 3.1415927f) * 0.16f;
this.posX -= MathHelper.cos(this.rotationYaw / 180.0f * (float) Math.PI) * 0.16f;
this.posY -= 0.10000000149011612;
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0f * 3.1415927f) * 0.16f;
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0f * (float) Math.PI) * 0.16f;
this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0f;
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0f * 3.1415927f)
* MathHelper.cos(this.rotationPitch / 180.0f * 3.1415927f);
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0f * 3.1415927f)
* MathHelper.cos(this.rotationPitch / 180.0f * 3.1415927f);
this.motionY = -MathHelper.sin(this.rotationPitch / 180.0f * 3.1415927f);
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0f * (float) Math.PI)
* MathHelper.cos(this.rotationPitch / 180.0f * (float) Math.PI);
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0f * (float) Math.PI)
* MathHelper.cos(this.rotationPitch / 180.0f * (float) Math.PI);
this.motionY = -MathHelper.sin(this.rotationPitch / 180.0f * (float) Math.PI);
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5f, 1.0f);
}
public EntitySyringe(World world, double x, double y, double z, NBTTagCompound effects) {
this(world, x, y, z);
this.effects = effects;
this.color = this.effects.getInteger("color");
this.canBePickedUp = 1;
}
public void writeEntityToNBT(final NBTTagCompound p_70014_1_) {
p_70014_1_.setTag("effects", this.effects);
p_70014_1_.setShort("xTile", (short) this.field_145791_d);
@@ -31,7 +31,7 @@ public class EntityAIHurtByTargetTH extends EntityAITargetTH {
this.field_142052_b = this.taskOwner.func_142015_aE();
if (this.entityCallsForHelp) {
final double d0 = this.getTargetDistance();
final List<EntityLiving> list = this.taskOwner.worldObj.getEntitiesWithinAABB(
final List<? extends EntityLiving> list = this.taskOwner.worldObj.getEntitiesWithinAABB(
this.taskOwner.getClass(),
AxisAlignedBB.getBoundingBox(
this.taskOwner.posX,
@@ -0,0 +1,66 @@
package com.kentington.thaumichorizons.common.handlers;
import java.util.Set;
import net.minecraft.block.BlockDispenser;
import net.minecraft.block.material.Material;
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
public class BehaviorDispenseBoat extends BehaviorDefaultDispenseItem {
public interface BoatFactory {
EntityBoat create(World world, double x, double y, double z);
}
private final Set<Material> validMaterials;
private final BoatFactory boatFactory;
public BehaviorDispenseBoat(Set<Material> validMaterials, BoatFactory boatFactory) {
this.validMaterials = validMaterials;
this.boatFactory = boatFactory;
}
@Override
protected ItemStack dispenseStack(IBlockSource dispenser, ItemStack stack) {
EnumFacing facing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata());
World world = dispenser.getWorld();
// Calculate spawn position slightly in front of the dispenser
double spawnX = dispenser.getX() + (facing.getFrontOffsetX() * 1.25F);
double spawnY = dispenser.getY() + (facing.getFrontOffsetY() * 1.125F) - 0.5F;
double spawnZ = dispenser.getZ() + (facing.getFrontOffsetZ() * 1.25F);
// Block coordinates in front of the dispenser
int targetX = dispenser.getXInt() + facing.getFrontOffsetX();
int targetY = dispenser.getYInt() + facing.getFrontOffsetY();
int targetZ = dispenser.getZInt() + facing.getFrontOffsetZ();
Material frontMaterial = world.getBlock(targetX, targetY, targetZ).getMaterial();
if (validMaterials.contains(frontMaterial)) {
spawnY++;
} else if (!Material.air.equals(frontMaterial)) {
return stack;
}
EntityBoat boat = boatFactory.create(world, spawnX, spawnY, spawnZ);
boat.rotationYaw = switch (facing) {
case NORTH -> 90.0F;
case WEST -> 180.0F;
case EAST -> 0.0F;
default -> -90.0F; // SOUTH or other
};
world.spawnEntityInWorld(boat);
stack.stackSize--;
return stack;
}
}
Loaded 100 of 402 files, more files were not shown because too many files have changed in this diff. Show more