Compare commits

..
90 Commits
Author SHA1 Message Date
OrderedSet86andUltraProdigy 3d90755aea Remove inert EMTDungeonChestGenerator (#123)
Co-authored-by: UltraProdigy <[email protected]>
2026-11-10 07:52:43 +00:00
UltraProdigy 15463a5a68 ci: run build and test on release branches 2026-11-09 00:56:57 -05:00
Discreater 94e3293b8e Fix wrong keys in lang file (#126) 2026-11-07 14:58:35 -05:00
boubou19 9ac1008c31 Cache enum .values() (#122) 2026-08-10 21:03:16 +02:00
LazyFlesh f1985199d8 Deprecate ic2 glass (#118) 2026-06-22 23:34:43 +02:00
LazyFlesh fd897dd854 deprecate ic2 bounce pad (#121) 2026-06-22 22:54:45 +02:00
LazyFlesh b15d4db81e move aspect registry after a isModLoaded check for gt5 (#120) 2026-06-22 00:17:50 +02:00
LazyFlesh 49554c94bb Deprecate ic2 iron fence (#119) 2026-06-21 23:31:38 +02:00
Martin Robertz 11d073ea29 Update GT5-Unofficial dependency version 2026-06-21 23:06:03 +02:00
FourIsTheNumber a6748c68de Remove spacesuit from nano armor (#117) 2026-06-03 11:51:04 +02:00
Luca 89995fb31a Fix EMT machines dropping wrong items when broken (#116) 2026-04-26 20:22:44 +02:00
Eldrinn-Elantey 9092b49d3b Remove smelting recipes Amber and Cinnabar Ore (#115) 2026-03-09 17:06:35 -04:00
UltraProdigy 508a51f2ca Optimize Images & Workflow (#114) 2026-03-08 09:29:07 +01:00
Martin Robertz ffbb1ec566 update+gradle+deps+bs 2026-03-04 17:33:30 +01:00
Yoshy d7e8bb0d42 Fix typos/grammar (#113) 2026-03-04 17:25:06 +01:00
Connor-ColensoandConnor Colenso ba59445a58 Format number migration (#112)
Co-authored-by: Connor Colenso <colen@CONNORSPC>
2026-01-24 01:46:28 +00:00
Connor Colenso e2da675b0d Revert "Update bs"
This reverts commit ebe7bcf718.
2026-01-24 01:35:01 +00:00
Connor Colenso fceabea560 Revert "Bump GT5u dep"
This reverts commit 002deef14e.
2026-01-24 01:35:00 +00:00
Connor Colenso e2ffd4b11b Revert "Switch to GTNHLib"
This reverts commit 303a815ba4.
2026-01-24 01:35:00 +00:00
Connor Colenso 303a815ba4 Switch to GTNHLib 2026-01-24 01:30:56 +00:00
Connor Colenso 002deef14e Bump GT5u dep 2026-01-24 01:29:52 +00:00
Connor Colenso ebe7bcf718 Update bs 2026-01-24 01:19:00 +00:00
WanderingHeroandMartin Robertz 572b1eff97 Rework The One Ring (#110)
Co-authored-by: Martin Robertz <[email protected]>
2026-01-14 08:06:02 +01:00
danyadevandWilhelm Schuster eab5ce16af respect step assist config and make it enabled by default (#111)
Co-authored-by: Wilhelm Schuster <[email protected]>
2026-01-07 12:30:15 +01:00
Martin Robertz f657893feb update 2026-01-05 20:45:33 +01:00
Martin Robertz 94220122e3 update 2025-12-22 21:56:19 +01:00
SST-03andRuling-0 3ee7e99054 Rebalance Falling and Flying Speed for Boots of Traveller (#107)
Co-authored-by: Ruling-0 <[email protected]>
2025-12-18 06:14:44 +01:00
sisyphussy d42aa5e7bd Fix speed & jump modifiers (#109) 2025-11-10 19:51:24 +01:00
Martin Robertz 824b6bc3b4 update 2025-10-31 19:54:43 +01:00
JohnandDream Master 83ef9ce92c Fix tooltip for Vis Discount on Nano and Quantum Wings (#108)
Co-authored-by: Dream Master <[email protected]>
2025-10-31 16:16:00 +01:00
Dream Master c1642ad8e1 update 2025-10-30 13:45:36 +01:00
Martin Robertz 9a51e36a33 update 2025-10-16 11:04:42 +02:00
WanderingHero 41ba26b62d Fix dungeon chests spawning with the one ring. (#105) 2025-10-16 09:03:14 +00:00
Julia d16c3f27d4 Update for Deprecated Tier Removal PR #5085 (#106) 2025-10-16 10:26:55 +02:00
Woriveandsisyphussy 46fa64f4f7 Fix(ItemElectricGoggles): ic2 energy bar not being displayed nor updated (#104)
Co-authored-by: sisyphussy <[email protected]>
2025-09-07 17:56:53 +00:00
Martin Robertz 893d79e147 update 2025-09-07 19:44:17 +02:00
Matthew Bentham 4920c605bc Fix Electric Goggles taking durability damage when they shouldn't (#103) 2025-09-07 13:42:54 +00:00
Worive 5eadeb8067 Fix Electric Goggles (and inheritors) from breaking from anvil or fallingBlock damage (#102) 2025-09-07 21:39:48 +10:00
Martin Robertz 9dee3ae782 update 2025-09-02 17:18:50 +02:00
Pedro Ortiz Bledow 9b40d06fb7 Swap references to EMT.TEXTURE_PATH with EMT.RESOURCE_PATH (#101) 2025-09-02 12:49:29 +02:00
Dream Master 1c69ce9b4d update 2025-08-16 18:47:40 +07:00
Pedro Ortiz Bledow 1049ca875c Add sound for Maintenance Focus (#100) 2025-08-15 17:35:40 +07:00
Dream Master 1d613494e9 update 2025-08-04 09:58:02 +07:00
Andreyandgithub-actions[bot] 1d81835e32 Fix solar panel draining Thaumcraft node twice (#98)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-04 08:17:34 +07:00
boubou19 940073709b Speed up forge event registration (#97) 2025-07-17 23:01:47 +00:00
Martin Robertz 9052428a3d update 2025-06-21 00:32:16 +02:00
JuliaandMartin Robertz e1e53af24f Update uses of crafting tools (#96)
Co-authored-by: Martin Robertz <[email protected]>
2025-05-25 16:34:37 +02:00
ceg 71c9976777 Fix ConcurrentModificationException in ItemShieldFocus (#95) 2025-05-18 19:04:37 +02:00
Martin Robertz cc46d6a039 update 2025-05-16 21:57:46 +02:00
Caedis 358a1f213e Replace Baubles with Baubles Expanded (#94) 2025-05-13 08:07:24 -05:00
Martin Robertz 91a816555b update 2025-04-28 20:26:16 +02:00
koolkrafter5 bb9ed2f219 Fix a bug where the essentia generator overdraws essentia from every nearby jar and voids essentia over its max capacity.
Make it so non-full generators do not check 9^3 blocks every tick for jars. The timer is set to 40 ticks (2 seconds) on failure. This reuses the timer value that was previously set to 0 every tick.
Fix logic error where a refuel value over 1 (is it ever even changed, or is it just to store the constant?) would overdraw and void essentia.
Move some default values from constructor to field declarations.
Clean up the fillfrompipe method.
2025-04-28 09:20:55 -04:00
Maya 730826c9d9 update 2025-04-23 14:48:09 -05:00
__felix__and__felix__ 0650072b85 Change optional decorator modid from gregtech to gregtech_nh for gt6 compat (#92)
Co-authored-by: __felix__ <134875831+48a3efa65c881ef567345b17f3910e06@users.noreply.github.com>
2025-04-23 14:48:01 -05:00
Maya d48233f266 update 2025-04-08 14:14:09 -05:00
Niclas Klugmann 367f37c7d5 Move Nano/Quantum armor pieces to GT Hazard API (#91) 2025-04-08 14:12:38 -05:00
Maya a1151399fc update 2025-03-16 13:11:39 -05:00
koolkrafter5 cb68d0a951 EMT Foci Bugfixes/Cleanup (#90) 2025-03-16 13:11:20 -05:00
Martin Robertz 3456ce64d7 update 2024-12-31 14:39:51 +01:00
glowredman f3ccdb450d Add Localizations (#89) 2024-12-30 17:44:06 -06:00
Martin Robertz 6df81d82d1 update gt version 2024-12-23 19:30:24 +01:00
Maya 83733212fb update 2024-12-17 10:02:40 -06:00
Maya 721c5c6aca Migrate Research Completer to GT5u (#88) 2024-12-15 17:18:48 -06:00
Martin Robertz 501cca5fd2 update 2024-10-20 11:42:08 +02:00
MeegooandMartin Robertz 7ec71bdcc9 Reset fall damage when holding shift or space with wings (#85)
Co-authored-by: Martin Robertz <[email protected]>
2024-10-20 11:41:35 +02:00
Alexdoruandgithub-actions[bot] c450204272 Multi ToolTip unification (#86)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-14 16:30:02 +02:00
Martin Robertz 58c206501b update 2024-09-06 23:04:52 +02:00
AlexdoruandMartin Robertz e7aaf791ad nuke-ic2-recipes (#83)
Co-authored-by: Martin Robertz <[email protected]>
2024-09-06 16:39:05 +02:00
Martin Robertz ab52ffb5df update 2024-09-03 23:20:47 +02:00
NotAPenguin 7eabde56d9 fix compatibility with the great renaming (#84) 2024-09-03 11:03:29 +02:00
boubou19GitHub GTNH Actionsgithub-actions[bot]
6d8ec1365a Use GT5U Enums (#81)
* use GT5U enums

* spotlessApply (#82)

Co-authored-by: GitHub GTNH Actions <>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-31 02:48:14 +02:00
Ethryan 732ccd3b45 Fix it to display the added augments on the focus, (#79)
* Fix it to display the added augments on the focus,
2024-08-15 02:46:25 +02:00
Dream Master b16109fd9d update 2024-08-04 23:30:11 +07:00
Martin Robertz 1087b3dda0 update 2024-05-31 18:46:29 +02:00
Alastors 9f6aac9db0 Flybug + inertial canceling (#78) 2024-05-31 12:42:54 -04:00
Martin Robertz b4f208eca7 update 2024-05-28 08:09:21 +02:00
Martin Robertz f26bd2c290 UPDATE 2024-05-19 13:27:13 +02:00
Caedis 6fea13084d Removed ModelWings Allocations (#77)
* Removed ModelWings Allocations

* init on first call

* Fix wings and speical armor

* spotless
2024-05-19 00:17:44 -05:00
Alastors 5074d8ba1d Update ItemElectricBootsTraveller.java 2024-05-06 23:14:33 +02:00
74d1aced60 Allow changing Electric Boots using ThaumicBoots Keybinds. (#75)
* Allow changing Traveler Boots speed using ThaumicBoots Keybinds.

* Air speed bonus gets modified by speedModifier

* Spotless Apply :/

* Added the temp lib file for tests

This should instead use the remote dependency system once TB PR 27 is merged

* Fix potential NSM exception when GTNH Thaumic Boots is not present.

* Spotless apply.

* Now using ThaumicBoots 1.2.2-Pre build

* Delete ThaumicBoots-1.2.1-master+4e33b9941e-dirty-dev.jar

* Fixed DuplicateMod, Excluded EMT from the ThaumicBoots pre jar

* Fixing the EMT Issues + Updating the way the Electric Boots Work

* Update dependencies.gradle

* update

---------

Co-authored-by: Alastors <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
2024-05-06 13:48:33 -04:00
Martin Robertz 547db6d7d0 update 2024-03-26 20:08:50 +01:00
glowredman 93dd3c91c2 Another Cleanup + Removal of GT-Harddep (#74)
* Update deps

* Fix generics

* Deobfuscate parameters

* Minor fixes

* Remove GT harddep

* Exclude GT6
2024-03-26 19:45:31 +01:00
Abdiel Kavash f7a608bf2b cleanup 2024-03-10 07:11:50 +01:00
Abdiel Kavash 787bed088f TileEntitySolarBase 2024-03-10 07:11:50 +01:00
Abdiel Kavash d57ee09abf TileEntityBaseGenerator 2024-03-10 07:11:50 +01:00
Abdiel Kavash 6a7262c066 bs + dep 2024-03-10 07:11:50 +01:00
Martin Robertz 31cf03db4e update 2024-02-18 22:00:37 +01:00
Sampsa 224ae70609 Apply boot speed bonus unidirectionally 2024-02-18 20:25:55 +01:00
kamenskyi 4d2d360be2 Update ru_RU.lang 2024-02-12 19:52:34 +01:00
Raven Szewczyk eed4618ace [ci skip] upgraded build system 2024-02-04 19:58:09 +00:00
279 changed files with 1840 additions and 3621 deletions

No files matched your search

+2 -2
View File
@@ -3,9 +3,9 @@ name: Build and test
on: on:
pull_request: pull_request:
branches: [ master, main ] branches: [ master, main, release/** ]
push: push:
branches: [ master, main ] branches: [ master, main, release/** ]
jobs: jobs:
build-and-test: build-and-test:
+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
+3 -3
View File
@@ -1,6 +1,6 @@
![](/src/main/resources/logo.png?raw=true) ![](/src/main/resources/logo.png?raw=true)
#Electro-Magic Tools # Electro-Magic Tools
Electro-Magic Tools is a Minecraft mod which integrates Thaumcraft 4 with IndustrialCraft 2 by adding cross-mod tools and items, such as magic solar panels, essentia generators and legendary items. Electro-Magic Tools is a Minecraft mod which integrates Thaumcraft 4 with IndustrialCraft 2 by adding cross-mod tools and items, such as magic solar panels, essentia generators and legendary items.
@@ -19,7 +19,7 @@ Before posting to the issue tracker, make sure you meet the following criteria:
- You've gone through the effort to isolate EMT from other mods that aren't related to the issue. - You've gone through the effort to isolate EMT from other mods that aren't related to the issue.
- You've gone through the effort to find what conditions are necessary to reproduce the issue. - You've gone through the effort to find what conditions are necessary to reproduce the issue.
- The issue is subtle enough and has been around long enough that you think we might have missed it. - The issue is subtle enough and has been around long enough that you think we might have missed it.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood. - You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
# Upstream # Upstream
@@ -27,4 +27,4 @@ Before posting to the issue tracker, make sure you meet the following criteria:
# License # License
Electro-Magic-Tools is licensed under the GPL 3 Electro-Magic-Tools is licensed under the GPL 3
+2 -1602
View File
File diff suppressed because it is too large. Load diff
+10 -4
View File
@@ -1,9 +1,15 @@
// Add your dependencies here // Add your dependencies here
dependencies { dependencies {
api 'com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev' api('com.github.GTNewHorizons:Baubles-Expanded:2.2.9-GTNH:dev')
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev' api('com.github.GTNewHorizons:ModularUI:1.3.1:dev')
api('com.github.GTNewHorizons:ThaumicBoots:1.5.8:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
exclude module: 'Baubles'
}
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev' api('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev' api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.53.05:dev')
} }
+199 -25
View File
@@ -1,64 +1,238 @@
# 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 = Electro-Magic Tools modName = Electro-Magic Tools
# 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 = EMT modId = EMT
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = emt modGroup = emt
# WHY is there no version field? # Whether to use modGroup as the maven publishing group.
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the # When false, com.github.GTNewHorizons is used.
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ 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 autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10 minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614 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 # Specify an MCP channel for dependency deobfuscation and the deobfParams task.
# restart Minecraft in development. Choose this dependent on your mod: channel = stable
# 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 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 developmentEnvironmentUserName = Developer
# Define a source file of your project with: # 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
# 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 = emt.EMTTags
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = 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"; # 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 # 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, [...]) # version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements # Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = EMT.java replaceGradleTokenInFile =
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 # 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. # 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 = apiPackage =
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/ # 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 = accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false 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. # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin = 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 = mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only # 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 = coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class # 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! # that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false containsMixinsAndOrCoreModOnly = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your # Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
# responsibility check the licence and request permission for distribution, if required. 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 usesShadowedDependencies = false
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older # 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
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# 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 =
# 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
# 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 to Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# 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 =
# 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 =
# 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 =
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# projects. New projects should not use this parameter. # projects. New projects should not use this parameter.
#customArchiveBaseName = # 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/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
toolchainVersion=25
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+7 -8
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (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/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit 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. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@@ -112,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -170,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -203,15 +203,14 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command: # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped. # 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 # * 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. # treated as '${Hostname}' itself on the command line.
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.
Vendored
+13 -12
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -57,22 +59,21 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
+11
View File
@@ -1,4 +1,15 @@
// Add any additional repositories for your dependencies here // Add any additional repositories for your dependencies here
repositories { repositories {
exclusiveContent {
forRepository {
maven {
name = 'glease'
url = 'https://maven.glease.net/repos/releases/'
}
}
filter {
includeGroup('net.glease')
}
}
} }
+3 -7
View File
@@ -6,6 +6,7 @@ pluginManagement {
name "GTNH Maven" name "GTNH Maven"
url "https://nexus.gtnewhorizons.com/repository/public/" url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent { mavenContent {
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+") includeGroupByRegex("com\\.gtnewhorizons\\..+")
} }
} }
@@ -16,12 +17,7 @@ pluginManagement {
} }
plugins { plugins {
id 'com.diffplug.blowdryerSetup' version '1.7.1' id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.26'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' // Provides java toolchains
} }
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
+21 -11
View File
@@ -7,6 +7,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
@@ -20,7 +21,6 @@ import emt.command.CommandOutputs;
import emt.init.EMTEntities; import emt.init.EMTEntities;
import emt.init.Registry; import emt.init.Registry;
import emt.network.PacketEMTKeys; import emt.network.PacketEMTKeys;
import emt.network.PacketNodeInfo;
import emt.proxy.CommonProxy; import emt.proxy.CommonProxy;
import emt.tile.solar.Solars; import emt.tile.solar.Solars;
import emt.util.EMTClientEventHandler; import emt.util.EMTClientEventHandler;
@@ -40,18 +40,21 @@ public class EMT {
public static final String NAME = "Electro-Magic Tools"; public static final String NAME = "Electro-Magic Tools";
public static final String MOD_ID = "EMT"; public static final String MOD_ID = "EMT";
public static final String VERSION = "GRADLETOKEN_VERSION"; public static final String VERSION = EMTTags.VERSION;
public static final String TEXTURE_PATH = "emt"; public static final String RESOURCE_PATH = "emt";
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory"; public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy"; public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
public static final String COMMON_PROXY = "emt.proxy.CommonProxy"; public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
public static final String CHANNEL = "EMT"; public static final String CHANNEL = "EMT";
public static final String DEPENDS = "required-after:Thaumcraft;" + "required-after:IC2;" public static final String DEPENDS = """
+ "required-after:gregtech;" required-after:Thaumcraft;\
+ "after:Avaritia;" required-after:IC2;\
+ "after:MagicBees;" required-after:modularui;\
+ "after:ForbiddenMagic;" after:gregtech;\
+ "after:dreamcraft;"; after:Avaritia;\
after:MagicBees;\
after:ForbiddenMagic;\
after:dreamcraft""";
public static final CreativeTabs TAB = new EMTCreativeTab("EMT.creativeTab"); public static final CreativeTabs TAB = new EMTCreativeTab("EMT.creativeTab");
public static final Logger LOGGER = LogManager.getLogger("Electro-Magic Tools"); public static final Logger LOGGER = LogManager.getLogger("Electro-Magic Tools");
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT"); public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT");
@@ -62,12 +65,18 @@ public class EMT {
@Mod.Instance("EMT") @Mod.Instance("EMT")
public static EMT instance; public static EMT instance;
public static boolean isBootsActive = false;
public static final String BOOTS = "thaumicboots";
public boolean isSimulating() { public boolean isSimulating() {
return !FMLCommonHandler.instance().getEffectiveSide().isClient(); return !FMLCommonHandler.instance().getEffectiveSide().isClient();
} }
@Mod.EventHandler @Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) { public void preInit(FMLPreInitializationEvent event) {
if (Loader.isModLoaded(BOOTS)) {
isBootsActive = true;
}
EMTConfigHandler.init(event.getSuggestedConfigurationFile()); EMTConfigHandler.init(event.getSuggestedConfigurationFile());
FMLCommonHandler.instance().bus().register(new EMTEventHandler()); FMLCommonHandler.instance().bus().register(new EMTEventHandler());
if (FMLCommonHandler.instance().getSide().isClient()) { if (FMLCommonHandler.instance().getSide().isClient()) {
@@ -76,7 +85,9 @@ public class EMT {
Registry.registerPreInit(); Registry.registerPreInit();
EMTEssentiasOutputs.addPrimalOutputs(); EMTEssentiasOutputs.addPrimalOutputs();
registerPackets(); registerPackets();
Solars.populateCache(); if (Registry.enableGTCompat) {
Solars.populateCache();
}
} }
@Mod.EventHandler @Mod.EventHandler
@@ -103,6 +114,5 @@ public class EMT {
public void registerPackets() { public void registerPackets() {
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER); INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
INSTANCE.registerMessage(PacketNodeInfo.class, PacketNodeInfo.class, 1, Side.CLIENT);
} }
} }
+1 -1
View File
@@ -14,7 +14,7 @@ public abstract class BlockBase extends Block {
name = unlocName; name = unlocName;
setBlockName(EMT.MOD_ID + ".block." + unlocName); setBlockName(EMT.MOD_ID + ".block." + unlocName);
if (textureName != null) { if (textureName != null) {
setBlockTextureName(EMT.TEXTURE_PATH + ":" + textureName); setBlockTextureName(EMT.RESOURCE_PATH + ":" + textureName);
} }
setCreativeTab(EMT.TAB); setCreativeTab(EMT.TAB);
setStepSound(soundType); setStepSound(soundType);
@@ -3,6 +3,7 @@ package emt.block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
@@ -40,6 +41,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
this.setCreativeTab(EMT.TAB); this.setCreativeTab(EMT.TAB);
this.setStepSound(soundType); this.setStepSound(soundType);
this.setHardness(hardness); this.setHardness(hardness);
setHarvestLevel("wrench", 1);
this.countOfMetas = countOfMetas; this.countOfMetas = countOfMetas;
this.instance = curInstance; this.instance = curInstance;
@@ -76,7 +78,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
return set.bottom; return set.bottom;
} else if (side == 1) { } else if (side == 1) {
return set.top; return set.top;
} else if (side != tile.facing) { } else if (tile == null || side != tile.facing) {
return set.side; return set.side;
} else if (tile.isOn) { } else if (tile.isOn) {
if (set.frontOn != null) { if (set.frontOn != null) {
@@ -143,6 +145,11 @@ public abstract class BlockBaseContainer extends BlockContainer {
} }
} }
@Override
public boolean canHarvestBlock(EntityPlayer player, int meta) {
return true;
}
@Override @Override
public int damageDropped(int meta) { public int damageDropped(int meta) {
return meta; return meta;
@@ -56,7 +56,7 @@ public class BlockElectricCloud extends BlockBase {
@Override @Override
public void registerBlockIcons(IIconRegister ir) { public void registerBlockIcons(IIconRegister ir) {
icon = ir.registerIcon(EMT.TEXTURE_PATH + ":empty"); icon = ir.registerIcon(EMT.RESOURCE_PATH + ":empty");
} }
@Override @Override
@@ -33,25 +33,25 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir) { public void registerBlockIcons(IIconRegister ir) {
super.registerBlockIcons(ir); super.registerBlockIcons(ir);
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); this.blockIcon = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
for (int meta = 0; meta < subtypes; meta++) { for (int meta = 0; meta < subtypes; meta++) {
iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top"); iconSets[meta].top = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/top");
iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top"); iconSets[meta].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/top");
iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side"); iconSets[meta].side = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/side");
} }
iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/potentiafront"); iconSets[0].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/potentiafront");
iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/ignisfront"); iconSets[1].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/ignisfront");
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront"); iconSets[2].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/auramfront");
iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront"); iconSets[3].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/arborfront");
iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront"); iconSets[4].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/aerfront");
iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront"); iconSets[5].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":essentiagenerator/aerfront");
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) { public void getSubBlocks(Item id, CreativeTabs tab, List<ItemStack> list) {
list.add(new ItemStack(id, 1, 0)); list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1)); list.add(new ItemStack(id, 1, 1));
list.add(new ItemStack(id, 1, 2)); list.add(new ItemStack(id, 1, 2));
+18 -19
View File
@@ -23,7 +23,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import emt.tile.TileEntityEtherealMacerator; import emt.tile.TileEntityEtherealMacerator;
import emt.tile.TileEntityIndustrialWandRecharge; import emt.tile.TileEntityIndustrialWandRecharge;
import ic2.api.item.IC2Items;
public class BlockMachines extends BlockBaseContainer { public class BlockMachines extends BlockBaseContainer {
@@ -36,31 +35,31 @@ public class BlockMachines extends BlockBaseContainer {
public void registerBlockIcons(IIconRegister ir) { public void registerBlockIcons(IIconRegister ir) {
super.registerBlockIcons(ir); super.registerBlockIcons(ir);
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); this.blockIcon = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
iconSets[0].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top"); iconSets[0].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/top");
iconSets[1].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); iconSets[1].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
iconSets[2].top = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); iconSets[2].top = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
iconSets[0].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side"); iconSets[0].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/side");
iconSets[1].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator"); iconSets[1].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmacerator");
iconSets[2].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); iconSets[2].bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
iconSets[0].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/side"); iconSets[0].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/side");
iconSets[1].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmacerator"); iconSets[1].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmacerator");
iconSets[2].side = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); iconSets[2].side = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
iconSets[0].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger"); iconSets[0].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/wandcharger");
iconSets[1].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfront"); iconSets[1].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratorfront");
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); iconSets[2].frontOff = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
iconSets[0].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/wandcharger"); iconSets[0].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/wandcharger");
iconSets[1].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratorfrontactive"); iconSets[1].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratorfrontactive");
iconSets[2].frontOn = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/etherealmaceratortop"); iconSets[2].frontOn = ir.registerIcon(EMT.RESOURCE_PATH + ":machines/etherealmaceratortop");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) { public void getSubBlocks(Item id, CreativeTabs tab, List<ItemStack> list) {
list.add(new ItemStack(id, 1, 0)); list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1)); list.add(new ItemStack(id, 1, 1));
list.add(new ItemStack(id, 1, 2)); list.add(new ItemStack(id, 1, 2));
@@ -90,7 +89,7 @@ public class BlockMachines extends BlockBaseContainer {
@Override @Override
public Item getItemDropped(int meta, Random random, int fortune) { public Item getItemDropped(int meta, Random random, int fortune) {
return IC2Items.getItem("machine").getItem(); return Item.getItemFromBlock(this);
} }
@Override @Override
@@ -60,7 +60,7 @@ public class BlockPortableNode extends BlockAiry {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerBlockIcons(IIconRegister ri) { public void registerBlockIcons(IIconRegister ri) {
texture = ri.registerIcon(EMT.TEXTURE_PATH + ":portablenode"); texture = ri.registerIcon(EMT.RESOURCE_PATH + ":portablenode");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -79,7 +79,7 @@ public class BlockPortableNode extends BlockAiry {
} }
@Override @Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { public TileEntity createNewTileEntity(World worldIn, int meta) {
return null; return null;
} }
} }
+1 -1
View File
@@ -39,7 +39,7 @@ public class BlockShield extends Block {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerBlockIcons(IIconRegister iconRegister) { public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":shield"); this.blockIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":shield");
} }
@Override @Override
+12 -12
View File
@@ -30,19 +30,19 @@ public class BlockSolars extends BlockBaseContainer {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir) { public void registerBlockIcons(IIconRegister ir) {
IIcon solarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/solartop"); IIcon solarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/solartop");
IIcon doubleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/doublesolartop"); IIcon doubleSolarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/doublesolartop");
IIcon tripleSolarTop = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/triplesolartop"); IIcon tripleSolarTop = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/triplesolartop");
IIcon bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/bottom"); IIcon bottom = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/bottom");
IIcon side = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/side"); IIcon side = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/side");
IIcon waterSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/water/waterside"); IIcon waterSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/water/waterside");
IIcon darkSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/dark/darkside"); IIcon darkSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/dark/darkside");
IIcon orderSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/order/orderside"); IIcon orderSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/order/orderside");
IIcon fireSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/fire/fireside"); IIcon fireSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/fire/fireside");
IIcon airSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/air/airside"); IIcon airSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/air/airside");
IIcon earthSide = ir.registerIcon(EMT.TEXTURE_PATH + ":solars/earth/earthside"); IIcon earthSide = ir.registerIcon(EMT.RESOURCE_PATH + ":solars/earth/earthside");
IIcon[] sides = { side, orderSide, darkSide, airSide, earthSide, waterSide, fireSide }; IIcon[] sides = { side, orderSide, darkSide, airSide, earthSide, waterSide, fireSide };
@@ -105,7 +105,7 @@ public class BlockSolars extends BlockBaseContainer {
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list) { public void getSubBlocks(Item id, CreativeTabs tab, List<ItemStack> list) {
for (int meta = 0; meta < countOfMetas; meta++) { for (int meta = 0; meta < countOfMetas; meta++) {
list.add(new ItemStack(id, 1, meta)); list.add(new ItemStack(id, 1, meta));
} }
@@ -1,22 +1,22 @@
package emt.client.gui; package emt.client.gui;
import static emt.EMT.TEXTURE_PATH; import static emt.EMT.RESOURCE_PATH;
import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.drawable.UITexture;
public class EMT_UITextures { public class EMT_UITextures {
public static final UITexture OVERLAY_SLOT_FUSION_CRAFTING = UITexture public static final UITexture OVERLAY_SLOT_FUSION_CRAFTING = UITexture
.fullImage(TEXTURE_PATH, "guis/overlay_slot/fusion_crafter"); .fullImage(RESOURCE_PATH, "guis/overlay_slot/fusion_crafter");
public static final UITexture OVERLAY_SLOT_WAND = UITexture.fullImage(TEXTURE_PATH, "guis/overlay_slot/wand"); public static final UITexture OVERLAY_SLOT_WAND = UITexture.fullImage(RESOURCE_PATH, "guis/overlay_slot/wand");
public static final UITexture PICTURE_GAUGE_EMPTY_25 = UITexture public static final UITexture PICTURE_GAUGE_EMPTY_25 = UITexture
.fullImage(TEXTURE_PATH, "guis/picture/gauge_empty_25"); .fullImage(RESOURCE_PATH, "guis/picture/gauge_empty_25");
public static final UITexture PICTURE_GAUGE_GENERATOR = UITexture public static final UITexture PICTURE_GAUGE_GENERATOR = UITexture
.fullImage(TEXTURE_PATH, "guis/picture/gauge_generator"); .fullImage(RESOURCE_PATH, "guis/picture/gauge_generator");
public static final UITexture PICTURE_GAUGE_SOLAR = UITexture.fullImage(TEXTURE_PATH, "guis/picture/gauge_solar"); public static final UITexture PICTURE_GAUGE_SOLAR = UITexture.fullImage(RESOURCE_PATH, "guis/picture/gauge_solar");
public static final UITexture PICTURE_GAUGE_EMPTY_11 = UITexture public static final UITexture PICTURE_GAUGE_EMPTY_11 = UITexture
.fullImage(TEXTURE_PATH, "guis/picture/gauge_empty_11"); .fullImage(RESOURCE_PATH, "guis/picture/gauge_empty_11");
public static final UITexture PICTURE_SOLAR_INDICATOR = UITexture public static final UITexture PICTURE_SOLAR_INDICATOR = UITexture
.fullImage(TEXTURE_PATH, "guis/picture/solar_indicator"); .fullImage(RESOURCE_PATH, "guis/picture/solar_indicator");
} }
@@ -12,6 +12,8 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class ModelSpecialArmor extends ModelBiped { public class ModelSpecialArmor extends ModelBiped {
private static ModelSpecialArmor instance;
public ModelRenderer rightWing; public ModelRenderer rightWing;
public ModelRenderer leftWing; public ModelRenderer leftWing;
public ModelRenderer center; public ModelRenderer center;
@@ -30,41 +32,43 @@ public class ModelSpecialArmor extends ModelBiped {
public ModelSpecialArmor(float scale, float offset, int type) { public ModelSpecialArmor(float scale, float offset, int type) {
super(scale, offset, type == 1 ? 128 : 64, type == 0 ? 32 : type == 1 ? 96 : 64); super(scale, offset, type == 1 ? 128 : 64, type == 0 ? 32 : type == 1 ? 96 : 64);
this.type = type; this.type = type;
switch (this.type) {
case 1:
this.textureWidth = 128;
this.textureHeight = 96;
this.jetpack = new ModelRenderer(this, 16, 69);
this.jetpack.setTextureSize(64, 48);
this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2);
this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F);
break;
case 2: this.textureWidth = 128;
this.textureWidth = 64; this.textureHeight = 96;
this.textureHeight = 64; this.jetpack = new ModelRenderer(this, 16, 69);
rightWing = new ModelRenderer(this, 24, 0 + 32); this.jetpack.setTextureSize(64, 48);
rightWing.addBox(-11F, -1F, 0F, 11, 13, 1); this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2);
rightWing.setRotationPoint(-2F, 0F, 3F); this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F);
rightWing.setTextureSize(64, 32);
rightWing.mirror = false;
setRotation(rightWing, 0F, 0.1570796F, 0F);
leftWing = new ModelRenderer(this, 0, 0 + 32); this.textureWidth = 64;
leftWing.addBox(0F, -1F, 0F, 11, 13, 1); this.textureHeight = 64;
leftWing.setRotationPoint(2F, 0F, 3F); rightWing = new ModelRenderer(this, 24, 0 + 32);
leftWing.setTextureSize(64, 32); rightWing.addBox(-11F, -1F, 0F, 11, 13, 1);
leftWing.mirror = true; rightWing.setRotationPoint(-2F, 0F, 3F);
setRotation(leftWing, 0F, -0.1570796F, 0F); rightWing.setTextureSize(64, 32);
rightWing.mirror = false;
setRotation(rightWing, 0F, 0.1570796F, 0F);
center = new ModelRenderer(this, 0, 14 + 32); leftWing = new ModelRenderer(this, 0, 0 + 32);
center.addBox(0F, 0F, 1F, 8, 14, 1); leftWing.addBox(0F, -1F, 0F, 11, 13, 1);
center.setRotationPoint(-4F, 0F, 3F); leftWing.setRotationPoint(2F, 0F, 3F);
center.setTextureSize(64, 32); leftWing.setTextureSize(64, 32);
center.mirror = true; leftWing.mirror = true;
setRotation(center, 0F, 0F, 0F); setRotation(leftWing, 0F, -0.1570796F, 0F);
break;
} center = new ModelRenderer(this, 0, 14 + 32);
center.addBox(0F, 0F, 1F, 8, 14, 1);
center.setRotationPoint(-4F, 0F, 3F);
center.setTextureSize(64, 32);
center.mirror = true;
setRotation(center, 0F, 0F, 0F);
}
public static ModelSpecialArmor getInstance() {
if (instance == null) instance = new ModelSpecialArmor();
return instance;
} }
private void setRotation(ModelRenderer model, float x, float y, float z) { private void setRotation(ModelRenderer model, float x, float y, float z) {
@@ -96,6 +100,7 @@ public class ModelSpecialArmor extends ModelBiped {
this.center.render(scale); this.center.render(scale);
this.leftWing.render(scale); this.leftWing.render(scale);
this.rightWing.render(scale); this.rightWing.render(scale);
break;
} }
} }
@@ -105,6 +110,9 @@ public class ModelSpecialArmor extends ModelBiped {
if (this.isJumping) { if (this.isJumping) {
this.rightWing.rotateAngleY = 0.5f; this.rightWing.rotateAngleY = 0.5f;
this.leftWing.rotateAngleY = -0.5f; this.leftWing.rotateAngleY = -0.5f;
} else {
this.rightWing.rotateAngleY = 0.1570796F;
this.leftWing.rotateAngleY = -0.1570796F;
} }
if (this.isSneak) { if (this.isSneak) {
@@ -113,14 +121,22 @@ public class ModelSpecialArmor extends ModelBiped {
this.jetpack.rotateAngleX = 0.5F; this.jetpack.rotateAngleX = 0.5F;
break; break;
case 2: case 2:
this.center.offsetY -= 0.1;
this.rightWing.offsetY -= 0.1;
this.leftWing.offsetY -= 0.1;
this.center.rotateAngleX = 0.5F; this.center.rotateAngleX = 0.5F;
this.rightWing.rotateAngleX = 0.5F; this.rightWing.rotateAngleX = 0.5F;
this.leftWing.rotateAngleX = 0.5F; this.leftWing.rotateAngleX = 0.5F;
break; break;
} }
} else {
switch (this.type) {
case 1:
this.jetpack.rotateAngleX = 0F;
break;
case 2:
this.center.rotateAngleX = 0F;
this.rightWing.rotateAngleX = 0F;
this.leftWing.rotateAngleX = 0F;
break;
}
} }
} }
} }
+21 -4
View File
@@ -4,8 +4,14 @@ import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ModelWings extends ModelBiped { public class ModelWings extends ModelBiped {
@SideOnly(Side.CLIENT)
private static ModelWings instance = null;
public boolean isJumping = false; public boolean isJumping = false;
ModelRenderer rightWing; ModelRenderer rightWing;
ModelRenderer leftWing; ModelRenderer leftWing;
@@ -41,6 +47,12 @@ public class ModelWings extends ModelBiped {
this.bipedBody.addChild(center); this.bipedBody.addChild(center);
} }
public static ModelWings getInstance() {
if (instance == null) instance = new ModelWings();
return instance;
}
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
@@ -55,20 +67,25 @@ public class ModelWings extends ModelBiped {
model.rotateAngleZ = z; model.rotateAngleZ = z;
} }
public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity) { public void setRotationAngles(float limbSwing, float limbSwingAmount, float playerTicksExisted,
float playerRotationYawHead, float playerRotationPitch, float f5, Entity entity) {
if (isJumping) { if (isJumping) {
this.rightWing.rotateAngleY = 0.5f; this.rightWing.rotateAngleY = 0.5f;
this.leftWing.rotateAngleY = -0.5f; this.leftWing.rotateAngleY = -0.5f;
} else {
this.rightWing.rotateAngleY = 0.1570796F;
this.leftWing.rotateAngleY = -0.1570796F;
} }
if (entity.isSneaking()) { if (entity.isSneaking()) {
this.center.offsetY -= 0.1;
this.rightWing.offsetY -= 0.1;
this.leftWing.offsetY -= 0.1;
this.center.rotateAngleX = 0.5F; this.center.rotateAngleX = 0.5F;
this.rightWing.rotateAngleX = 0.5F; this.rightWing.rotateAngleX = 0.5F;
this.leftWing.rotateAngleX = 0.5F; this.leftWing.rotateAngleX = 0.5F;
} else {
this.center.rotateAngleX = 0.0F;
this.rightWing.rotateAngleX = 0;
this.leftWing.rotateAngleX = 0;
} }
} }
} }
@@ -14,7 +14,7 @@ import emt.entity.EntityLaser;
public class RenderLaser extends Render { public class RenderLaser extends Render {
private static final ResourceLocation laserTexture = new ResourceLocation( private static final ResourceLocation laserTexture = new ResourceLocation(
EMT.TEXTURE_PATH, EMT.RESOURCE_PATH,
"textures/models/lasermodel.png"); "textures/models/lasermodel.png");
@Override @Override
@@ -19,7 +19,7 @@ import emt.entity.EntityShield;
public class RenderShield extends Render { public class RenderShield extends Render {
private static final ResourceLocation shieldTexture = new ResourceLocation( private static final ResourceLocation shieldTexture = new ResourceLocation(
EMT.TEXTURE_PATH, EMT.RESOURCE_PATH,
"textures/models/shield.png"); "textures/models/shield.png");
static int glCallList; static int glCallList;
@@ -89,7 +89,7 @@ public class RenderShield extends Render {
glTranslated(x, y, z); glTranslated(x, y, z);
} }
glCallList(this.glCallList); glCallList(glCallList);
glPopMatrix(); glPopMatrix();
glPopAttrib(); glPopAttrib();
@@ -97,7 +97,7 @@ public class CommandOutputs extends CommandBase {
} }
@Override @Override
public String getCommandUsage(ICommandSender p_71518_1_) { public String getCommandUsage(ICommandSender sender) {
return "/emt_outputs"; return "/emt_outputs";
} }
@@ -107,7 +107,7 @@ public class CommandOutputs extends CommandBase {
} }
@Override @Override
public List addTabCompletionOptions(ICommandSender command, String[] stringArray) { public List<String> addTabCompletionOptions(ICommandSender command, String[] stringArray) {
return null; return null;
} }
@@ -99,7 +99,7 @@ public class EntityEnergyBall extends Entity implements IProjectile, IEntityAddi
} }
/** Generating Coords for every Entity **/ /** Generating Coords for every Entity **/
ArrayList<Entity> entities = new ArrayList(); ArrayList<Entity> entities = new ArrayList<>();
int chunkSize = ((RADIUS - 1) >> 4) + 2; int chunkSize = ((RADIUS - 1) >> 4) + 2;
+2 -2
View File
@@ -165,7 +165,7 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
} }
Entity entity = null; Entity entity = null;
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity( List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(
this, this,
this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double d0 = 0.0D; double d0 = 0.0D;
@@ -173,7 +173,7 @@ public class EntityLaser extends Entity implements IThrowableEntity, IProjectile
float down; float down;
for (l = 0; l < list.size(); ++l) { for (l = 0; l < list.size(); ++l) {
Entity entity1 = (Entity) list.get(l); Entity entity1 = list.get(l);
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
down = 0.3F; down = 0.3F;
@@ -1,40 +1,69 @@
package emt.gthandler.common.loader; package emt.gthandler.common.loader;
import static emt.command.CommandOutputs.mkbook; import static emt.command.CommandOutputs.mkbook;
import static emt.util.EMTRandomHelper.getChargedItem;
import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static thaumcraft.api.ThaumcraftApi.addInfusionCraftingRecipe;
import static thaumcraft.api.ThaumcraftApi.registerObjectTag;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import emt.tile.GT_MetaTileEntity_ResearchCompleter; import emt.init.EMTItems;
import gregtech.api.enums.GT_Values; import emt.init.EMTRecipes;
import emt.util.EMTCraftingAspects;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials; import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TierEU; import gregtech.api.enums.TierEU;
import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GTOreDictUnificator;
import ic2.api.item.IC2Items;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.config.ConfigItems; import thaumcraft.common.config.ConfigItems;
public class EMT_GT_Loader implements Runnable { public class EMT_GT_Loader {
public static int aIDoffset = 13000 - GT_Values.VN.length - 1; public static void runlate() {
public static ItemStack ResearchMultiblock; GTValues.RA.stdBuilder()
@Override
public void run() {
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(
aIDoffset + GT_Values.VN.length + 2,
"Research Completer",
"Research Completer").getStackForm(1L);
}
public void runlate() {
GT_Values.RA.stdBuilder()
.itemInputs( .itemInputs(
new ItemStack(Items.book), new ItemStack(Items.book),
GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L), GTOreDictUnificator.get(OrePrefixes.circuit, Materials.LV, 1L),
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)) new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE))
.itemOutputs(mkbook()).duration(6 * SECONDS).eut(TierEU.RECIPE_MV / 2).addTo(assemblerRecipes); .itemOutputs(mkbook()).duration(6 * SECONDS).eut(TierEU.RECIPE_MV / 2).addTo(assemblerRecipes);
registerObjectTag(ItemList.ReinforcedGlass.get(1L), new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2));
registerObjectTag(
ItemList.FenceIron.get(1L),
new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1));
registerObjectTag(ItemList.PadBouncy.get(1L), new AspectList().add(Aspect.AIR, 5));
registerObjectTag(ItemList.PadSticky.get(1L), new AspectList().add(Aspect.TRAP, 5).add(Aspect.SLIME, 2));
EMTRecipes.shieldFocus = addInfusionCraftingRecipe(
"Shield Focus",
new ItemStack(EMTItems.shieldFocus),
4,
EMTCraftingAspects.shieldFocusCrafting,
new ItemStack(ConfigItems.itemFocusPortableHole, 1),
new ItemStack[] { ItemList.Block_ReinforcedConcrete.get(1L), ItemList.ReinforcedGlass.get(1L),
ItemList.Block_ReinforcedConcrete.get(1L), ItemList.ReinforcedGlass.get(1L),
new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian),
new ItemStack(Blocks.obsidian) });
EMTRecipes.rockbreakerDrill = addInfusionCraftingRecipe(
"Drill of the Rockbreaker",
getChargedItem(EMTItems.rockbreakerDrill, 10),
6,
EMTCraftingAspects.rockbreakerDrillCrafting,
new ItemStack(EMTItems.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack[] { new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge),
new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental),
new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE),
ItemList.Block_ReinforcedConcrete.get(1L), IC2Items.getItem("iridiumPlate"),
IC2Items.getItem("overclockerUpgrade") });
} }
} }
+7 -21
View File
@@ -10,11 +10,9 @@ import emt.block.BlockEssentiaGenerators;
import emt.block.BlockMachines; import emt.block.BlockMachines;
import emt.block.BlockPortableNode; import emt.block.BlockPortableNode;
import emt.block.BlockShield; import emt.block.BlockShield;
import emt.block.BlockSolars;
import emt.item.block.ItemBlockElectricCloud; import emt.item.block.ItemBlockElectricCloud;
import emt.item.block.ItemBlockEssentiaGenerators; import emt.item.block.ItemBlockEssentiaGenerators;
import emt.item.block.ItemBlockMachines; import emt.item.block.ItemBlockMachines;
import emt.item.block.ItemBlockSolars;
import emt.tile.solar.Solars; import emt.tile.solar.Solars;
import ic2.api.item.IC2Items; import ic2.api.item.IC2Items;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
@@ -24,7 +22,7 @@ public class EMTBlocks {
public static Block portableNode, essentiaGens, shield, emtMachines, electricCloud; public static Block portableNode, essentiaGens, shield, emtMachines, electricCloud;
public static Block[] solars = new Block[Solars.getCountOfInstances()]; public static Block[] solars = new Block[0];
public static void registerBlocks() { public static void registerBlocks() {
portableNode = new BlockPortableNode("portablenode"); portableNode = new BlockPortableNode("portablenode");
@@ -33,34 +31,22 @@ public class EMTBlocks {
shield = new BlockShield("shield"); shield = new BlockShield("shield");
GameRegistry.registerBlock(shield, "ShieldBlock"); GameRegistry.registerBlock(shield, "ShieldBlock");
for (int i = 0; i < solars.length; i++) { if (Registry.enableGTCompat) {
if (i == 0) { solars = Solars.registerBlocks();
solars[i] = new BlockSolars("solar", Solars.getCountOfMetas(i), i);
GameRegistry.registerBlock(solars[i], ItemBlockSolars.class, "EMTSolars");
} else {
solars[i] = new BlockSolars("solar" + (i + 1), Solars.getCountOfMetas(i), i);
GameRegistry.registerBlock(solars[i], ItemBlockSolars.class, "EMTSolars" + (i + 1));
}
} }
emtMachines = new BlockMachines("machine"); emtMachines = new BlockMachines("machine");
GameRegistry.registerBlock(emtMachines, ItemBlockMachines.class, "EMTMachines"); GameRegistry.registerBlock(emtMachines, ItemBlockMachines.class, "EMTMachines");
essentiaGens = new BlockEssentiaGenerators("essentia"); if (Registry.enableGTCompat) {
GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "EssentiaGenerators"); essentiaGens = new BlockEssentiaGenerators("essentia");
GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "EssentiaGenerators");
}
electricCloud = new BlockElectricCloud("electricCloud"); electricCloud = new BlockElectricCloud("electricCloud");
GameRegistry.registerBlock(electricCloud, ItemBlockElectricCloud.class, "electricCloud"); GameRegistry.registerBlock(electricCloud, ItemBlockElectricCloud.class, "electricCloud");
} }
public static void addAspects() { public static void addAspects() {
registerObjectTag(IC2Items.getItem("rubberTrampoline"), new AspectList().add(Aspect.AIR, 5));
registerObjectTag(
IC2Items.getItem("ironFence"),
new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1));
registerObjectTag(
IC2Items.getItem("reinforcedGlass"),
new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2));
registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4)); registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4));
registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4)); registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4));
registerObjectTag( registerObjectTag(
+292 -313
View File
@@ -12,12 +12,12 @@ import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import emt.EMT; import emt.EMT;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import emt.util.EMTCraftingAspects; import emt.util.EMTCraftingAspects;
import emt.util.EMTResearchAspects; import emt.util.EMTResearchAspects;
import gregtech.api.enums.ItemList;
import ic2.api.item.IC2Items; import ic2.api.item.IC2Items;
import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputItemStack;
@@ -103,8 +103,6 @@ public class EMTRecipes {
public static ShapedArcaneRecipe electricScribingTools; public static ShapedArcaneRecipe electricScribingTools;
public static ShapedArcaneRecipe thaumiumWing; public static ShapedArcaneRecipe thaumiumWing;
public static ShapedArcaneRecipe thaumiumWings; public static ShapedArcaneRecipe thaumiumWings;
public static ShapedArcaneRecipe researchCompleter;
public static ShapedArcaneRecipe magicalMachineCasing;
public static CrucibleRecipe ignisGenerator; public static CrucibleRecipe ignisGenerator;
public static CrucibleRecipe auramGenerator; public static CrucibleRecipe auramGenerator;
public static CrucibleRecipe arborGenerator; public static CrucibleRecipe arborGenerator;
@@ -250,28 +248,6 @@ public class EMTRecipes {
'X', 'X',
OreDictionary.getOres("itemRubber").get(i)); OreDictionary.getOres("itemRubber").get(i));
} }
/** Smelting Recipes **/
GameRegistry.addSmelting(
new ItemStack(EMTItems.itemEMTItems, 1, 1),
new ItemStack(ConfigItems.itemResource, 1, 6),
0.0F);
GameRegistry.addSmelting(
new ItemStack(EMTItems.itemEMTItems, 1, 2),
new ItemStack(ConfigItems.itemResource, 1, 6),
0.0F);
GameRegistry.addSmelting(
new ItemStack(EMTItems.itemEMTItems, 1, 3),
new ItemStack(ConfigItems.itemResource, 1, 3),
0.0F);
GameRegistry.addSmelting(
new ItemStack(EMTItems.itemEMTItems, 1, 4),
new ItemStack(ConfigItems.itemResource, 1, 3),
0.0F);
GameRegistry.addSmelting(
new ItemStack(EMTItems.itemEMTItems, 1, 10),
new ItemStack(EMTItems.itemEMTItems, 2, 8),
0.0F);
} }
private static void registerShaplessRecipes() {} private static void registerShaplessRecipes() {}
@@ -525,7 +501,7 @@ public class EMTRecipes {
new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder),
new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1) }); new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1) });
shieldFocus = addInfusionCraftingRecipe( if (!Registry.enableGTCompat) shieldFocus = addInfusionCraftingRecipe(
"Shield Focus", "Shield Focus",
new ItemStack(EMTItems.shieldFocus), new ItemStack(EMTItems.shieldFocus),
4, 4,
@@ -536,18 +512,19 @@ public class EMTRecipes {
new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian),
new ItemStack(Blocks.obsidian) }); new ItemStack(Blocks.obsidian) });
maintenanceFocus = addInfusionCraftingRecipe( if (Registry.enableGTCompat) {
"Wand Focus: Maintenance", maintenanceFocus = addInfusionCraftingRecipe(
new ItemStack(EMTItems.maintenanceFocus), "Wand Focus: Maintenance",
6, new ItemStack(EMTItems.maintenanceFocus),
EMTCraftingAspects.maintenanceFocus, 6,
new ItemStack(EMTItems.chargeFocus), EMTCraftingAspects.maintenanceFocus,
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(EMTItems.chargeFocus),
new ItemStack(ConfigItems.itemShard, 1, 4), new ItemStack(ConfigItems.itemShard, 1, 3), new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 5),
new ItemStack(EMTItems.itemEMTItems, 1, 9), new ItemStack(ConfigItems.itemShard, 1, 2), new ItemStack(ConfigItems.itemShard, 1, 4), new ItemStack(ConfigItems.itemShard, 1, 3),
new ItemStack(ConfigItems.itemShard, 1, 1), new ItemStack(ConfigItems.itemShard, 1, 0), new ItemStack(EMTItems.itemEMTItems, 1, 9), new ItemStack(ConfigItems.itemShard, 1, 2),
ItemList.Duct_Tape.get(1) }); new ItemStack(ConfigItems.itemShard, 1, 1), new ItemStack(ConfigItems.itemShard, 1, 0),
new ItemStack(GameRegistry.findItem("gregtech", "gt.metaitem.01"), 1, 32764) });
}
potentiaGenerator = addInfusionCraftingRecipe( potentiaGenerator = addInfusionCraftingRecipe(
"Potentia Generator", "Potentia Generator",
new ItemStack(EMTBlocks.essentiaGens, 1, 0), new ItemStack(EMTBlocks.essentiaGens, 1, 0),
@@ -570,7 +547,7 @@ public class EMTRecipes {
new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE),
IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") }); IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") });
rockbreakerDrill = addInfusionCraftingRecipe( if (!Registry.enableGTCompat) rockbreakerDrill = addInfusionCraftingRecipe(
"Drill of the Rockbreaker", "Drill of the Rockbreaker",
getChargedItem(EMTItems.rockbreakerDrill, 10), getChargedItem(EMTItems.rockbreakerDrill, 10),
6, 6,
@@ -616,16 +593,20 @@ public class EMTRecipes {
new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5),
new ItemStack(ConfigBlocks.blockJar) }); new ItemStack(ConfigBlocks.blockJar) });
solarHelmetRevealing = addInfusionCraftingRecipe( if (Registry.enableGTCompat) {
"Solar Helmet of Revealing", solarHelmetRevealing = addInfusionCraftingRecipe(
getChargedItem(EMTItems.solarHelmetRevealing, 10), "Solar Helmet of Revealing",
5, getChargedItem(EMTItems.solarHelmetRevealing, 10),
EMTCraftingAspects.solarHelmetRevealing, 5,
new ItemStack(EMTItems.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), EMTCraftingAspects.solarHelmetRevealing,
new ItemStack[] { new ItemStack(EMTBlocks.solars[0], 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(EMTItems.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(EMTBlocks.solars[0], 1, 1), IC2Items.getItem("glassFiberCableItem"),
new ItemStack(ConfigItems.itemShard, 1, 4) }); new ItemStack(
IC2Items.getItem("lapotronCrystal").getItem(),
1,
OreDictionary.WILDCARD_VALUE),
new ItemStack(ConfigItems.itemShard, 1, 4) });
}
electricBootsTravel = addInfusionCraftingRecipe( electricBootsTravel = addInfusionCraftingRecipe(
"Electric Boots of the Traveller", "Electric Boots of the Traveller",
getChargedItem(EMTItems.electricBootsTraveller, 10), getChargedItem(EMTItems.electricBootsTraveller, 10),
@@ -669,17 +650,19 @@ public class EMTRecipes {
new ItemStack(Blocks.iron_block), new ItemStack(EMTItems.itemEMTItems, 1, 5), new ItemStack(Blocks.iron_block), new ItemStack(EMTItems.itemEMTItems, 1, 5),
new ItemStack(EMTItems.itemEMTItems, 1, 5) }); new ItemStack(EMTItems.itemEMTItems, 1, 5) });
tripleCompressedSolar = addInfusionCraftingRecipe( if (Registry.enableGTCompat) {
"Compressed Solars", tripleCompressedSolar = addInfusionCraftingRecipe(
new ItemStack(EMTBlocks.solars[0], 1, 2), "Compressed Solars",
2, new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.compressedSolars, 2,
new ItemStack(EMTBlocks.solars[0], 1, 1), EMTCraftingAspects.compressedSolars,
new ItemStack[] { new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack[] { new ItemStack(EMTBlocks.solars[0], 1, 1),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1) }); new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1),
new ItemStack(EMTBlocks.solars[0], 1, 1) });
}
electricHoeGrowth = addInfusionCraftingRecipe( electricHoeGrowth = addInfusionCraftingRecipe(
"Electric Hoe of Growth", "Electric Hoe of Growth",
getChargedItem(EMTItems.electricHoeGrowth, 10), getChargedItem(EMTItems.electricHoeGrowth, 10),
@@ -867,26 +850,26 @@ public class EMTRecipes {
EMTCraftingAspects.tinyUraniumCrafting, EMTCraftingAspects.tinyUraniumCrafting,
IC2Items.getItem("Uran238")); IC2Items.getItem("Uran238"));
compressedSolar = addArcaneCraftingRecipe( if (Registry.enableGTCompat) {
"Compressed Solars", compressedSolar = addArcaneCraftingRecipe(
new ItemStack(EMTBlocks.solars[0], 1, 0), "Compressed Solars",
EMTCraftingAspects.compressedSolars, new ItemStack(EMTBlocks.solars[0], 1, 0),
"XXX", EMTCraftingAspects.compressedSolars,
"XXX", "XXX",
"XXX", "XXX",
'X', "XXX",
IC2Items.getItem("solarPanel")); 'X',
IC2Items.getItem("solarPanel"));
doubleCompressedSolar = addArcaneCraftingRecipe( doubleCompressedSolar = addArcaneCraftingRecipe(
"Compressed Solars", "Compressed Solars",
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.compressedSolars, EMTCraftingAspects.compressedSolars,
"XXX", "XXX",
"XXX", "XXX",
"XXX", "XXX",
'X', 'X',
new ItemStack(EMTBlocks.solars[0], 1, 0)); new ItemStack(EMTBlocks.solars[0], 1, 0));
}
electricScribingTools = addArcaneCraftingRecipe( electricScribingTools = addArcaneCraftingRecipe(
"Electric Scribing Tools", "Electric Scribing Tools",
getChargedItem(EMTItems.electricScribingTools, 10), getChargedItem(EMTItems.electricScribingTools, 10),
@@ -923,151 +906,140 @@ public class EMTRecipes {
'X', 'X',
new ItemStack(EMTItems.itemEMTItems, 1, 14)); new ItemStack(EMTItems.itemEMTItems, 1, 14));
// magicalMachineCasing = addArcaneCraftingRecipe("ResearchCompleter", new if (Registry.enableGTCompat) {
// ItemStack(GregTech_API.sBlockCasings8, 1, 6), EMTCraftingAspects.magicalMachineCasing, "XYX", "XZX", "XYX", /** Crucible Recipes **/
// 'X', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), 'Y', new ignisGenerator = addCrucibleRecipe(
// ItemStack(ConfigItems.itemResource, 1, 14) , 'Z', GT_OreDictUnificator.get(OrePrefixes.frameGt, "Ignis Generator",
// Materials.Thaumium, 1)); new ItemStack(EMTBlocks.essentiaGens, 1, 1),
new ItemStack(EMTBlocks.essentiaGens, 1, 0),
EMTCraftingAspects.ignisGeneratorCrafting);
// researchCompleter = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockMachines, auramGenerator = addCrucibleRecipe(
// 1, 13001), EMTCraftingAspects.researchCompleter, "XYX", "YZY", "XAX", 'X', "Auram Generator",
// GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 1L), 'Y', new new ItemStack(EMTBlocks.essentiaGens, 1, 2),
// ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 2), 'Z', new ItemStack(GregTech_API.sBlockCasings8, 1, 6), new ItemStack(EMTBlocks.essentiaGens, 1, 0),
// 'A', new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5)); EMTCraftingAspects.auramGeneratorCrafting);
/** Crucible Recipes **/ arborGenerator = addCrucibleRecipe(
ignisGenerator = addCrucibleRecipe( "Arbor Generator",
"Ignis Generator", new ItemStack(EMTBlocks.essentiaGens, 1, 3),
new ItemStack(EMTBlocks.essentiaGens, 1, 1), new ItemStack(EMTBlocks.essentiaGens, 1, 0),
new ItemStack(EMTBlocks.essentiaGens, 1, 0), EMTCraftingAspects.arborGeneratorCrafting);
EMTCraftingAspects.ignisGeneratorCrafting);
auramGenerator = addCrucibleRecipe( aerGenerator = addCrucibleRecipe(
"Auram Generator", "Aer Generator",
new ItemStack(EMTBlocks.essentiaGens, 1, 2), new ItemStack(EMTBlocks.essentiaGens, 1, 4),
new ItemStack(EMTBlocks.essentiaGens, 1, 0), new ItemStack(EMTBlocks.essentiaGens, 1, 0),
EMTCraftingAspects.auramGeneratorCrafting); EMTCraftingAspects.aerGenerator);
arborGenerator = addCrucibleRecipe( waterSolar = addCrucibleRecipe(
"Arbor Generator", "Water Infused Solar Panels",
new ItemStack(EMTBlocks.essentiaGens, 1, 3), new ItemStack(EMTBlocks.solars[0], 1, 3),
new ItemStack(EMTBlocks.essentiaGens, 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.arborGeneratorCrafting); EMTCraftingAspects.waterSolars);
aerGenerator = addCrucibleRecipe( doubleWaterSolar = addCrucibleRecipe(
"Aer Generator", "Water Infused Solar Panels",
new ItemStack(EMTBlocks.essentiaGens, 1, 4), new ItemStack(EMTBlocks.solars[0], 1, 4),
new ItemStack(EMTBlocks.essentiaGens, 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.aerGenerator); EMTCraftingAspects.waterSolars);
waterSolar = addCrucibleRecipe( tripleWaterSolar = addCrucibleRecipe(
"Water Infused Solar Panels", "Water Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 3), new ItemStack(EMTBlocks.solars[0], 1, 5),
new ItemStack(EMTBlocks.solars[0], 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.waterSolars); EMTCraftingAspects.waterSolars);
doubleWaterSolar = addCrucibleRecipe( darkSolar = addCrucibleRecipe(
"Water Infused Solar Panels", "Entropy Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 4), new ItemStack(EMTBlocks.solars[0], 1, 6),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.waterSolars); EMTCraftingAspects.darkSolars);
tripleWaterSolar = addCrucibleRecipe( doubleDarkSolar = addCrucibleRecipe(
"Water Infused Solar Panels", "Entropy Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 5), new ItemStack(EMTBlocks.solars[0], 1, 7),
new ItemStack(EMTBlocks.solars[0], 1, 2), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.waterSolars); EMTCraftingAspects.darkSolars);
darkSolar = addCrucibleRecipe( tripleDarkSolar = addCrucibleRecipe(
"Entropy Infused Solar Panels", "Entropy Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 6), new ItemStack(EMTBlocks.solars[0], 1, 8),
new ItemStack(EMTBlocks.solars[0], 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.darkSolars); EMTCraftingAspects.darkSolars);
doubleDarkSolar = addCrucibleRecipe( orderSolar = addCrucibleRecipe(
"Entropy Infused Solar Panels", "Order Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 7), new ItemStack(EMTBlocks.solars[0], 1, 9),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.darkSolars); EMTCraftingAspects.orderSolars);
tripleDarkSolar = addCrucibleRecipe( doubleOrderSolar = addCrucibleRecipe(
"Entropy Infused Solar Panels", "Order Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 8), new ItemStack(EMTBlocks.solars[0], 1, 10),
new ItemStack(EMTBlocks.solars[0], 1, 2), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.darkSolars); EMTCraftingAspects.orderSolars);
orderSolar = addCrucibleRecipe( tripleOrderSolar = addCrucibleRecipe(
"Order Infused Solar Panels", "Order Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 9), new ItemStack(EMTBlocks.solars[0], 1, 11),
new ItemStack(EMTBlocks.solars[0], 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.orderSolars); EMTCraftingAspects.orderSolars);
doubleOrderSolar = addCrucibleRecipe( fireSolar = addCrucibleRecipe(
"Order Infused Solar Panels", "Fire Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 10), new ItemStack(EMTBlocks.solars[0], 1, 12),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.orderSolars); EMTCraftingAspects.fireSolars);
tripleOrderSolar = addCrucibleRecipe( doubleFireSolar = addCrucibleRecipe(
"Order Infused Solar Panels", "Fire Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 11), new ItemStack(EMTBlocks.solars[0], 1, 13),
new ItemStack(EMTBlocks.solars[0], 1, 2), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.orderSolars); EMTCraftingAspects.fireSolars);
fireSolar = addCrucibleRecipe( tripleFireSolar = addCrucibleRecipe(
"Fire Infused Solar Panels", "Fire Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 12), new ItemStack(EMTBlocks.solars[0], 1, 14),
new ItemStack(EMTBlocks.solars[0], 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.fireSolars); EMTCraftingAspects.fireSolars);
doubleFireSolar = addCrucibleRecipe( airSolar = addCrucibleRecipe(
"Fire Infused Solar Panels", "Air Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 13), new ItemStack(EMTBlocks.solars[0], 1, 15),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.fireSolars); EMTCraftingAspects.airSolars);
tripleFireSolar = addCrucibleRecipe( doubleAirSolar = addCrucibleRecipe(
"Fire Infused Solar Panels", "Air Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 14), new ItemStack(EMTBlocks.solars[1], 1, 0),
new ItemStack(EMTBlocks.solars[0], 1, 2), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.fireSolars); EMTCraftingAspects.airSolars);
airSolar = addCrucibleRecipe( tripleAirSolar = addCrucibleRecipe(
"Air Infused Solar Panels", "Air Infused Solar Panels",
new ItemStack(EMTBlocks.solars[0], 1, 15), new ItemStack(EMTBlocks.solars[1], 1, 1),
new ItemStack(EMTBlocks.solars[0], 1, 0), new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.airSolars); EMTCraftingAspects.airSolars);
doubleAirSolar = addCrucibleRecipe( earthSolar = addCrucibleRecipe(
"Air Infused Solar Panels", "Earth Infused Solar Panels",
new ItemStack(EMTBlocks.solars[1], 1, 0), new ItemStack(EMTBlocks.solars[1], 1, 2),
new ItemStack(EMTBlocks.solars[0], 1, 1), new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.airSolars); EMTCraftingAspects.earthSolars);
tripleAirSolar = addCrucibleRecipe( doubleEarthSolar = addCrucibleRecipe(
"Air Infused Solar Panels", "Earth Infused Solar Panels",
new ItemStack(EMTBlocks.solars[1], 1, 1), new ItemStack(EMTBlocks.solars[1], 1, 3),
new ItemStack(EMTBlocks.solars[0], 1, 2), new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.airSolars); EMTCraftingAspects.earthSolars);
earthSolar = addCrucibleRecipe(
"Earth Infused Solar Panels",
new ItemStack(EMTBlocks.solars[1], 1, 2),
new ItemStack(EMTBlocks.solars[0], 1, 0),
EMTCraftingAspects.earthSolars);
doubleEarthSolar = addCrucibleRecipe(
"Earth Infused Solar Panels",
new ItemStack(EMTBlocks.solars[1], 1, 3),
new ItemStack(EMTBlocks.solars[0], 1, 1),
EMTCraftingAspects.earthSolars);
tripleEarthSolar = addCrucibleRecipe(
"Earth Infused Solar Panels",
new ItemStack(EMTBlocks.solars[1], 1, 4),
new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.earthSolars);
tripleEarthSolar = addCrucibleRecipe(
"Earth Infused Solar Panels",
new ItemStack(EMTBlocks.solars[1], 1, 4),
new ItemStack(EMTBlocks.solars[0], 1, 2),
EMTCraftingAspects.earthSolars);
}
ItemStack itemStack = new ItemStack(ConfigItems.itemJarNode); ItemStack itemStack = new ItemStack(ConfigItems.itemJarNode);
((ItemJarNode) itemStack.getItem()).setAspects(itemStack, new AspectList()); ((ItemJarNode) itemStack.getItem()).setAspects(itemStack, new AspectList());
portableNode = addCrucibleRecipe( portableNode = addCrucibleRecipe(
@@ -1084,54 +1056,58 @@ public class EMTRecipes {
/** IC2 Stuff related recipes **/ /** IC2 Stuff related recipes **/
/* Ore Clusters Macerator Recipes */ final boolean isDreamcraftNotLoaded = !Loader.isModLoaded("dreamcraft");
ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
ironClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
null,
true,
ironClusterRecipe);
ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy(); if (isDreamcraftNotLoaded) {
goldClusterRecipe.stackSize = 22; /* Ore Clusters Macerator Recipes */
((BasicMachineRecipeManager) Recipes.macerator).addRecipe( ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy();
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), ironClusterRecipe.stackSize = 22;
null, ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
true, new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)),
goldClusterRecipe); null,
true,
ironClusterRecipe);
ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy(); ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy();
copperClusterRecipe.stackSize = 22; goldClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe( ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)),
null, null,
true, true,
copperClusterRecipe); goldClusterRecipe);
ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy(); ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy();
tinClusterRecipe.stackSize = 22; copperClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe( ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)),
null, null,
true, true,
tinClusterRecipe); copperClusterRecipe);
ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy(); ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy();
silverClusterRecipe.stackSize = 22; tinClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe( ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)),
null, null,
true, true,
silverClusterRecipe); tinClusterRecipe);
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy(); ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy();
leadClusterRecipe.stackSize = 22; silverClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe( ((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)),
null, null,
true, true,
leadClusterRecipe); silverClusterRecipe);
ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy();
leadClusterRecipe.stackSize = 22;
((BasicMachineRecipeManager) Recipes.macerator).addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)),
null,
true,
leadClusterRecipe);
}
/* Thaumium Plates Recipes */ /* Thaumium Plates Recipes */
thaumiumPlate = GameRegistry.addShapedRecipe( thaumiumPlate = GameRegistry.addShapedRecipe(
@@ -1145,76 +1121,79 @@ public class EMTRecipes {
new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE),
'Z', 'Z',
new ItemStack(Blocks.obsidian)); new ItemStack(Blocks.obsidian));
Recipes.metalformerRolling.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)),
null,
new ItemStack(EMTItems.itemEMTItems, 1, 5));
/* Ore Processing for Amber and Cinnabar */ if (isDreamcraftNotLoaded) {
if (EMTConfigHandler.removeAmberAndCinnabarMacerating) { Recipes.metalformerRolling.addRecipe(
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) { new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)),
IRecipeInput input = it.next(); null,
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) { new ItemStack(EMTItems.itemEMTItems, 1, 5));
it.remove();
EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)"); /* Ore Processing for Amber and Cinnabar */
if (EMTConfigHandler.removeAmberAndCinnabarMacerating) {
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) {
it.remove();
EMT.LOGGER.info("Removing conflicting amber macerating recipe(s)");
}
}
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) {
IRecipeInput input = it.next();
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) {
it.remove();
EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)");
}
} }
} }
ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1);
crushedAmberRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)),
null,
crushedAmberRecipe);
for (Iterator<IRecipeInput> it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) { ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3);
IRecipeInput input = it.next(); crushedCinnabarRecipe.stackSize = 2;
if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) { Recipes.macerator.addRecipe(
it.remove(); new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)),
EMT.LOGGER.info("Removing Conflicting cinnabar macerating recipe(s)"); null,
} crushedCinnabarRecipe);
}
NBTTagCompound waterAmount = new NBTTagCompound();
waterAmount.setInteger("amount", 1000);
ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
smallCopperDust.stackSize = 2;
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
smallCopperDust.stackSize = 2;
Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 2),
smallCopperDust,
IC2Items.getItem("stoneDust"));
Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 4),
smallTinDust,
IC2Items.getItem("stoneDust"));
NBTTagCompound heatAmount = new NBTTagCompound();
heatAmount.setInteger("minHeat", 1000);
Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)),
heatAmount,
IC2Items.getItem("smallCopperDust"),
new ItemStack(ConfigItems.itemResource, 1, 6));
Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)),
heatAmount,
IC2Items.getItem("smallTinDust"),
new ItemStack(ConfigItems.itemResource, 1, 3));
} }
ItemStack crushedAmberRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 1);
crushedAmberRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)),
null,
crushedAmberRecipe);
ItemStack crushedCinnabarRecipe = new ItemStack(EMTItems.itemEMTItems, 1, 3);
crushedCinnabarRecipe.stackSize = 2;
Recipes.macerator.addRecipe(
new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)),
null,
crushedCinnabarRecipe);
NBTTagCompound waterAmount = new NBTTagCompound();
waterAmount.setInteger("amount", 1000);
ItemStack smallCopperDust = IC2Items.getItem("smallCopperDust");
smallCopperDust.stackSize = 2;
ItemStack smallTinDust = IC2Items.getItem("smallTinDust");
smallCopperDust.stackSize = 2;
Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 1)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 2),
smallCopperDust,
IC2Items.getItem("stoneDust"));
Recipes.oreWashing.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 3)),
waterAmount,
new ItemStack(EMTItems.itemEMTItems, 1, 4),
smallTinDust,
IC2Items.getItem("stoneDust"));
NBTTagCompound heatAmount = new NBTTagCompound();
heatAmount.setInteger("minHeat", 1000);
Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 2)),
heatAmount,
IC2Items.getItem("smallCopperDust"),
new ItemStack(ConfigItems.itemResource, 1, 6));
Recipes.centrifuge.addRecipe(
new RecipeInputItemStack(new ItemStack(EMTItems.itemEMTItems, 1, 4)),
heatAmount,
IC2Items.getItem("smallTinDust"),
new ItemStack(ConfigItems.itemResource, 1, 3));
} }
} }
+19 -50
View File
@@ -19,9 +19,9 @@ public class EMTResearches {
} }
public static void addResearchTab() { public static void addResearchTab() {
ResourceLocation background = new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/background.png"); ResourceLocation background = new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/background.png");
ResearchCategories ResearchCategories
.registerCategory("EMT", new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png"), background); .registerCategory("EMT", new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/emt.png"), background);
} }
public static void addResearch() { public static void addResearch() {
@@ -31,7 +31,7 @@ public class EMTResearches {
0, 0,
0, 0,
0, 0,
new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock() new ResourceLocation(EMT.RESOURCE_PATH, "textures/misc/emt.png")).setRound().setAutoUnlock()
.registerResearchItem().setPages(new ResearchPage("")); .registerResearchItem().setPages(new ResearchPage(""));
new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound() new EMTResearchItem("Diamond Chainsaw", 5, -6, 0, new ItemStack(EMTItems.diamondChainsaw)).setRound()
.setAutoUnlock().registerResearchItem() .setAutoUnlock().registerResearchItem()
@@ -54,10 +54,6 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.cardboard), new ResearchPage(EMTRecipes.cardboard),
new ResearchPage(EMTRecipes.featherWing), new ResearchPage(EMTRecipes.featherWing),
new ResearchPage(EMTRecipes.featherWings)); new ResearchPage(EMTRecipes.featherWings));
// new EMTResearchItem("ResearchCompleter", EMTResearchAspects.researchCompleter, -4, -2, 0, new
// ItemStack(GregTech_API.sBlockMachines, 1, 13001)).setParents("Electric Magic
// Tools").setParentsHidden("WANDPED", "WARDEDARCANA").registerResearchItem().setPages(new ResearchPage(""), new
// ResearchPage(EMTRecipes.magicalMachineCasing), new ResearchPage(EMTRecipes.researchCompleter));
/*************************************/ /*************************************/
/** Research that can be disabled **/ /** Research that can be disabled **/
@@ -229,7 +225,7 @@ public class EMTResearches {
} }
} }
if (!EMTConfigHandler.potentiaGeneratorResearch) { if (Registry.enableGTCompat && !EMTConfigHandler.potentiaGeneratorResearch) {
new EMTResearchItem( new EMTResearchItem(
"Potentia Generator", "Potentia Generator",
EMTResearchAspects.potentiaGeneratorResearch, EMTResearchAspects.potentiaGeneratorResearch,
@@ -239,9 +235,7 @@ public class EMTResearches {
new ItemStack(EMTBlocks.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed() new ItemStack(EMTBlocks.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed()
.registerResearchItem() .registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.potentiaGenerator)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.potentiaGenerator));
}
if (!EMTConfigHandler.potentiaGeneratorResearch) {
if (!EMTConfigHandler.ignisGeneratorResearch) { if (!EMTConfigHandler.ignisGeneratorResearch) {
new EMTResearchItem( new EMTResearchItem(
"Ignis Generator", "Ignis Generator",
@@ -253,9 +247,7 @@ public class EMTResearches {
.setConcealed().registerResearchItem() .setConcealed().registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ignisGenerator)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.ignisGenerator));
} }
}
if (!EMTConfigHandler.potentiaGeneratorResearch) {
if (!EMTConfigHandler.auramGeneratorResearch) { if (!EMTConfigHandler.auramGeneratorResearch) {
new EMTResearchItem( new EMTResearchItem(
"Auram Generator", "Auram Generator",
@@ -267,9 +259,7 @@ public class EMTResearches {
.setConcealed().registerResearchItem() .setConcealed().registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.auramGenerator)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.auramGenerator));
} }
}
if (!EMTConfigHandler.potentiaGeneratorResearch) {
if (!EMTConfigHandler.arborGeneratorResearch) { if (!EMTConfigHandler.arborGeneratorResearch) {
new EMTResearchItem( new EMTResearchItem(
"Arbor Generator", "Arbor Generator",
@@ -281,9 +271,7 @@ public class EMTResearches {
.setConcealed().registerResearchItem() .setConcealed().registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.arborGenerator)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.arborGenerator));
} }
}
if (!EMTConfigHandler.potentiaGeneratorResearch) {
if (!EMTConfigHandler.lucrumGeneratorResearch) { if (!EMTConfigHandler.lucrumGeneratorResearch) {
new EMTResearchItem( new EMTResearchItem(
"Lucrum Generator", "Lucrum Generator",
@@ -295,9 +283,7 @@ public class EMTResearches {
.setConcealed().registerResearchItem() .setConcealed().registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.lucrumGenerator));
} }
}
if (!EMTConfigHandler.potentiaGeneratorResearch) {
if (!EMTConfigHandler.aerGeneratorResearch) { if (!EMTConfigHandler.aerGeneratorResearch) {
new EMTResearchItem( new EMTResearchItem(
"Aer Generator", "Aer Generator",
@@ -308,23 +294,20 @@ public class EMTResearches {
new ItemStack(EMTBlocks.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator") new ItemStack(EMTBlocks.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator")
.setConcealed().registerResearchItem() .setConcealed().registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.aerGenerator));
if (!EMTConfigHandler.wandChargingSationResearch) {
new EMTResearchItem(
"Industrial Wand Charging Station",
EMTResearchAspects.wandCharger,
-4,
2,
3,
new ItemStack(EMTBlocks.emtMachines, 1, 0)).setParents("Potentia Generator")
.registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandRecharger));
}
} }
} }
if (!EMTConfigHandler.potentiaGeneratorResearch) {
if (!EMTConfigHandler.wandChargingSationResearch) {
new EMTResearchItem(
"Industrial Wand Charging Station",
EMTResearchAspects.wandCharger,
-4,
2,
3,
new ItemStack(EMTBlocks.emtMachines, 1, 0)).setParents("Potentia Generator")
.registerResearchItem()
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.wandRecharger));
}
}
if (!EMTConfigHandler.thaumiumChainsawResearch) { if (!EMTConfigHandler.thaumiumChainsawResearch) {
if (!EMTConfigHandler.streamChainsawResearch) { if (!EMTConfigHandler.streamChainsawResearch) {
new EMTResearchItem( new EMTResearchItem(
@@ -388,7 +371,7 @@ public class EMTResearches {
} }
} }
if (!EMTConfigHandler.compressedSolarsResearch) { if (Registry.enableGTCompat && !EMTConfigHandler.compressedSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Compressed Solars", "Compressed Solars",
EMTResearchAspects.compressedSolars, EMTResearchAspects.compressedSolars,
@@ -401,9 +384,6 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.compressedSolar), new ResearchPage(EMTRecipes.compressedSolar),
new ResearchPage(EMTRecipes.doubleCompressedSolar), new ResearchPage(EMTRecipes.doubleCompressedSolar),
new ResearchPage(EMTRecipes.tripleCompressedSolar)); new ResearchPage(EMTRecipes.tripleCompressedSolar));
}
if (!EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.solarHelmetResearch) { if (!EMTConfigHandler.solarHelmetResearch) {
new EMTResearchItem( new EMTResearchItem(
"Solar Helmet of Revealing", "Solar Helmet of Revealing",
@@ -416,7 +396,6 @@ public class EMTResearches {
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.solarHelmetRevealing)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.solarHelmetRevealing));
} }
} }
if (!EMTConfigHandler.electricBootsResearch) { if (!EMTConfigHandler.electricBootsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Electric Boots of the Traveller", "Electric Boots of the Traveller",
@@ -483,7 +462,7 @@ public class EMTResearches {
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.etheralProcessor)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.etheralProcessor));
} }
if (!EMTConfigHandler.compressedSolarsResearch) { if (Registry.enableGTCompat && !EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.waterSolarsResearch) { if (!EMTConfigHandler.waterSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Water Infused Solar Panels", "Water Infused Solar Panels",
@@ -498,9 +477,7 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.doubleWaterSolar), new ResearchPage(EMTRecipes.doubleWaterSolar),
new ResearchPage(EMTRecipes.tripleWaterSolar)); new ResearchPage(EMTRecipes.tripleWaterSolar));
} }
}
if (!EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.darkSolarsResearch) { if (!EMTConfigHandler.darkSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Entropy Infused Solar Panels", "Entropy Infused Solar Panels",
@@ -515,9 +492,7 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.doubleDarkSolar), new ResearchPage(EMTRecipes.doubleDarkSolar),
new ResearchPage(EMTRecipes.tripleDarkSolar)); new ResearchPage(EMTRecipes.tripleDarkSolar));
} }
}
if (!EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.orderSolarsResearch) { if (!EMTConfigHandler.orderSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Order Infused Solar Panels", "Order Infused Solar Panels",
@@ -532,9 +507,7 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.doubleOrderSolar), new ResearchPage(EMTRecipes.doubleOrderSolar),
new ResearchPage(EMTRecipes.tripleOrderSolar)); new ResearchPage(EMTRecipes.tripleOrderSolar));
} }
}
if (!EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.fireSolarsResearch) { if (!EMTConfigHandler.fireSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Fire Infused Solar Panels", "Fire Infused Solar Panels",
@@ -549,9 +522,7 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.doubleFireSolar), new ResearchPage(EMTRecipes.doubleFireSolar),
new ResearchPage(EMTRecipes.tripleFireSolar)); new ResearchPage(EMTRecipes.tripleFireSolar));
} }
}
if (!EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.airSolarsResearch) { if (!EMTConfigHandler.airSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Air Infused Solar Panels", "Air Infused Solar Panels",
@@ -566,9 +537,7 @@ public class EMTResearches {
new ResearchPage(EMTRecipes.doubleAirSolar), new ResearchPage(EMTRecipes.doubleAirSolar),
new ResearchPage(EMTRecipes.tripleAirSolar)); new ResearchPage(EMTRecipes.tripleAirSolar));
} }
}
if (!EMTConfigHandler.compressedSolarsResearch) {
if (!EMTConfigHandler.earthSolarsResearch) { if (!EMTConfigHandler.earthSolarsResearch) {
new EMTResearchItem( new EMTResearchItem(
"Earth Infused Solar Panels", "Earth Infused Solar Panels",
@@ -648,7 +617,7 @@ public class EMTResearches {
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus)); .setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus));
} }
if (!EMTConfigHandler.maintenanceFocusResearch) { if (Registry.enableGTCompat && !EMTConfigHandler.maintenanceFocusResearch) {
new EMTResearchItem( new EMTResearchItem(
"Wand Focus: Maintenance", "Wand Focus: Maintenance",
EMTResearchAspects.maintenanceFocus, EMTResearchAspects.maintenanceFocus,
+39 -37
View File
@@ -12,49 +12,51 @@ public class EMTTiles {
public static void registerTileEntities() { public static void registerTileEntities() {
// Essentia Gens if (Registry.enableGTCompat) {
// legacy support // Essentia Gens
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitypotentiagenerator"); // legacy support
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityignisgenerator"); GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitypotentiagenerator");
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityauramgenerator"); GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityignisgenerator");
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityarborgenerator"); GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityauramgenerator");
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityaergenerator"); GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityarborgenerator");
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitylucrumgenerator"); GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentityaergenerator");
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "tileentitylucrumgenerator");
// new TEs will be called TileEntityEssentiaGenerator // new TEs will be called TileEntityEssentiaGenerator
GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "TileEntityEssentiaGenerator"); GameRegistry.registerTileEntity(TileEntityBaseGenerator.class, "TileEntityEssentiaGenerator");
// Solars
// legacy support
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitycompressedsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublecompressedsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplecompressedsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitywatersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublewatersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplewatersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydarksolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubledarksolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripledarksolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityordersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleordersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleordersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityfiresolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublefiresolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplefiresolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityairsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleairsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleairsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityearthsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleearthsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleearthsolar");
// new TEs will be called TileEntityXCompressedSolar
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "TileEntityXCompressedSolar");
}
// Machinery // Machinery
GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
// Solars
// legacy support
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitycompressedsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublecompressedsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplecompressedsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitywatersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublewatersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplewatersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydarksolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubledarksolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripledarksolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityordersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleordersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleordersolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityfiresolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoublefiresolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytriplefiresolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityairsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleairsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleairsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentityearthsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitydoubleearthsolar");
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "tileentitytripleearthsolar");
// new TEs will be called TileEntityXCompressedSolar
GameRegistry.registerTileEntity(TileEntitySolarBase.class, "TileEntityXCompressedSolar");
// Random Stuff // Random Stuff
GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode"); GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode");
GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud"); GameRegistry.registerTileEntity(TileElectricCloud.class, "tileEntityElectricCloud");
@@ -1,243 +0,0 @@
package emt.init;
import static thaumcraft.api.aspects.Aspect.*;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import emt.EMT;
import emt.util.EMTResearchItem;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.CrucibleRecipe;
import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.crafting.InfusionRecipe;
import thaumcraft.api.crafting.ShapedArcaneRecipe;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
public class EMT_GTNH_Recipes_And_Researches implements Runnable {
private static LinkedHashMap<String, IArcaneRecipe> arcaneRecipeLinkedHashMap = new LinkedHashMap<>();
private static LinkedHashMap<String, InfusionRecipe> infusionRecipeLinkedHashMap = new LinkedHashMap<>();
private static LinkedHashMap<String, CrucibleRecipe> cruciblRecipeLinkedHashMap = new LinkedHashMap<>();
private static AspectList getPrimals(int amount) {
return new AspectList().add(ORDER, amount).add(ENTROPY, amount).add(AIR, amount).add(EARTH, amount)
.add(WATER, amount).add(FIRE, amount);
}
@Override
public void run() {
EMTResearches.addResearchTab();
runArcaneRecipes();
runResreaches();
}
private void runInfusionRecipes() {}
private void runKettleRecipes() {}
private void runArcaneRecipes() {
arcaneRecipeLinkedHashMap.put(
"DiamondChainsaw",
new ShapedArcaneRecipe(
"DiamondChainsaw",
new ItemStack(EMTItems.diamondChainsaw),
getPrimals(35),
"sts",
"pmp",
"pbp",
's',
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Diamond, 1),
'p',
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1),
't',
GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, Materials.Thaumium, 1),
'b',
ItemList.Battery_RE_LV_Sodium.get(1),
'm',
ItemList.Electric_Motor_MV.get(1)));
arcaneRecipeLinkedHashMap.put(
"ThaumiumChainsaw",
new ShapedArcaneRecipe(
"ThaumiumChainsaw",
new ItemStack(EMTItems.thaumiumChainsaw),
getPrimals(35),
"sps",
"pmp",
"ppp",
's',
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Thaumium, 1),
'p',
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1),
'b',
ItemList.Battery_RE_LV_Sodium.get(1),
'm',
new ItemStack(EMTItems.diamondChainsaw)));
for (IArcaneRecipe recipe : arcaneRecipeLinkedHashMap.values()) {
ThaumcraftApi.getCraftingRecipes().add(recipe);
}
}
private void runResreaches() {
HashSet<ResearchItem> researches = new HashSet<>();
researches.add(
new EMTResearchItem(
"ElectricMagicTools",
0,
0,
0,
new ResourceLocation(EMT.TEXTURE_PATH, "textures/misc/emt.png")).setSpecial().setAutoUnlock()
.setPages(new ResearchPage("")));
researches.add(
new EMTResearchItem(
"DiamondChainsaw",
new AspectList().add(GREED, 12).add(FIRE, 9).add(METAL, 6).add(EARTH, 3),
0,
-2,
2,
new ItemStack(EMTItems.diamondChainsaw))
.setPages(new ResearchPage(arcaneRecipeLinkedHashMap.get("DiamondChainsaw"))).setRound()
.setParentsHidden("ElectricMagicTools"));
// researches.add(new EMTResearchItem("DiamondChainsaw",new
// AspectList().add(GREED,12).add(FIRE,9).add(METAL,6).add(EARTH,3),0,-2,2,new
// ItemStack(EMTItems.diamondChainsaw)).setRound());
researches.forEach(ResearchItem::registerResearchItem);
}
class ShapedArcaneRecipeIgnoresNBT extends ShapedArcaneRecipe {
protected String research;
protected ItemStack result;
protected AspectList aspects;
protected Object[] recipe;
protected LinkedHashMap<Character, Object> translation = new LinkedHashMap<>();
int[] rowcolm;
public ShapedArcaneRecipeIgnoresNBT(String research, ItemStack result, AspectList aspects, Object... recipe) {
super(research, result, aspects, recipe);
this.research = research;
this.result = result;
this.aspects = aspects;
this.recipe = recipe;
int rows = 0;
int colums = 0;
if (!(recipe[0] instanceof String)) throw new UnsupportedOperationException(
"The Recipe must start with at least one String for the first row!");
int i = 0;
rowcolm = new int[3];
do {
rows++;
colums = Math.max(colums, ((String) recipe[i]).length());
rowcolm[i] = colums;
i = rows;
} while (recipe[i] instanceof String);
if (rows > 3 || colums > 3)
throw new UnsupportedOperationException("The Recipe must fit in a 3x3 crafting field!");
rowcolm = Arrays.copyOf(rowcolm, rows);
int k = 0;
for (int j = i; j < recipe.length; j += 2) {
k++;
if (recipe[j] instanceof Character) translation.put((Character) recipe[j], recipe[j + 1]);
}
}
@Override
public boolean matches(IInventory inv, World world, EntityPlayer player) {
if (this.research.length() > 0
&& !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), this.research))
return false;
else {
for (int y = 0; y < rowcolm.length; y++) {
String rowAsString = ((String) recipe[y]);
for (int x = 0; x < rowcolm[y]; x++) {
Object itemReplacement = translation.get(rowAsString.toCharArray()[x]);
ItemStack slot = ThaumcraftApiHelper.getStackInRowAndColumn(inv, x, y);
if (itemReplacement != null && slot == null) {
return false;
} else if (itemReplacement instanceof String) {
if (!GT_Utility.areStacksEqual(
GT_OreDictUnificator.getFirstOre(itemReplacement, 1),
GT_OreDictUnificator.get(slot),
true))
if (!OreDictionary.getOres((String) itemReplacement).contains(slot)) return false;
} else if (itemReplacement instanceof ItemStack) {
if (!GT_Utility.isStackValid(itemReplacement)) {
return false;
}
if (!GT_Utility.areStacksEqual((ItemStack) itemReplacement, slot, true))
if (!GT_Utility.areUnificationsEqual((ItemStack) itemReplacement, slot, true))
if (!(((ItemStack) itemReplacement).getItem().equals(slot.getItem())
&& ((ItemStack) itemReplacement).getItemDamage()
== OreDictionary.WILDCARD_VALUE))
return false;
} else if (itemReplacement instanceof Collection) {
boolean hit = false;
for (Object o : (Collection) itemReplacement) {
if (GT_Utility.areStacksEqual((ItemStack) o, slot, true)
|| GT_Utility.areUnificationsEqual((ItemStack) o, slot, true)
|| (((ItemStack) o).getItem().equals(slot.getItem())
&& ((ItemStack) itemReplacement).getItemDamage()
== OreDictionary.WILDCARD_VALUE))
hit = true;
}
if (!hit) {
return false;
}
}
}
}
return true;
}
}
@Override
public ItemStack getCraftingResult(IInventory iInventory) {
return result;
}
@Override
public int getRecipeSize() {
return recipe.length;
}
@Override
public ItemStack getRecipeOutput() {
return result;
}
@Override
public AspectList getAspects() {
return aspects;
}
@Override
public AspectList getAspects(IInventory iInventory) {
return aspects;
}
@Override
public String getResearch() {
return research;
}
}
}
+9 -4
View File
@@ -1,32 +1,37 @@
package emt.init; package emt.init;
import cpw.mods.fml.common.Loader;
import emt.gthandler.common.loader.EMT_GT_Loader; import emt.gthandler.common.loader.EMT_GT_Loader;
import emt.tile.solar.Solars; import emt.tile.solar.Solars;
import emt.util.EMTEssentiasOutputs; import emt.util.EMTEssentiasOutputs;
public class Registry { public class Registry {
private static final EMT_GT_Loader gtloader = new EMT_GT_Loader(); public static boolean enableGTCompat;
public static void registerPreInit() { public static void registerPreInit() {
enableGTCompat = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
EMTBlocks.registerBlocks(); EMTBlocks.registerBlocks();
EMTItems.registerItems(); EMTItems.registerItems();
EMTTiles.registerTileEntities(); EMTTiles.registerTileEntities();
} }
public static void registerInit() { public static void registerInit() {
gtloader.run();
EMTRecipes.registerEarlyRecipes(); EMTRecipes.registerEarlyRecipes();
} }
public static void registerLate() { public static void registerLate() {
EMTEssentiasOutputs.addOutputs(); EMTEssentiasOutputs.addOutputs();
EMTBlocks.addAspects(); EMTBlocks.addAspects();
gtloader.runlate(); if (enableGTCompat) {
EMT_GT_Loader.runlate();
}
EMTRecipes.registerLateRecipes(); EMTRecipes.registerLateRecipes();
// new EMT_GTNH_Recipes_And_Researches().run(); // new EMT_GTNH_Recipes_And_Researches().run();
EMTRecipes.registerUUMInfusionRecipes(); EMTRecipes.registerUUMInfusionRecipes();
EMTResearches.register(); EMTResearches.register();
Solars.registerReverseRecipes(); if (enableGTCompat) {
Solars.registerReverseRecipes();
}
} }
} }
+1 -1
View File
@@ -12,7 +12,7 @@ public class ItemBase extends Item {
public ItemBase(String unlocName, String textureName) { public ItemBase(String unlocName, String textureName) {
super(); super();
setUnlocalizedName(EMT.MOD_ID + unlocName); setUnlocalizedName(EMT.MOD_ID + unlocName);
setTextureName(EMT.TEXTURE_PATH + ":" + textureName); setTextureName(EMT.RESOURCE_PATH + ":" + textureName);
setCreativeTab(EMT.TAB); setCreativeTab(EMT.TAB);
} }
@@ -26,9 +26,8 @@ public class ItemElectricScribingTools extends ItemInkwell implements IElectricI
this.setMaxStackSize(1); this.setMaxStackSize(1);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
} }
@@ -53,7 +52,7 @@ public class ItemElectricScribingTools extends ItemInkwell implements IElectricI
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
+3 -3
View File
@@ -57,8 +57,8 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) { public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":armoreumaker"); this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":armoreumaker");
this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":inventoryeumaker"); this.icon[1] = ri.registerIcon(EMT.RESOURCE_PATH + ":inventoryeumaker");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -67,7 +67,7 @@ public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> list) {
list.add(new ItemStack(this, 1, 0)); list.add(new ItemStack(this, 1, 0));
list.add(new ItemStack(this, 1, 1)); list.add(new ItemStack(this, 1, 1));
} }
+24 -24
View File
@@ -111,7 +111,7 @@ public class ItemMaterials extends Item {
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List result, boolean advanced) { public void addInformation(ItemStack stack, EntityPlayer player, List<String> result, boolean advanced) {
switch (stack.getItemDamage()) { switch (stack.getItemDamage()) {
case 16: case 16:
case 17: case 17:
@@ -124,26 +124,26 @@ public class ItemMaterials extends Item {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) { public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/clusteruranium"); this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/clusteruranium");
this.icon[1] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedamber"); this.icon[1] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/crushedamber");
this.icon[2] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedamber"); this.icon[2] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/purifiedamber");
this.icon[3] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/crushedcinnabar"); this.icon[3] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/crushedcinnabar");
this.icon[4] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/purifiedcinnabar"); this.icon[4] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/purifiedcinnabar");
this.icon[5] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumplate"); this.icon[5] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/thaumiumplate");
this.icon[6] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/lightningsummoner"); this.icon[6] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/lightningsummoner");
this.icon[7] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/feathermesh"); this.icon[7] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/feathermesh");
this.icon[8] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/glue"); this.icon[8] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/glue");
this.icon[9] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/ducttape"); this.icon[9] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/ducttape");
this.icon[10] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/rubberball"); this.icon[10] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/rubberball");
this.icon[11] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboard"); this.icon[11] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/cardboard");
this.icon[12] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/cardboardsheet"); this.icon[12] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/cardboardsheet");
this.icon[13] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/taintedfeather"); this.icon[13] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/taintedfeather");
this.icon[14] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumWing"); this.icon[14] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/thaumiumWing");
this.icon[15] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/uumatterdrop"); this.icon[15] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/uumatterdrop");
this.icon[16] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/draconicSchematic"); this.icon[16] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/draconicSchematic");
this.icon[17] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/wyvernSchematic"); this.icon[17] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/wyvernSchematic");
this.icon[18] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/awakenedSchematic"); this.icon[18] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/awakenedSchematic");
this.icon[19] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/chaoticSchematic"); this.icon[19] = ri.registerIcon(EMT.RESOURCE_PATH + ":materials/chaoticSchematic");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -152,7 +152,7 @@ public class ItemMaterials extends Item {
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> list) {
for (int i = 1; i <= 19; i++) { for (int i = 1; i <= 19; i++) {
list.add(new ItemStack(this, 1, i)); list.add(new ItemStack(this, 1, i));
} }
@@ -170,8 +170,8 @@ public class ItemMaterials extends Item {
- player.yOffset; - player.yOffset;
double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ); Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ);
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); float f3 = MathHelper.cos((-f2 * 0.01745329F) - (float) Math.PI);
float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); float f4 = MathHelper.sin((-f2 * 0.01745329F) - (float) Math.PI);
float f5 = -MathHelper.cos(-f1 * 0.01745329F); float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F); float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5; float f7 = f4 * f5;
+69 -41
View File
@@ -61,7 +61,7 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
} }
@Override @Override
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) { public void addInformation(ItemStack itemStack, EntityPlayer player, List<String> list, boolean par4) {
String colourCode = "" + EnumChatFormatting.DARK_RED; String colourCode = "" + EnumChatFormatting.DARK_RED;
list.add( list.add(
colourCode colourCode
@@ -72,7 +72,7 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ri) { public void registerIcons(IIconRegister ri) {
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":onering"); this.icon[0] = ri.registerIcon(EMT.RESOURCE_PATH + ":onering");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -81,7 +81,7 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> list) {
list.add(new ItemStack(this, 1, 0)); list.add(new ItemStack(this, 1, 0));
} }
@@ -124,10 +124,6 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
@Override @Override
public void onWornTick(ItemStack stack, EntityLivingBase player) { public void onWornTick(ItemStack stack, EntityLivingBase player) {
if (!player.isInvisible()) {
player.setInvisible(true);
((EntityPlayer) player).capabilities.disableDamage = true;
}
// Stop doing this 20 times per second... // Stop doing this 20 times per second...
if (random.nextInt(20) > 0) return; if (random.nextInt(20) > 0) return;
@@ -151,11 +147,27 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
if (!player.worldObj.isRemote) { if (!player.worldObj.isRemote) {
// EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel( // EMT.LOGGER.info( String.format( "Total Corruption: %d ItemWarpLevel: %d", corruption, getItemWarpLevel(
// stack, false ) )); // stack, false ) ));
if (random.nextInt(55) == 0) {
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 2000, 4, false));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2000, 4, false));
player.addPotionEffect(new PotionEffect(Potion.hunger.id, 2000, 0, false));
if (corruption > 3000) {
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2000, 1, false));
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2000, 1, false));
}
if (corruption > 1000) {
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2000, 1, false));
}
if (corruption > 6000) {
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2000, 1, false));
}
}
if (corruption == 0) { if (corruption == 0) {
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 2000, 4, false));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2000, 4, false));
((EntityPlayer) player).addChatMessage( ((EntityPlayer) player).addChatMessage(
new ChatComponentText( new ChatComponentText(
EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been forever " EMTTextHelper.PURPLE + "You have worn the Ring. Your soul has now been temporarily "
+ EMTTextHelper.PURPLE + EMTTextHelper.PURPLE
+ "tainted. " + "tainted. "
+ EMTTextHelper.RED + EMTTextHelper.RED
@@ -165,48 +177,62 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
+ EMTTextHelper.ITALIC + EMTTextHelper.ITALIC
+ "increase, and strange things will start happening.")); + "increase, and strange things will start happening."));
} }
// First effect should become active after ~5 Minutes // First effect should become active after ~1 Minute
else if (corruption > 300 && corruption < 1400 && random.nextInt(100) == 0) { if (corruption > 60 && corruption < 400 && random.nextInt(100) == 0) {
((EntityPlayer) player) ((EntityPlayer) player)
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy")); .addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring somehow feels heavy"));
if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false)); player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 3, false));
else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false)); if (random.nextBoolean()) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 4, false));
} else if (corruption >= 1400 && corruption < 3800 && random.nextInt(100) == 0) { else player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 4, false));
((EntityPlayer) player).capabilities.disableDamage = false; }
player.addPotionEffect(new PotionEffect(Potion.poison.id, 500, 2, false)); if (corruption > 30 && random.nextInt(80) == 0) {
} else if (corruption >= 3800 && corruption < 6500 && random.nextInt(100) == 0) { ((EntityPlayer) player)
((EntityPlayer) player).capabilities.disableDamage = false; .addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring falters"));
player.removePotionEffect(14);
player.removePotionEffect(11);
player.removePotionEffect(5);
player.removePotionEffect(1);
player.removePotionEffect(8);
player.removePotionEffect(3);
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 400, 3, false));
/*
* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer)
* player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer)
* player).readFromNBT(tag);
*/
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 1, false));
}
if (corruption >= 150 && corruption < 8000 && random.nextInt(150) == 0) {
((EntityPlayer) player)
.addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your arms feel heavy"));
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 600, 4, false));
player.addPotionEffect(new PotionEffect(Potion.weakness.id, 600, 4, false));
}
if (corruption >= 700 && corruption < 8000 && random.nextInt(150) == 0) {
player.removePotionEffect(11);
player.motionY += 2d; player.motionY += 2d;
} else if (corruption >= 6500 && random.nextInt(10000) == 0) { } else if (corruption >= 1000 && random.nextInt(500) == 0) {
((EntityPlayer) player).capabilities.disableDamage = false; player.removePotionEffect(11);
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false)); player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
} }
if (corruption >= 300) { // worn more than 5 minutes if (corruption >= 60) { // worn more than 1 minute
if (random.nextInt(100) == 0) { // every 100 seconds if (random.nextInt(100) == 0) { // every 100 seconds
getItemWarpLevel(stack, true); getItemWarpLevel(stack, true);
((EntityPlayer) player).addChatMessage( ((EntityPlayer) player).addChatMessage(
new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple")); new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
} }
if (random.nextInt(300) == 0) { // randomly every 5 minutes if (random.nextInt(300) == 2) { // randomly every 5 minutes
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 1, false); // adds 1 perm warp ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 15, true); // adds 15 temp warp
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, random.nextInt(1)); // adds 0-1
// sticky warp
((EntityPlayer) player).addChatMessage( ((EntityPlayer) player).addChatMessage(
new ChatComponentText(EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple")); new ChatComponentText(EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple"));
} }
if (corruption >= 3600) { // if you wear it for more than an hour total if (corruption >= 180) { // if you wear it for 3 minutes
if (random.nextInt(300) == 0) { if (random.nextInt(290) == 1) {
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5), false); // adds ((EntityPlayer) player)
// 5-10 .addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring corrupts"));
// perm ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(20), true); // adds
// warp // 10-30
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5)); // adds
// 5-10
// sticky
// warp
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(40), true); // adds
// 10-50
// temp // temp
// warp, // warp,
// but // but
@@ -240,10 +266,12 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
@Override @Override
public void onUnequipped(ItemStack stack, EntityLivingBase player) { public void onUnequipped(ItemStack stack, EntityLivingBase player) {
player.setInvisible(false); player.removePotionEffect(14);
if (!((EntityPlayer) player).capabilities.isCreativeMode) player.removePotionEffect(11);
((EntityPlayer) player).capabilities.disableDamage = false; player.removePotionEffect(5);
player.removePotionEffect(1);
player.removePotionEffect(8);
player.removePotionEffect(3);
/* /*
* Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer) * Wtf? Remove ForgeData tag? There are more mods using this tag than just emt! ((EntityPlayer)
* player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer) player).readFromNBT(tag); * player).writeToNBT(tag); tag.removeTag( NBT_TAG_FORGE_DATA ); ((EntityPlayer) player).readFromNBT(tag);
@@ -18,11 +18,12 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent; import net.minecraftforge.event.entity.living.LivingFallEvent;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.Optional.Interface;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import emt.init.EMTItems;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper; import emt.util.EMTTextHelper;
import ic2.api.item.ElectricItem; import ic2.api.item.ElectricItem;
@@ -33,16 +34,20 @@ import thaumcraft.api.IVisDiscountGear;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.Thaumcraft; import thaumcraft.common.Thaumcraft;
import thaumcraft.common.items.armor.Hover; import thaumcraft.common.items.armor.Hover;
import thaumicboots.api.IBoots;
import thaumicboots.mixins.early.minecraft.EntityLivingBaseAccessor;
@Interface(iface = "thaumicboots.api.IBoots", modid = "thaumicboots")
public class ItemElectricBootsTraveller extends ItemArmor public class ItemElectricBootsTraveller extends ItemArmor
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor { implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor, IBoots {
public int maxCharge = 100000; public int maxCharge = 100000;
public int energyPerDamage = 1000; public int energyPerDamage = 1000;
public int visDiscount = 2; public int visDiscount = 2;
public float speedBonus = 0.055F; public float speedBonus = 0.055F;
// constant from Thaumcraft's EventHandlerEntity#playerJumps for basic Traveller Boots // constant from Thaumcraft's EventHandlerEntity#playerJumps for basic Traveller Boots
public float jumpBonus = 0.2750000059604645F; public static final float BASE_JUMP_BONUS = 0.2750000059604645F;
public float jumpBonus = BASE_JUMP_BONUS;
public double transferLimit = 100; public double transferLimit = 100;
public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) { public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) {
@@ -50,11 +55,11 @@ public class ItemElectricBootsTraveller extends ItemArmor
this.setMaxDamage(27); this.setMaxDamage(27);
this.setMaxStackSize(1); this.setMaxStackSize(1);
this.setCreativeTab(EMT.TAB); this.setCreativeTab(EMT.TAB);
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(new EventHandler());
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -69,7 +74,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_electric"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_electric");
} }
@Override @Override
@@ -108,9 +113,8 @@ public class ItemElectricBootsTraveller extends ItemArmor
return 0.15D; return 0.15D;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%"); list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
} }
@@ -122,15 +126,28 @@ public class ItemElectricBootsTraveller extends ItemArmor
@Override @Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (!player.capabilities.isFlying && player.moveForward > 0.0F) { if (getInertiaState(itemStack) && player.moveForward == 0
if (player.worldObj.isRemote && !player.isSneaking()) { && player.moveStrafing == 0
&& player.capabilities.isFlying) {
player.motionX *= 0.5;
player.motionZ *= 0.5;
}
if (EMT.isBootsActive) {
boolean omniMode = getOmniState(itemStack);
if ((player.moveForward == 0F && player.moveStrafing == 0F && omniMode)
|| (player.moveForward <= 0F && !omniMode)) {
return;
}
}
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F) {
if (player.worldObj.isRemote && !player.isSneaking() && getStepAssistState(itemStack)) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) { if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight); Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
} }
player.stepHeight = 1.0F; player.stepHeight = 1.0F;
} }
float speedMod = (float) getSpeedModifier(itemStack);
if (player.onGround) { if (player.onGround || player.isOnLadder() || player.capabilities.isFlying) {
float bonus = speedBonus; float bonus = speedBonus;
if (player.isInWater()) { if (player.isInWater()) {
bonus /= 4.0F; bonus /= 4.0F;
@@ -139,29 +156,36 @@ public class ItemElectricBootsTraveller extends ItemArmor
if (player.isSneaking()) { if (player.isSneaking()) {
bonus /= 2.0F; bonus /= 2.0F;
} }
bonus *= speedMod;
player.moveFlying(0.0F, 1.0F, bonus); if (EMT.isBootsActive) {
applyOmniState(player, bonus, itemStack);
} else if (player.moveForward > 0.0) {
player.moveFlying(0.0F, player.moveForward, bonus);
}
} else if (Hover.getHover(player.getEntityId())) { } else if (Hover.getHover(player.getEntityId())) {
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots, // Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
// so any other boots factor can be calculated via proportion method // so any other boots factor can be calculated via proportion method
player.jumpMovementFactor = 0.03F player.jumpMovementFactor = (0.03F / BASE_JUMP_BONUS * jumpBonus - 0.02F) * speedMod + 0.02F;
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
* jumpBonus;
} else { } else {
player.jumpMovementFactor = 0.05F player.jumpMovementFactor = (0.05F / BASE_JUMP_BONUS * jumpBonus - 0.02F) * speedMod + 0.02F;
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
* jumpBonus;
} }
} }
} }
@SubscribeEvent @Optional.Method(modid = "thaumicboots")
public void onPlayerJump(LivingEvent.LivingJumpEvent event) { public void applyOmniState(EntityPlayer player, float bonus, ItemStack itemStack) {
if (event.entityLiving instanceof EntityPlayer) { if (player.moveForward != 0.0) {
EntityPlayer player = (EntityPlayer) event.entityLiving; player.moveFlying(0.0F, player.moveForward, bonus);
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; }
if (getOmniState(itemStack)) {
if (hasArmor) player.motionY += jumpBonus; if (player.moveStrafing != 0.0) player.moveFlying(player.moveStrafing, 0.0F, bonus);
boolean jumping = ((EntityLivingBaseAccessor) player).getIsJumping();
boolean sneaking = player.isSneaking();
if (sneaking && !jumping && !player.onGround) {
player.motionY -= bonus;
} else if (jumping && !sneaking) {
player.motionY += bonus;
}
} }
} }
@@ -174,39 +198,9 @@ public class ItemElectricBootsTraveller extends ItemArmor
return 4.0f; return 4.0f;
} }
@SubscribeEvent
public void onLivingFall(LivingFallEvent event) {
if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) {
if (event.entity instanceof EntityPlayer) {
EntityPlayer entity = (EntityPlayer) event.entity;
if ((entity.inventory.armorInventory[0] != null)
&& (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0]
.getItem();
ItemStack stack = entity.inventory.armorInventory[0];
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
if (tUsedBoots.getMinimumDropDist() > event.distance) {
event.setCanceled(true);
} else {
float tEnergyDemand = tUsedBoots.energyPerDamage
* (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3
: event.distance) - 4.0F);
if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) {
// EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance,
// tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
ElectricItem.manager.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false);
event.setCanceled(true);
}
}
}
}
}
}
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/electricboots.png"; return EMT.RESOURCE_PATH + ":textures/models/electricboots.png";
} }
@Override @Override
@@ -221,20 +215,12 @@ public class ItemElectricBootsTraveller extends ItemArmor
@Override @Override
public int getItemEnchantability() { public int getItemEnchantability() {
if (EMTConfigHandler.enchanting == false) { return EMTConfigHandler.enchanting ? 4 : 0;
return 0;
} else {
return 4;
}
} }
@Override @Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (EMTConfigHandler.enchanting == false) { return EMTConfigHandler.enchanting;
return false;
} else {
return true;
}
} }
public int getEnergyPerDamage() { public int getEnergyPerDamage() {
@@ -277,4 +263,86 @@ public class ItemElectricBootsTraveller extends ItemArmor
public int getRunicCharge(ItemStack itemStack) { public int getRunicCharge(ItemStack itemStack) {
return 0; return 0;
} }
// Avoid NSM Exception when ThaumicBoots is not present.
public double getSpeedModifier(ItemStack stack) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("speed")) {
return stack.stackTagCompound.getDouble("speed");
}
return 1.0;
}
public double getJumpModifier(ItemStack stack) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("jump")) {
return stack.stackTagCompound.getDouble("jump");
}
return 1.0;
}
public boolean getOmniState(ItemStack stack) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("omni")) {
return stack.stackTagCompound.getBoolean("omni");
}
return true;
}
public boolean getStepAssistState(ItemStack stack) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("step")) {
return stack.stackTagCompound.getBoolean("step");
}
return true;
}
public boolean getInertiaState(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getBoolean("inertiacanceling");
}
return false;
}
public class EventHandler {
@SubscribeEvent
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
if (event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
ItemStack boots = player.getCurrentArmor(0);
boolean hasArmor = boots != null && boots.getItem() == ItemElectricBootsTraveller.this;
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
}
}
@SubscribeEvent
public void onLivingFall(LivingFallEvent event) {
if ((EMT.instance.isSimulating()) && ((event.entity instanceof EntityLivingBase))) {
if (event.entity instanceof EntityPlayer) {
EntityPlayer entity = (EntityPlayer) event.entity;
if ((entity.inventory.armorInventory[0] != null)
&& (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) {
ItemElectricBootsTraveller tUsedBoots = (ItemElectricBootsTraveller) entity.inventory.armorInventory[0]
.getItem();
ItemStack stack = entity.inventory.armorInventory[0];
// Check if we dropped the minimum amount; To cover the jump-boost bonus without penalty
if (tUsedBoots.getMinimumDropDist() > event.distance) {
event.setCanceled(true);
} else {
float tEnergyDemand = tUsedBoots.energyPerDamage
* (((event.distance > tUsedBoots.getMaxHealthyDropDist()) ? event.distance * 3
: event.distance) - 4.0F);
if (tEnergyDemand <= ElectricItem.manager.getCharge(stack)) {
// EMT.LOGGER.info( String.format("FD: %f DMG: %f EPD: %d HDD: %f", event.distance,
// tEnergyDemand, tUsedBoots.energyPerDamage, tUsedBoots.getMaxHealthyDropDist() ));
ElectricItem.manager
.discharge(stack, tEnergyDemand, Integer.MAX_VALUE, true, false, false);
event.setCanceled(true);
}
}
}
}
}
}
}
} }
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import gregtech.api.hazards.Hazard;
import gregtech.api.hazards.IHazardProtector;
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller { @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) { public ItemNanoBootsTraveller(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4); super(material, par3, par4);
@@ -44,11 +48,17 @@ public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_nano"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_nano");
} }
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/nanobootstravel.png"; return EMT.RESOURCE_PATH + ":textures/models/nanobootstravel.png";
}
@Override
@Optional.Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return Hazard.STANDARD_HAZARDS.contains(hazard);
} }
} }
@@ -4,12 +4,16 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import gregtech.api.hazards.Hazard;
import gregtech.api.hazards.IHazardProtector;
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller { @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller implements IHazardProtector {
public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) { public ItemQuantumBootsTraveller(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4); super(material, par3, par4);
@@ -44,11 +48,17 @@ public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/boots_quantum"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/boots_quantum");
} }
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/quantumbootstravel.png"; return EMT.RESOURCE_PATH + ":textures/models/quantumbootstravel.png";
}
@Override
@Optional.Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return true;
} }
} }
@@ -21,6 +21,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingFallEvent; import net.minecraftforge.event.entity.living.LivingFallEvent;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@@ -28,6 +29,8 @@ import emt.EMT;
import emt.client.model.ModelSpecialArmor; import emt.client.model.ModelSpecialArmor;
import emt.init.EMTItems; import emt.init.EMTItems;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import gregtech.api.hazards.Hazard;
import gregtech.api.hazards.IHazardProtector;
import ic2.api.item.ElectricItem; import ic2.api.item.ElectricItem;
import ic2.api.item.IC2Items; import ic2.api.item.IC2Items;
import ic2.core.IC2; import ic2.core.IC2;
@@ -38,7 +41,8 @@ import ic2.core.item.armor.ItemArmorElectric;
import ic2.core.util.StackUtil; import ic2.core.util.StackUtil;
import thaumcraft.api.IRunicArmor; import thaumcraft.api.IRunicArmor;
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor { @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor, IHazardProtector {
public static AudioSource audioSource; public static AudioSource audioSource;
protected static ArrayList<Integer> potionRemovalCost = new ArrayList<Integer>(); protected static ArrayList<Integer> potionRemovalCost = new ArrayList<Integer>();
@@ -56,18 +60,18 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) { public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) {
super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4); super(internalName, InternalName.quantum, armorType, 20000000D, 18000.0D, 4);
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(new EventHandler());
this.setCreativeTab(EMT.TAB); this.setCreativeTab(EMT.TAB);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
iconNONE = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest"); iconNONE = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest");
iconJETPACK = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_jetpack"); iconJETPACK = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_jetpack");
iconTHAUMIUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_t"); iconTHAUMIUM = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_t");
iconNANO = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_n"); iconNANO = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_n");
iconQUANTUM = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/armor_quantum_chest_wing_q"); iconQUANTUM = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/armor_quantum_chest_wing_q");
} }
@Override @Override
@@ -79,24 +83,6 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); return (StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
} }
@SubscribeEvent
public void onEntityLivingFallEvent(LivingFallEvent event) {
if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) {
EntityLivingBase entity = (EntityLivingBase) event.entity;
ItemStack armor = entity.getEquipmentInSlot(1);
if ((armor != null) && (armor.getItem() == this)) {
int fallDamage = Math.max((int) event.distance - 10, 0);
double energyCost = getEnergyPerDamage() * fallDamage;
if (energyCost <= ElectricItem.manager.getCharge(armor)) {
ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false);
event.setCanceled(true);
}
}
}
}
@Override @Override
public double getDamageAbsorptionRatio() { public double getDamageAbsorptionRatio() {
return 1.1D; return 1.1D;
@@ -370,15 +356,15 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
switch (wing) { switch (wing) {
case JETPACK: case JETPACK:
return EMT.TEXTURE_PATH + ":textures/models/quantum_jetpack.png"; return EMT.RESOURCE_PATH + ":textures/models/quantum_jetpack.png";
case THAUMIUM: case THAUMIUM:
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_t.png"; return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_t.png";
case NANO: case NANO:
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_n.png"; return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_n.png";
case QUANTUM: case QUANTUM:
return EMT.TEXTURE_PATH + ":textures/models/quantum_wings_q.png"; return EMT.RESOURCE_PATH + ":textures/models/quantum_wings_q.png";
default: default:
return EMT.TEXTURE_PATH + ":textures/models/quantum.png"; return EMT.RESOURCE_PATH + ":textures/models/quantum.png";
} }
} }
@@ -390,27 +376,29 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
try { if (entity instanceof EntityPlayer && stack != null && stack.stackTagCompound != null) {
if (entity instanceof EntityPlayer) { byte wing = stack.stackTagCompound.getByte("wing");
byte wing = stack.stackTagCompound.getByte("wing"); if (wing == JETPACK) {
if (wing == JETPACK) { ModelSpecialArmor.getInstance().type = 1;
ModelSpecialArmor mbm = new ModelSpecialArmor(1, 1); } else if (wing != 0) {
return mbm; ModelSpecialArmor.getInstance().type = 2;
} else if (wing != 0) { if (stack.stackTagCompound.hasKey("isJumping")) {
ModelSpecialArmor mbm = new ModelSpecialArmor(1, 2); ModelSpecialArmor.getInstance().isJumping = stack.stackTagCompound.getBoolean("isJumping");
mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping");
return mbm;
} }
} else {
ModelSpecialArmor.getInstance().type = 0;
} }
} catch (NullPointerException e) { } else {
new ModelSpecialArmor(1, 0); ModelSpecialArmor.getInstance().type = 0;
} }
return new ModelSpecialArmor(1, 0);
return ModelSpecialArmor.getInstance();
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings("rawtypes") List list,
boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
} }
@@ -532,6 +520,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
if (isJumping && !player.onGround && player.motionY < 0) { if (isJumping && !player.onGround && player.motionY < 0) {
player.motionY *= f1; player.motionY *= f1;
player.fallDistance = 0;
} }
if (player.isInWater() && !player.capabilities.isCreativeMode) { if (player.isInWater() && !player.capabilities.isCreativeMode) {
@@ -553,9 +542,6 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
if (player.isSneaking() && !player.onGround && player.motionY < 0) { if (player.isSneaking() && !player.onGround && player.motionY < 0) {
player.motionY *= 0.6; player.motionY *= 0.6;
}
if (player.fallDistance > 0.0F) {
player.fallDistance = 0; player.fallDistance = 0;
} }
} }
@@ -564,4 +550,31 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
public int getRunicCharge(ItemStack itemStack) { public int getRunicCharge(ItemStack itemStack) {
return 0; return 0;
} }
@Override
@Optional.Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return true;
}
public class EventHandler {
@SubscribeEvent
public void onEntityLivingFallEvent(LivingFallEvent event) {
if (IC2.platform.isSimulating() && (event.entity instanceof EntityLivingBase)) {
EntityLivingBase entity = (EntityLivingBase) event.entity;
ItemStack armor = entity.getEquipmentInSlot(1);
if ((armor != null) && (armor.getItem() == ItemInfusedQuantumChestplate.this)) {
int fallDamage = Math.max((int) event.distance - 10, 0);
double energyCost = getEnergyPerDamage() * fallDamage;
if (energyCost <= ElectricItem.manager.getCharge(armor)) {
ElectricItem.manager.discharge(armor, energyCost, Integer.MAX_VALUE, true, false, false);
event.setCanceled(true);
}
}
}
}
}
} }
@@ -43,22 +43,44 @@ public class ItemElectricGoggles extends ItemArmor
this.setCreativeTab(EMT.TAB); this.setCreativeTab(EMT.TAB);
} }
/**
* Allow damage to be set to avoid breaking IC2 Energy bar or other features, while preventing the item from
* breaking.
*
* @param stack the item stack
* @param damage the new damage value
*/
@Override
public void setDamage(ItemStack stack, int damage) {
int max = stack.getMaxDamage();
if (max > 0) {
if (damage >= max) {
damage = max - 1;
} else if (damage < 0) {
damage = 0;
}
}
super.setDamage(stack, damage);
}
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_electric"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_electric");
} }
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/electricgoggles.png"; return EMT.RESOURCE_PATH + ":textures/models/electricgoggles.png";
} }
@Override @Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {} public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {}
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -136,9 +158,8 @@ public class ItemElectricGoggles extends ItemArmor
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%"); list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
} }
@@ -6,12 +6,16 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import gregtech.api.hazards.Hazard;
import gregtech.api.hazards.IHazardProtector;
import ic2.api.item.IC2Items; import ic2.api.item.IC2Items;
public class ItemNanoGoggles extends ItemElectricGoggles { @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
public class ItemNanoGoggles extends ItemElectricGoggles implements IHazardProtector {
public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) { public ItemNanoGoggles(ArmorMaterial material, int renderIndex, int armorType) {
super(material, renderIndex, armorType); super(material, renderIndex, armorType);
@@ -28,12 +32,12 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_nano"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_nano");
} }
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/thaumicnanohelmet.png"; return EMT.RESOURCE_PATH + ":textures/models/thaumicnanohelmet.png";
} }
@Override @Override
@@ -50,4 +54,10 @@ public class ItemNanoGoggles extends ItemElectricGoggles {
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack); IC2Items.getItem("nightvisionGoggles").getItem().onArmorTick(world, player, itemStack);
} }
@Override
@Optional.Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return Hazard.STANDARD_HAZARDS.contains(hazard);
}
} }
@@ -21,7 +21,7 @@ import ic2.core.util.Keyboard;
public class ItemQuantumGoggles extends ItemNanoGoggles { public class ItemQuantumGoggles extends ItemNanoGoggles {
private static final Map<Integer, Integer> potionCost = new HashMap(); private static final Map<Integer, Integer> potionCost = new HashMap<>();
public ItemQuantumGoggles(ArmorMaterial material, int renderIndex, int armorType) { public ItemQuantumGoggles(ArmorMaterial material, int renderIndex, int armorType) {
super(material, renderIndex, armorType); super(material, renderIndex, armorType);
@@ -42,12 +42,12 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_quantum"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_quantum");
} }
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/thaumicquantumhelmet.png"; return EMT.RESOURCE_PATH + ":textures/models/thaumicquantumhelmet.png";
} }
@Override @Override
@@ -67,13 +67,14 @@ public class ItemQuantumGoggles extends ItemNanoGoggles {
Field f; Field f;
f = Keyboard.class.getDeclaredField("playerKeys"); f = Keyboard.class.getDeclaredField("playerKeys");
f.setAccessible(true); f.setAccessible(true);
Map<EntityPlayer, Set<Enum>> playerKeys = (Map<EntityPlayer, Set<Enum>>) f.get(IC2.keyboard); @SuppressWarnings("unchecked")
Map<EntityPlayer, Set<Enum<?>>> playerKeys = (Map<EntityPlayer, Set<Enum<?>>>) f.get(IC2.keyboard);
Enum hub = null; Enum<?> hub = null;
Set<Enum> set = playerKeys.get(player); Set<Enum<?>> set = playerKeys.get(player);
if (set != null) { if (set != null) {
for (Enum e : set) { for (Enum<?> e : set) {
if (e.ordinal() == 6) { if (e.ordinal() == 6) {
hub = e; hub = e;
} }
@@ -18,7 +18,7 @@ import ic2.api.item.IElectricItem;
public class ItemSolarHelmetRevealing extends ItemQuantumGoggles { public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
private static final Map potionCost = new HashMap(); private static final Map<Integer, Integer> potionCost = new HashMap<>();
/* /*
* private int ticker; private int generating; private boolean sunIsUp; private boolean skyIsVisible; private * private int ticker; private int generating; private boolean sunIsUp; private boolean skyIsVisible; private
* boolean noSunWorld; private boolean dampPlace; * boolean noSunWorld; private boolean dampPlace;
@@ -26,7 +26,6 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
private int genDay; private int genDay;
private int genNight; private int genNight;
@SuppressWarnings("unchecked")
public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) { public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) {
super(material, par3, par4); super(material, par3, par4);
this.setMaxDamage(27); this.setMaxDamage(27);
@@ -49,12 +48,12 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/goggles_solar"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/goggles_solar");
} }
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) {
return EMT.TEXTURE_PATH + ":textures/models/solarrevealinghelmet.png"; return EMT.RESOURCE_PATH + ":textures/models/solarrevealinghelmet.png";
} }
@Override @Override
@@ -39,28 +39,25 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_feather"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_feather");
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/featherwing.png"; return EMT.RESOURCE_PATH + ":textures/models/featherwing.png";
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
try { if (entity instanceof EntityPlayer && stack != null
if (entity instanceof EntityPlayer) { && stack.stackTagCompound != null
ModelWings mw = new ModelWings(); && stack.stackTagCompound.hasKey("isJumping")) {
mw.isJumping = stack.stackTagCompound.getBoolean("isJumping"); ModelWings.getInstance().isJumping = stack.stackTagCompound.getBoolean("isJumping");
return mw;
}
} catch (NullPointerException e) {
return new ModelWings();
} }
return new ModelWings();
return ModelWings.getInstance();
} }
@Override @Override
@@ -72,12 +69,12 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
int amount) { int amount) {
NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
boolean isJmuping = nbtData.getBoolean("isJumping"); boolean isJumping = nbtData.getBoolean("isJumping");
boolean isHolding = nbtData.getBoolean("isHolding"); boolean isHolding = nbtData.getBoolean("isHolding");
nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player)); nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player));
if (isJmuping) { if (isJumping) {
byte f = nbtData.getByte("f"); byte f = nbtData.getByte("f");
nbtData.setBoolean("isHolding", true); nbtData.setBoolean("isHolding", true);
if (IC2.keyboard.isSneakKeyDown(player)) nbtData.setByte("f", (byte) (0)); if (IC2.keyboard.isSneakKeyDown(player)) nbtData.setByte("f", (byte) (0));
@@ -108,8 +105,9 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
nbtData.setByte("f", (byte) 0); nbtData.setByte("f", (byte) 0);
} }
if (isJmuping && !player.onGround && player.motionY < 0) { if (isJumping && !player.onGround && player.motionY < 0) {
player.motionY *= f1; player.motionY *= f1;
player.fallDistance = 0;
} }
if (player.isInWater() && !player.capabilities.isCreativeMode) { if (player.isInWater() && !player.capabilities.isCreativeMode) {
@@ -127,6 +125,7 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
if (player.isSneaking() && !player.onGround && player.motionY < 0) { if (player.isSneaking() && !player.onGround && player.motionY < 0) {
player.motionY *= 0.6; player.motionY *= 0.6;
player.fallDistance = 0;
} }
} }
@@ -14,15 +14,21 @@ import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.ISpecialArmor;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper;
import gregtech.api.hazards.Hazard;
import gregtech.api.hazards.IHazardProtector;
import ic2.api.item.ElectricItem; import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem; import ic2.api.item.IElectricItem;
import ic2.api.item.IMetalArmor; import ic2.api.item.IMetalArmor;
public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor { @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh")
public class ItemNanoWing extends ItemThaumiumReinforcedWing
implements IElectricItem, ISpecialArmor, IMetalArmor, IHazardProtector {
public static int maxCharge = 1000000; public static int maxCharge = 1000000;
public int tier = 3; public int tier = 3;
@@ -45,11 +51,11 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_nano"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_nano");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -64,7 +70,7 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/nanowing.png"; return EMT.RESOURCE_PATH + ":textures/models/nanowing.png";
} }
@Override @Override
@@ -132,10 +138,10 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false);
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
} }
public double getDamageAbsorptionRatio() { public double getDamageAbsorptionRatio() {
@@ -177,4 +183,10 @@ public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectri
public Item getEmptyItem(ItemStack itemStack) { public Item getEmptyItem(ItemStack itemStack) {
return this; return this;
} }
@Override
@Optional.Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return Hazard.STANDARD_HAZARDS.contains(hazard);
}
} }
@@ -33,13 +33,13 @@ public class ItemQuantumWing extends ItemNanoWing {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_quantum"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_quantum");
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/quantumwing.png"; return EMT.RESOURCE_PATH + ":textures/models/quantumwing.png";
} }
@Override @Override
@@ -40,18 +40,17 @@ public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisD
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":armor/wing_thaumium"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":armor/wing_thaumium");
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return EMT.TEXTURE_PATH + ":textures/models/thaumiumwing.png"; return EMT.RESOURCE_PATH + ":textures/models/thaumiumwing.png";
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%"); list.add(EMTTextHelper.PURPLE + EMTTextHelper.localize("tooltip.EMT.visDiscount") + ": " + visDiscount + "%");
} }
@@ -25,7 +25,7 @@ public class ItemBlockElectricCloud extends ItemBlock {
@Override @Override
public void registerIcons(IIconRegister ir) { public void registerIcons(IIconRegister ir) {
icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "electric_cloud"); icon = ir.registerIcon(EMT.RESOURCE_PATH + ":" + "electric_cloud");
} }
@Override @Override
@@ -13,7 +13,6 @@ import org.lwjgl.input.Keyboard;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs; import emt.util.EMTEssentiasOutputs;
import emt.util.EMTTextHelper; import emt.util.EMTTextHelper;
import gregtech.api.enums.GT_Values;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
public class ItemBlockEssentiaGenerators extends ItemBlock { public class ItemBlockEssentiaGenerators extends ItemBlock {
@@ -57,11 +56,11 @@ public class ItemBlockEssentiaGenerators extends ItemBlock {
} }
private long getOutputAmperage(double EU) { private long getOutputAmperage(double EU) {
return (long) (1L + (EU / 20.0D / 20.0D / GT_Values.V[2])); return 1L + (long) (EU * 1.953125e-5); // EU/(20 * 20 * 128)
} }
@Override @Override
public void addInformation(ItemStack is, EntityPlayer player, List list, boolean flag) { public void addInformation(ItemStack is, EntityPlayer player, List<String> list, boolean flag) {
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
switch (is.getItemDamage()) { switch (is.getItemDamage()) {
case 0: case 0:
@@ -46,7 +46,8 @@ public class ItemBlockMachines extends ItemBlock {
} }
@Override @Override
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List<String> p_77624_3_,
boolean p_77624_4_) {
switch (p_77624_1_.getItemDamage()) { switch (p_77624_1_.getItemDamage()) {
case 2: { case 2: {
p_77624_3_.add("Connects between Essentia Hatches and the Pipe Network"); p_77624_3_.add("Connects between Essentia Hatches and the Pipe Network");
@@ -1,7 +1,7 @@
package emt.item.block; package emt.item.block;
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
import static emt.util.EMTTextHelper.localize; import static emt.util.EMTTextHelper.localize;
import static gregtech.api.util.GT_Utility.formatNumbers;
import java.io.StringReader; import java.io.StringReader;
import java.util.List; import java.util.List;
@@ -51,26 +51,27 @@ public class ItemBlockSolars extends ItemBlock {
} }
@Override @Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean advancedItemTooltips) { public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list,
boolean advancedItemTooltips) {
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
TileEntitySolarBase te = Solars.getTileEntitySolarBase(instance, itemstack.getItemDamage()); TileEntitySolarBase te = Solars.getTileEntitySolarBase(instance, itemstack.getItemDamage());
if (instance == 0) { if (instance == 0) {
switch (itemstack.getItemDamage()) { switch (itemstack.getItemDamage()) {
case 0: { case 0: {
list.add( list.add(
formatNumbers(EMTConfigHandler.compressedSolarOutput) formatNumber(EMTConfigHandler.compressedSolarOutput)
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
break; break;
} }
case 1: { case 1: {
list.add( list.add(
formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput) formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
break; break;
} }
case 2: { case 2: {
list.add( list.add(
formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput) formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
break; break;
} }
@@ -79,14 +80,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput) + formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.compressedSolarOutput) + formatNumber(2F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -95,7 +96,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * EMTConfigHandler.compressedSolarOutput) + formatNumber(3F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -104,7 +105,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * EMTConfigHandler.compressedSolarOutput) + formatNumber(6F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -116,14 +117,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -132,7 +133,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(3F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -141,7 +142,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(6F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -153,14 +154,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -169,7 +170,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(3F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -178,7 +179,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(6F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -191,7 +192,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.compressedSolarOutput) + formatNumber(0.75F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -200,7 +201,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.compressedSolarOutput) + formatNumber(2F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -212,7 +213,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -221,7 +222,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -233,7 +234,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -242,7 +243,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -254,7 +255,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.compressedSolarOutput) + formatNumber(2F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -263,7 +264,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.compressedSolarOutput) + formatNumber(0.75F * EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -275,7 +276,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(2F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -284,7 +285,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -297,7 +298,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(2F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -306,7 +307,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -318,7 +319,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput) + formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -342,7 +343,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -366,7 +367,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -390,7 +391,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput) + formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -412,7 +413,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -427,7 +428,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -442,7 +443,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.compressedSolarOutput) + formatNumber(EMTConfigHandler.compressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -457,7 +458,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput) + formatNumber(EMTConfigHandler.doubleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -472,7 +473,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput) + formatNumber(EMTConfigHandler.tripleCompressedSolarOutput)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -494,7 +495,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * te.output) + formatNumber(2F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -503,7 +504,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * te.output) + formatNumber(0.75F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -514,7 +515,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(0.75F * te.output) + formatNumber(0.75F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -523,7 +524,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * te.output) + formatNumber(2F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -534,7 +535,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output) + formatNumber(te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -548,7 +549,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output) + formatNumber(te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -562,14 +563,14 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output) + formatNumber(te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(2F * te.output) + formatNumber(2F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -578,7 +579,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(3F * te.output) + formatNumber(3F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -587,7 +588,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(6F * te.output) + formatNumber(6F * te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick") + localize("tooltip.EMT.euPerTick")
+ " " + " "
@@ -598,7 +599,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output) + formatNumber(te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
list.add( list.add(
@@ -621,7 +622,7 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions")
+ ": " + ": "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.output) + formatNumber(te.output)
+ " " + " "
+ localize("tooltip.EMT.euPerTick")); + localize("tooltip.EMT.euPerTick"));
break; break;
@@ -631,9 +632,9 @@ public class ItemBlockSolars extends ItemBlock {
EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax") EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax")
+ " " + " "
+ EMTTextHelper.LIGHT_GRAY + EMTTextHelper.LIGHT_GRAY
+ formatNumbers(te.calculateMaxVoltAmp()[0]) + formatNumber(te.calculateMaxVoltAmp()[0])
+ "EU/t @ " + "EU/t @ "
+ formatNumbers(te.calculateMaxVoltAmp()[1]) + formatNumber(te.calculateMaxVoltAmp()[1])
+ "A"); + "A");
} else list.add(StatCollector.translateToLocal("emt.PressShift")); } else list.add(StatCollector.translateToLocal("emt.PressShift"));
} }
@@ -1,20 +1,16 @@
package emt.item.focus; package emt.item.focus;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT; import emt.EMT;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.ItemFocusBasic; import thaumcraft.api.wands.ItemFocusBasic;
@@ -35,21 +31,7 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ir) { public void registerIcons(IIconRegister ir) {
this.icon = ir.registerIcon(EMT.TEXTURE_PATH + ":" + "focus_" + textureName); this.icon = ir.registerIcon(EMT.RESOURCE_PATH + ":" + "focus_" + textureName);
}
boolean hasDepth() {
return false;
}
@Override
public int getFocusColor(ItemStack stack) {
return 0;
}
@Override
public boolean isItemTool(ItemStack par1ItemStack) {
return true;
} }
@Override @Override
@@ -67,18 +49,10 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
return new AspectList(); return new AspectList();
} }
public boolean isUseItem(ItemStack stack) {
return isVisCostPerTick(stack);
}
public boolean isVisCostPerTick() {
return false;
}
@Override @Override
public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer,
MovingObjectPosition paramMovingObjectPosition) { MovingObjectPosition paramMovingObjectPosition) {
if (isUseItem(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE); if (isVisCostPerTick(paramItemStack)) paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE);
return paramItemStack; return paramItemStack;
} }
@@ -88,30 +62,9 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
@Override @Override
public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {} public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) {}
@Override
public String getSortingHelper(ItemStack itemstack) {
return "00";
}
@Override @Override
public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
return false; return false;
} }
@Override
public int getItemEnchantability() {
return 5;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
AspectList cost = getVisCost(stack);
if (cost != null && cost.size() > 0) {
list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
for (Aspect aspect : cost.getAspectsSorted()) {
float amount = cost.getAmount(aspect) / 100.0F;
list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
}
}
}
} }
@@ -1,10 +1,12 @@
package emt.item.focus; package emt.item.focus;
import java.util.List;
import java.util.Map.Entry; import java.util.Map.Entry;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
@@ -35,32 +37,27 @@ public class ItemChargeFocus extends ItemBaseFocus {
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add( for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
e.getKey(), e.getKey(),
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency)))); (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
return visCost; return actualCost;
} }
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "WANDCHARGING"; return "WANDCHARGING" + super.getSortingHelper(itemstack);
} }
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal }; return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
} }
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
return true;
}
@Override @Override
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player,
MovingObjectPosition movingobjectposition) { MovingObjectPosition movingobjectposition) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (player.capabilities.isCreativeMode if (player.capabilities.isCreativeMode
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
if (!world.isRemote) { if (!world.isRemote) {
int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction int energyLeft = getChargeRate(itemstack);
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
for (int i = 0; i < player.inventory.armorInventory.length; i++) { for (int i = 0; i < player.inventory.armorInventory.length; i++) {
if (energyLeft > 0) { if (energyLeft > 0) {
if ((player.inventory.armorInventory[i] != null) if ((player.inventory.armorInventory[i] != null)
@@ -89,4 +86,16 @@ public class ItemChargeFocus extends ItemBaseFocus {
} }
return itemstack; return itemstack;
} }
private int getChargeRate(ItemStack itemstack) {
return (int) (EMTConfigHandler.chargeFocusProduction
* Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.once", getChargeRate(stack)));
super.addInformation(stack, player, list, par4);
}
} }
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.FocusUpgradeType;
import thaumcraft.common.items.wands.ItemWandCasting; import thaumcraft.common.items.wands.ItemWandCasting;
public class ItemChristmasFocus extends ItemBaseFocus { public class ItemChristmasFocus extends ItemBaseFocus {
@@ -30,7 +31,12 @@ public class ItemChristmasFocus extends ItemBaseFocus {
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "CHRISTMAS"; return "CHRISTMAS" + super.getSortingHelper(itemstack);
}
@Override
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
} }
@Override @Override
@@ -42,7 +48,7 @@ public class ItemChristmasFocus extends ItemBaseFocus {
int y = mop.blockY + 1; int y = mop.blockY + 1;
int z = mop.blockZ; int z = mop.blockZ;
if (player.capabilities.isCreativeMode if (player.capabilities.isCreativeMode
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
if (!world.isRemote) { if (!world.isRemote) {
EntitySnowman snowman; EntitySnowman snowman;
snowman = new EntitySnowman(world); snowman = new EntitySnowman(world);
@@ -1,13 +1,17 @@
package emt.item.focus; package emt.item.focus;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import emt.entity.EntityEnergyBall; import emt.entity.EntityEnergyBall;
import ic2.api.item.ElectricItem; import ic2.api.item.ElectricItem;
import thaumcraft.api.wands.FocusUpgradeType;
public class ItemEnergyBallFocus extends ItemBaseFocus { public class ItemEnergyBallFocus extends ItemBaseFocus {
@@ -22,7 +26,12 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "ENERGYBALL"; return "ENERGYBALL" + super.getSortingHelper(itemstack);
}
@Override
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
} }
@Override @Override
@@ -36,9 +45,10 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
return stack; return stack;
} }
double val = ElectricItem.manager.discharge(armor, 5120, 4, true, false, false); int cost = getCost(stack);
double val = ElectricItem.manager.discharge(armor, cost, 4, true, false, false);
if (val < 5120) { if (val < cost) {
return stack; return stack;
} }
@@ -51,4 +61,18 @@ public class ItemEnergyBallFocus extends ItemBaseFocus {
return stack; return stack;
} }
/**
* Base cost of 5120 with a 10% discount per level of frugal.
*/
private int getCost(ItemStack stack) {
return (int) (5120 * (1.0 - (0.1 * getUpgradeLevel(stack, FocusUpgradeType.frugal))));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.once", getCost(stack)));
this.addFocusInformation(stack, player, list, par4);
}
} }
@@ -31,7 +31,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "EXPLOSION"; return "EXPLOSION" + super.getSortingHelper(itemstack);
} }
@Override @Override
@@ -39,7 +39,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
MovingObjectPosition movingobjectposition) { MovingObjectPosition movingobjectposition) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
if (player.capabilities.isCreativeMode if (player.capabilities.isCreativeMode
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
if (!world.isRemote) { if (!world.isRemote) {
EntityLaser laser; EntityLaser laser;
laser = new EntityLaser(world, player, 1); laser = new EntityLaser(world, player, 1);
@@ -54,12 +54,4 @@ public class ItemExplosionFocus extends ItemBaseFocus {
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal }; return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
} }
/**
* Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade
* "trees" that make certain upgrades available only when others are unlocked first, when certain research is
* completed, or similar logic.
*/
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
return true;
}
} }
@@ -1,14 +1,17 @@
package emt.item.focus; package emt.item.focus;
import static emt.EMT.RESOURCE_PATH;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World; import net.minecraft.world.World;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; import gregtech.api.metatileentity.implementations.MTEHatchMaintenance;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.FocusUpgradeType; import thaumcraft.api.wands.FocusUpgradeType;
@@ -19,6 +22,10 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 2500).add(Aspect.EARTH, 2500) private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 2500).add(Aspect.EARTH, 2500)
.add(Aspect.ORDER, 2500); .add(Aspect.ORDER, 2500);
private static final ResourceLocation focusMaintenanceSound = new ResourceLocation(
RESOURCE_PATH,
"maintenance.MaintenanceWandFocus");
public ItemMaintenanceFocus() { public ItemMaintenanceFocus() {
super("maintenance"); super("maintenance");
} }
@@ -35,7 +42,7 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "MAINTENANCE"; return "MAINTENANCE" + super.getSortingHelper(itemstack);
} }
@Override @Override
@@ -57,16 +64,17 @@ public class ItemMaintenanceFocus extends ItemBaseFocus {
TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ); TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
if (hatchCandidateTile instanceof BaseMetaTileEntity) { if (hatchCandidateTile instanceof BaseMetaTileEntity) {
IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity(); IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity();
if (hatchCandidateMetaTile instanceof GT_MetaTileEntity_Hatch_Maintenance) { if (hatchCandidateMetaTile instanceof MTEHatchMaintenance) {
GT_MetaTileEntity_Hatch_Maintenance hatch = (GT_MetaTileEntity_Hatch_Maintenance) hatchCandidateMetaTile; MTEHatchMaintenance hatch = (MTEHatchMaintenance) hatchCandidateMetaTile;
if (player.capabilities.isCreativeMode if (player.capabilities.isCreativeMode
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, true)) { || wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, false)) {
hatch.mCrowbar = true; hatch.mCrowbar = true;
hatch.mScrewdriver = true; hatch.mScrewdriver = true;
hatch.mHardHammer = true; hatch.mHardHammer = true;
hatch.mSolderingTool = true; hatch.mSolderingTool = true;
hatch.mWrench = true; hatch.mWrench = true;
hatch.mSoftHammer = true; hatch.mSoftMallet = true;
hatch.setMaintenanceSound(focusMaintenanceSound, 1.0F, 1.0F);
} }
} }
} }
@@ -1,6 +1,7 @@
package emt.item.focus; package emt.item.focus;
import java.util.LinkedList; import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -12,6 +13,7 @@ import emt.entity.EntityShield;
import ic2.core.IC2; import ic2.core.IC2;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.FocusUpgradeType;
import thaumcraft.common.items.wands.ItemWandCasting; import thaumcraft.common.items.wands.ItemWandCasting;
public class ItemShieldFocus extends ItemBaseFocus { public class ItemShieldFocus extends ItemBaseFocus {
@@ -35,22 +37,28 @@ public class ItemShieldFocus extends ItemBaseFocus {
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "SHIELD"; return "SHIELD" + super.getSortingHelper(itemstack);
} }
@Override @Override
public boolean isUseItem(ItemStack stack) { public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
}
@Override
public boolean isVisCostPerTick(ItemStack stack) {
return true; return true;
} }
@Override @Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
for (PotionEffect effect : new LinkedList<PotionEffect>(player.getActivePotionEffects())) { List<PotionEffect> potionEffects = new ArrayList<>(player.getActivePotionEffects());
for (PotionEffect effect : potionEffects) {
IC2.platform.removePotion(player, effect.getPotionID()); IC2.platform.removePotion(player, effect.getPotionID());
} }
if (!player.capabilities.isCreativeMode if (!player.capabilities.isCreativeMode
&& !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { && !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false)) {
player.stopUsingItem(); player.stopUsingItem();
} }
} }
@@ -61,7 +69,7 @@ public class ItemShieldFocus extends ItemBaseFocus {
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
player.setItemInUse(itemstack, Integer.MAX_VALUE); player.setItemInUse(itemstack, Integer.MAX_VALUE);
if (!world.isRemote && (player.capabilities.isCreativeMode if (!world.isRemote && (player.capabilities.isCreativeMode
|| wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) { || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false))) {
EntityShield shield = new EntityShield(world, player); EntityShield shield = new EntityShield(world, player);
world.spawnEntityInWorld(shield); world.spawnEntityInWorld(shield);
} }
@@ -1,9 +1,11 @@
package emt.item.focus; package emt.item.focus;
import java.util.List;
import java.util.Map.Entry; import java.util.Map.Entry;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import ic2.api.item.ElectricItem; import ic2.api.item.ElectricItem;
@@ -28,7 +30,7 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
@Override @Override
public String getSortingHelper(ItemStack itemstack) { public String getSortingHelper(ItemStack itemstack) {
return "ELECTRICCHARGING"; return "ELECTRICCHARGING" + super.getSortingHelper(itemstack);
} }
@Override @Override
@@ -42,38 +44,63 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add( for (Entry<Aspect, Integer> e : visCost.aspects.entrySet()) actualCost.add(
e.getKey(), e.getKey(),
(int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency)))); (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
return visCost; return actualCost;
} }
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal }; return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
} }
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
return true;
}
@Override @Override
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) { public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) {
if (!player.worldObj.isRemote) { if (!player.worldObj.isRemote) {
ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem(); ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem();
if (wandIsFull(itemstack, wandItem)) {
return;
}
ItemStack armor = player.inventory.armorInventory[1]; int cost = getCost(itemstack) / 4;
if (armor != null) { for (ItemStack stack : player.inventory.armorInventory) {
if ((ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player) if (stack == null || ElectricItem.manager.getCharge(stack) < cost) {
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) return;
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player))
&& (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)))) {
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
wandItem.addRealVis(itemstack, Aspect.WATER, amount, true);
wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true);
wandItem.addRealVis(itemstack, Aspect.AIR, amount, true);
} }
} }
for (ItemStack stack : player.inventory.armorInventory) {
ElectricItem.manager.use(stack, cost, player);
}
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
wandItem.addRealVis(itemstack, Aspect.WATER, amount, true);
wandItem.addRealVis(itemstack, Aspect.EARTH, amount, true);
wandItem.addRealVis(itemstack, Aspect.AIR, amount, true);
} }
} }
private boolean wandIsFull(ItemStack itemstack, ItemWandCasting wandItem) {
int size = wandItem.getMaxVis(itemstack);
for (Aspect a : Aspect.getPrimalAspects()) {
if (wandItem.getVis(itemstack, a) < size) {
return false;
}
}
return true;
}
/**
* Base cost from config with a 10% discount per level of frugal.
*/
private int getCost(ItemStack stack) {
return (int) (EMTConfigHandler.wandChargeFocusCost
* (1.0 - (0.1 * getUpgradeLevel(stack, FocusUpgradeType.frugal))));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
list.add(StatCollector.translateToLocal("item.EMT.focus.EU.cost.info"));
list.add(StatCollector.translateToLocalFormatted("item.EMT.focus.EU.cost.tick", getCost(stack)));
super.addInformation(stack, player, list, par4);
}
} }
@@ -39,11 +39,11 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.icon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/hoe_growth"); this.icon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/hoe_growth");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -118,9 +118,8 @@ public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
return did; return did;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
} }
@@ -41,12 +41,11 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/electricthorhammer"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/electricthorhammer");
} }
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -66,9 +65,8 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem {
return false; return false;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
list.add( list.add(
EMTTextHelper.localize("tooltip.EMT.hammer.electric") EMTTextHelper.localize("tooltip.EMT.hammer.electric")
@@ -33,7 +33,7 @@ public class ItemThorHammer extends ItemSword implements IRepairable {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/thorhammer"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/thorhammer");
} }
@Override @Override
@@ -46,8 +46,8 @@ public class ItemThorHammer extends ItemSword implements IRepairable {
double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset;
double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f);
Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2); Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2);
float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); float f3 = MathHelper.cos((-f2 * 0.01745329F) - (float) Math.PI);
float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); float f4 = MathHelper.sin((-f2 * 0.01745329F) - (float) Math.PI);
float f5 = -MathHelper.cos(-f1 * 0.01745329F); float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F); float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5; float f7 = f4 * f5;
@@ -87,7 +87,7 @@ public class ItemThorHammer extends ItemSword implements IRepairable {
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.The Hammer of Thor")); list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.The Hammer of Thor"));
} }
} }
@@ -30,7 +30,7 @@ public class ItemThorHammerBroken extends ItemSword implements IRepairable {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":hammer/taintedthorhammer"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":hammer/taintedthorhammer");
} }
@Override @Override
@@ -57,7 +57,7 @@ public class ItemThorHammerBroken extends ItemSword implements IRepairable {
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List<String> list, boolean par4) {
list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.thor")); list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.thor"));
list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.danger")); list.add(EMTTextHelper.localize("tooltip.EMT.hammer.broken.danger"));
if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
@@ -54,7 +54,7 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_diamond"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_diamond");
} }
@Override @Override
@@ -93,7 +93,7 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -270,9 +270,8 @@ public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem {
return EMTConfigHandler.enchanting; return EMTConfigHandler.enchanting;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
} }
@@ -22,7 +22,7 @@ import thaumcraft.common.lib.utils.Utils;
public class ItemStreamChainsaw extends ItemThaumiumChainsaw { public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
public static ArrayList oreDictLogs = new ArrayList(); public static ArrayList<?> oreDictLogs = new ArrayList<>();
boolean alternateServer; boolean alternateServer;
boolean alternateClient; boolean alternateClient;
@@ -42,7 +42,7 @@ public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_stream"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_stream");
} }
@Override @Override
@@ -28,7 +28,7 @@ public class ItemThaumiumChainsaw extends ItemDiamondChainsaw {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/chainsaw_thaumium"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/chainsaw_thaumium");
} }
@Override @Override
@@ -5,7 +5,6 @@ import java.util.Iterator;
import java.util.Locale; import java.util.Locale;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@@ -63,7 +62,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_rockbreaker"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/drill_rockbreaker");
} }
private boolean isEffectiveAgainst(Block block) { private boolean isEffectiveAgainst(Block block) {
@@ -126,7 +125,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
} }
int fortune = EnchantmentHelper.getFortuneModifier(entityLiving); int fortune = EnchantmentHelper.getFortuneModifier(entityLiving);
world.setBlockToAir(x + xx, y + yy, z + zz); world.setBlockToAir(x + xx, y + yy, z + zz);
ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune); ArrayList<ItemStack> ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune);
boolean creative = false; boolean creative = false;
if ((entityLiving instanceof EntityPlayer) if ((entityLiving instanceof EntityPlayer)
&& ((EntityPlayer) entityLiving).capabilities.isCreativeMode) { && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) {
@@ -136,7 +135,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
continue; continue;
} }
ItemStack is; ItemStack is;
for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld( for (Iterator<ItemStack> i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(
new EntityFollowingItem( new EntityFollowingItem(
world, world,
(double) x + (double) xx + 0.5D, (double) x + (double) xx + 0.5D,
@@ -145,7 +144,7 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
is, is,
entityLiving, entityLiving,
3))) { 3))) {
is = (ItemStack) i$.next(); is = i$.next();
} }
} }
} }
@@ -193,7 +192,6 @@ public class ItemRockbreakerDrill extends ItemThaumiumDrill {
0.2F + world.rand.nextFloat() * 0.2F); 0.2F + world.rand.nextFloat() * 0.2F);
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset); return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset);
} }
Minecraft mc = Minecraft.getMinecraft();
Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L, 1); Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L, 1);
player.swingItem(); player.swingItem();
return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset);
@@ -43,11 +43,11 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/drill_thaumium"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/drill_thaumium");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -115,9 +115,8 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem {
return EMTConfigHandler.enchanting; return EMTConfigHandler.enchanting;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
} }
@@ -33,7 +33,7 @@ public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_diamond");
} }
@Override @Override
@@ -46,11 +46,11 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_iron"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_iron");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
ItemStack itemStack = new ItemStack(this, 1); ItemStack itemStack = new ItemStack(this, 1);
if (getChargedItem(itemStack) == this) { if (getChargedItem(itemStack) == this) {
ItemStack charged = new ItemStack(this, 1); ItemStack charged = new ItemStack(this, 1);
@@ -156,9 +156,8 @@ public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem {
return EMTConfigHandler.enchanting; return EMTConfigHandler.enchanting;
} }
@SuppressWarnings("unchecked")
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List<String> list, boolean par4) {
list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this))); list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + getTier(new ItemStack(this)));
} }
@@ -33,7 +33,7 @@ public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_thaumium"); this.itemIcon = iconRegister.registerIcon(EMT.RESOURCE_PATH + ":tools/omnitool_thaumium");
} }
@Override @Override
@@ -1,70 +0,0 @@
package emt.network;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.tileentity.TileEntity;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import io.netty.buffer.ByteBuf;
public class PacketNodeInfo implements IMessage, IMessageHandler<PacketNodeInfo, IMessage> {
private int mBlockX, mBlockY, mBlockZ, mDim, nodeDistance, nodeColor;
public PacketNodeInfo() {}
public PacketNodeInfo(int mBlockX, int mBlockY, int mBlockZ, int mDim, int nodeDistance, int nodeColor) {
this.mBlockX = mBlockX;
this.mBlockY = mBlockY;
this.mBlockZ = mBlockZ;
this.mDim = mDim;
this.nodeDistance = nodeDistance;
this.nodeColor = nodeColor;
}
@Override
public void fromBytes(ByteBuf buf) {
mBlockX = buf.readInt();
mBlockY = buf.readInt();
mBlockZ = buf.readInt();
mDim = buf.readInt();
nodeDistance = buf.readInt();
nodeColor = buf.readInt();
}
@Override
public void toBytes(ByteBuf buf) {
buf.writeInt(mBlockX);
buf.writeInt(mBlockY);
buf.writeInt(mBlockZ);
buf.writeInt(mDim);
buf.writeInt(nodeDistance);
buf.writeInt(nodeColor);
}
@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(PacketNodeInfo message, MessageContext ctx) {
WorldClient world = Minecraft.getMinecraft().theWorld;
if (world != null) {
if (world.blockExists(message.mBlockX, message.mBlockY, message.mBlockZ)) {
TileEntity tileEntity = world.getTileEntity(message.mBlockX, message.mBlockY, message.mBlockZ);
if (tileEntity instanceof IGregTechTileEntity) {
IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity;
if (gtTile.getMetaTileEntity() instanceof GT_MetaTileEntity_ResearchCompleter) {
GT_MetaTileEntity_ResearchCompleter researchCompleter = (GT_MetaTileEntity_ResearchCompleter) gtTile
.getMetaTileEntity();
researchCompleter.setNodeValues(message.nodeDistance, message.nodeColor);
}
}
}
}
return null;
}
}
@@ -3,7 +3,6 @@ package emt.tile;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import gregtech.api.enums.GT_Values;
public class DefinitelyNotAIC2Source { public class DefinitelyNotAIC2Source {
@@ -14,7 +13,7 @@ public class DefinitelyNotAIC2Source {
protected long energyStored; protected long energyStored;
public DefinitelyNotAIC2Source(TileEntity parent1, long capacity1, int tier1) { public DefinitelyNotAIC2Source(TileEntity parent1, long capacity1, int tier1) {
long power = GT_Values.V[tier1]; long power = 8L << (2 * tier1);
this.parent = parent1; this.parent = parent1;
this.capacity = capacity1 < power ? power : capacity1; this.capacity = capacity1 < power ? power : capacity1;
this.tier = (byte) tier1; this.tier = (byte) tier1;
@@ -1,376 +0,0 @@
package emt.tile;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import java.util.ArrayList;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import cpw.mods.fml.common.network.NetworkRegistry;
import emt.EMT;
import emt.network.PacketNodeInfo;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import thaumcraft.common.lib.research.ResearchManager;
import thaumcraft.common.lib.research.ResearchNoteData;
import thaumcraft.common.tiles.TileNode;
public class GT_MetaTileEntity_ResearchCompleter
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {
private static final int CASING_INDEX = 184;
private static final int MAX_LENGTH = 13;
private static final int RECIPE_LENGTH = 1200;
private static final int RECIPE_EUT = 120;
private static final float NODE_COST_MULTIPLIER = 1.0f;
private int recipeAspectCost;
private int aspectsAbsorbed;
protected int mLength;
protected int mCasing;
protected boolean endFound;
// For displaying beam
private int lastNodeDistance;
private int lastNodeColor;
private int syncTimer;
private static final String STRUCTURE_PIECE_FIRST = "first";
private static final String STRUCTURE_PIECE_LATER = "later";
private static final String STRUCTURE_PIECE_LAST = "last";
private static final String STRUCTURE_PIECE_LATER_HINT = "laterHint";
private static final IStructureDefinition<GT_MetaTileEntity_ResearchCompleter> STRUCTURE_DEFINITION = StructureDefinition
.<GT_MetaTileEntity_ResearchCompleter>builder()
.addShape(STRUCTURE_PIECE_FIRST, transpose(new String[][] { { "ccc" }, { "g~g" }, { "ccc" }, }))
.addShape(STRUCTURE_PIECE_LATER, transpose(new String[][] { { "c c" }, { "gxg" }, { "c c" }, }))
.addShape(STRUCTURE_PIECE_LAST, transpose(new String[][] { { "c" }, { "g" }, { "c" }, }))
.addShape(STRUCTURE_PIECE_LATER_HINT, transpose(new String[][] { { "c c" }, { "g g" }, { "c c" }, }))
.addElement(
'c',
ofChain( // Magical machine casing or hatch
ofHatchAdder(
GT_MetaTileEntity_ResearchCompleter::addEnergyInputToMachineList,
CASING_INDEX,
1),
ofHatchAdder(GT_MetaTileEntity_ResearchCompleter::addInputToMachineList, CASING_INDEX, 1),
ofHatchAdder(GT_MetaTileEntity_ResearchCompleter::addOutputToMachineList, CASING_INDEX, 1),
ofHatchAdder(
GT_MetaTileEntity_ResearchCompleter::addMaintenanceToMachineList,
CASING_INDEX,
1),
onElementPass(
GT_MetaTileEntity_ResearchCompleter::onCasingFound,
ofBlock(GregTech_API.sBlockCasings8, 8))))
.addElement(
'x',
ofChain( // Check for the end but otherwise treat as a skipped spot
onElementPass(
GT_MetaTileEntity_ResearchCompleter::onEndFound,
ofBlock(ConfigBlocks.blockCosmeticOpaque, 2)),
isAir(), // Forgive me
notAir()))
.addElement('g', ofBlock(ConfigBlocks.blockCosmeticOpaque, 2)) // Warded glass
.build();
public GT_MetaTileEntity_ResearchCompleter(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
public GT_MetaTileEntity_ResearchCompleter(String aName) {
super(aName);
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
aNBT.setInteger("recipeAspectCost", recipeAspectCost);
aNBT.setInteger("aspectsAbsorbed", aspectsAbsorbed);
aNBT.setInteger("mLength", mLength);
super.saveNBTData(aNBT);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
recipeAspectCost = aNBT.getInteger("recipeAspectCost");
aspectsAbsorbed = aNBT.getInteger("aspectsAbsorbed");
mLength = aNBT.getInteger("mLength");
super.loadNBTData(aNBT);
}
// For client beam animation
public void setNodeValues(int nodeDistance, int nodeColor) {
this.lastNodeDistance = nodeDistance;
this.lastNodeColor = nodeColor;
}
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isClientSide()) {
if (aBaseMetaTileEntity.isActive()) {
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
double xCoord = aBaseMetaTileEntity.getXCoord() + 0.5;
double yCoord = aBaseMetaTileEntity.getYCoord() + 0.5;
double zCoord = aBaseMetaTileEntity.getZCoord() + 0.5;
Thaumcraft.proxy.beam(
aBaseMetaTileEntity.getWorld(),
xCoord + 0.5 * xDir,
yCoord + 0.5 * yDir,
zCoord + 0.5 * zDir,
xCoord + xDir * lastNodeDistance,
yCoord + yDir * lastNodeDistance,
zCoord + zDir * lastNodeDistance,
3,
lastNodeColor,
true,
2,
1);
} else {
lastNodeDistance = 0;
lastNodeColor = 0;
}
}
super.onPostTick(aBaseMetaTileEntity, aTick);
}
@Override
public boolean onRunningTick(ItemStack aStack) {
float progressAmount = ((float) this.mProgresstime) / this.mMaxProgresstime;
int requiredVis = (int) Math.ceil(progressAmount * recipeAspectCost - aspectsAbsorbed);
syncTimer--;
IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
int i = 1;
// Loop through node spaces and drain them from front to back
while (i < this.mLength - 1 && requiredVis > 0) {
int nodeX = aBaseMetaTileEntity.getXCoord() + xDir * i;
int nodeY = aBaseMetaTileEntity.getYCoord() + yDir * i;
int nodeZ = aBaseMetaTileEntity.getZCoord() + zDir * i;
TileEntity tileEntity = aBaseMetaTileEntity.getWorld().getTileEntity(nodeX, nodeY, nodeZ);
if (tileEntity instanceof TileNode) {
TileNode aNode = (TileNode) tileEntity;
AspectList aspectsBase = aNode.getAspectsBase();
for (Aspect aspect : aspectsBase.getAspects()) {
int aspectAmount = aspectsBase.getAmount(aspect);
int drainAmount = Math.min(requiredVis, aspectAmount);
aNode.setNodeVisBase(aspect, (short) (aspectAmount - drainAmount));
aNode.takeFromContainer(aspect, drainAmount);
requiredVis -= drainAmount;
aspectsAbsorbed += drainAmount;
if (requiredVis <= 0) {
if (i != lastNodeDistance || aspect.getColor() != lastNodeColor)
sendClientAnimationUpdate(aBaseMetaTileEntity, i, aspect.getColor());
break;
}
}
if (aspectsBase.visSize() <= 0) aBaseMetaTileEntity.getWorld().setBlockToAir(nodeX, nodeY, nodeZ);
else {
aNode.markDirty();
aBaseMetaTileEntity.getWorld().markBlockForUpdate(nodeX, nodeY, nodeZ);
}
}
i++;
}
if (syncTimer <= 0) sendClientAnimationUpdate(aBaseMetaTileEntity, lastNodeDistance, lastNodeColor);
if (requiredVis > 0) this.criticalStopMachine();
return super.onRunningTick(aStack);
}
private void sendClientAnimationUpdate(IGregTechTileEntity aBaseMetaTileEntity, int nodeDistance, int nodeColor) {
int xCoord = aBaseMetaTileEntity.getXCoord();
int yCoord = aBaseMetaTileEntity.getYCoord();
int zCoord = aBaseMetaTileEntity.getZCoord();
int dim = aBaseMetaTileEntity.getWorld().provider.dimensionId;
PacketNodeInfo packet = new PacketNodeInfo(xCoord, yCoord, zCoord, dim, nodeDistance, nodeColor);
EMT.INSTANCE.sendToAllAround(packet, new NetworkRegistry.TargetPoint(dim, xCoord, yCoord, zCoord, 128));
lastNodeDistance = nodeDistance;
lastNodeColor = nodeColor;
syncTimer = 100;
}
@Override
public boolean isCorrectMachinePart(ItemStack itemStack) {
return true;
}
@Override
public boolean checkRecipe(ItemStack itemStack) {
ArrayList<ItemStack> tInputList = this.getStoredInputs();
for (ItemStack stack : tInputList) {
if (GT_Utility.isStackValid(stack) && stack.stackSize > 0) {
if (stack.getItem() == ConfigItems.itemResearchNotes
&& !stack.stackTagCompound.getBoolean("complete")) {
ResearchNoteData noteData = ResearchManager.getData(stack);
if (noteData == null) continue;
ResearchItem researchItem = ResearchCategories.getResearch(noteData.key);
if (researchItem == null) continue;
this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
this.mEfficiencyIncrease = 10000;
this.calculateOverclockedNessMulti(RECIPE_EUT, RECIPE_LENGTH, 1, this.getMaxInputVoltage());
if (this.mMaxProgresstime == 2147483646 && this.mEUt == 2147483646) {
return false;
}
if (this.mEUt > 0) {
this.mEUt = -this.mEUt;
}
// Create a completed version of the note to output
this.mOutputItems = new ItemStack[] { GT_Utility.copyAmount(1L, stack) };
this.mOutputItems[0].stackTagCompound.setBoolean("complete", true);
this.mOutputItems[0].setItemDamage(64);
stack.stackSize -= 1;
this.aspectsAbsorbed = 0;
this.recipeAspectCost = (int) Math.ceil(researchItem.tags.visSize() * NODE_COST_MULTIPLIER);
this.lastNodeDistance = 0;
this.lastNodeColor = 0;
this.sendLoopStart((byte) 20);
this.updateSlots();
return true;
}
}
}
return false;
}
@Override
public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
mLength = 1;
mCasing = 0;
endFound = false;
// check front
if (!checkPiece(STRUCTURE_PIECE_FIRST, 1, 1, 0)) return false;
// check middle pieces
while (!endFound && mLength++ < MAX_LENGTH) {
if (!checkPiece(STRUCTURE_PIECE_LATER, 1, 1, -(mLength - 1))) return false;
}
return endFound && mLength >= 3
&& checkPiece(STRUCTURE_PIECE_LAST, 0, 1, -(mLength - 1))
&& mCasing >= mLength * 3;
}
@Override
public int getMaxEfficiency(ItemStack itemStack) {
return 10000;
}
@Override
public int getPollutionPerTick(ItemStack itemStack) {
return 0;
}
@Override
public int getDamageToComponent(ItemStack itemStack) {
return 0;
}
@Override
public boolean explodesOnComponentBreak(ItemStack itemStack) {
return false;
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
return new GT_MetaTileEntity_ResearchCompleter(this.mName);
}
protected void onCasingFound() {
mCasing++;
}
protected void onEndFound() {
endFound = true;
}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
int ColorIndex, boolean aActive, boolean aRedstone) {
if (side == facing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE).extFacing().build(),
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE_GLOW).extFacing().glow()
.build() };
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER).extFacing().build(),
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_GLOW).extFacing().glow()
.build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@Override
public IStructureDefinition<GT_MetaTileEntity_ResearchCompleter> getStructureDefinition() {
return STRUCTURE_DEFINITION;
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Research Completer").addInfo("Controller block for the Research Completer")
.addInfo("Completes Thaumcraft research notes using EU and Thaumcraft nodes")
.addInfo("Place nodes in the center row").addSeparator()
.beginVariableStructureBlock(3, 3, 3, 3, 3, MAX_LENGTH, true).addController("Front center")
.addOtherStructurePart("Magical machine casing", "Top and bottom layers outside. 3 x L minimum")
.addOtherStructurePart("Warded glass", "Middle layer outside").addEnergyHatch("Any casing")
.addMaintenanceHatch("Any casing").addInputBus("Any casing").addOutputBus("Any casing")
.toolTipFinisher("Electro-Magic Tools");
return tt;
}
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
buildPiece(STRUCTURE_PIECE_FIRST, stackSize, hintsOnly, 1, 1, 0);
int tTotalLength = Math.min(MAX_LENGTH, stackSize.stackSize + 2);
for (int i = 1; i < tTotalLength; i++) {
buildPiece(STRUCTURE_PIECE_LATER_HINT, stackSize, hintsOnly, 1, 1, -i);
}
buildPiece(STRUCTURE_PIECE_LAST, stackSize, hintsOnly, 0, 1, -(tTotalLength - 1));
}
}
@@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.drawable.UITexture;
import com.gtnewhorizons.modularui.api.forge.InvWrapper; import com.gtnewhorizons.modularui.api.forge.InvWrapper;
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -20,13 +21,13 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget;
import emt.init.EMTBlocks; import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import emt.util.EMTTextHelper; import emt.util.EMTTextHelper;
import gregtech.api.gui.modularui.GT_UITextures;
import ic2.api.tile.IWrenchable; import ic2.api.tile.IWrenchable;
import thaumcraft.common.config.ConfigItems; import thaumcraft.common.config.ConfigItems;
public class TileEntityEtherealMacerator extends TileEntityEMT public class TileEntityEtherealMacerator extends TileEntityEMT
implements ISidedInventory, IWrenchable, ITileWithModularUI { implements ISidedInventory, IWrenchable, ITileWithModularUI {
private static final UITexture PROGRESSBAR_MACERATE = UITexture.fullImage("gregtech", "gui/progressbar/macerate");
private static final int[] slots_top = new int[] { 0 }; private static final int[] slots_top = new int[] { 0 };
private static final int[] slots_bottom = new int[] { 2, 1 }; private static final int[] slots_bottom = new int[] { 2, 1 };
private static final int[] slots_sides = new int[] { 1 }; private static final int[] slots_sides = new int[] { 1 };
@@ -306,7 +307,7 @@ public class TileEntityEtherealMacerator extends TileEntityEMT
.setPos(115, 25)) .setPos(115, 25))
.widget(new SlotWidget(invWrapper, 1).setAccess(true, false).setPos(115, 52)) .widget(new SlotWidget(invWrapper, 1).setAccess(true, false).setPos(115, 52))
.widget( .widget(
new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_MACERATE, 20) new ProgressBar().setTexture(PROGRESSBAR_MACERATE, 20)
.setProgress(() -> (float) cookTime / maceratingSpeed).setPos(81, 36).setSize(20, 18)) .setProgress(() -> (float) cookTime / maceratingSpeed).setPos(81, 36).setSize(20, 18))
.widget(new TextWidget(EMTTextHelper.localize("gui.EMT.etherealMacerator.title")).setPos(6, 6)); .widget(new TextWidget(EMTTextHelper.localize("gui.EMT.etherealMacerator.title")).setPos(6, 6));
@@ -152,9 +152,9 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT
} }
@Override @Override
public void readFromNBT(NBTTagCompound p_145839_1_) { public void readFromNBT(NBTTagCompound compound) {
super.readFromNBT(p_145839_1_); super.readFromNBT(compound);
NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); NBTTagList nbttaglist = compound.getTagList("Items", 10);
this.ItemStacks = new ItemStack[this.getSizeInventory()]; this.ItemStacks = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < nbttaglist.tagCount(); ++i) { for (int i = 0; i < nbttaglist.tagCount(); ++i) {
@@ -167,13 +167,13 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT
} }
if (this.energyStored == 0) { if (this.energyStored == 0) {
this.energyStored = p_145839_1_.getDouble("Energy"); this.energyStored = compound.getDouble("Energy");
} }
} }
@Override @Override
public void writeToNBT(NBTTagCompound p_145841_1_) { public void writeToNBT(NBTTagCompound compound) {
super.writeToNBT(p_145841_1_); super.writeToNBT(compound);
NBTTagList nbttaglist = new NBTTagList(); NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < this.ItemStacks.length; ++i) { for (int i = 0; i < this.ItemStacks.length; ++i) {
@@ -185,8 +185,8 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT
} }
} }
p_145841_1_.setTag("Items", nbttaglist); compound.setTag("Items", nbttaglist);
p_145841_1_.setDouble("Energy", this.energyStored); compound.setDouble("Energy", this.energyStored);
} }
@Override @Override
@@ -14,6 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.NumberFormatMUI;
import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.drawable.Text;
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -28,13 +29,12 @@ import emt.tile.DefinitelyNotAIC2Source;
import emt.tile.TileEntityEMT; import emt.tile.TileEntityEMT;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs; import emt.util.EMTEssentiasOutputs;
import emt.util.EMTTextHelper; import gregtech.api.enums.GTValues;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer; import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IEnergyConnected;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.net.GT_Packet_Block_Event; import gregtech.common.data.GTBlockEventTracker;
import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectList;
@@ -56,14 +56,21 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
public int storage; public int storage;
public short mpshownstroage; public short mpshownstroage;
public int maxstorage; public int maxstorage;
public byte maxfuel; public byte maxfuel = 64;
public byte fuel; public byte fuel = 0;
public byte refuel; // The amount to pull from jars (through the air like the runic matrix) when empty.
public long timer = 0L; // Values above 1 do not work with essentia mirrors.
public byte refuel = 1;
// Used to make the generator sleep between failed attempts to draw essentia from nearby jars.
public int timer = 0;
// The number of ticks to wait after failing to draw essentia.
public final int refuelSleepTime = 40;
public boolean dead = true; public boolean dead = true;
public byte color; public byte color = -1;
private boolean side; private boolean side;
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
public TileEntityBaseGenerator(int aspect) { public TileEntityBaseGenerator(int aspect) {
this(); this();
switch (aspect) { switch (aspect) {
@@ -92,18 +99,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
public TileEntityBaseGenerator() { public TileEntityBaseGenerator() {
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage); this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage);
this.maxstorage = ((int) this.energySource.getCapacity()); this.maxstorage = ((int) this.energySource.getCapacity());
this.maxfuel = 64;
this.fuel = 0;
this.refuel = 1;
this.color = -1;
} }
@Override @Override
public void updateEntity() { public void updateEntity() {
this.side = !this.worldObj.isRemote; this.side = !this.worldObj.isRemote;
this.dead = false; this.dead = false;
this.timer += 1L; this.timer--;
if (this.timer <= Long.MAX_VALUE - 1) this.timer = 0L; if (this.timer <= Integer.MIN_VALUE + 1) this.timer = 0;
if (this.fuel + this.refuel > this.maxfuel) {
this.timer = refuelSleepTime;
}
storeFuel(); storeFuel();
fillfrompipe(); fillfrompipe();
createEnergy(); createEnergy();
@@ -111,64 +117,61 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
} }
public void storeFuel() { public void storeFuel() {
if (!side) return; if (this.timer > 0 || !side) {
return;
if (this.fuel < this.maxfuel) { }
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) { boolean stored = false;
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) { for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) { for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
TileEntity tile = this.worldObj.getTileEntity(x, y, z); for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
if (tile instanceof IAspectSource) { TileEntity tile = this.worldObj.getTileEntity(x, y, z);
IAspectSource as = (IAspectSource) tile; if (tile instanceof IAspectSource as && as.takeFromContainer(this.aspect, this.refuel)) {
if ((as.doesContainerContainAmount(this.aspect, this.refuel)) PacketHandler.INSTANCE.sendToAllAround(
&& (as.takeFromContainer(this.aspect, this.refuel))) { new PacketFXEssentiaSource(
PacketHandler.INSTANCE.sendToAllAround( this.xCoord,
new PacketFXEssentiaSource( this.yCoord,
this.xCoord, this.zCoord,
this.yCoord, (byte) (this.xCoord - x),
this.zCoord, (byte) (this.yCoord - y),
(byte) (this.xCoord - x), (byte) (this.zCoord - z),
(byte) (this.yCoord - y), this.aspect.getColor()),
(byte) (this.zCoord - z), new NetworkRegistry.TargetPoint(
this.aspect.getColor()), getWorldObj().provider.dimensionId,
new NetworkRegistry.TargetPoint( this.xCoord,
getWorldObj().provider.dimensionId, this.yCoord,
this.xCoord, this.zCoord,
this.yCoord, 32.0D));
this.zCoord, addToContainer(this.aspect, this.refuel);
32.0D)); if (this.fuel + this.refuel > this.maxfuel) {
addToContainer(this.aspect, this.refuel); return;
}
} }
stored = true;
} }
} }
} }
} }
if (!stored) {
this.timer = refuelSleepTime;
}
} }
public void fillfrompipe() { public void fillfrompipe() {
if (!side) return; if (this.fuel >= this.maxfuel || !side) return;
if (this.fuel == this.maxfuel) return; for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
TileEntity pipeTE = ThaumcraftApiHelper
TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length]; .getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, direction);
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { if (pipeTE != null) {
te[i] = ThaumcraftApiHelper.getConnectableTile( IEssentiaTransport pipe = (IEssentiaTransport) pipeTE;
this.worldObj, if (!pipe.canOutputTo(direction)) {
this.xCoord, continue;
this.yCoord,
this.zCoord,
ForgeDirection.VALID_DIRECTIONS[i]);
if (te[i] != null) {
IEssentiaTransport pipe = (IEssentiaTransport) te[i];
if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) {
return;
} }
if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]) != null) if ((pipe.getEssentiaType(direction) != null) && (pipe.getEssentiaType(direction).equals(this.aspect))
&& (pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]).equals(this.aspect)) && (pipe.getSuctionAmount(direction) < getSuctionAmount(direction))) {
&& (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]) addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, direction));
< getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) { if (this.fuel >= this.maxfuel) {
addToContainer(this.aspect, pipe.takeEssentia(this.aspect, 1, ForgeDirection.VALID_DIRECTIONS[i])); return;
}
} }
} }
} }
@@ -237,17 +240,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
} }
@Override @Override
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { public ItemStack decrStackSize(int index, int count) {
return null; return null;
} }
@Override @Override
public ItemStack getStackInSlotOnClosing(int p_70304_1_) { public ItemStack getStackInSlotOnClosing(int index) {
return null; return null;
} }
@Override @Override
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {} public void setInventorySlotContents(int index, ItemStack stack) {}
@Override @Override
public boolean hasCustomInventoryName() { public boolean hasCustomInventoryName() {
@@ -260,7 +263,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
} }
@Override @Override
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { public boolean isUseableByPlayer(EntityPlayer player) {
return true; return true;
} }
@@ -432,18 +435,18 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
@Override @Override
public long getOutputAmperage() { public long getOutputAmperage() {
if (this.generating / 20.0D / 20.0D <= GT_Values.V[this.energySource.getSourceTier()]) { if (this.generating / 20.0D / 20.0D <= GTValues.V[this.energySource.getSourceTier()]) {
return 1L; return 1L;
} }
if (this.generating / 20.0D / 20.0D % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) { if (this.generating / 20.0D / 20.0D % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
return (long) (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]); return (long) (this.generating / 20.0D / 20.0D / GTValues.V[this.energySource.getSourceTier()]);
} }
return (long) (1L + (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()])); return (long) (1L + (this.generating / 20.0D / 20.0D / GTValues.V[this.energySource.getSourceTier()]));
} }
@Override @Override
public long getOutputVoltage() { public long getOutputVoltage() {
return GT_Values.V[this.energySource.getSourceTier()]; return GTValues.V[this.energySource.getSourceTier()];
} }
@Override @Override
@@ -508,11 +511,6 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
return 0L; return 0L;
} }
@Override
public boolean increaseStoredSteam(long aEnergy, boolean aIgnoreTooMuchEnergy) {
return false;
}
@Override @Override
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) { public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
return 0L; return 0L;
@@ -698,17 +696,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
} }
@Override @Override
public byte getMetaID(int aX, int aY, int aZ) { public int getMetaID(int aX, int aY, int aZ) {
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ); return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
} }
@Override @Override
public byte getMetaIDOffset(int aX, int aY, int aZ) { public int getMetaIDOffset(int aX, int aY, int aZ) {
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
} }
@Override @Override
public byte getMetaIDAtSide(ForgeDirection side) { public int getMetaIDAtSide(ForgeDirection side) {
int tX = getOffsetX(side, 1); int tX = getOffsetX(side, 1);
int tY = getOffsetY(side, 1); int tY = getOffsetY(side, 1);
int tZ = getOffsetZ(side, 1); int tZ = getOffsetZ(side, 1);
@@ -716,7 +714,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
} }
@Override @Override
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) { public int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
if (aDistance == 1) { if (aDistance == 1) {
return getMetaIDAtSide(side); return getMetaIDAtSide(side);
} }
@@ -841,11 +839,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
@Override @Override
public void sendBlockEvent(byte aID, byte aValue) { public void sendBlockEvent(byte aID, byte aValue) {
GT_Values.NW.sendPacketToAllPlayersInRange( GTBlockEventTracker.enqueue(worldObj, xCoord, yCoord, zCoord, aID, aValue);
this.worldObj,
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
this.xCoord,
this.zCoord);
} }
@Override @Override
@@ -890,33 +884,35 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
.setProgress(() -> (float) fuel / this.maxfuel).setSynced(false, false).setPos(9, 43) .setProgress(() -> (float) fuel / this.maxfuel).setSynced(false, false).setPos(9, 43)
.setSize(25, 11)) .setSize(25, 11))
.widget( .widget(
TextWidget new TextWidget().setStringSupplier(
.dynamicString( () -> StatCollector.translateToLocal("emt.Storage") + " "
() -> StatCollector.translateToLocal("emt.Storage") + numberFormat.formatWithSuffix(storage)
+ EMTTextHelper.formatNumber(storage) + "/"
+ "/" + numberFormat.formatWithSuffix(maxstorage)
+ EMTTextHelper.formatNumber(maxstorage) + " EU")
+ "EU") .setDefaultColor(0).setPos(36, 22))
.setSynced(false).setDefaultColor(0).setPos(36, 22))
.widget(new FakeSyncWidget.IntegerSyncer(() -> storage, val -> storage = val)) .widget(new FakeSyncWidget.IntegerSyncer(() -> storage, val -> storage = val))
.widget( .widget(
TextWidget.dynamicString( new TextWidget().setStringSupplier(
() -> StatCollector.translateToLocal("emt.Generating") () -> StatCollector.translateToLocal("emt.Generating") + " "
+ (isActive ? generating / 20 / 20 : 0) + numberFormat.formatWithSuffix(isActive ? (long) (generating / 20 / 20) : 0)
+ " EU/t") + " EU/t")
.setSynced(false).setDefaultColor(0).setPos(36, 35)) .setDefaultColor(0).setPos(36, 35))
.widget(new FakeSyncWidget.DoubleSyncer(() -> generating, val -> generating = val)) .widget(new FakeSyncWidget.DoubleSyncer(() -> generating, val -> generating = val))
.widget(new FakeSyncWidget.BooleanSyncer(() -> isActive, val -> isActive = val)) .widget(new FakeSyncWidget.BooleanSyncer(() -> isActive, val -> isActive = val))
.widget( .widget(
TextWidget.dynamicString(() -> StatCollector.translateToLocal("emt.Fuel") + ": " + fuel) new TextWidget()
.setSynced(false).setDefaultColor(0).setPos(36, 48)) .setStringSupplier(
() -> StatCollector.translateToLocal("emt.Fuel") + ": "
+ numberFormat.formatWithSuffix(fuel))
.setDefaultColor(0).setPos(36, 48))
.widget(new FakeSyncWidget.ByteSyncer(() -> fuel, val -> fuel = val)) .widget(new FakeSyncWidget.ByteSyncer(() -> fuel, val -> fuel = val))
.widget( .widget(
TextWidget new TextWidget()
.dynamicString( .setStringSupplier(
() -> StatCollector.translateToLocal("emt.remaining_second") () -> StatCollector.translateToLocal("emt.remaining_second") + " "
+ ((fuel * 20 * 20) - tick) / 20) + numberFormat.format(((fuel * 20 * 20) - tick) / 20))
.setSynced(false).setDefaultColor(0).setPos(36, 63)) .setDefaultColor(0).setPos(36, 63))
.widget(new FakeSyncWidget.IntegerSyncer(() -> tick, val -> tick = val)); .widget(new FakeSyncWidget.IntegerSyncer(() -> tick, val -> tick = val));
return builder.build(); return builder.build();
+29 -9
View File
@@ -1,18 +1,22 @@
package emt.tile.solar; package emt.tile.solar;
import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes; import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static thaumcraft.api.aspects.Aspect.*; import static thaumcraft.api.aspects.Aspect.*;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.registry.GameRegistry;
import emt.block.BlockSolars;
import emt.init.EMTBlocks; import emt.init.EMTBlocks;
import emt.item.block.ItemBlockSolars;
import emt.util.EMTConfigHandler; import emt.util.EMTConfigHandler;
import gregtech.api.enums.GT_Values; import gregtech.api.enums.GTValues;
import gregtech.api.enums.Materials; import gregtech.api.enums.Materials;
import gregtech.api.enums.TierEU; import gregtech.api.enums.TierEU;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
@@ -107,6 +111,8 @@ public enum Solars {
Octuple_Compressed_Ignis(EMTConfigHandler.octupleCompressedSolarOutput, FIRE, 4, 2, Octuple_Compressed_Ignis(EMTConfigHandler.octupleCompressedSolarOutput, FIRE, 4, 2,
"Octuple_Compressed_Ignis_Solar"),; "Octuple_Compressed_Ignis_Solar"),;
public static final Solars[] VALUES = values();
private static final LinkedHashMap<Long, Solars> cachemap = new LinkedHashMap<>(); private static final LinkedHashMap<Long, Solars> cachemap = new LinkedHashMap<>();
final int instance, meta; final int instance, meta;
final Aspect aspect; final Aspect aspect;
@@ -127,16 +133,16 @@ public enum Solars {
@Nullable @Nullable
private static Solars getBaseSolar(double output) { private static Solars getBaseSolar(double output) {
for (Solars s : Solars.values()) { for (Solars s : Solars.VALUES) {
if (s.output == output && s.aspect == null) return s; if (s.output == output && s.aspect == null) return s;
} }
return null; return null;
} }
public static void registerReverseRecipes() { public static void registerReverseRecipes() {
for (Solars s : Solars.values()) { for (Solars s : Solars.VALUES) {
if (s.aspect != null) { if (s.aspect != null) {
GT_Values.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta)) GTValues.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta))
.fluidInputs(Materials.Chlorine.getGas(1000)) .fluidInputs(Materials.Chlorine.getGas(1000))
.itemOutputs( .itemOutputs(
new ItemStack( new ItemStack(
@@ -149,14 +155,14 @@ public enum Solars {
} }
public static void populateCache() { public static void populateCache() {
for (Solars s : Solars.values()) { for (Solars s : Solars.VALUES) {
cachemap.put(s.id, s); cachemap.put(s.id, s);
} }
} }
public static int getCountOfInstances() { public static int getCountOfInstances() {
int ret = 0; int ret = 0;
for (Solars s : Solars.values()) { for (Solars s : Solars.VALUES) {
ret = Math.max(s.instance, ret); ret = Math.max(s.instance, ret);
} }
return ret + 1; return ret + 1;
@@ -164,7 +170,7 @@ public enum Solars {
public static int getCountOfMetas(int instance) { public static int getCountOfMetas(int instance) {
int ret = 0; int ret = 0;
for (Solars s : Solars.values()) { for (Solars s : Solars.VALUES) {
if (s.instance == instance) { if (s.instance == instance) {
ret = Math.max(s.meta, ret); ret = Math.max(s.meta, ret);
} }
@@ -196,10 +202,24 @@ public enum Solars {
final long id = (long) instance << 4 | meta; final long id = (long) instance << 4 | meta;
Solars cached = cachemap.get(id); Solars cached = cachemap.get(id);
if (cached != null) return cached; if (cached != null) return cached;
for (Solars s : Solars.values()) { for (Solars s : Solars.VALUES) {
cachemap.put(s.id, s); cachemap.put(s.id, s);
if (s.id == id) return s; if (s.id == id) return s;
} }
return null; return null;
} }
public static Block[] registerBlocks() {
Block[] solars = new Block[getCountOfInstances()];
for (int i = 0; i < solars.length; i++) {
if (i == 0) {
solars[i] = new BlockSolars("solar", Solars.getCountOfMetas(i), i);
GameRegistry.registerBlock(solars[i], ItemBlockSolars.class, "EMTSolars");
} else {
solars[i] = new BlockSolars("solar" + (i + 1), Solars.getCountOfMetas(i), i);
GameRegistry.registerBlock(solars[i], ItemBlockSolars.class, "EMTSolars" + (i + 1));
}
}
return solars;
}
} }
@@ -15,6 +15,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.NumberFormatMUI;
import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.drawable.Text;
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -28,13 +29,12 @@ import emt.client.gui.EMT_UITextures;
import emt.init.EMTBlocks; import emt.init.EMTBlocks;
import emt.tile.DefinitelyNotAIC2Source; import emt.tile.DefinitelyNotAIC2Source;
import emt.tile.TileEntityEMT; import emt.tile.TileEntityEMT;
import emt.util.EMTTextHelper; import gregtech.api.enums.GTValues;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer; import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IEnergyConnected;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.net.GT_Packet_Block_Event; import gregtech.common.data.GTBlockEventTracker;
import ic2.api.tile.IWrenchable; import ic2.api.tile.IWrenchable;
import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.visnet.VisNetHandler; import thaumcraft.api.visnet.VisNetHandler;
@@ -68,6 +68,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
protected boolean side; protected boolean side;
private int instance, meta; private int instance, meta;
protected static NumberFormatMUI numberFormat = new NumberFormatMUI();
public TileEntitySolarBase(double output, Aspect aspect, String guiname, int instance, int meta) { public TileEntitySolarBase(double output, Aspect aspect, String guiname, int instance, int meta) {
this.tick = 10; this.tick = 10;
this.storage = 0; this.storage = 0;
@@ -100,10 +102,10 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
} }
private int getTierFromCapacity(long capacity) { private int getTierFromCapacity(long capacity) {
for (int i = 0; i < GT_Values.V.length; i++) { for (int i = 0; i < GTValues.V.length; i++) {
if (capacity / 1000 < GT_Values.V[i]) return i; if (capacity / 1000 < GTValues.V[i]) return i;
} }
return GT_Values.V.length - 1; return GTValues.V.length - 1;
} }
@Override @Override
@@ -160,9 +162,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
case AQUA: { case AQUA: {
if (worldObj.isThundering()) return 6F; if (worldObj.isThundering()) return 6F;
else if (worldObj.isRaining()) return 3F; else if (worldObj.isRaining()) return 3F;
else if (!worldObj.isThundering() && !worldObj.isRaining() else if (worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water)) return 2F;
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord).equals(Blocks.water))
return 2F;
else return 1F; else return 1F;
} }
case IGNIS: { case IGNIS: {
@@ -191,7 +191,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
this.isActive = true; this.isActive = true;
if (side) { if (side) {
this.generating = output * calc_multi(); this.generating = output * calc_multi();
this.energySource.addEnergy(this.output * calc_multi()); this.energySource.addEnergy(this.generating);
} }
} else { } else {
isActive = false; isActive = false;
@@ -308,17 +308,17 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
} }
@Override @Override
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { public ItemStack decrStackSize(int index, int count) {
return null; return null;
} }
@Override @Override
public ItemStack getStackInSlotOnClosing(int p_70304_1_) { public ItemStack getStackInSlotOnClosing(int index) {
return null; return null;
} }
@Override @Override
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {} public void setInventorySlotContents(int index, ItemStack stack) {}
@Override @Override
public boolean hasCustomInventoryName() { public boolean hasCustomInventoryName() {
@@ -336,7 +336,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
} }
@Override @Override
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { public boolean isUseableByPlayer(EntityPlayer player) {
return true; return true;
} }
@@ -351,7 +351,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
} }
@Override @Override
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { public boolean isItemValidForSlot(int index, ItemStack stack) {
return false; return false;
} }
@@ -422,11 +422,11 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
long[] voltAmp = new long[2]; long[] voltAmp = new long[2];
voltAmp[0] = getOutputVoltage(); voltAmp[0] = getOutputVoltage();
long generating = (long) Math.floor(output * getMaxMulti()); long generating = (long) Math.floor(output * getMaxMulti());
if (generating <= GT_Values.V[energySource.getSourceTier()]) { if (generating <= GTValues.V[energySource.getSourceTier()]) {
voltAmp[1] = 1L; voltAmp[1] = 1L;
} else if (generating % GT_Values.V[energySource.getSourceTier()] == 0.0D) { } else if (generating % GTValues.V[energySource.getSourceTier()] == 0.0D) {
voltAmp[1] = (generating / GT_Values.V[energySource.getSourceTier()]); voltAmp[1] = (generating / GTValues.V[energySource.getSourceTier()]);
} else voltAmp[1] = (1L + (generating / GT_Values.V[energySource.getSourceTier()])); } else voltAmp[1] = (1L + (generating / GTValues.V[energySource.getSourceTier()]));
return voltAmp; return voltAmp;
} }
@@ -435,28 +435,28 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
return calculateMaxVoltAmp()[1]; return calculateMaxVoltAmp()[1];
// long ret; // long ret;
// if (this.energySource.getSourceTier() <= 4) { // if (this.energySource.getSourceTier() <= 4) {
// if (this.generating <= GT_Values.V[this.energySource.getSourceTier() - 2]) { // if (this.generating <= GTValues.V[this.energySource.getSourceTier() - 2]) {
// ret = 1L; // ret = 1L;
// } // }
// if (this.generating % GT_Values.V[this.energySource.getSourceTier() - 2] == 0.0D) { // if (this.generating % GTValues.V[this.energySource.getSourceTier() - 2] == 0.0D) {
// ret = (long) (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2]); // ret = (long) (this.generating / GTValues.V[this.energySource.getSourceTier() - 2]);
// } else // } else
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 2])); // ret = (long) (1L + (this.generating / GTValues.V[this.energySource.getSourceTier() - 2]));
// } else { // } else {
// if (this.generating <= GT_Values.V[this.energySource.getSourceTier() - 1]) { // if (this.generating <= GTValues.V[this.energySource.getSourceTier() - 1]) {
// ret = 1L; // ret = 1L;
// } // }
// if (this.generating % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) { // if (this.generating % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
// ret = (long) (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1]); // ret = (long) (this.generating / GTValues.V[this.energySource.getSourceTier() - 1]);
// } else // } else
// ret = (long) (1L + (this.generating / GT_Values.V[this.energySource.getSourceTier() - 1])); // ret = (long) (1L + (this.generating / GTValues.V[this.energySource.getSourceTier() - 1]));
// } // }
// return ret; // return ret;
} }
@Override @Override
public long getOutputVoltage() { public long getOutputVoltage() {
return GT_Values.V[this.energySource.getSourceTier()]; return GTValues.V[this.energySource.getSourceTier()];
} }
@Override @Override
@@ -711,17 +711,17 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
} }
@Override @Override
public byte getMetaID(int aX, int aY, int aZ) { public int getMetaID(int aX, int aY, int aZ) {
return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ); return (byte) this.worldObj.getBlockMetadata(aX, aY, aZ);
} }
@Override @Override
public byte getMetaIDOffset(int aX, int aY, int aZ) { public int getMetaIDOffset(int aX, int aY, int aZ) {
return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); return getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ);
} }
@Override @Override
public byte getMetaIDAtSide(ForgeDirection side) { public int getMetaIDAtSide(ForgeDirection side) {
int tX = getOffsetX(side, 1); int tX = getOffsetX(side, 1);
int tY = getOffsetY(side, 1); int tY = getOffsetY(side, 1);
int tZ = getOffsetZ(side, 1); int tZ = getOffsetZ(side, 1);
@@ -729,7 +729,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
} }
@Override @Override
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) { public int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
if (aDistance == 1) { if (aDistance == 1) {
return getMetaIDAtSide(side); return getMetaIDAtSide(side);
} }
@@ -854,11 +854,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
@Override @Override
public void sendBlockEvent(byte aID, byte aValue) { public void sendBlockEvent(byte aID, byte aValue) {
GT_Values.NW.sendPacketToAllPlayersInRange( GTBlockEventTracker.enqueue(this.worldObj, this.xCoord, this.yCoord, this.zCoord, aID, aValue);
this.worldObj,
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
this.xCoord,
this.zCoord);
} }
@Override @Override
@@ -903,16 +899,20 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
.setProgress(() -> generating > 9 ? 1f : 0f).setSynced(false, false).setPos(9, 43) .setProgress(() -> generating > 9 ? 1f : 0f).setSynced(false, false).setPos(9, 43)
.setSize(11, 11)) .setSize(11, 11))
.widget( .widget(
TextWidget.dynamicString( new TextWidget().setStringSupplier(
() -> StatCollector.translateToLocal("emt.Storage") + EMTTextHelper () -> StatCollector.translateToLocal("emt.Storage") + " "
.formatNumber(storage) + "/" + EMTTextHelper.formatNumber(maxstorage) + "EU") + numberFormat.formatWithSuffix(storage)
.setSynced(false).setDefaultColor(0).setPos(36, 22)) + "/"
+ numberFormat.formatWithSuffix(maxstorage)
+ " EU")
.setDefaultColor(0).setPos(36, 22))
.widget(new FakeSyncWidget.LongSyncer(() -> storage, val -> storage = val)) .widget(new FakeSyncWidget.LongSyncer(() -> storage, val -> storage = val))
.widget( .widget(
TextWidget new TextWidget().setStringSupplier(
.dynamicString( () -> StatCollector.translateToLocal("emt.Generating") + " "
() -> StatCollector.translateToLocal("emt.Generating") + generating + " EU/t") + numberFormat.formatWithSuffix((long) generating)
.setSynced(false).setDefaultColor(0).setPos(36, 35)) + " EU/t")
.setDefaultColor(0).setPos(36, 35))
.widget(new FakeSyncWidget.DoubleSyncer(() -> generating, val -> generating = val)); .widget(new FakeSyncWidget.DoubleSyncer(() -> generating, val -> generating = val));
return builder.build(); return builder.build();
+21 -16
View File
@@ -7,9 +7,6 @@ import java.util.List;
import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Configuration;
import emt.gthandler.common.loader.EMT_GT_Loader;
import gregtech.api.enums.GT_Values;
/** /**
* TODO: Need to rewrite... * TODO: Need to rewrite...
**/ **/
@@ -23,6 +20,10 @@ public class EMTConfigHandler {
public static final String RESEARCH = "Research"; public static final String RESEARCH = "Research";
public static final String VALUES = "Numeric Values"; public static final String VALUES = "Numeric Values";
public static final String OUTPUTS = "Essentia Generator Outputs"; public static final String OUTPUTS = "Essentia Generator Outputs";
private static final String IGNORED_UNDER_GTNH = "Ignored when GTNH (dreamcraft) is installed: "
+ "dungeon loot is controlled by config/TooMuchLoot/loot/dungeonChest.xml in GTNH.";
public static Configuration config; public static Configuration config;
public static int etherealProcessorBaseSpeed; public static int etherealProcessorBaseSpeed;
public static int etherealProcessorBonus; public static int etherealProcessorBonus;
@@ -55,6 +56,7 @@ public class EMTConfigHandler {
public static double quantumBootsMaxDrop; public static double quantumBootsMaxDrop;
public static double EssentiaGeneratorStorage; public static double EssentiaGeneratorStorage;
public static int aIDoffset;
/** /**
* Essentias * Essentias
@@ -189,19 +191,25 @@ public class EMTConfigHandler {
"Disable smoke effect for boots", "Disable smoke effect for boots",
false, false,
"This effect only appears when the player isn't on the ground").getBoolean(smoke); "This effect only appears when the player isn't on the ground").getBoolean(smoke);
oneRingSpawn = config oneRingSpawn = config.get(
.get(RANDOM, "Disable One Ring in dungeon chests", true, "There is a recipe to get this item.") RANDOM,
.getBoolean(oneRingSpawn); "Disable One Ring in dungeon chests",
true,
"There is a recipe to get this item. " + IGNORED_UNDER_GTNH).getBoolean(oneRingSpawn);
chanceTaintedMjolnir = config.get( chanceTaintedMjolnir = config.get(
RANDOM, RANDOM,
"Tainted Mjolnir spawning change", "Tainted Mjolnir spawning change",
25, 25,
"If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); "If you have a lot of mods adding dungeon loot, you should definetely increase this. "
+ IGNORED_UNDER_GTNH)
.getInt();
chanceOneRing = config.get( chanceOneRing = config.get(
RANDOM, RANDOM,
"One Ring spawning chance", "One Ring spawning chance",
15, 15,
"If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); "If you have a lot of mods adding dungeon loot, you should definetely increase this. "
+ IGNORED_UNDER_GTNH)
.getInt();
removeAmberAndCinnabarMacerating = config removeAmberAndCinnabarMacerating = config
.get( .get(
RANDOM, RANDOM,
@@ -235,14 +243,11 @@ public class EMTConfigHandler {
"This is the number you have to modify if you want to change the size of the " "This is the number you have to modify if you want to change the size of the "
+ "internal buffer of the Essentia Generator") + "internal buffer of the Essentia Generator")
.getDouble(EssentiaGeneratorStorage); .getDouble(EssentiaGeneratorStorage);
EMT_GT_Loader.aIDoffset = config aIDoffset = config.get(
.get( VALUES,
VALUES, "aID offset for Gregetch Machinery",
"aID offset for Gregetch Machinery", 12983,
(13000 - GT_Values.VN.length - 1), "This Mod will use 17 IDs, do not change if you dont know what you are doing!").getInt();
"This Mod will use " + Integer.toString(GT_Values.VN.length + 1)
+ " IDs, do not change if you dont know what you are doing!")
.getInt(13000 - GT_Values.VN.length - 1);
wandChargerConsumption = config wandChargerConsumption = config
.get( .get(
@@ -98,8 +98,4 @@ public class EMTCraftingAspects {
public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8); public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8);
public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8) public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8)
.add(Aspect.MAGIC, 8); .add(Aspect.MAGIC, 8);
public static AspectList researchCompleter = new AspectList().add(Aspect.FIRE, 50).add(Aspect.WATER, 50)
.add(Aspect.AIR, 50).add(Aspect.EARTH, 50).add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50);
public static AspectList magicalMachineCasing = new AspectList().add(Aspect.FIRE, 8).add(Aspect.AIR, 8)
.add(Aspect.ORDER, 8);
} }
@@ -4,11 +4,17 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.ChestGenHooks;
import cpw.mods.fml.common.Loader;
import emt.init.EMTItems; import emt.init.EMTItems;
public class EMTDungeonChestGenerator { public class EMTDungeonChestGenerator {
public static void generateLoot() { public static void generateLoot() {
// GTNH replaces the whole dungeonChest table from config/TooMuchLoot/loot/dungeonChest.xml at
// FMLServerStartingEvent, which discards everything registered here. Edit that file instead.
if (Loader.isModLoaded("dreamcraft")) {
return;
}
if (!EMTConfigHandler.thorHammerResearch) { if (!EMTConfigHandler.thorHammerResearch) {
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(
new WeightedRandomChestContent( new WeightedRandomChestContent(
+5 -19
View File
@@ -1,18 +1,14 @@
package emt.util; package emt.util;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import baubles.api.BaublesApi;
import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.gameevent.TickEvent;
@@ -27,6 +23,11 @@ import thaumcraft.common.entities.monster.EntityTaintChicken;
public class EMTEventHandler { public class EMTEventHandler {
/**
* Intercept the onLivingHurt event so that we can mitigate fall damage with feather wings
*
* @param e Entity that is being damaged
*/
@SubscribeEvent @SubscribeEvent
public void onLivingHurt(LivingHurtEvent e) { public void onLivingHurt(LivingHurtEvent e) {
if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) return; if (!(e.entityLiving instanceof EntityPlayer) || e.source != DamageSource.fall) return;
@@ -77,21 +78,6 @@ public class EMTEventHandler {
} }
} }
@SubscribeEvent
public void onSetEntityAttack(LivingSetAttackTargetEvent e) {
if (e.entityLiving instanceof EntityLiving && e.target instanceof EntityPlayer) {
IInventory inventory = BaublesApi.getBaubles((EntityPlayer) e.target);
for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack stack = inventory.getStackInSlot(i);
if (stack != null && stack.getItem() == EMTItems.onering) {
((EntityLiving) e.entityLiving).setAttackTarget(null);
}
}
}
}
@SubscribeEvent @SubscribeEvent
public void createCloud(PlayerInteractEvent e) { public void createCloud(PlayerInteractEvent e) {
if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || e.world.isRemote) { if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK || e.world.isRemote) {
@@ -94,6 +94,4 @@ public class EMTResearchAspects {
public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5) public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5)
.add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); .add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4);
public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3); public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3);
public static AspectList researchCompleter = new AspectList().add(Aspect.MIND, 8).add(Aspect.MECHANISM, 5)
.add(Aspect.EXCHANGE, 5).add(Aspect.AURA, 4);
} }
-12
View File
@@ -42,16 +42,4 @@ public class EMTTextHelper {
public static String localize(String key) { public static String localize(String key) {
return StatCollector.translateToLocal(key); return StatCollector.translateToLocal(key);
} }
public static String formatNumber(long number) {
if (number < 10_000) {
return String.valueOf(number);
} else if (number < 10_000_000) {
return (number / 1000) + "k";
} else if (number < 1_000_000_000) {
return (number / 1_000_000) + "M";
} else {
return (number / 1_000_000_000) + "G";
}
}
} }
+10 -7
View File
@@ -13,9 +13,9 @@ gui.EMT.book.aspect.output.eu.title=Essentia Ausgabe Buch
gui.EMT.book.aspect.output.essentia.eu=EU Leistung per Essentia gui.EMT.book.aspect.output.essentia.eu=EU Leistung per Essentia
gui.EMT.key.unequip=Ausziehen gui.EMT.key.unequip=Ausziehen
emt.Output=Ausgabe: emt.Output=Ausgabe:
emt.Storage=Speicher: emt.Storage=Speicher:
emt.PressShift=<Drücke SHIFT> emt.PressShift=<Drücke SHIFT>
emt.Generating=Erzeugt: emt.Generating=Erzeugt:
emt.Fuel=Brennstoff emt.Fuel=Brennstoff
#=============Tooltips============= #=============Tooltips=============
@@ -100,6 +100,9 @@ item.EMT.focus.charge.name=Stab Fokus: Aufladung
item.EMT.focus.chargeWand.name=Stab Fokus: Stabs Aufladung item.EMT.focus.chargeWand.name=Stab Fokus: Stabs Aufladung
item.EMT.focus.electricCloud.name=Electrische Wolke item.EMT.focus.electricCloud.name=Electrische Wolke
item.EMT.focus.energyBall.name=Energie Ball Fokus item.EMT.focus.energyBall.name=Energie Ball Fokus
item.EMT.focus.EU.cost.info=EU pro Zauber
item.EMT.focus.EU.cost.once= §r%s §eEU§0
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
#=============Block Names============= #=============Block Names=============
tile.EMT.electricCloud.name=Electrische Wolke tile.EMT.electricCloud.name=Electrische Wolke
@@ -129,11 +132,11 @@ tile.EMT.solar.fire.name=Feuer Infundierte Verdichte Solarzelle
tile.EMT.solar.doublefire.name=Feuer Infundierte Doppelt Verdichte Solarzelle tile.EMT.solar.doublefire.name=Feuer Infundierte Doppelt Verdichte Solarzelle
tile.EMT.solar.triplefire.name=Feuer Infundierte Dreifach Verdichte Solarzelle tile.EMT.solar.triplefire.name=Feuer Infundierte Dreifach Verdichte Solarzelle
tile.EMT.solar.air.name=Luft Infundierte Verdichte Solarzelle tile.EMT.solar.air.name=Luft Infundierte Verdichte Solarzelle
tile.EMT.solar2.doubleair.name=Luft Infundierte Doppelt Verdichte Solarzelle tile.EMT.solar.doubleair.name=Luft Infundierte Doppelt Verdichte Solarzelle
tile.EMT.solar2.tripleair.name=Luft Infundierte Dreifach Verdichte Solarzelle tile.EMT.solar.tripleair.name=Luft Infundierte Dreifach Verdichte Solarzelle
tile.EMT.solar2.earth.name=Erde Infundierte Verdichte Solarzelle tile.EMT.solar.earth.name=Erde Infundierte Verdichte Solarzelle
tile.EMT.solar2.doubleearth.name=Erde Infundierte Doppelt Verdichte Solarzelle tile.EMT.solar.doubleearth.name=Erde Infundierte Doppelt Verdichte Solarzelle
tile.EMT.solar2.tripleearth.name=Erde Infundierte Dreifach Verdichte Solarzelle tile.EMT.solar.tripleearth.name=Erde Infundierte Dreifach Verdichte Solarzelle
#=============Thaumonomicon Texts============= #=============Thaumonomicon Texts=============
+34 -25
View File
@@ -87,6 +87,7 @@ item.EMT.wing.feather.name=Feather Duct-Taped Wings
item.EMT.wing.thaumium.name=Thaumium Reinforced Wings item.EMT.wing.thaumium.name=Thaumium Reinforced Wings
item.EMT.wing.nano.name=Nanosuit Wings item.EMT.wing.nano.name=Nanosuit Wings
item.EMT.wing.quantum.name=Quantum Wings item.EMT.wing.quantum.name=Quantum Wings
ic2.EMT.quantum.name=Infused Quantum Chestplate
item.EMT.chestplates.infusedQuantum.name=Infused Quantum Chestplate item.EMT.chestplates.infusedQuantum.name=Infused Quantum Chestplate
item.EMT.hammer.broken.name=Broken Relic of Mjolnir item.EMT.hammer.broken.name=Broken Relic of Mjolnir
item.EMT.hammer.name=Mjolnir item.EMT.hammer.name=Mjolnir
@@ -108,20 +109,30 @@ item.EMT.focus.chargeWand.name=Wand Focus: Wand Charging
item.EMT.focus.maintenance.name=Wand Focus: Maintenance item.EMT.focus.maintenance.name=Wand Focus: Maintenance
item.EMT.focus.electricCloud.name=Electric Cloud item.EMT.focus.electricCloud.name=Electric Cloud
item.EMT.focus.energyBall.name=Energy Ball Focus item.EMT.focus.energyBall.name=Energy Ball Focus
item.EMT.focus.EU.cost.info=EU per cast
item.EMT.focus.EU.cost.once= §r%s §eEU§0
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
#=============Block Names============= #=============Block Names=============
tile.EMT.electricCloud.name=Electric Cloud tile.EMT.electricCloud.name=Electric Cloud
tile.EMT.shield.name=Shield Block tile.EMT.shield.name=Shield Block
tile.EMT.portablenode.name=Portable Node tile.EMT.portablenode.name=Portable Node
tile.EMT.essentia.name=Essentia Generator
tile.EMT.essentia.potentia.name=Potentia Generator tile.EMT.essentia.potentia.name=Potentia Generator
tile.EMT.essentia.ignis.name=Ignis Generator tile.EMT.essentia.ignis.name=Ignis Generator
tile.EMT.essentia.auram.name=Auram Generator tile.EMT.essentia.auram.name=Auram Generator
tile.EMT.essentia.arbor.name=Arbor Generator tile.EMT.essentia.arbor.name=Arbor Generator
tile.EMT.essentia.aer.name=Aer Generator tile.EMT.essentia.aer.name=Aer Generator
tile.EMT.essentia.lucrum.name=Lucrum Generator tile.EMT.essentia.lucrum.name=Lucrum Generator
tile.EMT.machine.name=Machine
tile.EMT.machine.wandrecharge.name=Industrial Wand Charging Station tile.EMT.machine.wandrecharge.name=Industrial Wand Charging Station
tile.EMT.machine.etheralprocessor.name=Ethereal Processor tile.EMT.machine.etheralprocessor.name=Ethereal Processor
tile.EMT.machine.essentiafiller.name=Essentia Filler - Marked for deprecation tile.EMT.machine.essentiafiller.name=Essentia Filler - Marked for deprecation
tile.EMT.solar.name=Compressed Solar Panel
tile.EMT.solar2.name=Double Compressed Aer Solar
tile.EMT.solar3.name=Quadruple Compressed Solar
tile.EMT.solar4.name=Sextuple Compressed Perditio Solar
tile.EMT.solar5.name=Octuple Compressed Terra Solar
tile.EMT.solar.compressed.name=Compressed Solar Panel tile.EMT.solar.compressed.name=Compressed Solar Panel
tile.EMT.solar.doublecompressed.name=Double Compressed Solar Panel tile.EMT.solar.doublecompressed.name=Double Compressed Solar Panel
tile.EMT.solar.triplecompressed.name=Triple Compressed Solar Panel tile.EMT.solar.triplecompressed.name=Triple Compressed Solar Panel
@@ -163,16 +174,16 @@ tile.EMT.Sextuple_Compressed_Ignis_Solar.name=Sextuple Compressed Ignis Solar
tile.EMT.Septuple_Compressed_Ignis_Solar.name=Septuple Compressed Ignis Solar tile.EMT.Septuple_Compressed_Ignis_Solar.name=Septuple Compressed Ignis Solar
tile.EMT.Octuple_Compressed_Ignis_Solar.name=Octuple Compressed Ignis Solar tile.EMT.Octuple_Compressed_Ignis_Solar.name=Octuple Compressed Ignis Solar
tile.EMT.solar.air.name=Air Infused Compressed Solar Panel tile.EMT.solar.air.name=Air Infused Compressed Solar Panel
tile.EMT.solar2.doubleair.name=Air Infused Double Compressed Solar Panel tile.EMT.solar.doubleair.name=Air Infused Double Compressed Solar Panel
tile.EMT.solar2.tripleair.name=Air Infused Triple Compressed Solar Panel tile.EMT.solar.tripleair.name=Air Infused Triple Compressed Solar Panel
tile.EMT.Quadruple_Compressed_Aer_Solar.name=Quadruple Compressed Aer Solar tile.EMT.Quadruple_Compressed_Aer_Solar.name=Quadruple Compressed Aer Solar
tile.EMT.Quintuple_Compressed_Aer_Solar.name=Quintuple Compressed Aer Solar tile.EMT.Quintuple_Compressed_Aer_Solar.name=Quintuple Compressed Aer Solar
tile.EMT.Sextuple_Compressed_Aer_Solar.name=Sextuple Compressed Aer Solar tile.EMT.Sextuple_Compressed_Aer_Solar.name=Sextuple Compressed Aer Solar
tile.EMT.Septuple_Compressed_Aer_Solar.name=Septuple Compressed Aer Solar tile.EMT.Septuple_Compressed_Aer_Solar.name=Septuple Compressed Aer Solar
tile.EMT.Octuple_Compressed_Aer_Solar.name=Octuple Compressed Aer Solar tile.EMT.Octuple_Compressed_Aer_Solar.name=Octuple Compressed Aer Solar
tile.EMT.solar2.earth.name=Earth Infused Compressed Solar Panel tile.EMT.solar.earth.name=Earth Infused Compressed Solar Panel
tile.EMT.solar2.doubleearth.name=Earth Infused Double Compressed Solar Panel tile.EMT.solar.doubleearth.name=Earth Infused Double Compressed Solar Panel
tile.EMT.solar2.tripleearth.name=Earth Infused Triple Compressed Solar Panel tile.EMT.solar.tripleearth.name=Earth Infused Triple Compressed Solar Panel
tile.EMT.Quadruple_Compressed_Terra_Solar.name=Quadruple Compressed Terra Solar tile.EMT.Quadruple_Compressed_Terra_Solar.name=Quadruple Compressed Terra Solar
tile.EMT.Quintuple_Compressed_Terra_Solar.name=Quintuple Compressed Terra Solar tile.EMT.Quintuple_Compressed_Terra_Solar.name=Quintuple Compressed Terra Solar
tile.EMT.Sextuple_Compressed_Terra_Solar.name=Sextuple Compressed Terra Solar tile.EMT.Sextuple_Compressed_Terra_Solar.name=Sextuple Compressed Terra Solar
@@ -190,7 +201,7 @@ emt.text.Energy Ball Focus=It's necessary to put on the BatPack or nano/quant ch
emt.rsname.Electric Cloud=Electric Cloud emt.rsname.Electric Cloud=Electric Cloud
emt.tag.Electric Cloud=Still the same Nitor emt.tag.Electric Cloud=Still the same Nitor
emt.text.Electric Cloud.1=All thaumaturges (except Crimson ones, I guess) enjoy the shine and heat of the magic flame called Nitor, aren't they? You desided to make it more... energetic. Well, you did it.<BR><BR>You have created a new kind of magic flame — the Electric Cloud. It behaves and looks like normal Nitor, but it has purple colour and creates light-purple lightning charges around itself. For electrolizing need to click RMB on Nitor with advanced battery(or better) on hand. emt.text.Electric Cloud.1=All thaumaturges (except Crimson ones, I guess) enjoy the shine and heat of the magic flame called Nitor, aren't they? You decided to make it more... energetic. Well, you did it.<BR><BR>You have created a new kind of magic flame — the Electric Cloud. It behaves and looks like normal Nitor, but it has purple color and creates light-purple lightning charges around itself. For electrolizing need to click RMB on Nitor with advanced battery(or better) on hand.
emt.text.Electric Cloud.2=<IMG>emt:textures/researches/electric_cloud.png:0:0:255:255:0.6</IMG> emt.text.Electric Cloud.2=<IMG>emt:textures/researches/electric_cloud.png:0:0:255:255:0.6</IMG>
emt.rsname.Thaumium Drill=Thaumium Drill emt.rsname.Thaumium Drill=Thaumium Drill
@@ -227,7 +238,7 @@ emt.text.Thaumium Omnitool=After creating the Diamond and Iron Omnitools, the ne
emt.rsname.Explosion Focus=Explosion Focus emt.rsname.Explosion Focus=Explosion Focus
emt.tag.Explosion Focus=Use only in well-ventilated areas emt.tag.Explosion Focus=Use only in well-ventilated areas
emt.text.Explosion Focus=You have found a way to improve the Nine Hells focus. By exposing the bats to the explosive properties of a Mining Laser, you have built a focus that acts similarly to the Laser but uses vis instead of EU. However, its effects are incredibly unstable, so you make a note to be careful. emt.text.Explosion Focus=You have found a way to improve the Nine Hells focus. By exposing the bats to the explosive properties of a Mining Laser, you have built a focus that acts similarly to the Laser but uses vis instead of EU. However, its effects are incredibly unstable, so you make a note to be careful.
emt.rsname.Kris-tmas Focus=Kris-tmas Focus emt.rsname.Kris-tmas Focus=Kris-tmas Focus
emt.tag.Kris-tmas Focus=Ho! Ho! Ho! emt.tag.Kris-tmas Focus=Ho! Ho! Ho!
@@ -255,7 +266,7 @@ emt.text.Ignis Generator=Just as you thought, with a bit of tweaking, you have f
emt.rsname.Auram Generator=Auram Generator emt.rsname.Auram Generator=Auram Generator
emt.tag.Auram Generator=Harnessing the magic in the air emt.tag.Auram Generator=Harnessing the magic in the air
emt.text.Auram Generator=Though it took a bit more work than you initially thought, you have found a way to produce EU using Auram Essenita. This required a complete reworking of the machine, relying on Auram's pulsating magical power to spin a Generator. emt.text.Auram Generator=Though it took a bit more work than you initially thought, you have found a way to produce EU using Auram Essentia. This required a complete reworking of the machine, relying on Auram's pulsating magical power to spin a Generator.
emt.rsname.Arbor Generator=Arbor Generator emt.rsname.Arbor Generator=Arbor Generator
emt.tag.Arbor Generator=Bringing power generation back to its basics emt.tag.Arbor Generator=Bringing power generation back to its basics
@@ -283,7 +294,7 @@ emt.text.Tiny Uranium=After processing all your ores and using them for the crea
emt.rsname.Mjolnir=Mjolnir emt.rsname.Mjolnir=Mjolnir
emt.tag.Mjolnir=Godly power emt.tag.Mjolnir=Godly power
emt.text.Mjolnir=You have travelled the world, in quest for the mighty Hammer of Thor. One day, you stumbled upon its broken remains, and your heart crumbled with it. After some long and tedious research, you found a way to restore this magnificent tool to its past greatness.<BR><BR>You have an odd feeling,(you seem to have a lot of these), that although this tool is amazingly powerful, you could do more with it. emt.text.Mjolnir=You have travelled the world, in quest for the mighty Hammer of Thor. One day, you stumbled upon its broken remains, and your heart crumbled with it. After some long and tedious research, you found a way to restore this magnificent tool to its past greatness.<BR><BR>You have an odd feeling, (you seem to have a lot of these), that although this tool is amazingly powerful, you could do more with it.
emt.rsname.The Legend=The Legend emt.rsname.The Legend=The Legend
emt.tag.The Legend=Childhood memories... emt.tag.The Legend=Childhood memories...
@@ -295,7 +306,7 @@ emt.text.Lightning Summoner=This item is dropped by your archenemy, the Supercha
emt.rsname.Supercharged Mjolnir=Supercharged Mjolnir emt.rsname.Supercharged Mjolnir=Supercharged Mjolnir
emt.tag.Supercharged Mjolnir=Making it yours emt.tag.Supercharged Mjolnir=Making it yours
emt.text.Supercharged Mjolnir=After some more exploring of the dungeons existing all around the worlds and dimensions, you have managed to find a method that makes you able to overpower Thor's power, making his Hammer yours. Furthermore, you have managed to make your Hammer summon defenders, some strange Snow-Golems like creature that shall protect you. However, the hammer lost its power to summon lightning where you desire it to, and creates a ring of lightning around you. emt.text.Supercharged Mjolnir=After some more exploring of the dungeons existing all around the worlds and dimensions, you have managed to find a method that makes you able to overpower Thor's power, making his Hammer yours. Furthermore, you have managed to make your Hammer summon defenders, some strange Snow-Golems like creatures that shall protect you. However, the hammer lost its power to summon lightning where you desire it to, and creates a ring of lightning around you.
emt.rsname.Industrial Wand Charging Station=Industrial Wand Charging Station emt.rsname.Industrial Wand Charging Station=Industrial Wand Charging Station
emt.tag.Industrial Wand Charging Station=Charging your wand the industrial way emt.tag.Industrial Wand Charging Station=Charging your wand the industrial way
@@ -315,7 +326,7 @@ emt.text.Diamond Chainsaw=You are unsure why the thought of upgrading a Chainsaw
emt.rsname.Thaumium Plate=Thaumium Plate emt.rsname.Thaumium Plate=Thaumium Plate
emt.tag.Thaumium Plate=Thaumium, the industrial way emt.tag.Thaumium Plate=Thaumium, the industrial way
emt.text.Thaumium Plate=As every electrical engineer knows, plates are the basis of many devices. We knew that pressing Thaumium into plates would be a neccesary step to facilitate integration of magic into our tools, but this made the mages of the school of Thaumaturgy very upset. The don't like us tampering with their precious metal. You can produce these plates as shown, which is a bit more expensive, or in a metal former, requiring only one Thaumium Ingot. Keep an eye out for angry mages. emt.text.Thaumium Plate=As every electrical engineer knows, plates are the basis of many devices. We knew that pressing Thaumium into plates would be a necessary step to facilitate integration of magic into our tools, but this made the mages of the school of Thaumaturgy very upset. They don't like us tampering with their precious metal. You can produce these plates as shown, which is a bit more expensive, or in a metal former, requiring only one Thaumium Ingot. Keep an eye out for angry mages.
emt.rsname.Macerating Native Ore Clusters=Macerating Native Ore Clusters emt.rsname.Macerating Native Ore Clusters=Macerating Native Ore Clusters
emt.tag.Macerating Native Ore Clusters=Augmenting your yield emt.tag.Macerating Native Ore Clusters=Augmenting your yield
@@ -339,7 +350,7 @@ emt.text.Electric Scribing Tools=You have decided not to kill any more squid. Th
emt.rsname.Etheral Processor=Etheral Processor emt.rsname.Etheral Processor=Etheral Processor
emt.tag.Etheral Processor=The sky is blue... emt.tag.Etheral Processor=The sky is blue...
emt.text.Etheral Processor=After taping into hell's power with the Infernal Furnace to get some rewards out of your mining sessions, you have something totally different in mind. You are now using the power of the "Good", the sky and the so called "Paradise". This Ethereal Processor doubles the yield of every smelting recipe, and gives a 10% chance of getting a Thaumium Nugget as a bonus. You can see two drawbacks to this : as it doubles your smelting yield, it takes twice the time to process an item. As it is a highly magical device, some mundane smelting recipes do not seem to work. You are confident that smelting cobblestone into stone will not work into this wonder-machine. emt.text.Etheral Processor=After tapping into hell's power with the Infernal Furnace to get some rewards out of your mining sessions, you have something totally different in mind. You are now using the power of the "Good", the sky and the so called "Paradise". This Ethereal Processor doubles the yield of every smelting recipe, and gives a 10% chance of getting a Thaumium Nugget as a bonus. You can see two drawbacks to this : as it doubles your smelting yield, it takes twice the time to process an item. As it is a highly magical device, some mundane smelting recipes do not seem to work. You are confident that smelting cobblestone into stone will not work into this wonder-machine.
emt.rsname.Water Infused Solar Panels=Water Infused Solar Panels emt.rsname.Water Infused Solar Panels=Water Infused Solar Panels
emt.tag.Water Infused Solar Panels=Curse you rain! emt.tag.Water Infused Solar Panels=Curse you rain!
@@ -367,7 +378,7 @@ emt.text.Earth Infused Solar Panels=You have decided to get closer to the core.
emt.rsname.UU-Matter Infusion=UU-Matter Infusion emt.rsname.UU-Matter Infusion=UU-Matter Infusion
emt.tag.UU-Matter Infusion=A magically charged metamorphic liquid... emt.tag.UU-Matter Infusion=A magically charged metamorphic liquid...
emt.text.UU-Matter Infusion=You have always found the powers possessed by UU-Mater very strange, even... magical looking, especially the ability to take a large number of shapes if manipulated correctly. And here you are, having discovered a way to shape the liquid through the process of Infusion Crafting. Many recipes are available, and all of them use between 4 to 32 of each primal aspect. emt.text.UU-Matter Infusion=You have always found the powers possessed by UU-Matter very strange, even... magical looking, especially the ability to take a large number of shapes if manipulated correctly. And here you are, having discovered a way to shape the liquid through the process of Infusion Crafting. Many recipes are available, and all of them use between 4 to 32 of each primal aspect.
emt.rsname.Portable Node=Portable Node emt.rsname.Portable Node=Portable Node
emt.tag.Portable Node=Randomly convenient emt.tag.Portable Node=Randomly convenient
@@ -379,31 +390,33 @@ emt.text.Electric Hoe of Growth=You have managed to upgrade your Hoe of Growth.
emt.rsname.Wand Focus: Charging=Wand Focus: Charging emt.rsname.Wand Focus: Charging=Wand Focus: Charging
emt.tag.Wand Focus: Charging=From vis to electricity emt.tag.Wand Focus: Charging=From vis to electricity
emt.text.Wand Focus: Charging=You realized you always carry a wand with you, along with your electric stuff. But sometimes, you have ran out of juice in your electric tools. That's why you created this wand focus. It is very simple, yet very useful, for it drains vis from your wand storage, and charges the items using mundane electricity. emt.text.Wand Focus: Charging=You realized you always carry a wand with you, along with your electric stuff. But sometimes, you have run out of juice in your electric tools. That's why you created this wand focus. It is very simple, yet very useful, for it drains vis from your wand storage, and charges the items using mundane electricity.
emt.rsname.Wand Focus: Wand Charging=Wand Focus: Wand Charging emt.rsname.Wand Focus: Wand Charging=Wand Focus: Wand Charging
emt.tag.Wand Focus: Wand Charging=From electricity to vis emt.tag.Wand Focus: Wand Charging=From electricity to vis
emt.text.Wand Focus: Wand Charging=You've discovered a way to take the benefits of the Industrial Recharge station and house them inside of a Charging Focus, reversing its polarity. Now it will drain electricity from your items in order to recharge your wand, albeit at a rather high cost. Furthermore, you have realized than you need a full set of Electric Armor to be able to start the wand charging process. emt.text.Wand Focus: Wand Charging=You've discovered a way to take the benefits of the Industrial Recharge station and house them inside of a Charging Focus, reversing its polarity. Now it will drain electricity from your items in order to recharge your wand, albeit at a rather high cost. Furthermore, you have realized that you need a full set of Electric Armor to be able to start the wand charging process.
emt.rsname.Inventory Charging Ring=Inventory Charging Ring emt.rsname.Inventory Charging Ring=Inventory Charging Ring
emt.tag.Inventory Charging Ring=Passive charger emt.tag.Inventory Charging Ring=Passive charger
emt.text.Inventory Charging Ring=While other thaumaturgists use rings to charge their runic shields, you feel that there are better applications for them. By fusing power sources into a mundane ring, you have learned how to funnel its charging effects into electric items in your inventory instead. It doesn't generate much at only 32 EU per tick, but that just means there's room for improvement. emt.text.Inventory Charging Ring=While other thaumaturgists use rings to charge their runic shields, you feel that there are better applications for them. By fusing power sources into a mundane ring, you have learned how to funnel its charging effects into electric items in your inventory instead. It doesn't generate much at only 32 EU per tick, but that just means there's room for improvement.
item.EMT.bauble.name=Armor Charging Ring
emt.rsname.Armor Charging Ring=Armor Charging Ring emt.rsname.Armor Charging Ring=Armor Charging Ring
emt.tag.Armor Charging Ring=Passive life-saver emt.tag.Armor Charging Ring=Passive life-saver
emt.text.Armor Charging Ring=You have found the low but constant recharge rate of your new ring to be more useful than anticipated, but it would be nice if it charged your armor when there wasn't a tool in need of power. By infusing a few more power sources and a piece of armor, you have found a way to have it do just that. Sadly, the new power sources do not increase the recharge rate, but progress is progress. emt.text.Armor Charging Ring=You have found the low but constant recharge rate of your new ring to be more useful than anticipated, but it would be nice if it charged your armor when there wasn't a tool in need of power. By infusing a few more power sources and a piece of armor, you have found a way to have it do just that. Sadly, the new power sources do not increase the recharge rate, but progress is progress.
item.EMT.item.bauble.name=The One Ring
emt.rsname.The One Ring=The One Ring emt.rsname.The One Ring=The One Ring
emt.tag.The One Ring=Forged inside the pit of the volcanic Mount Doom... emt.tag.The One Ring=Forged inside the pit of the volcanic Mount Doom...
emt.text.The One Ring=Three Rings for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne in the Land of Mordor where the Shadows lie. One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them in the Land of Mordor where the Shadows lie. -J.R.R. Tolkien's epigraph to The Lord of The Rings.<BR>You dream of being able to disappear from sight , therefore becoming invulnerable to any attack. You have heard that this Ring lays somewhere in ruins, unaltered by time... emt.text.The One Ring=Three Rings for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne in the Land of Mordor where the Shadows lie. One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them in the Land of Mordor where the Shadows lie. -J.R.R. Tolkien's epigraph to The Lord of The Rings.<BR>You dream of being able to disappear from sight, therefore becoming invulnerable to any attack. You have heard that this Ring lays somewhere in ruins, unaltered by time...
emt.rsname.Feather Wings=Feather Wings emt.rsname.Feather Wings=Feather Wings
emt.tag.Feather Wings=It only works in anime... emt.tag.Feather Wings=It only works in anime...
emt.text.Feather Wings=Duct-taping feathers to cardboard sheets, formed in the shape of wings sounded like a good idea. At least, you can thrust yourself in the air when the spacebar is hit. Not much, but it'll work. Using any wings underwater or during the rain sounds like a very bad idea. Included: fall damage reduction, 25%. emt.text.Feather Wings=Duct-taping feathers to cardboard sheets, formed in the shape of wings sounded like a good idea. At least, you can thrust yourself in the air when the spacebar is pressed. Not much, but it'll work. Using any wings underwater or during the rain sounds like a very bad idea. Included: fall damage reduction, 25%.
emt.rsname.Thaumium Reinforced Wings=Thaumium Reinforced Wings emt.rsname.Thaumium Reinforced Wings=Thaumium Reinforced Wings
emt.tag.Thaumium Reinforced Wings=Already much better emt.tag.Thaumium Reinforced Wings=Already much better
emt.text.Thaumium Reinforced Wings=The magic infusing Thaumium is well known. Therefore, reinforcing your cardboard wings with Thaumium sounded like a good idea. You can thrust yourself much higher on spacebar hit, and slow your fall down when spacebar is held. Sneak to go down at a steady pace. Included: fall damage reduction, 50%. emt.text.Thaumium Reinforced Wings=The magic infusing Thaumium is well known. Therefore, reinforcing your cardboard wings with Thaumium sounded like a good idea. You can thrust yourself much higher when spacebar is pressed, and slow your fall down when spacebar is held. Sneak to go down at a steady pace. Included: fall damage reduction, 50%.
emt.rsname.Nanosuit Wings=Nanosuit Wings emt.rsname.Nanosuit Wings=Nanosuit Wings
emt.tag.Nanosuit Wings=Nanotechnologies to the rescue! emt.tag.Nanosuit Wings=Nanotechnologies to the rescue!
@@ -415,8 +428,4 @@ emt.text.Quantum Wings=After exploring all the possibilities of nanotechnologies
emt.rsname.Infused Quantum Armor=Infused Quantum Сhestplate. emt.rsname.Infused Quantum Armor=Infused Quantum Сhestplate.
emt.tag.Infused Quantum Armor=The last step is here... emt.tag.Infused Quantum Armor=The last step is here...
emt.text.Infused Quantum Armor=You had been nothing to do and you decided to do something useful. You had an idea in your head of making armor which you can fasten the wings or backpack for being protected in flight. Take the wings or backpack in your hands and sit down to put their on armor. To remove them, hold Shift + "Unequip"(see in options). emt.text.Infused Quantum Armor=You had nothing to do and you decided to do something useful. You had an idea in your head of making armor which you can fasten the wings or backpack to protect yourself in flight. Take the wings or backpack in your hands and sit down to put them on the armor. To remove them, hold Shift + "Unequip"(see in options).
emt.rsname.ResearchCompleter=Automated Research
emt.tag.ResearchCompleter=No more ordo spam
emt.text.ResearchCompleter=It was fun at first, but you've decided it's time to find a better way to handle all this research. By mixing technology and magic you have come up with a multiblock that can complete a research note by itself.<BR><BR>To function, it needs nodes to be placed in the center of the structure and will slowly destroy them while running. Node stabilizers are optional but recommended for keeping so many nodes close together without them destroying each other.
+53 -9
View File
@@ -12,10 +12,10 @@ gui.EMT.inventory=Инвентарь
gui.EMT.book.aspect.output.eu.title=Книга выхода эссенции gui.EMT.book.aspect.output.eu.title=Книга выхода эссенции
gui.EMT.book.aspect.output.essentia.eu=Выход EU за эссенцию gui.EMT.book.aspect.output.essentia.eu=Выход EU за эссенцию
gui.EMT.key.unequip=Снять gui.EMT.key.unequip=Снять
emt.Output=Выход: emt.Output=Выход:
emt.Storage=Хранилище: emt.Storage=Хранилище:
emt.PressShift=<Нажмите SHIFT> emt.PressShift=<Нажмите SHIFT>
emt.Generating=Генерирует: emt.Generating=Генерирует:
emt.Fuel=горючее emt.Fuel=горючее
#=============Tooltips============= #=============Tooltips=============
@@ -99,8 +99,12 @@ item.EMT.focus.christmas.name=Набалдашник: Рождество
item.EMT.focus.shield.name=Набалдашник: Щит item.EMT.focus.shield.name=Набалдашник: Щит
item.EMT.focus.charge.name=Набалдашник: Зарядка item.EMT.focus.charge.name=Набалдашник: Зарядка
item.EMT.focus.chargeWand.name=Набалдашник: Зарядка жезла item.EMT.focus.chargeWand.name=Набалдашник: Зарядка жезла
item.EMT.focus.maintenance.name=Набалдашник: Обслуживание
item.EMT.focus.electricCloud.name=Электризованное облако item.EMT.focus.electricCloud.name=Электризованное облако
item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако
item.EMT.focus.EU.cost.info=EU за использование
item.EMT.focus.EU.cost.once= §r%s §eEU§0
item.EMT.focus.EU.cost.tick= §r%s §eEU/тик§0
#=============Block Names============= #=============Block Names=============
tile.EMT.electricCloud.name=Наэлектризованное облако tile.EMT.electricCloud.name=Наэлектризованное облако
@@ -118,31 +122,67 @@ tile.EMT.machine.essentiafiller.name=Эфирный наполнитель
tile.EMT.solar.compressed.name=Сжатая солнечная панель tile.EMT.solar.compressed.name=Сжатая солнечная панель
tile.EMT.solar.doublecompressed.name=Дважды сжатая солнечная панель tile.EMT.solar.doublecompressed.name=Дважды сжатая солнечная панель
tile.EMT.solar.triplecompressed.name=Трижды сжатая солнечная панель tile.EMT.solar.triplecompressed.name=Трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Solar.name=Четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Solar.name=Пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Solar.name=Шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Solar.name=Семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Solar.name=Восьмикратная сжатая солнечная панель
tile.EMT.solar.water.name=Наполненная водой, сжатая солнечная панель tile.EMT.solar.water.name=Наполненная водой, сжатая солнечная панель
tile.EMT.solar.doublewater.name=Наполненная водой, дважды сжатая солнечная панель tile.EMT.solar.doublewater.name=Наполненная водой, дважды сжатая солнечная панель
tile.EMT.solar.triplewater.name=Наполненная водой, трижды сжатая солнечная панель tile.EMT.solar.triplewater.name=Наполненная водой, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Aqua_Solar.name=Наполненная водой, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Aqua_Solar.name=Наполненная водой, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Aqua_Solar.name=Наполненная водой, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Aqua_Solar.name=Наполненная водой, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Aqua_Solar.name=Наполненная водой, восьмикратная сжатая солнечная панель
tile.EMT.solar.dark.name=Наполненная энтропией, сжатая солнечная панель tile.EMT.solar.dark.name=Наполненная энтропией, сжатая солнечная панель
tile.EMT.solar.doubledark.name=Наполненная энтропией, дважды сжатая солнечная панель tile.EMT.solar.doubledark.name=Наполненная энтропией, дважды сжатая солнечная панель
tile.EMT.solar.tripledark.name=Наполненная энтропией, трижды сжатая солнечная панель tile.EMT.solar.tripledark.name=Наполненная энтропией, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Perditio_Solar.name=Наполненная энтропией, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Perditio_Solar.name=Наполненная энтропией, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Perditio_Solar.name=Наполненная энтропией, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Perditio_Solar.name=Наполненная энтропией, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Perditio_Solar.name=Наполненная энтропией, восьмикратная сжатая солнечная панель
tile.EMT.solar.order.name=Наполненная порядком, сжатая солнечная панель tile.EMT.solar.order.name=Наполненная порядком, сжатая солнечная панель
tile.EMT.solar.doubleorder.name=Наполненная порядком, дважды сжатая солнечная панель tile.EMT.solar.doubleorder.name=Наполненная порядком, дважды сжатая солнечная панель
tile.EMT.solar.tripleorder.name=Наполненная порядком, трижды сжатая солнечная панель tile.EMT.solar.tripleorder.name=Наполненная порядком, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Ordo_Solar.name=Наполненная порядком, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Ordo_Solar.name=Наполненная порядком, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Ordo_Solar.name=Наполненная порядком, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Ordo_Solar.name=Наполненная порядком, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Ordo_Solar.name=Наполненная порядком, восьмикратная сжатая солнечная панель
tile.EMT.solar.fire.name=Наполненная огнём, сжатая солнечная панель tile.EMT.solar.fire.name=Наполненная огнём, сжатая солнечная панель
tile.EMT.solar.doublefire.name=Наполненная огнём, дважды сжатая солнечная панель tile.EMT.solar.doublefire.name=Наполненная огнём, дважды сжатая солнечная панель
tile.EMT.solar.triplefire.name=Наполненная огнём, трижды сжатая солнечная панель tile.EMT.solar.triplefire.name=Наполненная огнём, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Ignis_Solar.name=Наполненная огнём, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Ignis_Solar.name=Наполненная огнём, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Ignis_Solar.name=Наполненная огнём, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Ignis_Solar.name=Наполненная огнём, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Ignis_Solar.name=Наполненная огнём, восьмикратная сжатая солнечная панель
tile.EMT.solar.air.name=Наполненная воздухом, сжатая солнечная панель tile.EMT.solar.air.name=Наполненная воздухом, сжатая солнечная панель
tile.EMT.solar2.doubleair.name=Наполненная воздухом, дважды сжатая солнечная панель tile.EMT.solar.doubleair.name=Наполненная воздухом, дважды сжатая солнечная панель
tile.EMT.solar2.tripleair.name=Наполненная воздухом, трижды сжатая солнечная панель tile.EMT.solar.tripleair.name=Наполненная воздухом, трижды сжатая солнечная панель
tile.EMT.solar2.earth.name=Наполненная землёй, сжатая солнечная панель tile.EMT.Quadruple_Compressed_Aer_Solar.name=Наполненная воздухом, четырежды сжатая солнечная панель
tile.EMT.solar2.doubleearth.name=Наполненная землёй, дважды сжатая солнечная панель tile.EMT.Quintuple_Compressed_Aer_Solar.name=Наполненная воздухом, пятикратно сжатая солнечная панель
tile.EMT.solar2.tripleearth.name=Наполненная землёй, трижды сжатая солнечная панель tile.EMT.Sextuple_Compressed_Aer_Solar.name=Наполненная воздухом, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Aer_Solar.name=Наполненная воздухом, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Aer_Solar.name=Наполненная воздухом, восьмикратная сжатая солнечная панель
tile.EMT.solar.earth.name=Наполненная землёй, сжатая солнечная панель
tile.EMT.solar.doubleearth.name=Наполненная землёй, дважды сжатая солнечная панель
tile.EMT.solar.tripleearth.name=Наполненная землёй, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Terra_Solar.name=Наполненная землёй, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Terra_Solar.name=Наполненная землёй, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Terra_Solar.name=Наполненная землёй, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Terra_Solar.name=Наполненная землёй, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Terra_Solar.name=Наполненная землёй, восьмикратная сжатая солнечная панель
#=============Thaumonomicon============= #=============Thaumonomicon=============
emt.rsname.Electric Magic Tools=Electric Magic Tools emt.rsname.Electric Magic Tools=Electric Magic Tools
emt.tag.Electric Magic Tools=Кто сказал что магия и технология не дружат вместе? emt.tag.Electric Magic Tools=Кто сказал что магия и технология не дружат вместе?
emt.text.Electric Magic Tools=Кто сказал, что магия не может дружить с технологией? Наши исследователи сотрудничали с лучшими магами школы тауматургов, чтобы приподнести Вам эффективность магии, в сочетании с удобством электроинструментов. emt.text.Electric Magic Tools=Кто сказал, что магия не может дружить с технологией? Наши исследователи сотрудничали с лучшими магами школы тауматургов, чтобы приподнести Вам эффективность магии, в сочетании с удобством электроинструментов.
emt.rsname.Energy Ball Focus=Набалдашник: энерго-шар emt.rsname.Energy Ball Focus=Набалдашник: Наэлектризованное облако
emt.tag.Energy Ball Focus=Не игрушка emt.tag.Energy Ball Focus=Не игрушка
emt.text.Energy Ball Focus=Для использования этого наболдашника необходимо надеть аккумуляторный ранец или нано/квантовую кирасу. Для создания одного шара необходимо 5120EU. Крайне не рекомендуется использовать в замкнутом пространстве! emt.text.Energy Ball Focus=Для использования этого наболдашника необходимо надеть аккумуляторный ранец или нано/квантовую кирасу. Для создания одного шара необходимо 5120EU. Крайне не рекомендуется использовать в замкнутом пространстве!
@@ -195,6 +235,10 @@ emt.rsname.Shield Focus=Набалдашник: Щит
emt.tag.Shield Focus=З.А.Щ.И.Т.А. emt.tag.Shield Focus=З.А.Щ.И.Т.А.
emt.text.Shield Focus=После некоторых экспериментов с червоточиной, Вы узнали больше о транспортировке объектов в альтернативные измерения. Вы верите, что Вы сможете обратить эти эффекты, чтобы призвать ряд блоков из измерения, сделанного из материи, которые будут защищать Вас от любой беды. Будьте внимательны, используя этот набалдашник, так как когда эти блоки появятся в нашем измерении, они будут переносить любые встречные блоки в своё измерение, которые никогда не вернуться. Вы также не сможете двигаться, во время существования этого щита. emt.text.Shield Focus=После некоторых экспериментов с червоточиной, Вы узнали больше о транспортировке объектов в альтернативные измерения. Вы верите, что Вы сможете обратить эти эффекты, чтобы призвать ряд блоков из измерения, сделанного из материи, которые будут защищать Вас от любой беды. Будьте внимательны, используя этот набалдашник, так как когда эти блоки появятся в нашем измерении, они будут переносить любые встречные блоки в своё измерение, которые никогда не вернуться. Вы также не сможете двигаться, во время существования этого щита.
emt.rsname.Wand Focus: Maintenance=Таумическое обслуживание
emt.tag.Wand Focus: Maintenance=Кому нужен ящик с инструментами, когда у вас есть магия?
emt.text.Wand Focus: Maintenance=После интенсивного изучения предположительно механической природы вашего аппарата вы, наконец, сделали это, вы обнаружили метод, позволяющий использовать Вис в ремонте. <BR> Что представляют собой несколько взорванных чистых помещений на фоне явного прогресса? Теперь вы можете избавиться от этих подлых обыденных инструментов...
emt.rsname.Potentia Generator=Potentia генератор emt.rsname.Potentia Generator=Potentia генератор
emt.tag.Potentia Generator=Освоение производящего потенциала эссенции emt.tag.Potentia Generator=Освоение производящего потенциала эссенции
emt.text.Potentia Generator=После долгих изучений и исследований, Вы, наконец-то, узнали как получить электричество от остатков эссенции.<BR><BR>Просто поместите банку, содержащую Potentia, в радиусе 8 блоков от механизма и она заставит его вырабатывать EU.<BR><BR>Хотя Potentia кажется наиболее логичным выбором для производства EU с помощью эссенции, Вы уверены, что Вы сможете производить электричество из различных эссенций в ближайшем будущем. emt.text.Potentia Generator=После долгих изучений и исследований, Вы, наконец-то, узнали как получить электричество от остатков эссенции.<BR><BR>Просто поместите банку, содержащую Potentia, в радиусе 8 блоков от механизма и она заставит его вырабатывать EU.<BR><BR>Хотя Potentia кажется наиболее логичным выбором для производства EU с помощью эссенции, Вы уверены, что Вы сможете производить электричество из различных эссенций в ближайшем будущем.
@@ -102,6 +102,9 @@ item.EMT.focus.charge.name=法杖核心:充电
item.EMT.focus.chargeWand.name=法杖核心:化魔 item.EMT.focus.chargeWand.name=法杖核心:化魔
item.EMT.focus.electricCloud.name=雷云之光 item.EMT.focus.electricCloud.name=雷云之光
item.EMT.focus.energyBall.name=法杖核心:能量球 item.EMT.focus.energyBall.name=法杖核心:能量球
item.EMT.focus.EU.cost.info=EU/每次施法
item.EMT.focus.EU.cost.once= §r%s §eEU§0
item.EMT.focus.EU.cost.tick= §r%s §eEU/t§0
#=============Block Names============= #=============Block Names=============
tile.EMT.electricCloud.name=雷云之光 tile.EMT.electricCloud.name=雷云之光
@@ -157,16 +160,16 @@ tile.EMT.Sextuple_Compressed_Ignis_Solar.name=火注魔太阳能(6级)
tile.EMT.Septuple_Compressed_Ignis_Solar.name=火注魔太阳能(7级) tile.EMT.Septuple_Compressed_Ignis_Solar.name=火注魔太阳能(7级)
tile.EMT.Octuple_Compressed_Ignis_Solar.name=火注魔太阳能(8级) tile.EMT.Octuple_Compressed_Ignis_Solar.name=火注魔太阳能(8级)
tile.EMT.solar.air.name=风注魔太阳能(1级) tile.EMT.solar.air.name=风注魔太阳能(1级)
tile.EMT.solar2.doubleair.name=风注魔太阳能(2级) tile.EMT.solar.doubleair.name=风注魔太阳能(2级)
tile.EMT.solar2.tripleair.name=风注魔太阳能(3级) tile.EMT.solar.tripleair.name=风注魔太阳能(3级)
tile.EMT.Quadruple_Compressed_Aer_Solar.name=风注魔太阳能(4级) tile.EMT.Quadruple_Compressed_Aer_Solar.name=风注魔太阳能(4级)
tile.EMT.Quintuple_Compressed_Aer_Solar.name=风注魔太阳能(5级) tile.EMT.Quintuple_Compressed_Aer_Solar.name=风注魔太阳能(5级)
tile.EMT.Sextuple_Compressed_Aer_Solar.name=风注魔太阳能(6级) tile.EMT.Sextuple_Compressed_Aer_Solar.name=风注魔太阳能(6级)
tile.EMT.Septuple_Compressed_Aer_Solar.name=风注魔太阳能(7级) tile.EMT.Septuple_Compressed_Aer_Solar.name=风注魔太阳能(7级)
tile.EMT.Octuple_Compressed_Aer_Solar.name=风注魔太阳能(8级) tile.EMT.Octuple_Compressed_Aer_Solar.name=风注魔太阳能(8级)
tile.EMT.solar2.earth.name=地注魔太阳能(1级) tile.EMT.solar.earth.name=地注魔太阳能(1级)
tile.EMT.solar2.doubleearth.name=地注魔太阳能(2级) tile.EMT.solar.doubleearth.name=地注魔太阳能(2级)
tile.EMT.solar2.tripleearth.name=地注魔太阳能(3级) tile.EMT.solar.tripleearth.name=地注魔太阳能(3级)
tile.EMT.Quadruple_Compressed_Terra_Solar.name=地注魔太阳能(4级) tile.EMT.Quadruple_Compressed_Terra_Solar.name=地注魔太阳能(4级)
tile.EMT.Quintuple_Compressed_Terra_Solar.name=地注魔太阳能(5级) tile.EMT.Quintuple_Compressed_Terra_Solar.name=地注魔太阳能(5级)
tile.EMT.Sextuple_Compressed_Terra_Solar.name=地注魔太阳能(6级) tile.EMT.Sextuple_Compressed_Terra_Solar.name=地注魔太阳能(6级)
@@ -406,7 +409,3 @@ emt.text.Quantum Wings=在探索完纳米科技所有的可能性后,你决定
emt.rsname.Infused Quantum Armor=注魔量子胸甲 emt.rsname.Infused Quantum Armor=注魔量子胸甲
emt.tag.Infused Quantum Armor=最后的一步... emt.tag.Infused Quantum Armor=最后的一步...
emt.text.Infused Quantum Armor=你已经无事可做,但是你决定做一些有用的东西.你的脑海中浮现出一个想法,在制作盔甲时可以把羽翼或者背包系在一起以保证飞行的安全.持有羽翼或者背包时在潜行状态下右击可以将它们系在盔甲上.要将它们拿下来时只需要按住Shift + [卸下装备]键(详见[选项]-[控制]). emt.text.Infused Quantum Armor=你已经无事可做,但是你决定做一些有用的东西.你的脑海中浮现出一个想法,在制作盔甲时可以把羽翼或者背包系在一起以保证飞行的安全.持有羽翼或者背包时在潜行状态下右击可以将它们系在盔甲上.要将它们拿下来时只需要按住Shift + [卸下装备]键(详见[选项]-[控制]).
emt.rsname.ResearchCompleter=自动化研究
emt.tag.ResearchCompleter=再也不用担心秩序危机了
emt.text.ResearchCompleter=连连看一开始很有趣,但你已经决定寻找一种更好的方法解决所有的研究.最终,你结合科技与魔法,制造出了一台多方块机器,可以自动完成研究笔记.<BR><BR>需要将灵气节点放在机器内部才能使其正常运行,而且在运行过程中,机器会缓慢摧毁这些节点.节点稳定器不是必须品,但为了让这么多节点不互相打架,我们还是推荐使用节点稳定器.
+34
View File
@@ -0,0 +1,34 @@
{
"maintenance.MaintenanceWandFocus": {
"category": "block",
"sounds": [
{
"name": "MaintenanceWandFocus",
"stream": false,
"licensing": {
"author_name": "Kynake",
"license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
"license_name": "Attribution-ShareAlike 4.0",
"original_sound_urls": [
"https://freesound.org/people/tgerginov/sounds/671175/",
"https://opengameart.org/content/68-workshop-sounds"
],
"original_sound_names": [
"671175__tgerginov__magic.wav",
"workshop - ratchet2.wav"
],
"original_author_urls": [
"https://freesound.org/people/tgerginov/",
"https://opengameart.org/users/bart"
],
"original_author_names": [
"tgerginov",
"bart"
],
"original_license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
"original_license_name": "CC0 1.0 Universal"
}
}
]
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 173 B

Loaded 100 of 279 files, more files were not shown because too many files have changed in this diff. Show more