Compare commits

...

131 Commits

Author SHA1 Message Date
Boblet
6bb6b5426c the ground trembles with my every step 2026-01-23 14:53:39 +01:00
Boblet
492703ab23 amogus 2026-01-23 14:50:29 +01:00
Bob
b4d0122cfc monty python's horrible world of gravity 2026-01-22 21:48:48 +01:00
Boblet
f809843745 calliou is impaled on an asbestos stalagmite and dies 2026-01-22 15:38:17 +01:00
Boblet
6401ffde19 now kiss 2026-01-21 16:27:35 +01:00
Boblet
1aba934d36 e 2026-01-21 13:12:32 +01:00
Boblet
69c1ed01fa the glunch lunch 2026-01-21 13:11:28 +01:00
Boblet
e776b4c8d9 the gloach 2026-01-20 16:56:00 +01:00
HbmMods
6fa00c5771
Merge pull request #2643 from Bufka2011/master
Enhance CI workflow with version update logic
2026-01-20 11:06:19 +01:00
HbmMods
69c1f49f55
Merge pull request #2661 from Voxelstice/oc-comp-fix
OC connection with multiblocks bug fix
2026-01-20 10:33:15 +01:00
HbmMods
ade48e4ac7
Merge pull request #2656 from RayzerHan/master
Update ru_RU lang again
2026-01-20 10:32:18 +01:00
Bob
6c1fd10a50 plushby 2026-01-19 21:23:57 +01:00
Raaaaaaaaaay
a2fd0ea108
ok 2026-01-19 13:50:22 +02:00
Raaaaaaaaaay
33a4b983e5
Компонзит 2026-01-19 13:42:34 +02:00
Raaaaaaaaaay
0d431e387b
ммм 2026-01-19 13:37:10 +02:00
Raaaaaaaaaay
f0a1eaaaff
фикс 2026-01-19 13:36:01 +02:00
Raaaaaaaaaay
165fd062f4
ням 2026-01-18 20:07:30 +02:00
Voxelstice
7b18634b34 here's hoping this doesnt break anything else
OC connection with multiblocks bug fix
2026-01-17 10:42:19 +03:00
Raaaaaaaaaay
99ca4628dc
Kyiv 2026-01-15 21:29:53 +02:00
Raaaaaaaaaay
b892f0cc37
Merge branch 'HbmMods:master' into master 2026-01-15 17:58:02 +02:00
Boblet
7664cacd2f double barrel shaboing hot dog
(frot dog)
2026-01-14 15:54:59 +01:00
Raaaaaaaaaay
e96e821146
next door two 2026-01-14 09:18:38 +02:00
Raaaaaaaaaay
e02e4f6aae
next door 2026-01-14 09:15:59 +02:00
Raaaaaaaaaay
c1464f2881
Update 2026-01-14 02:01:10 +02:00
Raaaaaaaaaay
91dd4cc218
Sometimes I think the wind blows well, but the robot is a slut 2026-01-13 18:56:03 +02:00
Raaaaaaaaaay
6cadca0d89
People are idiots, and that's a fact. 2026-01-13 18:53:52 +02:00
HbmMods
5c9d71c626
Merge pull request #2649 from RayzerHan/master
Update RU_ru lang
2026-01-13 15:14:17 +01:00
Raaaaaaaaaay
bd03028170
фак 2026-01-13 16:06:08 +02:00
HbmMods
67aee6a2e0
Merge pull request #2648 from Vaern/muzzle-flashes
Visible third-person muzzle flashes from other players +self, skeleguns
2026-01-13 15:04:52 +01:00
Vaern
223fe240c1 remove redundant TODO 2026-01-12 23:55:29 -08:00
Vaern
5cb013d545 extended timeout duration
the highest duration for muzzle flashes is 150?, not under 100, so let's be safe
2026-01-12 23:39:50 -08:00
Vaern
82293e46cd copypaste hell
fixed tick issues in eventHandler, added packets to orchestra + third person rendering for every gun with built-in muzzle/laser flashes, and softened playAnimation so skeleguns use orchestra/muzzle flashes. akimbos show both firing, probably won't be changed
2026-01-12 23:33:05 -08:00
Raaaaaaaaaay
2e7af7058c
Merge branch 'HbmMods:master' into master 2026-01-12 19:58:03 +02:00
Raaaaaaaaaay
cc816b40e0
Очень познавательно, милая пони 2026-01-12 19:55:17 +02:00
Boblet
64fc72e18a margret thatcher is dead 2026-01-12 16:45:09 +01:00
Boblet
76c6222f45 post merge cleanup 2026-01-12 10:30:50 +01:00
HbmMods
2f8b0dde49
Merge pull request #2607 from WolfEclipses/METADATA
Rad Absorbers Metadata (Done now)
2026-01-12 10:19:08 +01:00
Vaern
712ae952df we ain't even done wit this we #KillingOurselves
superficial dedicated + integrated server testing worked. ran into a weird race condition on the former, though, but i doubt that's from anythng here
2026-01-11 18:17:36 -08:00
Bob
b2df165b4b the spingus 2026-01-11 22:24:04 +01:00
Wolf
90e148e022 I think I finally fixed this shit 2026-01-11 16:18:37 -05:00
WolfEclipses
52440fca2f
Merge branch 'HbmMods:master' into METADATA 2026-01-11 15:58:45 -05:00
Wolf
292b989e09 Testing??? 2026-01-11 15:56:24 -05:00
Raaaaaaaaaay
b0e0b54def
бля 2026-01-11 22:28:00 +02:00
HbmMods
51b758e103
Merge pull request #2645 from RayzerHan/master
update RU_ru lang
2026-01-11 21:00:24 +01:00
Raaaaaaaaaay
d25cef888d
Merge branch 'HbmMods:master' into master 2026-01-11 21:51:52 +02:00
Raaaaaaaaaay
62ce75f458
battery 2026-01-11 21:45:35 +02:00
Bufka2011
c146829bf4
Merge branch 'HbmMods:master' into master 2026-01-11 12:24:43 -07:00
Bufka2011
b60cf07e98
Enhance CI workflow with version update logic
Added steps to calculate days since 10/10/10 and update version files accordingly.
2026-01-11 12:24:11 -07:00
HbmMods
0e30985963
Merge pull request #2639 from ranch21/calc
calculator history
2026-01-11 20:23:09 +01:00
HbmMods
a491b16dfe
Merge pull request #2641 from sunryze-git/improved-pneumatics
improved pneumatics throughput
2026-01-11 20:22:26 +01:00
Bob
026c0d074e mirror fix 2026-01-11 20:21:02 +01:00
sunryze-git
6cc60c0234 pneumatic throughput now doesnt suck cuz we dont give up instantly 2026-01-11 14:17:00 -05:00
WolfEclipses
1f17af27f7
Merge branch 'master' into METADATA 2026-01-11 13:32:05 -05:00
HbmMods
8aa9ff2895
Merge pull request #2630 from Voxelstice/oc-bat-rework
OC compat for new batteries
2026-01-11 19:20:28 +01:00
HbmMods
5c0ff2b603
Merge branch 'master' into oc-bat-rework 2026-01-11 19:20:18 +01:00
HbmMods
3c461313bc
Merge pull request #2636 from RayzerHan/master
update RU_ru lang
2026-01-11 19:18:39 +01:00
Bob
71fb9a814d he rotates 2026-01-11 19:14:08 +01:00
ranch
27e4cd32aa gui design is my passion 2026-01-10 17:38:05 -06:00
Bob
8bdce3a4b3 been thinking about that yaoi 2026-01-10 21:31:09 +01:00
Bob
4bfce2ba92 Auto stash before merge of "master" and "origin/master" 2026-01-10 14:39:59 +01:00
WolfEclipses
5ec68643f8
Merge branch 'master' into METADATA 2026-01-09 20:52:29 -05:00
Voxelstice
65ea177ac0 consider not forgetting. thanks.
priority is outputted correctly now
2026-01-09 23:05:21 +03:00
Voxelstice
be93b9cc8c waiter! waiter! more lead acid batteries please!
adds OC compat to new battery blocks
2026-01-09 23:01:38 +03:00
Raaaaaaaaaay
439d5e52b8
электромассивы 2026-01-09 16:43:32 +02:00
Raaaaaaaaaay
72500ed749
термоядерный термоядерный 2026-01-09 16:28:44 +02:00
Boblet
f17556a0d6 fentanyl 2026-01-09 14:55:58 +01:00
HbmMods
6a732fadde
Merge pull request #2624 from ranch21/better-bars
Better electric FSB hud bars
2026-01-09 10:07:07 +01:00
HbmMods
bcb2f1a198
Merge pull request #2625 from MellowArpeggiation/msu-ui
in world UI for mass storage units
2026-01-09 10:06:37 +01:00
Boblet
79351bbd0a do you come from a vegetmite sandwich? 2026-01-09 10:05:56 +01:00
George Paton
a6087b4bef vanilla slimes also leak state who'da'fucken'thunk it 2026-01-09 14:48:52 +11:00
George Paton
9f26d04f7a buzzer beater functionality: render 3D items with fancy graphics enabled! 2026-01-09 14:08:07 +11:00
Boblet
84326bedb4 bals 2026-01-08 17:43:07 +01:00
George Paton
a0a7e000d4 drop correct meta on breaking 2026-01-08 22:26:26 +11:00
George Paton
b5b4a537c5 what the fuck is this baby doing mixed in with my bathwater 2026-01-08 22:17:25 +11:00
George Paton
7757e3cb53 add a fill progress bar 2026-01-08 22:07:21 +11:00
George Paton
b77633b152 draw the rest of the owl 2026-01-08 21:01:57 +11:00
Boblet
9ef7668702 FUCK 2026-01-08 08:52:22 +01:00
ranch
4998cd13c2 we do a little cleanup 2026-01-08 01:19:32 -06:00
ranch
1aaf568338 better electric FSB hud 2026-01-08 01:01:27 -06:00
George Paton
18a4d7a25a basic rendering of items inside MSUs (on the north face only atm) complete 2026-01-08 15:32:12 +11:00
Boblet
2b9d43891a dance the safety dance 2026-01-07 16:44:15 +01:00
HbmMods
0197ee79a7
Merge pull request #2617 from RayzerHan/master
update RU_ru lang
2026-01-07 10:52:59 +01:00
HbmMods
6297bbd6a8
Merge pull request #2618 from NarekoMichigami810/master
zh_CN update
2026-01-07 10:51:45 +01:00
道神 馴子
ad9130079e
Rape my brain 2026-01-07 17:41:15 +08:00
道神 馴子
7a39fd778f
i cum on my face 2026-01-07 17:28:48 +08:00
道神 馴子
ee0149c133
姗姗来迟 2026-01-07 16:34:31 +08:00
Raaaaaaaaaay
ee643f4407
Merge branch 'HbmMods:master' into master 2026-01-06 22:26:01 +02:00
Raaaaaaaaaay
218ad3e59e
кумавы 2026-01-06 22:24:38 +02:00
Bob
4032cc277a he thicc 2026-01-06 21:21:06 +01:00
Raaaaaaaaaay
4b4868e102
kimi 2026-01-06 22:17:28 +02:00
Raaaaaaaaaay
83d4505021
и танцевала рыбка с раком 2026-01-06 21:00:40 +02:00
Raaaaaaaaaay
0e063bbd72
up up up 2026-01-06 20:50:33 +02:00
Raaaaaaaaaay
29960cdc0a
Merge branch 'HbmMods:master' into master 2026-01-06 20:42:21 +02:00
HbmMods
d718b58269
Merge pull request #2605 from Toshayo/master
Fluid valve with counter for simpler automation
2026-01-06 19:38:13 +01:00
HbmMods
6141d1d24e
Merge branch 'master' into master 2026-01-06 19:38:02 +01:00
Bob
8619c8e67d he big 2026-01-06 19:35:39 +01:00
Raaaaaaaaaay
9c89902e56
aoh 2026-01-04 21:12:53 +02:00
Bob
b20d5f46b2 more caching because sure 2026-01-03 12:22:56 +01:00
WolfEclipses
52ae974f51
Merge branch 'master' into METADATA 2026-01-02 20:13:04 -05:00
Bob
a7afacfaf2 flavor town 2026-01-02 11:20:15 +01:00
Wolf
f089578ba7 Got rid of functionality for legacy rad absorber 2026-01-01 19:55:49 -05:00
Wolf
1e4346a54b Fixed redundant functions (there were more than I thought) xd 2026-01-01 19:40:37 -05:00
WolfEclipses
a1b83b4a67
Merge branch 'master' into METADATA 2026-01-01 18:38:27 -05:00
Raaaaaaaaaay
4e7bbda689
ня 2026-01-01 17:59:35 +02:00
HbmMods
539225cf78
Merge pull request #2608 from WolfEclipses/WATER
Infinite Water tank Recipe
2026-01-01 14:56:07 +01:00
HbmMods
195cf193c7
Merge pull request #2613 from WolfEclipses/OilQMAW
QMAW Page for crude oil
2026-01-01 14:55:47 +01:00
HbmMods
fd348a40e7
Merge pull request #2614 from PewPewCricket/master
Update PWR OpenComputers Compat
2026-01-01 14:54:26 +01:00
HbmMods
6964b4ec9d
Merge pull request #2606 from Goaty1208/master
mhmhmgmg pizza
2026-01-01 14:52:39 +01:00
PewPewCricket
1418a9be87
Merge branch 'HbmMods:master' into master 2025-12-31 19:30:45 -06:00
Bob
f87b37d7e3 well, too bad 2025-12-31 15:38:24 +01:00
PewPewCricket
871de4ae47 fix PWRangler crashing with PWRs using heat sinks 2025-12-30 18:40:08 -06:00
PewPewCricket
89b1cb1de0 allow reading core heat capacity using OC with PWRs. 2025-12-30 17:50:38 -06:00
Wolf
5dc1ee440b Forgot to account for all processing methods, need to expand in their own pages 2025-12-29 19:33:08 -05:00
Wolf
e52f70b340 QMAW Page for crude oil 2025-12-29 19:09:44 -05:00
Goaty1208
e629802bcb Cruciblelicious 2025-12-28 11:42:38 +01:00
Wolf
59bccc9be3 Why am I being asked for this so often 2025-12-27 18:46:01 -05:00
Wolf
838bcb8faa Had them swapped up somehow xd 2025-12-27 18:18:48 -05:00
Goaty1208
5100384e18 mhmhmgmg pizza
Fixed translations
2025-12-27 23:40:46 +01:00
Wolf
a8b046f46b Bringing up to date because yeah 2025-12-27 17:19:45 -05:00
WolfEclipses
6b87447ca1
Merge branch 'master' into METADATA 2025-12-27 14:01:57 -05:00
Toshayo
e601e79ad3
Updated changelog 2025-12-26 15:05:47 +01:00
Toshayo
a944c28dd4
Added fluid valve with counter 2025-12-26 14:14:20 +01:00
Bob
de2a11389c i like eating lead-sulfur batteries 2025-12-23 20:51:55 +01:00
Raaaaaaaaaay
b88d6f6cd3
aoh 2025-12-20 15:48:05 +02:00
Boblet
ef2b20d357 succumb 2025-12-17 14:55:50 +01:00
Boblet
f82a606b66 shit yourself 2025-12-16 16:16:19 +01:00
Boblet
c639be1429 67 mango mustard kendrick still water dubai labubu chocolate tralalero
please someone euthanize me
2025-12-16 15:22:51 +01:00
WolfEclipses
bce98561d3 Added back old ones, changed lang to OLD for them 2025-12-09 08:31:52 -05:00
WolfEclipses
003afa4071 Forgot to remove this from making the name work xd 2025-12-09 07:46:27 -05:00
WolfEclipses
7f963bdb6f I FORGOT TO ACCOUNT FOR OTHER LANGUAGES T_T 2025-12-08 22:44:49 -05:00
WolfEclipses
96298a5c31 I think this works :P we will find out that Im an
idiot in like 30seconds
2025-12-08 22:20:07 -05:00
345 changed files with 21480 additions and 15137 deletions

View File

@ -7,6 +7,7 @@
# Yes this is a mostly untouched Github actions template
name: Java CI with Gradle
on:
@ -16,19 +17,36 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin' # Temurin because it's default :P
# Calculate days since 10/10/10
- name: Calculate days since 10/10/10
id: calculate_days
run: |
start_date="2010-10-10"
current_date=$(date +%Y-%m-%d)
days_since=$(( ($(date -d "$current_date" +%s) - $(date -d "$start_date" +%s)) / 86400 ))
echo "days=$days_since" >> $GITHUB_OUTPUT
# Update version files with proper sed syntax
- name: Update version files
run: |
days=${{ steps.calculate_days.outputs.days }}
# Use proper sed syntax for Linux runners
sed -i "s/public static final String VERSION = \".*\";/public static final String VERSION = \"1.0.27 BETA ($days)\";/" src/main/java/com/hbm/lib/RefStrings.java
sed -i "s/mod_build_number=.*/mod_build_number=$days/" gradle.properties
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
@ -42,5 +60,3 @@ jobs:
with:
# A file, directory or wildcard pattern that describes what to upload
path: ./build/libs

View File

@ -6,6 +6,7 @@ import java.nio.file.StandardCopyOption
buildscript {
repositories {
maven { url = 'https://maven.ntmr.dev/proxy/' }
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = 'https://plugins.gradle.org/m2' }
mavenCentral()
@ -67,6 +68,10 @@ eclipse.classpath.file.whenMerged { cp ->
}
repositories {
maven {
name = 'Blerg'
url = 'https://maven.ntmr.dev/proxy/'
}
maven {
name = 'ModMaven'
url = 'https://modmaven.dev'

View File

@ -1,10 +1,27 @@
## Changed
* Updated russian localization
* Changed the recipe change button on the mixer to be bright red with arrows on it (since the "C" looked too much like it meant "clear")
* The refinery and the vacuum refinery now have working recipe configs
* Recipe autogen for foundry casting now deprioritizes fragments, preventing them from being casted when nuggets of that material are available
* Rad absorbers now use metadata, existing blocks will be converted automatically
* Fissure bombs that go off in crater biomes now create fissures with metadata 1 which creates radioactive volcanic lava
* If a crater biome is created on top of an existing fissure, it will keep producing normal volcanic lava
* Simplified the battery socket's client packets, reducing CPU load
* Muzzle flashes on guns now work in third person mode, including on other players and on NPCs, making it more apparent when you're being fired at
* This includes non-standard special effects like the .44 gap flash and the .35-800 ejector plume
* Removed the old unused satelite deco blocks, freeing up 6 block IDs
* Crucibles that smelt metal with no template set will no place the metal in the recipe stack instead of the waste stack, this should make it easier to get a recipe to work in the many, many cases where people add the template after smelting the material
* Battery sockets and the FENSU now support the copy tool
* Removed unused displaylist support from the model loader
* DLs have been long phased out in favor of VBOs anyway
* Rebranded canned horse slime
* Now with extra bone marrow
* Updated the deuterium tower's model
* Increased the energy requirement for welding osmiridium
## Fixed
* Fixed atomic clock precision assembler recipe not working
* Fixed ICF parts using 528 mode templates in normal mode
* Fixed arc furnace queue slots inserting too many items, causing the output to exceed max stack size
# Fixed
* Potentially fixed yet another issue regarding crates
* Fixed battery socket `fillpercent` RoR function always assuming a max power of 1
* Fixed issue where multiblock ports would generate many OpenComputers component entries
* Fixed RBMK automatic control rods having incorrect settings when using the copy tool
* Fixed battery sockets producing junk debug data in the logs
* Fixed an issue where the charging station would crash when trying to charge certain items
* Fixed the DFC's core component not dropping its contents when mined
* Fixed audio problems with guns

View File

@ -1,15 +1,15 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5545
mod_build_number=5572
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\
\ grangerave (explosion algorithms),\
\ Hoboy (textures, models),\
\ Drillgon200 (effects, models, porting),\
\ Drillgon200 (effects, models),\
\ MartinTheDragon (calculator, chunk-based fallout, bendable cranes, pipe improvements, PWR sounds),\
\ Alcater (GUI textures, porting),\
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, conveyor wand, NBT structures),\
\ Alcater (GUI textures),\
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, conveyor wand, NBT structures, MSU displays),\
\ Pheo (textures, various machines, models, weapons),\
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron, weapon animations),\
\ UFFR (RTG pellets, guns, casings, euphemium capacitor, nucleartech.wiki),\
@ -22,6 +22,7 @@ credits=HbMinecraft,\
\ Doctor17 (russian localization)),\
\ Pashtet (russian localization),\
\ 7H40 (russian localization),\
\ RayzerHan (russian localization),\
\ Bismarck (chinese localization),\
\ Creeper-banner (chinese localization),\
\ 5467864 (chinese localization),\
@ -34,8 +35,10 @@ credits=HbMinecraft,\
\ Herobrine 457985 (chinese localization),\
\ xxwinhere (chinese localization),\
\ Nycticoraxnightheron (chinese localization),\
\ NarekoMichigami810 (chinese localization),\
\ Maksymisio (polish localization)\
\ el3ctro4ndre (italian localization),\
\ Goaty1208 (italian localization),\
\ Pu-238 (Tom impact effects),\
\ Frooz (gun models),\
\ VT-6/24 (models, textures),\
@ -55,18 +58,22 @@ credits=HbMinecraft,\
\ Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration, turbine spinup),\
\ BallOfEnergy1 (OpenComputers integration, RBMK and packet optimization, crate backpacks),\
\ PewPewCricket (OpenComputers integration),\
\ kelllllen (OpenComputers integration),\
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
\ Abel1502 (abilities GUI, optimization, crate upgrade recipes, strand caster improvements, varous tweaks),\
\ Darek505 (armor rendering compatibility fix),\
\ ranch21 (improved HUD gauges),\
\ SuperCraftAlex (tooltips)\
\ Ice-Arrow (research reactor tweaks),\
\ 245tt (anvil GUI improvements),\
\ KoblizekXD (doors),\
\ FOlkvangrField (custom machine parts),\
\ RosaTryp (centrifuge config),\
\ Toshayo (satellite loot system, project settings, gradle curse task, OpenComputers integration),\
\ Toshayo (satellite loot system, project settings, gradle curse task, OpenComputers integration, fluid counter valve),\
\ Dash (PA particle serialization fix),\
\ archiecarrot123 (armor rendering compatibility fix),\
\ mikkerlo (mining laser & builder's jetpack improvements),\
\ icomet (refactoring),\
\ martemen (project settings),\
\ OvermindDL1 (project settings),\

View File

@ -3,6 +3,7 @@ package api.hbm.block;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@Deprecated
public interface IDrillInteraction {
/**

View File

@ -1,5 +1,6 @@
package api.hbm.block;
@Deprecated
public interface IMiningDrill {
/**

View File

@ -11,8 +11,8 @@ public interface IBatteryItem {
public void dischargeBattery(ItemStack stack, long i);
public long getCharge(ItemStack stack);
public long getMaxCharge(ItemStack stack);
public long getChargeRate();
public long getDischargeRate();
public long getChargeRate(ItemStack stack);
public long getDischargeRate(ItemStack stack);
/** Returns a string for the NBT tag name of the long storing power */
public default String getChargeTagName() {

View File

@ -2,7 +2,6 @@ package api.hbm.energymk2;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.util.Compat;
import api.hbm.energymk2.Nodespace.PowerNode;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -25,7 +24,7 @@ public interface IEnergyProviderMK2 extends IEnergyHandlerMK2 {
public default void tryProvide(World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IEnergyConductorMK2) {
@ -43,7 +42,7 @@ public interface IEnergyProviderMK2 extends IEnergyHandlerMK2 {
if(te instanceof IEnergyReceiverMK2 && te != this) {
IEnergyReceiverMK2 rec = (IEnergyReceiverMK2) te;
if(rec.canConnect(dir.getOpposite())) {
if(rec.canConnect(dir.getOpposite()) && rec.allowDirectProvision()) {
long provides = Math.min(this.getPower(), this.getProviderSpeed());
long receives = Math.min(rec.getMaxPower() - rec.getPower(), rec.getReceiverSpeed());
long toTransfer = Math.min(provides, receives);

View File

@ -3,7 +3,6 @@ package api.hbm.energymk2;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.interfaces.NotableComments;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.Nodespace.PowerNode;
@ -31,12 +30,15 @@ public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
public default long getReceiverSpeed() {
return this.getMaxPower();
}
/** Whether a provider can provide power by touching the block (i.e. via proxies), bypassing the need for a network entirely */
public default boolean allowDirectProvision() { return true; }
public default void trySubscribe(World world, DirPos pos) { trySubscribe(world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
public default void trySubscribe(World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IEnergyConductorMK2) {

View File

@ -78,7 +78,7 @@ public class PowerNetMK2 extends NodeNet<IEnergyReceiverMK2, IEnergyProviderMK2,
for(Pair<IEnergyReceiverMK2, Long> entry : list) {
double weight = (double) entry.getValue() / (double) (priorityDemand);
long toSend = (long) Math.max(toTransfer * weight, 0D);
long toSend = (long) Math.min(Math.max(toTransfer * weight, 0D), entry.getValue());
energyUsed += (toSend - entry.getKey().transferPower(toSend)); //leftovers are subtracted from the intended amount to use up
}

View File

@ -5,7 +5,6 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
@ -28,7 +27,7 @@ public interface IFluidReceiverMK2 extends IFluidUserMK2 {
public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConnectorMK2) {

View File

@ -6,7 +6,6 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -30,7 +29,7 @@ public interface IFluidStandardSenderMK2 extends IFluidProviderMK2 {
public default void tryProvide(FluidType type, int pressure, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConnectorMK2) {

View File

@ -1,7 +1,55 @@
package api.hbm.tile;
import java.util.HashMap;
import java.util.Map;
import com.hbm.util.Compat;
import com.hbm.util.Tuple.Quartet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
/** For anything that should be removed off networks when considered unloaded, only affects providers and receivers, not links. Must not necessarily be a tile. */
public interface ILoadedTile {
public boolean isLoaded();
// should we gunk this into the API? no, but i don't care
public static class TileAccessCache {
public static Map<Quartet, TileAccessCache> cache = new HashMap();
public static int NULL_CACHE = 20;
public static int NONNULL_CACHE = 60;
public TileEntity tile;
public long expiresOn;
public TileAccessCache(TileEntity tile, long expiresOn) {
this.tile = tile;
this.expiresOn = expiresOn;
}
public boolean hasExpired(long worldTime) {
if(tile != null && tile.isInvalid()) return true;
if(worldTime >= expiresOn) return true;
if(tile instanceof ILoadedTile && !((ILoadedTile) tile).isLoaded()) return true;
return false;
}
public static Quartet publicCumRag = new Quartet(0, 0, 0, 0);
public static TileEntity getTileOrCache(World world, int x, int y, int z) {
publicCumRag.mangle(x, y, z, world.provider.dimensionId);
TileAccessCache cache = TileAccessCache.cache.get(publicCumRag);
if(cache == null || cache.hasExpired(world.getTotalWorldTime())) {
TileEntity tile = Compat.getTileStandard(world, x, y, z);
cache = new TileAccessCache(tile, world.getTotalWorldTime() + (tile == null ? NULL_CACHE : NONNULL_CACHE));
TileAccessCache.cache.put(publicCumRag.clone(), cache);
return tile;
} else {
return cache.tile;
}
}
}
}

View File

@ -80,4 +80,5 @@ public class BlockEnums {
FLUORESCENT,
HALOGEN
}
}

View File

@ -13,6 +13,7 @@ import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
import com.hbm.blocks.machine.fusion.MachineFusionCoupler;
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
import com.hbm.blocks.machine.fusion.MachineFusionKlystronCreative;
import com.hbm.blocks.machine.fusion.MachineFusionMHDT;
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
import com.hbm.blocks.machine.pile.*;
@ -29,6 +30,8 @@ import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.DoorDecl;
import com.hbm.tileentity.machine.storage.TileEntityFileCabinet;
import com.hbm.util.Compat;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
@ -154,8 +157,6 @@ public class ModBlocks {
public static Block ore_bedrock_oil;
public static Block ore_lignite;
public static Block ore_asbestos;
@Deprecated public static Block ore_coal_oil;
@Deprecated public static Block ore_coal_oil_burning;
public static Block ore_tikite;
@ -252,11 +253,6 @@ public class ModBlocks {
public static Block block_slag;
public static Block block_australium;
public static Block block_weidanium;
public static Block block_reiium;
public static Block block_unobtainium;
public static Block block_daffergon;
public static Block block_verticium;
public static Block block_cap;
@ -621,15 +617,7 @@ public class ModBlocks {
public static Block tesla;
public static Block sat_mapper;
public static Block sat_scanner;
public static Block sat_radar;
public static Block sat_laser;
public static Block sat_foeq;
public static Block sat_resonator;
public static Block sat_dock;
public static Block soyuz_capsule;
public static Block crate_supply;
@ -747,25 +735,24 @@ public class ModBlocks {
public static Block machine_electric_furnace_off;
public static Block machine_electric_furnace_on;
public static Block machine_microwave;
//public static Block machine_deuterium;
public static Block machine_battery_socket;
public static Block machine_battery_redd;
@Deprecated public static Block machine_battery_potato;
@Deprecated public static Block machine_battery;
@Deprecated public static Block machine_lithium_battery;
@Deprecated public static Block machine_schrabidium_battery;
@Deprecated public static Block machine_dineutronium_battery;
@Deprecated public static Block machine_fensu;
public static Block machine_battery_potato;
public static Block machine_battery;
public static Block machine_lithium_battery;
public static Block machine_schrabidium_battery;
public static Block machine_dineutronium_battery;
public static Block machine_fensu;
public static final int guiID_machine_fensu = 99;
public static Block capacitor_bus;
public static Block capacitor_copper;
public static Block capacitor_gold;
public static Block capacitor_niobium;
public static Block capacitor_tantalium;
public static Block capacitor_schrabidate;
@Deprecated public static Block capacitor_bus;
public static Block capacitor_copper; // neat for structures
@Deprecated public static Block capacitor_gold;
@Deprecated public static Block capacitor_niobium;
@Deprecated public static Block capacitor_tantalium;
@Deprecated public static Block capacitor_schrabidate;
public static Block machine_wood_burner;
@ -796,6 +783,7 @@ public class ModBlocks {
public static Block pipe_anchor;
public static Block fluid_valve;
public static Block fluid_switch;
public static Block fluid_counter_valve;
public static Block fluid_pump;
public static Block machine_drain;
public static Block radio_torch_sender;
@ -809,7 +797,6 @@ public class ModBlocks {
public static Block conveyor;
public static Block conveyor_express;
//public static Block conveyor_classic;
public static Block conveyor_double;
public static Block conveyor_triple;
public static Block conveyor_chute;
@ -834,7 +821,6 @@ public class ModBlocks {
public static Block pneumatic_tube_paintable;
public static Block fan;
public static Block piston_inserter;
public static Block chain;
@ -900,9 +886,6 @@ public class ModBlocks {
public static Block pwr_controller;
public static Block pwr_block;
@Deprecated public static Block fusion_conductor;
@Deprecated public static Block fusion_center;
@Deprecated public static Block fusion_motor;
@Deprecated public static Block fusion_heater;
@Deprecated public static Block fusion_hatch;
@Deprecated public static Block plasma; // only actually used by the old plasma grenade, will die with the grenade rework
@ -913,6 +896,7 @@ public class ModBlocks {
public static Block fusion_component;
public static Block fusion_torus;
public static Block fusion_klystron;
public static Block fusion_klystron_creative;
public static Block fusion_breeder;
public static Block fusion_collector;
public static Block fusion_boiler;
@ -946,8 +930,6 @@ public class ModBlocks {
public static Block machine_converter_he_rf;
public static Block machine_converter_rf_he;
public static Block machine_schrabidium_transmutator;
public static Block machine_diesel;
public static Block machine_combustion_engine;
@ -1074,9 +1056,6 @@ public class ModBlocks {
public static Block machine_controller;
public static Block machine_spp_bottom;
public static Block machine_spp_top;
public static Block radiobox;
public static Block radiorec;
@ -1187,10 +1166,11 @@ public class ModBlocks {
public static Block gas_explosive;
public static Block vacuum;
public static Block absorber;
public static Block absorber_red;
public static Block absorber_green;
public static Block absorber_pink;
@Deprecated public static Block absorber;
@Deprecated public static Block absorber_red;
@Deprecated public static Block absorber_green;
@Deprecated public static Block absorber_pink;
public static Block rad_absorber;
public static Block decon;
public static Block mud_block;
@ -1290,8 +1270,6 @@ public class ModBlocks {
ore_beryllium = new BlockGeneric(Material.rock).setBlockName("ore_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_beryllium");
ore_lignite = new BlockOre(Material.rock).setBlockName("ore_lignite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_lignite");
ore_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_asbestos");
ore_coal_oil = new BlockCoalOil(Material.rock).setBlockName("ore_coal_oil").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_coal_oil");
ore_coal_oil_burning = new BlockCoalBurning(Material.rock).setBlockName("ore_coal_oil_burning").setCreativeTab(MainRegistry.blockTab).setLightLevel(10F/15F).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_coal_oil_burning");
cluster_iron = new BlockCluster(Material.rock).setBlockName("cluster_iron").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":cluster_iron");
cluster_titanium = new BlockCluster(Material.rock).setBlockName("cluster_titanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":cluster_titanium");
@ -1470,11 +1448,6 @@ public class ModBlocks {
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(2.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
block_australium = new BlockBeaconable(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
block_reiium = new BlockBeaconable(Material.iron).setBlockName("block_reiium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
block_unobtainium = new BlockBeaconable(Material.iron).setBlockName("block_unobtainium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
block_daffergon = new BlockBeaconable(Material.iron).setBlockName("block_daffergon").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
block_verticium = new BlockBeaconable(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
block_cap = new BlockCap().setBlockName("block_cap").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
@ -1885,19 +1858,22 @@ public class ModBlocks {
machine_arc_furnace = new MachineArcFurnaceLarge().setBlockName("machine_arc_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_microwave = new MachineMicrowave(Material.iron).setBlockName("machine_microwave").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_microwave");
machine_battery_potato = new MachineBattery(Material.iron, 10_000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_battery = new MachineBattery(Material.iron, 1_000_000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_lithium_battery = new MachineBattery(Material.iron, 50_000_000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_schrabidium_battery = new MachineBattery(Material.iron, 25_000_000_000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_dineutronium_battery = new MachineBattery(Material.iron, 1_000_000_000_000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
machine_battery_socket = new MachineBatterySocket().setBlockName("machine_battery_socket").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_battery_redd = new MachineBatteryREDD().setBlockName("machine_battery_redd").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_battery_potato = new MachineBattery(Material.iron, 10_000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_battery = new MachineBattery(Material.iron, 1_000_000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_lithium_battery = new MachineBattery(Material.iron, 50_000_000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_schrabidium_battery = new MachineBattery(Material.iron, 25_000_000_000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_dineutronium_battery = new MachineBattery(Material.iron, 1_000_000_000_000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
capacitor_bus = new MachineCapacitorBus(Material.iron).setBlockName("capacitor_bus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
capacitor_bus = new MachineCapacitorBus(Material.iron).setBlockName("capacitor_bus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
capacitor_copper = new MachineCapacitor(Material.iron, 1_000_000L, "copper").setBlockName("capacitor_copper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_copper");
capacitor_gold = new MachineCapacitor(Material.iron, 5_000_000L, "gold").setBlockName("capacitor_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName("gold_block");
capacitor_niobium = new MachineCapacitor(Material.iron, 25_000_000L, "niobium").setBlockName("capacitor_niobium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_niobium");
capacitor_tantalium = new MachineCapacitor(Material.iron, 150_000_000L, "tantalium").setBlockName("capacitor_tantalium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
capacitor_schrabidate = new MachineCapacitor(Material.iron, 50_000_000_000L, "schrabidate").setBlockName("capacitor_schrabidate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_schrabidate");
capacitor_gold = new MachineCapacitor(Material.iron, 5_000_000L, "gold").setBlockName("capacitor_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName("gold_block");
capacitor_niobium = new MachineCapacitor(Material.iron, 25_000_000L, "niobium").setBlockName("capacitor_niobium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_niobium");
capacitor_tantalium = new MachineCapacitor(Material.iron, 150_000_000L, "tantalium").setBlockName("capacitor_tantalium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
capacitor_schrabidate = new MachineCapacitor(Material.iron, 50_000_000_000L, "schrabidate").setBlockName("capacitor_schrabidate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_schrabidate");
machine_wood_burner = new MachineWoodBurner(Material.iron).setBlockName("machine_wood_burner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_diesel = new MachineDiesel().setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -1942,6 +1918,7 @@ public class ModBlocks {
fluid_duct_gauge = new FluidDuctGauge().setBlockName("fluid_duct_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_valve = new FluidValve(Material.iron).setBlockName("fluid_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_switch = new FluidSwitch(Material.iron).setBlockName("fluid_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_counter_valve = new FluidCounterValve(Material.iron).setBlockName("fluid_counter_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_pump = new FluidPump(Material.iron).setBlockName("fluid_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_drain = new MachineDrain(Material.iron).setBlockName("machine_drain").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
@ -2047,9 +2024,6 @@ public class ModBlocks {
pwr_controller = new MachinePWRController(Material.iron).setBlockName("pwr_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing_blank");
pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pwr_block");
fusion_conductor = new BlockToolConversionPillar(Material.iron).addVariant("_welded").setBlockName("fusion_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_conductor");
fusion_center = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_center_top_alt").setBlockName("fusion_center").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_center_side_alt");
fusion_motor = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_motor_top_alt").setBlockName("fusion_motor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_motor_side_alt");
fusion_heater = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_heater_top").setBlockName("fusion_heater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_heater_side");
fusion_hatch = new FusionHatch(Material.iron).setBlockName("fusion_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_hatch");
plasma = new BlockPlasma(Material.iron).setBlockName("plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":plasma");
@ -2059,6 +2033,7 @@ public class ModBlocks {
fusion_component = new BlockFusionComponent().setBlockName("fusion_component").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_component");
fusion_torus = new MachineFusionTorus().setBlockName("fusion_torus").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_klystron = new MachineFusionKlystron().setBlockName("fusion_klystron").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_klystron_creative = new MachineFusionKlystronCreative().setBlockName("fusion_klystron_creative").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_breeder = new MachineFusionBreeder().setBlockName("fusion_breeder").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_collector = new MachineFusionCollector().setBlockName("fusion_collector").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_boiler = new MachineFusionBoiler().setBlockName("fusion_boiler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -2141,13 +2116,6 @@ public class ModBlocks {
launch_table = new LaunchTable(Material.iron).setBlockName("launch_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_table");
soyuz_launcher = new SoyuzLauncher(Material.iron).setBlockName("soyuz_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_launcher");
sat_mapper = new DecoBlock(Material.iron).setBlockName("sat_mapper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_mapper");
sat_radar = new DecoBlock(Material.iron).setBlockName("sat_radar").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_radar");
sat_scanner = new DecoBlock(Material.iron).setBlockName("sat_scanner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_scanner");
sat_laser = new DecoBlock(Material.iron).setBlockName("sat_laser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_laser");
sat_foeq = new DecoBlock(Material.iron).setBlockName("sat_foeq").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_foeq");
sat_resonator = new DecoBlock(Material.iron).setBlockName("sat_resonator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_resonator");
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
crate_supply = new BlockSupplyCrate(Material.wood).setBlockName("crate_supply").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
@ -2322,13 +2290,8 @@ public class ModBlocks {
machine_waste_drum = new WasteDrum(Material.iron).setBlockName("machine_waste_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":waste_drum");
machine_storage_drum = new StorageDrum(Material.iron).setBlockName("machine_storage_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_storage_drum");
machine_schrabidium_transmutator = new MachineSchrabidiumTransmutator(Material.iron).setBlockName("machine_schrabidium_transmutator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
machine_siren = new MachineSiren(Material.iron).setBlockName("machine_siren").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_siren");
machine_spp_bottom = new SPPBottom(Material.iron).setBlockName("machine_spp_bottom").setHardness(5.0F).setResistance(10.0F);
machine_spp_top = new SPPTop(Material.iron).setBlockName("machine_spp_top").setHardness(5.0F).setResistance(10.0F);
radiobox = new Radiobox(Material.iron).setBlockName("radiobox").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiobox");
radiorec = new RadioRec(Material.iron).setBlockName("radiorec").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiorec");
@ -2358,13 +2321,15 @@ public class ModBlocks {
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
absorber = new BlockAbsorber(Material.iron, 2.5F).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber");
absorber_red = new BlockAbsorber(Material.iron, 10F).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_red");
absorber_green = new BlockAbsorber(Material.iron, 100F).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_green");
absorber_pink = new BlockAbsorber(Material.iron, 10000F).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
absorber = new BlockGeneric(Material.iron).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
absorber_red = new BlockGeneric(Material.iron).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
absorber_green = new BlockGeneric(Material.iron).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
absorber_pink = new BlockGeneric(Material.iron).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
if (Loader.isModLoaded("OpenComputers")) {
if(Loader.isModLoaded("OpenComputers")) {
oc_cable_paintable = new BlockOpenComputersCablePaintable().setBlockName("oc_cable_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
}
@ -2479,10 +2444,6 @@ public class ModBlocks {
//Bedrock ores
GameRegistry.registerBlock(ore_bedrock_oil, ore_bedrock_oil.getUnlocalizedName());
//Nice Meme
GameRegistry.registerBlock(ore_coal_oil, ore_coal_oil.getUnlocalizedName());
GameRegistry.registerBlock(ore_coal_oil_burning, ore_coal_oil_burning.getUnlocalizedName());
//Nether Ores
GameRegistry.registerBlock(ore_nether_coal, ore_nether_coal.getUnlocalizedName());
GameRegistry.registerBlock(ore_nether_smoldering, ore_nether_smoldering.getUnlocalizedName());
@ -2647,11 +2608,6 @@ public class ModBlocks {
GameRegistry.registerBlock(block_bakelite, block_bakelite.getUnlocalizedName());
GameRegistry.registerBlock(block_rubber, block_rubber.getUnlocalizedName());
GameRegistry.registerBlock(block_australium, ItemOreBlock.class, block_australium.getUnlocalizedName());
GameRegistry.registerBlock(block_weidanium, ItemOreBlock.class, block_weidanium.getUnlocalizedName());
GameRegistry.registerBlock(block_reiium, ItemOreBlock.class, block_reiium.getUnlocalizedName());
GameRegistry.registerBlock(block_unobtainium, ItemOreBlock.class, block_unobtainium.getUnlocalizedName());
GameRegistry.registerBlock(block_daffergon, ItemOreBlock.class, block_daffergon.getUnlocalizedName());
GameRegistry.registerBlock(block_verticium, ItemOreBlock.class, block_verticium.getUnlocalizedName());
register(block_cap);
GameRegistry.registerBlock(block_lanthanium, block_lanthanium.getUnlocalizedName());
GameRegistry.registerBlock(block_ra226, block_ra226.getUnlocalizedName());
@ -3154,8 +3110,6 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_powerrtg, machine_powerrtg.getUnlocalizedName());
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
GameRegistry.registerBlock(machine_hephaestus, machine_hephaestus.getUnlocalizedName());
GameRegistry.registerBlock(machine_spp_bottom, machine_spp_bottom.getUnlocalizedName());
GameRegistry.registerBlock(machine_spp_top, machine_spp_top.getUnlocalizedName());
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());
@ -3241,6 +3195,7 @@ public class ModBlocks {
register(pipe_anchor);
register(fluid_duct_gauge);
register(fluid_valve);
register(fluid_counter_valve);
register(fluid_switch);
register(fluid_pump);
register(machine_drain);
@ -3296,6 +3251,8 @@ public class ModBlocks {
register(barrel_steel);
register(barrel_tcalloy);
register(barrel_antimatter);
register(machine_battery_socket);
register(machine_battery_redd);
register(machine_battery_potato);
register(machine_battery);
register(machine_lithium_battery);
@ -3376,7 +3333,6 @@ public class ModBlocks {
register(machine_turbofan);
register(machine_turbinegas);
register(machine_lpw2);
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
@ -3403,6 +3359,7 @@ public class ModBlocks {
GameRegistry.registerBlock(absorber_red, absorber_red.getUnlocalizedName());
GameRegistry.registerBlock(absorber_green, absorber_green.getUnlocalizedName());
GameRegistry.registerBlock(absorber_pink, absorber_pink.getUnlocalizedName());
GameRegistry.registerBlock(rad_absorber, ItemBlockBase.class, rad_absorber.getUnlocalizedName());
GameRegistry.registerBlock(decon, decon.getUnlocalizedName());
//Solar Tower Blocks
@ -3439,9 +3396,6 @@ public class ModBlocks {
register(pwr_block);
//Multiblock Generators
register(fusion_conductor);
GameRegistry.registerBlock(fusion_center, fusion_center.getUnlocalizedName());
GameRegistry.registerBlock(fusion_motor, fusion_motor.getUnlocalizedName());
GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName());
GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName());
GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName());
@ -3451,6 +3405,7 @@ public class ModBlocks {
register(fusion_component);
register(fusion_torus);
register(fusion_klystron);
register(fusion_klystron_creative);
register(fusion_breeder);
register(fusion_collector);
register(fusion_boiler);
@ -3502,14 +3457,6 @@ public class ModBlocks {
//Guide
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
//Sat Blocks
GameRegistry.registerBlock(sat_mapper, sat_mapper.getUnlocalizedName());
GameRegistry.registerBlock(sat_scanner, sat_scanner.getUnlocalizedName());
GameRegistry.registerBlock(sat_radar, sat_radar.getUnlocalizedName());
GameRegistry.registerBlock(sat_laser, sat_laser.getUnlocalizedName());
GameRegistry.registerBlock(sat_foeq, sat_foeq.getUnlocalizedName());
GameRegistry.registerBlock(sat_resonator, sat_resonator.getUnlocalizedName());
//Rails
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
@ -3579,7 +3526,7 @@ public class ModBlocks {
GameRegistry.registerBlock(vacuum, vacuum.getUnlocalizedName());
// OC Compat Items
if (Loader.isModLoaded("OpenComputers")) {
if(Loader.isModLoaded(Compat.MOD_OC)) {
register(oc_cable_paintable);
}
@ -3644,15 +3591,15 @@ public class ModBlocks {
}
// Is this block a special structure handling block, so we can ignore it for blacklist selection, etc.
public static boolean isStructureBlock(Block block, boolean includeAir) {
if(block == null) return false;
if(block == wand_air) return includeAir;
public static boolean isStructureBlock(Block block, boolean includeAir) {
if(block == null) return false;
if(block == wand_air) return includeAir;
if(block == wand_structure) return true;
if(block == wand_jigsaw) return true;
if(block == wand_logic) return true;
if(block == wand_tandem) return true;
if(block == wand_loot) return true;
return false;
}
if(block == wand_jigsaw) return true;
if(block == wand_logic) return true;
if(block == wand_tandem) return true;
if(block == wand_loot) return true;
return false;
}
}

View File

@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.item.EntityTNTPrimedBase;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.world.biome.BiomeGenCraterBase;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
@ -16,6 +17,8 @@ public class BlockFissureBomb extends BlockTNTBase {
int range = 5;
boolean crater = world.getBiomeGenForCoords((int) Math.floor(x), (int) Math.floor(z)) instanceof BiomeGenCraterBase;
for(int i = -range; i <= range; i++) {
for(int j = -range; j <= range; j++) {
for(int k = -range; k <= range; k++) {
@ -27,7 +30,7 @@ public class BlockFissureBomb extends BlockTNTBase {
Block block = world.getBlock(a, b, c);
if(block == ModBlocks.ore_bedrock) {
world.setBlock(a, b, c, ModBlocks.ore_volcano);
world.setBlock(a, b, c, ModBlocks.ore_volcano, crater ? 1 : 0, 3);
} else if(block == ModBlocks.ore_bedrock_oil) {
world.setBlock(a, b, c, Blocks.bedrock);
}

View File

@ -2,38 +2,79 @@ package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.blocks.BlockEnumMulti;
import com.hbm.blocks.IBlockMulti;
import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.lib.RefStrings;
import net.minecraft.block.Block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockAbsorber extends Block {
public class BlockAbsorber extends BlockEnumMulti implements IBlockMulti {
float absorb = 0;
// Enum for tiers they are in order of meta data, 0, 1, 2, 3 for Base, Red, Green, Pink
public static enum EnumAbsorberTier {
public BlockAbsorber(Material mat, float ab) {
super(mat);
BASE(2.5F, "absorber"), RED(10F, "absorber_red"), GREEN(100F, "absorber_green"), PINK(10000F, "absorber_pink");
public final float absorbAmount;
public final String textureName;
private EnumAbsorberTier(float absorb, String texture) {
this.absorbAmount = absorb;
this.textureName = texture;
}
}
public BlockAbsorber(Material mat) {
super(mat, EnumAbsorberTier.class, true, true);
this.setTickRandomly(true);
absorb = ab;
this.setBlockName("rad_absorber");
}
public EnumAbsorberTier getTier(int meta) {
return EnumAbsorberTier.values()[rectify(meta)];
}
@Override
public int tickRate(World world) {
public String getUnlocalizedName(ItemStack stack) {
EnumAbsorberTier tier = getTier(stack.getItemDamage());
String tierName = net.minecraft.util.StatCollector.translateToLocal("tile.rad_absorber." + tier.name().toLowerCase());
return tierName;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(net.minecraft.client.renderer.texture.IIconRegister reg) {
icons = new IIcon[EnumAbsorberTier.values().length];
for(int i = 0; i < icons.length; i++) {
icons[i] = reg.registerIcon(RefStrings.MODID + ":" + EnumAbsorberTier.values()[i].textureName);
}
}
// All that rad math shit that was on there already, did not touch this
// -Wolf
@Override
public int tickRate(World world) {
return 10;
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, absorb);
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
EnumAbsorberTier tier = getTier(world.getBlockMetadata(x, y, z));
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, tier.absorbAmount);
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
super.onBlockAdded(world, x, y, z);
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
}
}

View File

@ -1,26 +1,15 @@
package com.hbm.blocks.generic;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.util.i18n.I18nUtil;
import api.hbm.block.IDrillInteraction;
import api.hbm.block.IMiningDrill;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
public class BlockCluster extends Block implements IDrillInteraction, ITooltipProvider {
public class BlockCluster extends Block {
public BlockCluster(Material mat) {
super(mat);
@ -28,32 +17,7 @@ public class BlockCluster extends Block implements IDrillInteraction, ITooltipPr
@Override
public Item getItemDropped(int i, Random rand, int j) {
return null;
}
@Override
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
if(player instanceof FakePlayer || player == null) {
return;
}
if(!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops") && !world.restoringBlockSnapshots) {
Item drop = getDrop();
if(drop == null)
return;
float f = 0.7F;
double mX = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
double mY = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
double mZ = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
EntityItem entityitem = new EntityItem(world, (double) x + mX, (double) y + mY, (double) z + mZ, new ItemStack(drop));
entityitem.delayBeforeCanPickup = 10;
world.spawnEntityInWorld(entityitem);
}
return getDrop();
}
private Item getDrop() {
@ -65,24 +29,4 @@ public class BlockCluster extends Block implements IDrillInteraction, ITooltipPr
return null;
}
@Override
public boolean canBreak(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return drill.getDrillRating() > 70 || world.rand.nextFloat() < 0.05;
}
@Override
public ItemStack extractResource(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return drill.getDrillRating() <= 70 ? new ItemStack(getDrop()) : null;
}
@Override
public float getRelativeHardness(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return this.getBlockHardness(world, x, y, z);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.cluster"));
}
}

View File

@ -1,78 +0,0 @@
package com.hbm.blocks.generic;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockCoalBurning extends BlockOutgas {
public BlockCoalBurning(Material mat) {
super(mat, false, 1, false);
this.setTickRandomly(true);
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if(dir == ForgeDirection.DOWN)
continue;
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.air) {
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D;
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D;
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D;
if(dir.offsetX != 0)
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.125 * dir.offsetX;
if(dir.offsetY != 0)
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * 0.125 * dir.offsetY;
if(dir.offsetZ != 0)
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.125 * dir.offsetZ;
world.spawnParticle("flame", ix, iy, iz, 0.0, 0.0, 0.0);
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.0, 0.0);
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.1, 0.0);
}
}
}
@Override
public Item getItemDropped(int i, Random rand, int j) {
return null;
}
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
super.breakBlock(world, x, y, z, block, i);
world.setBlock(x, y, z, Blocks.fire);
for(int ix = -2; ix <= 2; ix++) {
for(int iy = -2; iy <= 2; iy++) {
for(int iz = -2; iz <= 2; iz++) {
if(Math.abs(ix + iy + iz) < 5 && world.getBlock(x + ix, y + iy, z + iz) == Blocks.air) {
world.setBlock(x + ix, y + iy, z + iz, this.getGas());
}
}
}
}
}
@Override
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
entity.setFire(3);
}
}

View File

@ -1,33 +0,0 @@
package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.world.World;
public class BlockCoalOil extends Block {
public BlockCoalOil(Material mat) {
super(mat);
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
world.setBlock(x, y, z, ModBlocks.ore_coal_oil_burning);
}
@Override
public Item getItemDropped(int i, Random rand, int j) {
return Items.coal;
}
@Override
public int quantityDropped(Random rand) {
return 2 + rand.nextInt(2);
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.interfaces.Spaghetti;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import net.minecraft.block.BlockFalling;
import net.minecraft.block.material.Material;
@ -102,8 +103,7 @@ public class BlockCrate extends BlockFalling {
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.red_pylon), 9);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_battery), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_lithium_battery), 5);
BlockCrate.addToListWithWeight(metalList, new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD.ordinal()), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembly_machine), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);

View File

@ -55,7 +55,8 @@ public class BlockFissure extends BlockContainer implements IBlockMultiPass {
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, ModBlocks.volcanic_lava_block);
boolean crater = world.getBlockMetadata(x, y, z) != 0;
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, crater ? ModBlocks.rad_lava_block : ModBlocks.volcanic_lava_block);
}
@Override

View File

@ -50,7 +50,7 @@ public class BlockOutgas extends BlockOre {
if(this == ModBlocks.ancient_scrap)
return ModBlocks.gas_radon_tomb;
if(this == ModBlocks.ore_coal_oil_burning || this == ModBlocks.ore_nether_coal) {
if(this == ModBlocks.ore_nether_coal) {
return ModBlocks.gas_monoxide;
}

View File

@ -159,7 +159,8 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
NONE( "NONE", null),
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
NUMBERNINE( "Number Nine", "None of y'all deserve coal."),
HUNDUN( "Hundun", "混沌");
HUNDUN( "Hundun", "混沌"),
DERG( "Dragon", "Squeeze him.");
public String label;
public String inscription;

View File

@ -152,7 +152,6 @@ public class BlockToolConversion extends BlockMulti implements IToolable, ILookO
public static void registerRecipes() {
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.watz_end, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.watz_end, 1)));
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.fusion_conductor, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast())}, new MetaBlock(ModBlocks.fusion_conductor, 1)));
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.fusion_component, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast())}, new MetaBlock(ModBlocks.fusion_component, 1)));
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.icf_component, 1)), new Pair(new AStack[] {new OreDictStack(OreDictManager.ANY_BISMOIDBRONZE.plateCast())}, new MetaBlock(ModBlocks.icf_component, 2)));
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.icf_component, 3)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast()), new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.icf_component, 4)));

View File

@ -33,6 +33,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
@ -40,7 +41,8 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
@SideOnly(Side.CLIENT) private IIcon[] iconTop;
@SideOnly(Side.CLIENT) private IIcon[] iconSide;
@SideOnly(Side.CLIENT) private IIcon[] iconFront;
public BlockMassStorage() {
super(Material.iron);
}
@ -50,15 +52,23 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = new IIcon[4];
this.iconSide = new IIcon[4];
this.iconFront = new IIcon[4];
this.iconTop[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_iron");
this.iconSide[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_iron");
this.iconFront[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_iron");
this.iconTop[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_desh");
this.iconSide[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_desh");
this.iconFront[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_desh");
this.iconTop[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top");
this.iconSide[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side");
this.iconFront[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front");
this.iconTop[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_wood");
this.iconSide[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_wood");
this.iconFront[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_wood");
}
@Override
@ -74,20 +84,24 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
int meta = this.rectify(metadata);
return side == 1 ? this.iconTop[meta] : (side == 0 ? this.iconTop[meta] : this.iconSide[meta]);
int dir = (metadata / getSubCount()) + 2;
if(side == 0 || side == 1) return iconTop[meta];
if(side == dir) return iconFront[meta];
return iconSide[meta];
}
@Override
public int damageDropped(int meta) {
return meta;
return rectify(meta);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityMassStorage(getCapacity(meta));
}
public int getCapacity(int meta) {
meta = rectify(meta);
return meta == 3 ? 100 : meta == 0 ? 10_000 : meta == 1 ? 100_000 : meta == 2 ? 1_000_000 : 0;
}
@ -108,121 +122,129 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
return false;
}
}
private static boolean dropInv = true;
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) {
ItemStack drop = new ItemStack(this, 1, world.getBlockMetadata(x, y, z));
ItemStack drop = new ItemStack(this, 1, rectify(world.getBlockMetadata(x, y, z)));
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
NBTTagCompound nbt = new NBTTagCompound();
if(inv != null) {
for(int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i);
if(stack == null)
continue;
NBTTagCompound slot = new NBTTagCompound();
stack.writeToNBT(slot);
nbt.setTag("slot" + i, slot);
}
}
if(inv instanceof TileEntityLockableBase) {
TileEntityLockableBase lockable = (TileEntityLockableBase) inv;
if(lockable.isLocked()) {
nbt.setInteger("lock", lockable.getPins());
nbt.setDouble("lockMod", lockable.getMod());
}
}
if(inv instanceof TileEntityMassStorage && nbt.func_150296_c().size() > 0) {
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
nbt.setInteger("stack", storage.getStockpile());
}
if(!nbt.hasNoTags()) {
drop.stackTagCompound = nbt;
}
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
}
dropInv = false;
boolean flag = world.setBlockToAir(x, y, z);
dropInv = true;
return flag;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
if(inv != null && stack.hasTagCompound()) {
for(int i = 0; i < inv.getSizeInventory(); i++) {
inv.setInventorySlotContents(i, ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot" + i)));
}
if(inv instanceof TileEntityMassStorage) {
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
if(stack.stackTagCompound.hasKey("lock")) {
storage.setPins(stack.stackTagCompound.getInteger("lock"));
storage.setMod(stack.stackTagCompound.getDouble("lockMod"));
storage.lock();
}
storage.setStockpile(stack.stackTagCompound.getInteger("stack"));
}
}
super.onBlockPlacedBy(world, x, y, z, player, stack);
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
int meta = stack.getItemDamage();
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, meta, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, meta + 3 * getSubCount(), 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, meta + 1 * getSubCount(), 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, meta + 2 * getSubCount(), 2);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
if(dropInv) {
ISidedInventory sided = (ISidedInventory) world.getTileEntity(x, y, z);
Random rand = world.rand;
if(sided != null) {
for(int i1 = 0; i1 < sided.getSizeInventory(); ++i1) {
if(i1 == 1) continue; //do NOT drop the filter item
ItemStack itemstack = sided.getStackInSlot(i1);
if(itemstack != null) {
float f = rand.nextFloat() * 0.8F + 0.1F;
float f1 = rand.nextFloat() * 0.8F + 0.1F;
float f2 = rand.nextFloat() * 0.8F + 0.1F;
while(itemstack.stackSize > 0) {
int j1 = rand.nextInt(21) + 10;
if(j1 > itemstack.stackSize) {
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if(itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float) rand.nextGaussian() * f3;
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
@ -231,7 +253,7 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
}
}
}
world.func_147453_f(x, y, z, block);
}
}
@ -251,51 +273,51 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if(!(te instanceof TileEntityMassStorage))
return;
TileEntityMassStorage storage = (TileEntityMassStorage) te;
List<String> text = new ArrayList();
String title = "Empty";
boolean full = storage.type != null;
if(full) {
title = storage.type.getDisplayName();
text.add(String.format(Locale.US, "%,d", storage.getStockpile()) + " / " + String.format(Locale.US, "%,d", storage.getCapacity()));
double percent = (double) storage.getStockpile() / (double) storage.getCapacity();
int charge = (int) Math.floor(percent * 10_000D);
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
text.add("&[" + color + "&]" + (charge / 100D) + "%");
}
ILookOverlay.printGeneric(event, title, full ? 0xffff00 : 0x00ffff, full ? 0x404000 : 0x004040, text);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
if(!stack.hasTagCompound()) return;
ItemStack type = ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot1"));
if(type != null) {
list.add(EnumChatFormatting.GOLD + type.getDisplayName());
list.add(String.format(Locale.US, "%,d", stack.stackTagCompound.getInteger("stack")) + " / " + String.format(Locale.US, "%,d", getCapacity(stack.getItemDamage())));
}
}
@Override
public boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
return ((TileEntityMassStorage) world.getTileEntity(x, y, z)).redstone;

View File

@ -1,12 +1,18 @@
package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityCore;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
@ -50,5 +56,43 @@ public class CoreCore extends BlockContainer {
return false;
}
}
private Random rand = new Random();
// shitty copy pasted crap for the 50th time because i hate this block
@Override
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
TileEntityCore core = (TileEntityCore) world.getTileEntity(x, y, z);
if(core != null) {
for(int i1 = 0; i1 < core.getSizeInventory(); ++i1) {
ItemStack itemstack = core.getStackInSlot(i1);
if(itemstack != null) {
float f = this.rand.nextFloat() * 0.8F + 0.1F;
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
while(itemstack.stackSize > 0) {
int j1 = this.rand.nextInt(21) + 10;
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
float f3 = 0.05F;
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, b);
}
super.breakBlock(world, x, y, z, b, m);
}
}

View File

@ -5,6 +5,7 @@ import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ICustomBlockHighlight;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.inventory.material.Mats.MaterialStack;
import com.hbm.items.machine.ItemScraps;
import com.hbm.main.MainRegistry;
@ -27,7 +28,7 @@ import net.minecraft.world.World;
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineCrucible extends BlockDummyable implements ICrucibleAcceptor {
public class MachineCrucible extends BlockDummyable implements ICrucibleAcceptor, ITooltipProvider {
public MachineCrucible() {
super(Material.rock);
@ -181,4 +182,9 @@ public class MachineCrucible extends BlockDummyable implements ICrucibleAcceptor
@Override public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) { return false; }
@Override public MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) { return null; }
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -18,6 +18,7 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@Deprecated
public class MachineITER extends BlockDummyable {
public MachineITER() {

View File

@ -1,133 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineSchrabidiumTransmutator;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import java.util.Random;
public class MachineSchrabidiumTransmutator extends BlockContainer {
private final Random field_149933_a = new Random();
private static boolean keepInventory;
@SideOnly(Side.CLIENT)
//private IIcon iconFront;
private IIcon iconTop;
private IIcon iconBottom;
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (":transmutator_top"));
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + (":transmutator_bottom"));
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":transmutator_side");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
}
public MachineSchrabidiumTransmutator(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote)
{
return true;
} else if(!player.isSneaking())
{
TileEntityMachineSchrabidiumTransmutator entity = (TileEntityMachineSchrabidiumTransmutator) world.getTileEntity(x, y, z);
if(entity != null)
{
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
}
return true;
} else {
return false;
}
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineSchrabidiumTransmutator();
}
@Override
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
if (!keepInventory)
{
TileEntityMachineSchrabidiumTransmutator tileentityfurnace = (TileEntityMachineSchrabidiumTransmutator)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
if (tileentityfurnace != null)
{
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
{
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
if (itemstack != null)
{
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0)
{
int j1 = this.field_149933_a.nextInt(21) + 10;
if (j1 > itemstack.stackSize)
{
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound())
{
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
p_149749_1_.spawnEntityInWorld(entityitem);
}
}
}
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
}
}
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
}

View File

@ -1,7 +1,6 @@
package com.hbm.blocks.machine;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.tileentity.machine.TileEntityRadiobox;
import net.minecraft.block.Block;
@ -47,31 +46,17 @@ public class Radiobox extends BlockContainer {
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0)
{
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
if(i == 1)
{
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if(i == 2)
{
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if(i == 3)
{
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote)
{
if(world.isRemote) {
return true;
} else if(!player.isSneaking())
{
} else if(!player.isSneaking()) {
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.battery_spark && !box.infinite) {
@ -93,78 +78,53 @@ public class Radiobox extends BlockContainer {
return true;
} else {
//FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_radiobox, world, x, y, z);
//return true;
return false;
}
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
{
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f);
switch(te)
{
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) {
case 4:
case 8:
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
break;
case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
case 2:
case 6:
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
break;
case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
case 5:
case 9:
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
break;
case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
case 3:
case 7:
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
break;
case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
}
}
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
int te = world.getBlockMetadata(x, y, z);
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f);
switch(te)
{
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) {
case 4:
case 8:
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
break;
case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
case 2:
case 6:
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
break;
case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
case 5:
case 9:
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
break;
case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
case 3:
case 7:
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
break;
case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
}
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
if(box.infinite) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.battery_spark)));
if(box.infinite) {
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, ItemBattery.getEmptyBattery(ModItems.battery_spark)));
}
super.breakBlock(world, x, y, z, b, m);
}
super.breakBlock(world, x, y, z, b, m);
}
}

View File

@ -1,31 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineSPP;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class SPPBottom extends BlockContainer {
public SPPBottom(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineSPP();
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
}
}

View File

@ -1,22 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
public class SPPTop extends Block {
public SPPTop(Material p_i45394_1_) {
super(p_i45394_1_);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
}
}

View File

@ -33,15 +33,8 @@ public class MachineFusionKlystron extends BlockDummyable implements ITooltipPro
return super.standardOpenBehavior(world, x, y, z, player, 0);
}
@Override
public int[] getDimensions() {
return new int[] { 3, 0, 4, 3, 2, 2 };
}
@Override
public int getOffset() {
return 3;
}
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
@Override public int getOffset() { return 3; }
@Override
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {

View File

@ -0,0 +1,48 @@
package com.hbm.blocks.machine.fusion;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.tileentity.machine.fusion.TileEntityFusionKlystronCreative;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineFusionKlystronCreative extends BlockDummyable implements ITooltipProvider {
public MachineFusionKlystronCreative() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityFusionKlystronCreative();
return null;
}
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
@Override public int getOffset() { return 3; }
@Override
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
return super.checkRequirement(world, x, y, z, dir, o) &&
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, x, y, z, dir);
}
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, this, dir);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
addStandardInfo(stack, player, list, ext);
}
}

View File

@ -0,0 +1,68 @@
package com.hbm.blocks.network;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.network.TileEntityFluidCounterValve;
import com.hbm.util.i18n.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import java.util.ArrayList;
import java.util.List;
public class FluidCounterValve extends FluidDuctBase implements ILookOverlay, ITooltipProvider {
@SideOnly(Side.CLIENT)
private IIcon iconOn;
public FluidCounterValve(Material mat) {
super(mat);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconOn = iconRegister.registerIcon(RefStrings.MODID + ":fluid_counter_valve_on");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":fluid_counter_valve_off");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return metadata == 1 ? iconOn : blockIcon;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityFluidCounterValve();
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if(!(te instanceof TileEntityFluidCounterValve))
return;
TileEntityFluidCounterValve duct = (TileEntityFluidCounterValve) te;
List<String> text = new ArrayList<>();
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
text.add("Counter: " + duct.getCounter());
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -0,0 +1,88 @@
package com.hbm.blocks.network;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.IPersistentInfoProvider;
import com.hbm.tileentity.IPersistentNBT;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import com.hbm.util.BobMathUtil;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.StatList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineBatteryREDD extends BlockDummyable implements IPersistentInfoProvider {
public MachineBatteryREDD() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityBatteryREDD();
if(meta >= 6) return new TileEntityProxyCombo().power().conductor();
return null;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return standardOpenBehavior(world, x, y, z, player, side);
}
@Override public int[] getDimensions() { return new int[] {9, 0, 2, 2, 4, 4}; }
@Override public int getOffset() { return 2; }
@Override
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
x += dir.offsetX * o;
z += dir.offsetZ * o;
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
this.makeExtra(world, x + dir.offsetX * 2 + rot.offsetX * 2, y, z + dir.offsetZ * 2 + rot.offsetZ * 2);
this.makeExtra(world, x + dir.offsetX * 2 - rot.offsetX * 2, y, z + dir.offsetZ * 2 - rot.offsetZ * 2);
this.makeExtra(world, x - dir.offsetX * 2 + rot.offsetX * 2, y, z - dir.offsetZ * 2 + rot.offsetZ * 2);
this.makeExtra(world, x - dir.offsetX * 2 - rot.offsetX * 2, y, z - dir.offsetZ * 2 - rot.offsetZ * 2);
this.makeExtra(world, x + rot.offsetX * 4, y, z + rot.offsetZ * 4);
this.makeExtra(world, x - rot.offsetX * 4, y, z - rot.offsetZ * 4);
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
return IPersistentNBT.getDrops(world, x, y, z, this);
}
@Override
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
if(!player.capabilities.isCreativeMode) {
harvesters.set(player);
this.dropBlockAsItem(world, x, y, z, meta, 0);
harvesters.set(null);
}
}
@Override
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
player.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
player.addExhaustion(0.025F);
}
@Override
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
if(persistentTag != null && persistentTag.hasKey("power"))
list.add(EnumChatFormatting.YELLOW + "" + BobMathUtil.format(new BigInteger(persistentTag.getByteArray("power"))) + " HE");
}
}

View File

@ -0,0 +1,95 @@
package com.hbm.blocks.network;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
import com.hbm.util.BobMathUtil;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineBatterySocket extends BlockDummyable implements ITooltipProvider, ILookOverlay {
public MachineBatterySocket() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityBatterySocket();
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().conductor();
return null;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return standardOpenBehavior(world, x, y, z, player, side);
}
@Override public int[] getDimensions() { return new int[] {1, 0, 1, 0, 1, 0}; }
@Override public int getOffset() { return 0; }
@Override
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
this.makeExtra(world, x - dir.offsetX, y, z - dir.offsetZ);
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
this.makeExtra(world, x - dir.offsetX + rot.offsetX, y, z - dir.offsetZ + rot.offsetZ);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
addStandardInfo(stack, player, list, ext);
}
@Override
public boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
if(world.getBlockMetadata(x, y, z) < 6) return 0;
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return 0;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntityBatterySocket)) return 0;
TileEntityBatterySocket battery = (TileEntityBatterySocket) te;
return battery.getComparatorPower();
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntityBatterySocket)) return;
TileEntityBatterySocket socket = (TileEntityBatterySocket) te;
if(socket.syncStack == null) return;
List<String> text = new ArrayList();
text.add(BobMathUtil.getShortNumber(socket.syncPower) + " / " + BobMathUtil.getShortNumber(socket.syncMaxPower) + "HE");
double percent = (double) socket.syncPower / socket.syncMaxPower;
int charge = (int) Math.floor(percent * 10_000D);
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
text.add("&[" + color + "&]" + (charge / 100D) + "%");
ILookOverlay.printGeneric(event, socket.syncStack.getDisplayName(), 0xffff00, 0x404000, text);
}
}

View File

@ -0,0 +1,49 @@
package com.hbm.commands;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.ChatBuilder;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
public class CommandReapNetworks extends CommandBase {
@Override
public String getCommandName() {
return "ntmreapnetworks";
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "/ntmreapnetworks";
}
@Override
public void processCommand(ICommandSender sender, String[] args) {
try {
UniNodespace.activeNodeNets.forEach((net) -> {
net.links.forEach((link) -> { ((GenNode)link).expired = true; });
net.links.clear();
net.providerEntries.clear();
net.receiverEntries.clear();
});
UniNodespace.activeNodeNets.clear();
UniNodespace.worlds.clear();
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Nodespace cleared :)"));
} catch(Exception ex) {
sender.addChatMessage(ChatBuilder.start("----------------------------------").color(EnumChatFormatting.GRAY).flush());
sender.addChatMessage(ChatBuilder.start("An error has occoured during network reap, consult the log for details.").color(EnumChatFormatting.RED).flush());
sender.addChatMessage(ChatBuilder.start(ex.getLocalizedMessage()).color(EnumChatFormatting.RED).flush());
sender.addChatMessage(ChatBuilder.start(ex.getStackTrace()[0].toString()).color(EnumChatFormatting.RED).flush());
sender.addChatMessage(ChatBuilder.start("----------------------------------").color(EnumChatFormatting.GRAY).flush());
throw ex;
}
}
}

View File

@ -128,7 +128,7 @@ public class GeneralConfig {
enable528 = CommonConfig.createConfigBool(config, CATEGORY_528, "enable528Mode", "The central toggle for 528 mode, required TRUE for most subsequent toggles to work.", false);
enable528ReasimBoilers = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_forceReasimBoilers", "Keeps the RBMK dial for ReaSim boilers on, preventing use of non-ReaSim boiler columns and forcing the use of steam in-/outlets", true);
enable528ColtanDeposit = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanDepsoit", "Enables the coltan deposit. A large amount of coltan will spawn around a single random location in the world.", true);
enable528ColtanDeposit = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanDeposit", "Enables the coltan deposit. A large amount of coltan will spawn around a single random location in the world.", true);
enable528ColtanSpawn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanSpawning", "Enables coltan ore as a random spawn in the world. Unlike the deposit option, coltan will not just spawn in one central location.", false);
enable528BosniaSimulator = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBosniaSimulator", "Enables anti tank mines spawning all over the world.", true);
enable528NetherBurn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enable528NetherBurn", "Whether players burn in the nether", true);

View File

@ -20,6 +20,7 @@ public class ServerConfig extends RunningConfig {
public static ConfigWrapper<Boolean> CRATE_OPEN_HELD = new ConfigWrapper(true);
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
private static void initDefaults() {
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
@ -32,6 +33,7 @@ public class ServerConfig extends RunningConfig {
configMap.put("CRATE_OPEN_HELD", CRATE_OPEN_HELD);
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
configMap.put("ENABLE_MKU", ENABLE_MKU);
}
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */

View File

@ -4,6 +4,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.ItemEnums;
@ -181,13 +182,13 @@ public class ConsumableRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pads_static, 1), new Object[] { "CDC", "ISI", "CDC", 'C', CU.ingot(), 'D', ModItems.ducttape, 'I', ANY_RUBBER.ingot(), 'S', ModItems.pads_slime });
//Batteries
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery, 1), new Object[] { "PCP", "PCP", "PCP", 'P', STEEL.plate(), 'C', ModBlocks.capacitor_gold });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk2, 1), new Object[] { "PCP", "PCP", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', ModBlocks.capacitor_niobium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk3, 1), new Object[] { "PCP", "PCP", "PCP", 'P', GOLD.plate(), 'C', ModBlocks.capacitor_tantalium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery, 1), new Object[] { "PCP", "PCP", "PCP", 'P', STEEL.plate(), 'C', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_GOLD.ordinal()) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk2, 1), new Object[] { "PCP", "PCP", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_NIOBIUM.ordinal()) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk3, 1), new Object[] { "PCP", "PCP", "PCP", 'P', GOLD.plate(), 'C', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_TANTALUM.ordinal()) });
//Special Mods
CraftingManager.addRecipeAuto(new ItemStack(ModItems.horseshoe_magnet, 1), new Object[] { "L L", "I I", "ILI", 'L', ModItems.lodestone, 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.industrial_magnet, 1), new Object[] { "SMS", " B ", "SMS", 'S', STEEL.ingot(), 'M', ModItems.horseshoe_magnet, 'B', ModBlocks.fusion_conductor });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.industrial_magnet, 1), new Object[] { "SMS", " B ", "SMS", 'S', STEEL.ingot(), 'M', ModItems.horseshoe_magnet, 'B', ModBlocks.hadron_coil_alloy });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.heart_container, 1), new Object[] { "HAH", "ACA", "HAH", 'H', ModItems.heart_piece, 'A', AL.ingot(), 'C', ModItems.coin_creeper });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.heart_booster, 1), new Object[] { "GHG", "MCM", "GHG", 'G', GOLD.ingot(), 'H', ModItems.heart_container, 'M', ModItems.morning_glory, 'C', ModItems.coin_maskman });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.heart_fab, 1), new Object[] { "GHG", "MCM", "GHG", 'G', PO210.billet(), 'H', ModItems.heart_booster, 'M', ANY_COKE.gem(), 'C', ModItems.coin_worm });

View File

@ -9,6 +9,7 @@ import static com.hbm.inventory.OreDictManager.*;
import com.hbm.items.ItemEnums.EnumPlantType;
import com.hbm.items.ItemGenericPart.EnumPartType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.tool.ItemBlowtorch;
import com.hbm.items.tool.ItemModMinecart;
@ -62,10 +63,10 @@ public class ToolRecipes {
addShovel( DESH.ingot(), ModItems.desh_shovel);
addHoe( DESH.ingot(), ModItems.desh_hoe);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_sword, 1), new Object[] { "RPR", "RPR", " B ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_sword, 1), new Object[] { "RPR", "RPR", " B ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.centri_stick, 1), new Object[] { ModItems.centrifuge_element, ModItems.energy_core, KEY_STICK });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.smashing_hammer, 1), new Object[] { "STS", "SPS", " P ", 'S', STEEL.block(), 'T', W.block(), 'P', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.meteorite_sword, 1), new Object[] { " B", "GB ", "SG ", 'B', ModItems.blade_meteorite, 'G', GOLD.plate(), 'S', KEY_STICK });
@ -136,7 +137,7 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', AL.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_tool), new Object[] { " A ", " IA", "I ", 'A', PB.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', MINGRADE.wireFine(), 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', ModItems.battery_generic });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', MINGRADE.wireFine(), 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.analysis_tool), new Object[] { " G", " S ", "S ", 'G', KEY_ANYPANE, 'S', STEEL.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.toolbox), new Object[] { "CCC", "CIC", 'C', CU.plate(), 'I', IRON.ingot() });

View File

@ -12,6 +12,7 @@ import static com.hbm.inventory.OreDictManager.*;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ItemEnums.EnumCasingType;
import com.hbm.items.ItemEnums.EnumSecretType;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.GunB92Cell;
@ -148,7 +149,7 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.DRILL_SATURNITE.ordinal()), new Object[] { " IP", "IIM", " IP", 'I', BIGMT.ingot(), 'P', ANY_HARDPLASTIC.ingot(), 'M', WEAPONSTEEL.mechanism() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_DIESEL.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', DURA.plate(), 'P', ModItems.piston_selenium, 'S', STEEL.pipe() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_AVIATION.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', DURA.plateCast(), 'P', ModItems.piston_selenium, 'S', GUNMETAL.mechanism() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_ELECTRIC.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', ANY_PLASTIC.ingot(), 'P', GOLD.wireDense(), 'S', ModBlocks.capacitor_gold });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_ELECTRIC.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', ANY_PLASTIC.ingot(), 'P', GOLD.wireDense(), 'S', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_GOLD.ordinal()) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_TURBO.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', ANY_BISMOIDBRONZE.plateCast(), 'P', ModItems.piston_selenium, 'S', WEAPONSTEEL.mechanism() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.MAGNET.ordinal()), new Object[] { "RGR", "GBG", "RGR", 'R', RUBBER.ingot(), 'G', GOLD.wireDense(), 'B', NB.block() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.SIFTER.ordinal()), new Object[] { "IGI", "IGI", 'I', DURA.ingot(), 'G', ModBlocks.steel_grate });
@ -310,6 +311,9 @@ public class WeaponRecipes {
//Nuke parts
CraftingManager.addRecipeAuto(new ItemStack(ModItems.n2_charge, 1), new Object[] { " D ", "ERE", " D ", 'D', ModItems.ducttape, 'E', ModBlocks.det_charge, 'R', REDSTONE.block() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.battery_spark, 1), new Object[] { " W ", "DSD", "DSD", 'W', MAGTUNG.wireDense(), 'D', ModItems.plate_dineutronium, 'S', ModItems.powder_spark_mix });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.battery_trixite, 1), new Object[] { " W ", "DSD", "DTD", 'W', MAGTUNG.wireDense(), 'D', BIGMT.plateCast(), 'S', ModItems.powder_power, 'T', ModItems.crystal_trixite });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.battery_trixite, 1), new Object[] { " W ", "DTD", "DSD", 'W', MAGTUNG.wireDense(), 'D', BIGMT.plateCast(), 'S', ModItems.powder_power, 'T', ModItems.crystal_trixite });
//Custom nuke rods
CraftingManager.addRecipeAuto(new ItemStack(ModItems.custom_tnt, 1), new Object[] { " C ", "TIT", "TIT", 'C', CU.plate(), 'I', IRON.plate(), 'T', ANY_HIGHEXPLOSIVE.ingot() });

View File

@ -24,7 +24,7 @@ public abstract class EntityDroneBase extends Entity {
public EntityDroneBase(World world) {
super(world);
this.setSize(1.5F, 2.0F);
this.setSize(0.75F, 0.75F);
}
public void setTarget(double x, double y, double z) {

View File

@ -30,8 +30,6 @@ public class EntityMeteor extends Entity {
this.ignoreFrustumCheck = true;
this.isImmuneToFire = true;
this.setSize(4F, 4F);
if(worldObj.isRemote)
this.audioFly = MainRegistry.proxy.getLoopedSound("hbm:entity.meteoriteFallingLoop", 0, 0, 0, 1F, 200F, 0.9F + this.rand.nextFloat() * 0.2F, 0);
}
public List<BlockPos> getBlocksInRadius(World world, int x, int y, int z, int radius) {
@ -144,12 +142,14 @@ public class EntityMeteor extends Entity {
if(this.audioFly != null) this.audioFly.stopSound();
} else {
if(this.audioFly == null) this.audioFly = MainRegistry.proxy.getLoopedSound("hbm:entity.meteoriteFallingLoop", 0, 0, 0, 1F, 200F, 0.9F + this.rand.nextFloat() * 0.2F, 10);
if(this.audioFly.isPlaying()) {
// Update sound
this.audioFly.keepAlive();
this.audioFly.updateVolume(1F);
this.audioFly.updatePosition((int) this.posX, (int) this.posY, (int) this.posZ);
this.audioFly.updatePosition((float) this.posX, (float) (this.posY + this.height / 2), (float) this.posZ);
} else {
// Start playing the sound
EntityPlayer player = MainRegistry.proxy.me();

View File

@ -52,7 +52,7 @@ public abstract class EntityRailCarElectric extends EntityRailCarRidable {
if(stack != null && stack.getItem() instanceof IBatteryItem) {
IBatteryItem battery = (IBatteryItem) stack.getItem();
int powerNeeded = this.getMaxPower() - this.getPower();
long powerProvided = Math.min(battery.getDischargeRate(), battery.getCharge(stack));
long powerProvided = Math.min(battery.getDischargeRate(stack), battery.getCharge(stack));
int powerTransfered = (int) Math.min(powerNeeded, powerProvided);
if(powerTransfered > 0) {

View File

@ -421,7 +421,6 @@ public class ExplosionNukeGeneric {
public static void emp(World world, int x, int y, int z) {
if (!world.isRemote) {
Block b = world.getBlock(x,y,z);
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof IEnergyHandlerMK2) {
@ -440,8 +439,6 @@ public class ExplosionNukeGeneric {
if(random.nextInt(5) <= 1)
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
}
if((b == ModBlocks.fusion_conductor || b == ModBlocks.fusion_motor || b == ModBlocks.fusion_heater) && random.nextInt(10) == 0)
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
}
}

View File

@ -110,7 +110,7 @@ public class ExplosionTom {
if(y <= craterFloor) {
if(worldObj.rand.nextInt(499) < 1) {
if(worldObj.rand.nextInt(200) == 0) {
worldObj.setBlock(pX, y, pZ, ModBlocks.ore_tektite_osmiridium, 0, 2);
} else {
worldObj.setBlock(pX, y, pZ, ModBlocks.tektite, 0, 2);

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.UUID;
import com.hbm.config.RadiationConfig;
import com.hbm.config.ServerConfig;
import com.hbm.entity.mob.EntityDuck;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.lib.ModDamageSource;
@ -261,6 +262,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
/// CONTAGION ///
public static int getContagion(EntityLivingBase entity) {
if(!ServerConfig.ENABLE_MKU.get()) return 0;
return getData(entity).contagion;
}
@ -315,7 +317,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
props.setFloat("hfr_digamma", digamma);
props.setInteger("hfr_asbestos", asbestos);
props.setInteger("hfr_bomb", bombTimer);
props.setInteger("hfr_contagion", contagion);
if(ServerConfig.ENABLE_MKU.get()) props.setInteger("hfr_contagion", contagion);
props.setInteger("hfr_blacklung", blacklung);
props.setInteger("hfr_oil", oil);
props.setInteger("hfr_fire", fire);
@ -343,7 +345,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
digamma = props.getFloat("hfr_digamma");
asbestos = props.getInteger("hfr_asbestos");
bombTimer = props.getInteger("hfr_bomb");
contagion = props.getInteger("hfr_contagion");
if(ServerConfig.ENABLE_MKU.get()) contagion = props.getInteger("hfr_contagion");
blacklung = props.getInteger("hfr_blacklung");
oil = props.getInteger("hfr_oil");
fire = props.getInteger("hfr_fire");

View File

@ -149,7 +149,7 @@ public class BobmazonOfferFactory {
special.add(new Offer(ItemKitNBT.create(
new ItemStack(ModItems.rod_of_discord).setStackDisplayName("Cock Joke"),
ModItems.canned_conserve.stackFromEnum(64, EnumFoodType.JIZZ).setStackDisplayName("Class A Horse Semen"),
ModItems.canned_conserve.stackFromEnum(64, EnumFoodType.SLIME).setStackDisplayName("Class A Horse Semen"),
new ItemStack(ModItems.pipe_lead).setStackDisplayName("Get Nutted, Dumbass"),
new ItemStack(ModItems.gem_alexandrite)
).setStackDisplayName("The Nut Bucket"), Requirement.HIDDEN, 64));

View File

@ -6,6 +6,7 @@ import java.util.Random;
import com.hbm.config.GeneralConfig;
import com.hbm.config.RadiationConfig;
import com.hbm.config.ServerConfig;
import com.hbm.config.WorldConfig;
import com.hbm.entity.mob.EntityCreeperNuclear;
import com.hbm.entity.mob.EntityDuck;
@ -371,6 +372,7 @@ public class EntityEffectHandler {
}
private static void handleContagion(EntityLivingBase entity) {
if(!ServerConfig.ENABLE_MKU.get()) return;
World world = entity.worldObj;
@ -676,7 +678,7 @@ public class EntityEffectHandler {
FlameCreator.composeEffect(entity.worldObj, x - living.width / 2 + living.width * rand.nextDouble(), y + rand.nextDouble() * living.height, z - living.width / 2 + living.width * rand.nextDouble(), FlameCreator.META_BLACK);
}
if(props.fire > 0 || props.phosphorus > 0 || props.balefire > 0) if(!entity.isEntityAlive()) ConfettiUtil.decideConfetti(living, DamageSource.onFire);
if(props.fire > 0 || props.phosphorus > 0 || props.balefire > 0 || props.blackFire > 0) if(!entity.isEntityAlive()) ConfettiUtil.decideConfetti(living, DamageSource.onFire);
}
private static void handleDashing(Entity entity) {

View File

@ -23,7 +23,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@Deprecated
@Deprecated // an experiment that i had to staple more and more features to until it ended up a bloated decaying corpse
public abstract class NEIUniversalHandler extends TemplateRecipeHandler implements ICompatNHNEI {
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();

View File

@ -259,11 +259,6 @@ public class OreDictManager {
* RARE METALS
*/
public static final DictFrame AUSTRALIUM = new DictFrame("Australium");
public static final DictFrame REIIUM = new DictFrame("Reiium");
public static final DictFrame WEIDANIUM = new DictFrame("Weidanium");
public static final DictFrame UNOBTAINIUM = new DictFrame("Unobtainium");
public static final DictFrame VERTICIUM = new DictFrame("Verticium");
public static final DictFrame DAFFERGON = new DictFrame("Daffergon");
/*
* RARE EARTHS
*/
@ -466,11 +461,6 @@ public class OreDictManager {
* RARE METALS
*/
AUSTRALIUM .nugget(nugget_australium) .billet(billet_australium) .ingot(ingot_australium) .dust(powder_australium) .block(block_australium) .ore(ore_australium);
REIIUM .block(block_reiium);
WEIDANIUM .block(block_weidanium);
UNOBTAINIUM .block(block_unobtainium);
VERTICIUM .block(block_verticium);
DAFFERGON .block(block_daffergon);
/*
* RARE EARTHS

View File

@ -0,0 +1,62 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerBatteryREDD extends Container {
protected TileEntityBatteryREDD socket;
public ContainerBatteryREDD(InventoryPlayer invPlayer, TileEntityBatteryREDD tedf) {
this.socket = tedf;
this.addSlotToContainer(new SlotNonRetarded(socket, 0, 26, 53));
this.addSlotToContainer(new SlotNonRetarded(socket, 1, 80, 53));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 99 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 157));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return socket.isUseableByPlayer(player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack copy = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
copy = stack.copy();
if(index <= 1) {
if(!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) return null;
} else {
if(!this.mergeItemStack(stack, 0, 2, false)) return null;
}
if(stack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return copy;
}
}

View File

@ -0,0 +1,61 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerBatterySocket extends Container {
protected TileEntityBatterySocket socket;
public ContainerBatterySocket(InventoryPlayer invPlayer, TileEntityBatterySocket tedf) {
this.socket = tedf;
this.addSlotToContainer(new SlotNonRetarded(socket, 0, 35, 35));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 99 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 157));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return socket.isUseableByPlayer(player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack copy = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
copy = stack.copy();
if(index == 0) {
if(!this.mergeItemStack(stack, 1, this.inventorySlots.size(), true)) return null;
} else {
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
}
if(stack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return copy;
}
}

View File

@ -1,88 +0,0 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotCraftingOutput;
import com.hbm.tileentity.machine.TileEntityMachineSchrabidiumTransmutator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerMachineSchrabidiumTransmutator extends Container {
private TileEntityMachineSchrabidiumTransmutator nukeBoy;
public ContainerMachineSchrabidiumTransmutator(InventoryPlayer invPlayer, TileEntityMachineSchrabidiumTransmutator tedf) {
nukeBoy = tedf;
this.addSlotToContainer(new Slot(tedf, 0, 44, 63));
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 1, 134, 63));
this.addSlotToContainer(new Slot(tedf, 2, 26, 18));
this.addSlotToContainer(new Slot(tedf, 3, 8, 108));
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 9; j++)
{
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
}
}
for(int i = 0; i < 9; i++)
{
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
{
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
if (var4 != null && var4.getHasStack())
{
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if (par2 <= 3) {
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
{
return null;
}
}
else if (!this.mergeItemStack(var5, 0, 1, false))
{
if (!this.mergeItemStack(var5, 3, 4, false))
if (!this.mergeItemStack(var5, 2, 3, false))
return null;
}
if (var5.stackSize == 0)
{
var4.putStack((ItemStack) null);
}
else
{
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return nukeBoy.isUseableByPlayer(player);
}
@Override
public void updateProgressBar(int i, int j) {
if(i == 1)
{
nukeBoy.power = j;
}
}
}

View File

@ -70,7 +70,12 @@ public class FluidType {
this.id = Fluids.registerSelf(this);
}
/** For custom fluids */
public FluidType(String name, int color, int p, int f, int r, EnumSymbol symbol, String texName, int tint, int id, String displayName) {
setupCustom(name, color, p, f, r, symbol, texName, tint, id, displayName);
}
public FluidType setupCustom(String name, int color, int p, int f, int r, EnumSymbol symbol, String texName, int tint, int id, String displayName) {
this.stringId = name;
this.color = color;
this.unlocalized = "hbmfluid." + name.toLowerCase(Locale.US);
@ -85,6 +90,7 @@ public class FluidType {
this.id = id;
Fluids.register(this, id);
return this;
}
public FluidType(int forcedId, String name, int color, int p, int f, int r, EnumSymbol symbol) {
@ -97,6 +103,10 @@ public class FluidType {
/** For CompatFluidRegistry */
public FluidType(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
setupForeign(name, id, color, p, f, r, symbol, texture);
}
public FluidType setupForeign(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
this.stringId = name;
this.color = color;
this.unlocalized = "hbmfluid." + name.toLowerCase(Locale.US);
@ -108,8 +118,9 @@ public class FluidType {
this.renderWithTint = true;
this.id = id;
Fluids.register(this, id);
Fluids.foreignFluids.add(this);
Fluids.register(this, id);
return this;
}
public FluidType setTemp(int temperature) {

View File

@ -418,6 +418,8 @@ public class Fluids {
if(!customTypes.exists()) initDefaultFluids(customTypes);
readCustomFluids(customTypes);
for(IFluidRegisterListener listener : additionalListeners) listener.onFluidsLoad();
//AND DON'T FORGET THE META DOWN HERE
// V V V V V V V V
@ -601,6 +603,7 @@ public class Fluids {
ACID = PEROXIDE;
for(FluidType custom : customFluids) metaOrder.add(custom);
for(FluidType custom : foreignFluids) metaOrder.add(custom);
CHLORINE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 2F, 20, HazardClass.GAS_LUNG, false)));
PHOSGENE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 20, HazardClass.GAS_LUNG, false)));
@ -670,7 +673,6 @@ public class Fluids {
throw new IllegalStateException("A severe error has occoured during NTM's fluid registering process! The MetaOrder and Mappings are inconsistent! Mapping size: " + idMapping.size()+ " / MetaOrder size: " + metaOrder.size());
}
/// FINAL ///
long baseline = 100_000L; //we do not know
@ -817,7 +819,9 @@ public class Fluids {
String texture = obj.get("texture").getAsString();
int temperature = obj.get("temperature").getAsInt();
FluidType type = new FluidType(name, color, p, f, r, symbol, texture, tint, id, displayName).setTemp(temperature);
FluidType type = fluidMigration.get(name);
if(type == null) type = new FluidType(name, color, p, f, r, symbol, texture, tint, id, displayName).setTemp(temperature);
else type.setupCustom(name, color, p, f, r, symbol, texture, tint, id, displayName).setTemp(temperature);
customFluids.add(type);
}
@ -881,13 +885,16 @@ public class Fluids {
ex.printStackTrace();
}
}
public static HashMap<String, FluidType> fluidMigration = new HashMap(); // since reloading would create new fluid instances, and those break existing machines
public static void reloadFluids(){
File folder = MainRegistry.configHbmDir;
File customTypes = new File(folder.getAbsolutePath() + File.separatorChar + "hbmFluidTypes.json");
if(!customTypes.exists()) initDefaultFluids(customTypes);
for(FluidType type : customFluids){
for(FluidType type : customFluids) {
fluidMigration.put(type.getName(), type);
idMapping.remove(type.getID());
registerOrder.remove(type);
nameMapping.remove(type.getName());
@ -895,7 +902,8 @@ public class Fluids {
}
customFluids.clear();
for(FluidType type : foreignFluids){
for(FluidType type : foreignFluids) {
fluidMigration.put(type.getName(), type);
idMapping.remove(type.getID());
registerOrder.remove(type);
nameMapping.remove(type.getName());
@ -915,6 +923,7 @@ public class Fluids {
}
for(IFluidRegisterListener listener : additionalListeners) listener.onFluidsLoad();
for(FluidType custom : foreignFluids) metaOrder.add(custom);
}
private static void registerCalculatedFuel(FluidType type, double base, double combustMult, FuelGrade grade) {

View File

@ -0,0 +1,87 @@
package com.hbm.inventory.gui;
import java.math.BigInteger;
import java.util.Locale;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.inventory.container.ContainerBatteryREDD;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class GUIBatteryREDD extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_battery_redd.png");
private TileEntityBatteryREDD battery;
public GUIBatteryREDD(InventoryPlayer invPlayer, TileEntityBatteryREDD tedf) {
super(new ContainerBatteryREDD(invPlayer, tedf));
battery = tedf;
this.xSize = 176;
this.ySize = 181;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
}
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
NBTTagCompound data = new NBTTagCompound();
if(this.checkClick(x, y, 133, 16, 18, 18)) { this.click(); data.setBoolean("low", true); }
if(this.checkClick(x, y, 133, 52, 18, 18)) { this.click(); data.setBoolean("high", true); }
if(this.checkClick(x, y, 152, 35, 16, 16)) { this.click(); data.setBoolean("priority", true); }
if(!data.hasNoTags()) PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, battery.xCoord, battery.yCoord, battery.zCoord));
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.battery.hasCustomInventoryName() ? this.battery.getInventoryName() : I18n.format(this.battery.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
GL11.glPushMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glScaled(0.5, 0.5, 1);
String label = String.format(Locale.US, "%,d", battery.power) + " HE";
this.fontRendererObj.drawString(label, 242 - this.fontRendererObj.getStringWidth(label), 45, 0x00ff00);
String deltaText = String.format(Locale.US, "%,d", battery.delta) + " HE/s";
int comp = battery.delta.compareTo(BigInteger.ZERO);
if(comp > 0) deltaText = EnumChatFormatting.GREEN + "+" + deltaText;
else if(comp < 0) deltaText = EnumChatFormatting.RED + deltaText;
else deltaText = EnumChatFormatting.YELLOW + "+" + deltaText;
this.fontRendererObj.drawString(deltaText, 242 - this.fontRendererObj.getStringWidth(deltaText), 65, 0x00ff00);
GL11.glPopMatrix();
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft + 133, guiTop + 16, 176, 52 + battery.redLow * 18, 18, 18);
drawTexturedModalRect(guiLeft + 133, guiTop + 52, 176, 52 + battery.redHigh * 18, 18, 18);
drawTexturedModalRect(guiLeft + 152, guiTop + 35, 194, 52 + battery.priority.ordinal() * 16 - 16, 16, 16);
}
}

View File

@ -0,0 +1,116 @@
package com.hbm.inventory.gui;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerBatterySocket;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
import com.hbm.util.BobMathUtil;
import com.hbm.util.i18n.I18nUtil;
import api.hbm.energymk2.IBatteryItem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class GUIBatterySocket extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_battery_socket.png");
private TileEntityBatterySocket battery;
public GUIBatterySocket(InventoryPlayer invPlayer, TileEntityBatterySocket tedf) {
super(new ContainerBatterySocket(invPlayer, tedf));
battery = tedf;
this.xSize = 176;
this.ySize = 181;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
if(battery.slots[0] != null && battery.slots[0].getItem() instanceof IBatteryItem) {
//this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 69 - 52, 52, 52, battery.power, battery.getMaxPower());
IBatteryItem item = (IBatteryItem) battery.slots[0].getItem();
String deltaText = BobMathUtil.getShortNumber(Math.abs(battery.delta)) + "HE/s";
if(battery.delta > 0) deltaText = EnumChatFormatting.GREEN + "+" + deltaText;
else if(battery.delta < 0) deltaText = EnumChatFormatting.RED + "-" + deltaText;
else deltaText = EnumChatFormatting.YELLOW + "+" + deltaText;
String[] info = { BobMathUtil.getShortNumber(item.getCharge(battery.slots[0])) + "/" + BobMathUtil.getShortNumber(item.getMaxCharge(battery.slots[0])) + "HE", deltaText };
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 62, guiTop + 69 - 52, 34, 52, mouseX, mouseY, info);
}
String lang = null;
switch(battery.priority) {
case LOW: lang = "low"; break;
case HIGH: lang = "high"; break;
default: lang = "normal"; break;
}
List<String> priority = new ArrayList();
priority.add(I18nUtil.resolveKey("battery.priority." + lang));
priority.add(I18nUtil.resolveKey("battery.priority.recommended"));
String[] desc = I18nUtil.resolveKeyArray("battery.priority." + lang + ".desc");
for(String s : desc) priority.add(s);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 125, guiTop + 35, 16, 16, mouseX, mouseY, priority);
}
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
NBTTagCompound data = new NBTTagCompound();
if(this.checkClick(x, y, 106, 16, 18, 18)) { this.click(); data.setBoolean("low", true); }
if(this.checkClick(x, y, 106, 52, 18, 18)) { this.click(); data.setBoolean("high", true); }
if(this.checkClick(x, y, 125, 35, 16, 16)) { this.click(); data.setBoolean("priority", true); }
if(!data.hasNoTags()) PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, battery.xCoord, battery.yCoord, battery.zCoord));
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.battery.hasCustomInventoryName() ? this.battery.getInventoryName() : I18n.format(this.battery.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(battery.slots[0] != null && battery.slots[0].getItem() instanceof IBatteryItem) {
IBatteryItem item = (IBatteryItem) battery.slots[0].getItem();
long power = item.getCharge(battery.slots[0]);
long maxPower = item.getMaxCharge(battery.slots[0]);
if(power > Long.MAX_VALUE / 100) {
power /= 100;
maxPower /= 100;
}
if(maxPower <= 1) maxPower = 1;
int p = (int) (power * 52 / maxPower); // won't work then flying too close to the sun (the limits of the LONG data type)
drawTexturedModalRect(guiLeft + 62, guiTop + 69 - p, 176, 52 - p, 34, p);
}
drawTexturedModalRect(guiLeft + 106, guiTop + 16, 176, 52 + battery.redLow * 18, 18, 18);
drawTexturedModalRect(guiLeft + 106, guiTop + 52, 176, 52 + battery.redHigh * 18, 18, 18);
drawTexturedModalRect(guiLeft + 125, guiTop + 35, 194, 52 + battery.priority.ordinal() * 16 - 16, 16, 16);
}
}

View File

@ -1,23 +1,29 @@
package com.hbm.inventory.gui;
import com.hbm.lib.RefStrings;
import com.hbm.util.Tuple;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.Locale;
import java.util.Stack;
public class GUICalculator extends GuiScreen {
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/gui/calculator.png");
private int xSize = 220;
private int ySize = 50;
private int borderWidth = 2;
private GuiTextField inputField;
private int selectedHist = -1;
private static final int maxHistory = 6;
private static Deque<Tuple.Pair<String, Double>> history = new ArrayDeque<>();
private String latestResult = "?";
@Override
@ -46,15 +52,31 @@ public class GUICalculator extends GuiScreen {
String input = inputField.getText().replaceAll("[^\\d+\\-*/^!.()\\sA-Za-z]+", "");
if (p_73869_1_ == 13 || p_73869_1_ == 10) { // when pressing enter (CR or LF)
try {
double result = evaluateExpression(input);
String plainStringRepresentation = (new BigDecimal(result, MathContext.DECIMAL64)).toPlainString();
GuiScreen.setClipboardString(plainStringRepresentation);
inputField.setText(plainStringRepresentation);
inputField.setCursorPositionEnd();
inputField.setSelectionPos(0);
} catch (Exception ignored) {}
return;
if (selectedHist != -1) {
input = new ArrayList<>(history).get(selectedHist).key;
inputField.setText(input);
selectedHist = -1;
} else {
try {
double result = evaluateExpression(input);
history.addFirst(new Tuple.Pair<String,Double>(input, result));
if (history.size() > maxHistory) history.removeLast();
String plainStringRepresentation = (new BigDecimal(result, MathContext.DECIMAL64)).toPlainString();
GuiScreen.setClipboardString(plainStringRepresentation);
inputField.setText(plainStringRepresentation);
inputField.setCursorPositionEnd();
inputField.setSelectionPos(0);
} catch (Exception ignored) {}
return;
}
}
if (p_73869_2_ == 200) { // up arrow
selectedHist = Math.max(selectedHist - 1, -1);
} else if (p_73869_2_ == 208) { // down arrow
selectedHist = Math.min(selectedHist + 1, history.size() - 1);
} else {
selectedHist = -1;
}
if (input.isEmpty()) {
@ -72,14 +94,27 @@ public class GUICalculator extends GuiScreen {
super.drawScreen(mouseX, mouseY, partialTicks);
GL11.glColor4f(1F, 1F, 1F, 1F);
mc.getTextureManager().bindTexture(texture);
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
int histHeight = (fontRendererObj.FONT_HEIGHT + 2) * maxHistory;
int histStart = y + 30 + fontRendererObj.FONT_HEIGHT + 8;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
drawRect(x, y, x+xSize, y+ySize+histHeight, 0xFF2d2d2d);
drawRect(x+borderWidth, y+borderWidth, x+xSize-borderWidth, y+ySize-borderWidth+histHeight, 0xFF3d3d3d);
drawRect(x, histStart - 5, x+xSize, histStart - 3, 0xFF2d2d2d);
inputField.drawTextBox();
fontRendererObj.drawString("=" + latestResult, x + 5, y + 30, -1);
int i = 0;
for (Tuple.Pair<String, Double> prevInput : history) {
int hy = y + 50 + (fontRendererObj.FONT_HEIGHT+1)*i;
if (i == selectedHist) {
drawRect(x + 4, hy - 1, x + 4 + xSize - 9, hy + fontRendererObj.FONT_HEIGHT, 0xFF111111);
}
fontRendererObj.drawString(prevInput.key + " = " + prevInput.value, x + 5, hy, -1);
i++;
}
}
/**

View File

@ -6,13 +6,12 @@ import com.hbm.inventory.container.ContainerCrateDesh;
import com.hbm.lib.RefStrings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.util.ResourceLocation;
public class GUICrateDesh extends GuiContainer {
public class GUICrateDesh extends GuiCrateBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_desh.png");
private IInventory crate;

View File

@ -7,12 +7,11 @@ import com.hbm.inventory.container.ContainerCrateIron;
import com.hbm.lib.RefStrings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUICrateIron extends GuiContainer {
public class GUICrateIron extends GuiCrateBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_iron.png");
private IInventory diFurnace;

View File

@ -6,13 +6,12 @@ import com.hbm.inventory.container.ContainerCrateSteel;
import com.hbm.lib.RefStrings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.util.ResourceLocation;
public class GUICrateSteel extends GuiContainer {
public class GUICrateSteel extends GuiCrateBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_steel.png");
private IInventory crate;

View File

@ -7,12 +7,11 @@ import com.hbm.inventory.container.ContainerCrateTemplate;
import com.hbm.lib.RefStrings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUICrateTemplate extends GuiContainer {
public class GUICrateTemplate extends GuiCrateBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_template.png");
private IInventory diFurnace;

View File

@ -8,12 +8,11 @@ import com.hbm.inventory.container.ContainerCrateTungsten;
import com.hbm.lib.RefStrings;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUICrateTungsten extends GuiContainer {
public class GUICrateTungsten extends GuiCrateBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_tungsten.png");
private static ResourceLocation texture_hot = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_tungsten_hot.png");

View File

@ -1,60 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerMachineSchrabidiumTransmutator;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineSchrabidiumTransmutator;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIMachineSchrabidiumTransmutator extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_transmutator.png");
private TileEntityMachineSchrabidiumTransmutator diFurnace;
public GUIMachineSchrabidiumTransmutator(InventoryPlayer invPlayer, TileEntityMachineSchrabidiumTransmutator tedf) {
super(new ContainerMachineSchrabidiumTransmutator(invPlayer, tedf));
diFurnace = tedf;
this.xSize = 176;
this.ySize = 222;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 106 - 88, 16, 88, diFurnace.power, diFurnace.maxPower);
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format(String.valueOf(diFurnace.getPower()) + " HE"), this.xSize / 2 - this.fontRendererObj.getStringWidth(String.valueOf(diFurnace.getPower()) + " HE") / 2, 16, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(diFurnace.getPower() > 0) {
int i = (int)diFurnace.getPowerScaled(88);
drawTexturedModalRect(guiLeft + 8, guiTop + 106 - i, 176, 88 - i, 16, i);
}
if(diFurnace.isProcessing())
{
int j1 = diFurnace.getProgressScaled(66);
drawTexturedModalRect(guiLeft + 64, guiTop + 55, 176, 88, j1, 66);
}
}
}

View File

@ -0,0 +1,19 @@
package com.hbm.inventory.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Container;
public abstract class GuiCrateBase extends GuiContainer {
public GuiCrateBase(Container container) {
super(container);
}
@Override
protected void mouseClicked(int x, int y, int button) {
boolean touchScreen = this.mc.gameSettings.touchscreen;
this.mc.gameSettings.touchscreen = false;
super.mouseClicked(x, y, button);
this.mc.gameSettings.touchscreen = touchScreen;
}
}

View File

@ -60,7 +60,7 @@ public class Mats {
public static final NTMMaterial MAT_DIAMOND = makeNonSmeltable(1430, DIAMOND, 0xFFFFFF, 0x1B7B6B, 0x8CF4E2).setConversion(MAT_CARBON, 1, 1).setAutogen(FRAGMENT).n();
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setAutogen(FRAGMENT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setAutogen(FRAGMENT, WIRE, NUGGET, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setAutogen(FRAGMENT).n();
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setAutogen(FRAGMENT, INGOT).n();
public static final NTMMaterial MAT_OBSIDIAN = makeSmeltable(_VS + 02, df("Obsidian"), 0x3D234D).n();
public static final NTMMaterial MAT_HEMATITE = makeAdditive( 2601, HEMATITE, 0xDFB7AE, 0x5F372E, 0x6E463D).m();
public static final NTMMaterial MAT_WROUGHTIRON = makeSmeltable(2602, df("WroughtIron"), 0xFAAB89).m();
@ -107,7 +107,7 @@ public class Mats {
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setAutogen(FRAGMENT, NUGGET, WIRE, BOLT, DUST, PLATE, CASTPLATE, PIPE, BLOCK).m();
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF, 0xB200FF, 0xB200FF).setAutogen(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
public static final NTMMaterial MAT_ARSENIC = makeSmeltable(3300, AS, 0x6CBABA, 0x242525, 0x558080).setAutogen(NUGGET).m();
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setAutogen(NUGGET, DUST, BLOCK).m();
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setAutogen(FRAGMENT, NUGGET, DUST, BLOCK).m();
public static final NTMMaterial MAT_NEODYMIUM = makeSmeltable(6000, ND, 0xE6E6B6, 0x1C1C00, 0x8F8F5F).setAutogen(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setAutogen(FRAGMENT, NUGGET, DUSTTINY, DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_BERYLLIUM = makeSmeltable(400, BE, 0xB2B2A6, 0x0F0F03, 0xAE9572).setAutogen(FRAGMENT, NUGGET, DUST, BLOCK).m();

View File

@ -14,6 +14,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.FluidType;
@ -59,23 +60,25 @@ public class AnnihilatorRecipes extends SerializableRecipe {
@Override
public void registerDefaults() {
recipes.put(STEEL.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "steel"))));
recipes.put(SI.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip"))));
recipes.put(BI.nugget(), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_bismoid"))));
recipes.put(ModItems.pellet_charged, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_quantum"))));
recipes.put(U.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "gascent"))));
recipes.put(ANY_PLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "plastic"))));
recipes.put(RUBBER.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "rubber"))));
recipes.put(FERRO.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "ferrouranium"))));
recipes.put(SR.dust(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "strontium"))));
recipes.put(ANY_HARDPLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "hardplastic"))));
recipes.put(ANY_RESISTANTALLOY.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "tcalloy"))));
recipes.put(ModItems.powder_chlorophyte, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"))));
recipes.put(new ComparableStack(ModItems.ammo_standard, 1, EnumAmmo.BMG50_FMJ), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "bmg"))));
recipes.put(new ComparableStack(ModItems.ammo_arty, 1, 0), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "arty"))));
recipes.put(new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "controller"))));
if(GeneralConfig.enable528) {
recipes.put(STEEL.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "steel"))));
recipes.put(SI.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip"))));
recipes.put(BI.nugget(), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_bismoid"))));
recipes.put(ModItems.pellet_charged, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_quantum"))));
recipes.put(U.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "gascent"))));
recipes.put(ANY_PLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "plastic"))));
recipes.put(RUBBER.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "rubber"))));
recipes.put(FERRO.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "ferrouranium"))));
recipes.put(SR.dust(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "strontium"))));
recipes.put(ANY_HARDPLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "hardplastic"))));
recipes.put(ANY_RESISTANTALLOY.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "tcalloy"))));
recipes.put(ModItems.powder_chlorophyte, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"))));
recipes.put(new ComparableStack(ModItems.ammo_standard, 1, EnumAmmo.BMG50_FMJ), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "bmg"))));
recipes.put(new ComparableStack(ModItems.ammo_arty, 1, 0), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "arty"))));
recipes.put(new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "controller"))));
}
}
@Override public String getFileName() { return "hbmAnnihilator.json"; }

View File

@ -80,7 +80,7 @@ public class ArcWelderRecipes extends SerializableRecipe {
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_CMB.id), 1_200, 10_000_000L, new FluidStack(Fluids.REFORMGAS, 1_000),
new OreDictStack(CMB.plateCast(), 2)));
//pre-DFC
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id), 6_000, 20_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id), 6_000, 50_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
new OreDictStack(OSMIRIDIUM.plateCast(), 2)));
//Missile Parts

View File

@ -115,10 +115,6 @@ import net.minecraft.item.ItemStack;
makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()) }, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new OreDictStack(STEEL.shell(), 1), new ComparableStack(ModItems.piston_selenium, 1), new OreDictStack(STEEL.plateCast(), 1), new ComparableStack(ModItems.coil_copper, 4), }, 60);
makeRecipe(new ComparableStack(ModBlocks.machine_rtg_grey, 1), new AStack[] {new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(STEEL.plate(), 4), new OreDictStack(MINGRADE.wireFine(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 3), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_battery, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 1), new OreDictStack(S.dust(), 12), new OreDictStack(PB.dust(), 12) },100);
makeRecipe(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new AStack[] {new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(CO.dust(), 12), new OreDictStack(LI.dust(), 12) },100);
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_battery, 1), new AStack[] {new OreDictStack(DESH.ingot(), 16), new OreDictStack(NP237.dust(), 12), new OreDictStack(SA326.dust(), 12) },200);
makeRecipe(new ComparableStack(ModBlocks.machine_dineutronium_battery, 1), new AStack[] {new OreDictStack(DNT.ingot(), 24), new ComparableStack(ModItems.powder_spark_mix, 12), new ComparableStack(ModItems.battery_spark_cell_1000, 1), new OreDictStack(CMB.ingot(), 32) }, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_shredder, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModBlocks.steel_beam, 2), new ComparableStack(Blocks.iron_bars, 2) },200);
makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.drill_titanium, 1) }, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.plateWelded(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor_desh) }, 400);
@ -130,16 +126,8 @@ import net.minecraft.item.ItemStack;
makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(TI.shell(), 3), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate(), 6), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_TAR.any(), 4), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new OreDictStack(DURA.bolt(), 8), new ComparableStack(ModBlocks.machine_battery, 3), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {!exp ? new OreDictStack(TI.shell(), 8) : new OreDictStack(TI.heavyComp(), 1), new OreDictStack(DURA.pipe(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 12), new ComparableStack(ModItems.turbine_tungsten, 1), new OreDictStack(GOLD.wireDense(), 12), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC.ordinal()) }, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_turbinegas, 1), new AStack[] {!exp ? new OreDictStack(STEEL.shell(), 10) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(GOLD.wireDense(), 12), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.turbine_tungsten, 3), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.ingot_rubber, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC.ordinal())}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 8), new OreDictStack(ALLOY.plate(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1) },300);
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_transmutator, 1), new AStack[] {new OreDictStack(MAGTUNG.ingot(), 1), !exp ? new OreDictStack(TI.ingot(), 24) : new OreDictStack(TI.heavyComp(), 2), !exp ? new OreDictStack(ALLOY.plate(), 18) : new OreDictStack(ALLOY.heavyComp(), 1), new OreDictStack(STEEL.plateWelded(), 12), new ComparableStack(ModItems.plate_desh, 6), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModBlocks.machine_battery, 5), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED.ordinal()), },500);
makeRecipe(new ComparableStack(ModBlocks.fusion_conductor, 1), new AStack[] {new ComparableStack(ModItems.coil_advanced_alloy, 5), }, 100);
makeRecipe(new ComparableStack(ModBlocks.fusion_center, 1), new AStack[] {new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new OreDictStack(ALLOY.wireFine(), 24), },200);
makeRecipe(new ComparableStack(ModBlocks.fusion_motor, 1), new AStack[] {new OreDictStack(TI.ingot(), 4), new OreDictStack(STEEL.ingot(), 2), new ComparableStack(ModItems.motor, 4), },250);
makeRecipe(new ComparableStack(ModBlocks.fusion_heater, 4), new AStack[] {new OreDictStack(W.plateWelded(), 2), new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.magnetron, 2) }, 200);
makeRecipe(new ComparableStack(ModBlocks.watz_element, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(ZR.ingot(), 2), new OreDictStack(BIGMT.ingot(), 2), new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},200);
makeRecipe(new ComparableStack(ModBlocks.watz_cooler, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 2), }, 200);
makeRecipe(new ComparableStack(ModBlocks.watz_end, 3), new AStack[] {new OreDictStack(ANY_RESISTANTALLOY.plateWelded()), new OreDictStack(B.ingot(), 3), new OreDictStack(STEEL.plateWelded(), 2), }, 100);
@ -193,55 +181,6 @@ import net.minecraft.item.ItemStack;
makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(ANY_RUBBER.ingot(), 8), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC.ordinal()), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300);
makeRecipe(new ComparableStack(ModBlocks.machine_radar_large, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 6), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(ANY_RUBBER.ingot(), 16), new ComparableStack(ModItems.magnetron, 12), new ComparableStack(ModItems.motor_desh, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.coil_copper, 32), new ComparableStack(ModItems.crt_display, 4), },600);
makeRecipe(new ComparableStack(ModBlocks.machine_forcefield, 1), new AStack[] {new OreDictStack(ALLOY.plate(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.machine_transformer, 1), },1000);
makeRecipe(new ComparableStack(ModItems.mp_thruster_10_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100);
makeRecipe(new ComparableStack(ModItems.mp_thruster_10_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.coil_tungsten, 1), new OreDictStack(DURA.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100);
makeRecipe(new ComparableStack(ModItems.mp_thruster_10_xenon, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 4), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.arc_electrode, 4), },100);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 8), new OreDictStack(STEEL.plate(), 6), new OreDictStack(DESH.ingot(), 4), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_kerosene_dual, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new OreDictStack(DESH.ingot(), 1), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_kerosene_triple, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 6), new OreDictStack(STEEL.plate(), 6), new OreDictStack(DESH.ingot(), 2), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(DURA.ingot(), 6), new ComparableStack(ModItems.coil_tungsten, 3), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_solid_hexdecuple, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(DURA.ingot(), 12), new ComparableStack(ModItems.coil_tungsten, 6), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_hydrogen, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 8), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.tank_steel, 1), new OreDictStack(DESH.ingot(), 4), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_hydrogen_dual, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.tank_steel, 1), new OreDictStack(DESH.ingot(), 1), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_balefire_short, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModBlocks.pwr_fuel, 1), new OreDictStack(DESH.ingot(), 8), new OreDictStack(BIGMT.plate(), 12), new OreDictStack(CU.plateCast(), 2), new ComparableStack(ModItems.ingot_uranium_fuel, 4), new ComparableStack(ModItems.pipes_steel, 2), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModBlocks.pwr_fuel, 2), new OreDictStack(DESH.ingot(), 16), new OreDictStack(BIGMT.plate(), 24), new OreDictStack(CU.plateCast(), 4), new ComparableStack(ModItems.ingot_uranium_fuel, 8), new ComparableStack(ModItems.pipes_steel, 2), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_15_balefire_large, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModBlocks.pwr_fuel, 2), new OreDictStack(DESH.ingot(), 24), new OreDictStack(BIGMT.plate(), 32), new OreDictStack(CU.plateCast(), 4), new ComparableStack(ModItems.ingot_uranium_fuel, 8), new ComparableStack(ModItems.pipes_steel, 2), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_20_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_20, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 16), new OreDictStack(STEEL.plate(), 12), new OreDictStack(DESH.ingot(), 8), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_20_kerosene_dual, 1), new AStack[] {new ComparableStack(ModItems.seg_20, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 8), new OreDictStack(STEEL.plate(), 6), new OreDictStack(DESH.ingot(), 4), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_20_kerosene_triple, 1), new AStack[] {new ComparableStack(ModItems.seg_20, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 12), new OreDictStack(STEEL.plate(), 8), new OreDictStack(DESH.ingot(), 6), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_20_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_20, 1), new ComparableStack(ModItems.coil_tungsten, 8), new OreDictStack(DURA.ingot(), 16), new OreDictStack(STEEL.plate(), 12), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_20_solid_multi, 1), new AStack[] {new ComparableStack(ModItems.seg_20, 1), new ComparableStack(ModItems.coil_tungsten, 12), new OreDictStack(DURA.ingot(), 18), new OreDictStack(STEEL.plate(), 12), },500);
makeRecipe(new ComparableStack(ModItems.mp_thruster_20_solid_multier, 1), new AStack[] {new ComparableStack(ModItems.seg_20, 1), new ComparableStack(ModItems.coil_tungsten, 16), new OreDictStack(DURA.ingot(), 20), new OreDictStack(STEEL.plate(), 12), },500);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 2), new ComparableStack(ModBlocks.steel_scaffold, 3), new OreDictStack(TI.plate(), 12), new OreDictStack(STEEL.plate(), 3), },100);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 2), new ComparableStack(ModBlocks.steel_scaffold, 3), new OreDictStack(TI.plate(), 12), new OreDictStack(AL.plate(), 3), },100);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_xenon, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 2), new ComparableStack(ModBlocks.steel_scaffold, 3), new OreDictStack(TI.plate(), 12), new OreDictStack(CU.plateCast(), 3), },100);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_long_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 2), new ComparableStack(ModBlocks.steel_scaffold, 6), new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 6), },200);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_long_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 2), new ComparableStack(ModBlocks.steel_scaffold, 6), new OreDictStack(TI.plate(), 24), new OreDictStack(AL.plate(), 6), },200);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_15_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModBlocks.steel_scaffold, 9), new OreDictStack(TI.plate(), 36), new OreDictStack(STEEL.plate(), 9), },300);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_15_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModBlocks.steel_scaffold, 9), new OreDictStack(TI.plate(), 36), new OreDictStack(AL.plate(), 9), },300);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_15_hydrogen, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModBlocks.steel_scaffold, 9), new OreDictStack(TI.plate(), 36), new OreDictStack(IRON.plate(), 9), },300);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModBlocks.steel_scaffold, 9), new OreDictStack(TI.plate(), 36), new OreDictStack(BIGMT.plate(), 9), },300);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_15_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 2), new ComparableStack(ModBlocks.steel_scaffold, 12), new OreDictStack(TI.plate(), 48), new OreDictStack(STEEL.plate(), 12), },500);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_15_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 2), new ComparableStack(ModBlocks.steel_scaffold, 12), new OreDictStack(TI.plate(), 48), new OreDictStack(AL.plate(), 12), },500);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_15_hydrogen, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 2), new ComparableStack(ModBlocks.steel_scaffold, 12), new OreDictStack(TI.plate(), 48), new OreDictStack(IRON.plate(), 12), },500);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_10_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModBlocks.steel_scaffold, 9), new OreDictStack(TI.plate(), 36), new OreDictStack(BIGMT.plate(), 9), },500);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_15_20_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModItems.seg_20, 1), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(TI.plate(), 64), new OreDictStack(STEEL.plate(), 16), },600);
makeRecipe(new ComparableStack(ModItems.mp_fuselage_15_20_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new ComparableStack(ModItems.seg_20, 1), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(TI.plate(), 64), new OreDictStack(AL.plate(), 16), },600);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_he, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_incendiary, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(TI.plate(), 4), new OreDictStack(P_RED.dust(), 3), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_buster, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(TI.plate(), 4), new ComparableStack(ModBlocks.det_charge, 1), new ComparableStack(ModBlocks.det_cord, 4), new OreDictStack(CU.plateCast(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(PU239.ingot(), 1), new OreDictStack(OreDictManager.getReflector(), 2), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), },200);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_nuclear_large, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(AL.plate(), 4), new OreDictStack(PU239.ingot(), 2), new ComparableStack(ModBlocks.det_charge, 4), new ComparableStack(ModItems.circuit,3, EnumCircuitType.ADVANCED), },300);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_taint, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.powder_magic, 12), new ComparableStack(ModItems.bucket_mud, 1), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_cloud, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.grenade_pink_cloud, 2), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_he, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_charge, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), },200);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_incendiary, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_charge, 2), new OreDictStack(P_RED.dust(), 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), },200);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 24), new OreDictStack(TI.plate(), 12), new OreDictStack(PU239.ingot(), 3), new ComparableStack(ModBlocks.det_charge, 6), new ComparableStack(ModItems.circuit, 5, EnumCircuitType.ADVANCED), },500);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_n2, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 20), new ComparableStack(ModBlocks.det_charge, 24), new ComparableStack(Blocks.redstone_block, 12), new OreDictStack(MAGTUNG.dust(), 6), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), },400);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), }, 60);
makeRecipe(new ComparableStack(ModItems.fusion_shield_tungsten, 1), new AStack[] {new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96)}, 600);
makeRecipe(new ComparableStack(ModItems.fusion_shield_desh, 1), new AStack[] {new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96)}, 600);
makeRecipe(new ComparableStack(ModItems.fusion_shield_chlorophyte, 1), new AStack[] {new OreDictStack(W.block(), 16), new OreDictStack(DURA.block(), 16), new OreDictStack(OreDictManager.getReflector(), 48), new ComparableStack(ModItems.powder_chlorophyte, 48)}, 600);
makeRecipe(new ComparableStack(ModItems.missile_soyuz, 1), new AStack[] {
new OreDictStack(TI.shell(), 32),
@ -253,17 +192,6 @@ import net.minecraft.item.ItemStack;
new ComparableStack(ModItems.part_generic, 32, EnumPartType.LDE)
},600);
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {
new OreDictStack(RUBBER.ingot(), 12),
new OreDictStack(TI.shell(), 3),
new ComparableStack(ModItems.thruster_large, 1),
new ComparableStack(ModItems.part_generic, 8, EnumPartType.LDE),
new ComparableStack(ModItems.plate_desh, 4),
new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()),
new ComparableStack(ModItems.photo_panel, 24),
new ComparableStack(ModItems.circuit, 12, EnumCircuitType.BASIC),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)
},500);
makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {
new OreDictStack(STEEL.shell(), 3),
new ComparableStack(ModItems.plate_desh, 4),
@ -300,39 +228,6 @@ import net.minecraft.item.ItemStack;
new ComparableStack(ModItems.crystal_xen, 1),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.ADVANCED)
},1000);
makeRecipe(new ComparableStack(ModItems.sat_foeq, 1), new AStack[] {
new OreDictStack(TI.shell(), 3),
new ComparableStack(ModItems.plate_desh, 8),
new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.HYDROGEN.getID()),
new ComparableStack(ModItems.photo_panel, 16),
new ComparableStack(ModItems.thruster_nuclear, 1),
new ComparableStack(ModItems.ingot_uranium_fuel, 6),
new ComparableStack(ModItems.circuit, 24, EnumCircuitType.BASIC),
new ComparableStack(ModItems.magnetron, 3),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)
},1200);
makeRecipe(new ComparableStack(ModItems.sat_miner, 1), new AStack[] {
new OreDictStack(BIGMT.plate(), 24),
new ComparableStack(ModItems.motor_desh, 2),
new ComparableStack(ModItems.drill_titanium, 2),
new ComparableStack(ModItems.circuit, 12, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()),
new ComparableStack(ModItems.thruster_small, 1),
new ComparableStack(ModItems.photo_panel, 12),
new ComparableStack(ModItems.centrifuge_element, 4),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)
},600);
makeRecipe(new ComparableStack(ModItems.sat_lunar_miner, 1), new AStack[] {
new ComparableStack(ModItems.ingot_meteorite, 4),
new ComparableStack(ModItems.plate_desh, 4),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.drill_titanium, 2),
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()),
new ComparableStack(ModItems.thruster_small, 1),
new ComparableStack(ModItems.photo_panel, 12),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)
},600);
makeRecipe(new ComparableStack(ModItems.upgrade_overdrive_1, 1), new AStack[] {
new ComparableStack(ModItems.upgrade_speed_3, 1),
@ -358,19 +253,6 @@ import net.minecraft.item.ItemStack;
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID),
}, 500);
makeRecipe(new ComparableStack(ModBlocks.machine_fensu, 1), new AStack[] {
new ComparableStack(ModItems.ingot_electronium, 32),
new ComparableStack(ModBlocks.machine_dineutronium_battery, 16),
!exp ? new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 64) : new OreDictStack(ANY_RESISTANTALLOY.heavyComp(), 64),
new OreDictStack(DURA.block(), 16),
new OreDictStack(STAR.block(), 64),
new ComparableStack(ModBlocks.machine_transformer_dnt, 8),
new ComparableStack(ModItems.coil_magnetized_tungsten, 24),
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.plate_dineutronium, 24),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 128)
}, 1200);
makeRecipe(new ComparableStack(ModBlocks.machine_combustion_engine, 1), new AStack[] {
new OreDictStack(STEEL.plate(), 16),
new OreDictStack(CU.ingot(), 12),
@ -517,18 +399,6 @@ import net.minecraft.item.ItemStack;
new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 4)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_cyclotron, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 3),
new OreDictStack(ND.wireDense(), 32),
!exp ? new OreDictStack(STEEL.ingot(), 16) : new OreDictStack(STEEL.heavyComp(), 3),
new OreDictStack(STEEL.plate(), 32),
new OreDictStack(AL.plate(), 32),
new OreDictStack(ANY_PLASTIC.ingot(), 24),
new OreDictStack(RUBBER.ingot(), 24),
new OreDictStack(CU.plateCast(), 8),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.reactor_zirnox, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.shell(), 4) : new OreDictStack(STEEL.heavyComp(), 1),
new OreDictStack(STEEL.pipe(), 8),
@ -581,113 +451,6 @@ import net.minecraft.item.ItemStack;
new ComparableStack(ModItems.motor, 2),
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_chekhov, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 3),
new OreDictStack(GUNMETAL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_iron, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_friendly, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC),
new OreDictStack(STEEL.pipe(), 3),
new OreDictStack(GUNMETAL.mechanism(), 1),
new ComparableStack(ModBlocks.crate_iron, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_jeremy, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.motor_desh, 1),
new OreDictStack(STEEL.shell(), 3),
new OreDictStack(WEAPONSTEEL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_tauon, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(ANY_PLASTIC.ingot(), 4),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.motor_desh, 1),
new OreDictStack(CU.ingot(), 32),
new OreDictStack(BIGMT.mechanism(), 3),
new ComparableStack(ModItems.battery_lithium, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_richard, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new OreDictStack(ANY_PLASTIC.ingot(), 2),
new OreDictStack(STEEL.shell(), 8),
new OreDictStack(WEAPONSTEEL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_howard, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 24),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.motor_desh, 2),
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 10),
new OreDictStack(WEAPONSTEEL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_maxwell, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 1),
new OreDictStack(STEEL.ingot(), 24),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 4),
new OreDictStack(BIGMT.mechanism(), 3),
new ComparableStack(ModItems.magnetron, 16),
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_fritz, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 8),
new OreDictStack(GUNMETAL.mechanism(), 3),
new ComparableStack(ModBlocks.barrel_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_arty, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 128),
new ComparableStack(ModItems.motor_desh, 5),
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 12),
new OreDictStack(WEAPONSTEEL.mechanism(), 16),
new ComparableStack(ModBlocks.machine_radar, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_himars, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 128),
new OreDictStack(ANY_PLASTIC.ingot(), 64),
new ComparableStack(ModItems.motor_desh, 5),
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new OreDictStack(BIGMT.mechanism(), 8),
new ComparableStack(ModBlocks.machine_radar, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 300);
makeRecipe(new ComparableStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL), new AStack[] {
new OreDictStack(STEEL.plate(), 24),
new OreDictStack(ANY_PLASTIC.ingot(), 12),
@ -761,14 +524,6 @@ import net.minecraft.item.ItemStack;
new OreDictStack(RUBBER.ingot(), 8),
new OreDictStack(STEEL.pipe(), 8),
}, 400);
makeRecipe(new ComparableStack(Item.getItemFromBlock(ModBlocks.machine_fel), 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 1),
new OreDictStack(ALLOY.wireDense(), 64),
!exp ? new OreDictStack(STEEL.plateCast(), 12) : new OreDictStack(STEEL.heavyComp(), 1),
new OreDictStack(ANY_PLASTIC.ingot(), 16),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR),
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)
}, 400);
makeRecipe(new ComparableStack(ModBlocks.rbmk_blank, 1), new AStack[] {
new ComparableStack(ModBlocks.concrete_asbestos, 4),
@ -905,17 +660,6 @@ import net.minecraft.item.ItemStack;
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.QUANTUM),
}, 400);
makeRecipe(new ComparableStack(ModBlocks.machine_exposure_chamber, 1), new AStack[] {
!exp ? new OreDictStack(AL.plateCast(), 12) : new OreDictStack(AL.heavyComp(), 1),
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4),
new OreDictStack(ANY_HARDPLASTIC.ingot(), 12),
new OreDictStack(ALLOY.wireDense(), 32),
new ComparableStack(ModItems.motor_desh, 2),
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID),
new ComparableStack(ModBlocks.capacitor_tantalium, 1),
new ComparableStack(ModBlocks.glass_quartz, 16)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.launch_pad_large, 1), new AStack[] {
new OreDictStack(STEEL.plateCast(), 6),
@ -1064,20 +808,6 @@ import net.minecraft.item.ItemStack;
addTantalium(new ComparableStack(ModBlocks.turret_fritz, 1), 3);
addTantalium(new ComparableStack(ModBlocks.launch_pad, 1), 5);
makeRecipe(new ComparableStack(ModBlocks.machine_cyclotron, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 3),
new ComparableStack(ModBlocks.hadron_coil_neodymium, 8),
new OreDictStack(ALLOY.wireFine(), 64),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(STEEL.plate(), 32),
new OreDictStack(AL.plate(), 32),
new OreDictStack(ANY_PLASTIC.ingot(), 24),
new OreDictStack(RUBBER.ingot(), 24),
new OreDictStack(CU.plateCast(), 8),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC),
new ComparableStack(ModItems.circuit, 50, EnumCircuitType.CAPACITOR_BOARD)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.rbmk_console, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(AL.plate(), 32),
@ -1094,34 +824,6 @@ import net.minecraft.item.ItemStack;
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC),
new ComparableStack(ModItems.circuit, 10, EnumCircuitType.CAPACITOR_BOARD),
}, 300);
makeRecipe(new ComparableStack(ModBlocks.struct_launcher_core, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 3),
new ComparableStack(ModBlocks.steel_scaffold, 10),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(ANY_PLASTIC.ingot(), 8),
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.circuit, 15, EnumCircuitType.CAPACITOR_BOARD),
}, 200);
makeRecipe(new ComparableStack(ModBlocks.struct_launcher_core_large, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 5),
new ComparableStack(ModBlocks.steel_scaffold, 10),
new OreDictStack(STEEL.ingot(), 24),
new OreDictStack(ANY_PLASTIC.ingot(), 12),
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.circuit, 25, EnumCircuitType.CAPACITOR_BOARD),
}, 200);
makeRecipe(new ComparableStack(ModBlocks.struct_soyuz_core, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 5),
new ComparableStack(ModBlocks.steel_scaffold, 24),
new OreDictStack(STEEL.ingot(), 32),
new OreDictStack(ANY_PLASTIC.ingot(), 24),
new ComparableStack(ModItems.circuit, 5, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.upgrade_power_3, 3),
new ComparableStack(ModItems.circuit, 100, EnumCircuitType.CAPACITOR_BOARD),
}, 200);
}
makeRecipe(new ComparableStack(ModBlocks.machine_fracking_tower), new AStack[] {

View File

@ -27,6 +27,8 @@ import com.hbm.items.ItemEnums.EnumExpensiveType;
import com.hbm.items.ItemEnums.EnumSecretType;
import com.hbm.items.ItemGenericPart.EnumPartType;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemBatterySC.EnumBatterySC;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.machine.ItemDrillbit.EnumDrillType;
import com.hbm.items.machine.ItemPACoil.EnumCoilType;
@ -56,11 +58,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
@Override
public void registerDefaults() {
boolean no528 = !GeneralConfig.enable528;
// NBTStack test
// this.register(new GenericRecipe("demo1").setup(20, 100).outputItems(BrokenItem.make(ModItems.plate_iron)).inputItems(new OreDictStack(IRON.ingot())));
// this.register(new GenericRecipe("demo2").setup(20, 100).outputItems(BrokenItem.make(ModItems.plate_gold)).inputItems(new OreDictStack(IRON.ingot())));
// this.register(new GenericRecipe("demo3").setup(20, 100).outputItems(new ItemStack(Items.iron_ingot)).inputItems(new NBTStack(BrokenItem.make(ModItems.plate_iron))));
// plates and ingots
String autoPlate = "autoswitch.plates";
@ -87,7 +84,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.platebismuth").setup(200, 100).outputItems(new ItemStack(ModItems.plate_bismuth, 1))
.inputItems(new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)));
this.register(new GenericRecipe("ass.plateeuphemium").setup(600, 100).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new ComparableStack(ModItems.ingot_osmiridium)));
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
this.register(new GenericRecipe("ass.platednt").setup(600, 100).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
@ -216,10 +213,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new ComparableStack(ModItems.cap_fritz, 64), new ComparableStack(ModItems.cap_fritz, 64)));
this.register(new GenericRecipe("ass.capkorl").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.KORL))
.inputItems(new ComparableStack(ModItems.cap_korl, 64), new ComparableStack(ModItems.cap_korl, 64)));
/*
this.register(new GenericRecipe("ass.").setup(, 100).outputItems(new ItemStack(ModBlocks., 1))
.inputItems());
*/
// machines
this.register(new GenericRecipe("ass.shredder").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_shredder, 1))
@ -276,7 +269,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.crackingtower").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_catalytic_cracker, 1))
.inputItems(new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(STEEL.shell(), 6), new OreDictStack(DESH.ingot(), 12), new OreDictStack(NB.ingot(), 4))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(NB.ingot(), 4))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "rubber"));
.setPools528(GenericRecipes.POOL_PREFIX_528 + "plastic"));
this.register(new GenericRecipe("ass.radiolysis").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_radiolysis, 1))
.inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(PB.plate(), 12), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.thermo_element, 8))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.LEAD_PLATING), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModItems.thermo_element, 8)));
@ -315,7 +308,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.part_generic, 4, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)));
this.register(new GenericRecipe("ass.fel").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_fel, 1))
.inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new OreDictStack(ALLOY.wireDense(), 64), new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.part_generic, 4, EnumPartType.GLASS_POLARIZED), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM), new OreDictStack(ALLOY.wireDense(), 64), new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.part_generic, 4, EnumPartType.GLASS_POLARIZED), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ALLOY.wireDense(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.part_generic, 4, EnumPartType.GLASS_POLARIZED), new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.CIRCUIT)));
this.register(new GenericRecipe("ass.silex").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_silex, 1))
.inputItems(new ComparableStack(ModBlocks.glass_quartz, 16), new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(DESH.ingot(), 4), new OreDictStack(RUBBER.ingot(), 8), new OreDictStack(STEEL.pipe(), 8))
@ -348,7 +341,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(TI.shell(), 4), new OreDictStack(DURA.plate(), 4), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 8), new ComparableStack(ModItems.motor, 3))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(DURA.plate(), 4), new ComparableStack(ModItems.crystal_redstone, 12), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.motor_desh, 3)));
this.register(new GenericRecipe("ass.teleporter").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_teleporter, 1))
.inputItems(new OreDictStack(TI.plate(), 12), new OreDictStack(ALLOY.plate(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1)));
.inputItems(new OreDictStack(TI.plate(), 12), new OreDictStack(ALLOY.plate(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
this.register(new GenericRecipe("ass.radar").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_radar, 1))
.inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(ANY_RUBBER.ingot(), 12), new ComparableStack(ModItems.magnetron, 5), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC.ordinal()), new ComparableStack(ModItems.crt_display, 4))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.magnetron, 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT), new ComparableStack(ModItems.crt_display, 4)));
@ -409,36 +402,49 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.motor_desh, 5), new OreDictStack(STEEL.pipe(), 24), new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 16)));
// batteries
this.register(new GenericRecipe("ass.battery").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_battery, 1))
.inputItems(new OreDictStack(STEEL.plateWelded(), 1), new OreDictStack(S.dust(), 12), new OreDictStack(PB.dust(), 12)));
this.register(new GenericRecipe("ass.batterylithium").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_lithium_battery, 1))
.inputItems(new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(CO.dust(), 12), new OreDictStack(LI.dust(), 12)));
this.register(new GenericRecipe("ass.batteryschrabidium").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_schrabidium_battery, 1))
.inputItems(new OreDictStack(DESH.ingot(), 16), new OreDictStack(NP237.dust(), 12), new OreDictStack(SA326.dust(), 12)));
this.register(new GenericRecipe("ass.batterydnt").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_dineutronium_battery, 1))
.inputItems(new OreDictStack(DNT.ingot(), 24), new ComparableStack(ModItems.powder_spark_mix, 12), new ComparableStack(ModItems.battery_spark_cell_1000, 1), new OreDictStack(CMB.ingot(), 32)));
this.register(new GenericRecipe("ass.fensusan").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_fensu, 1))
.inputItems(new ComparableStack(ModItems.ingot_electronium, 32),
new ComparableStack(ModBlocks.machine_dineutronium_battery, 16),
new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 64),
new OreDictStack(DURA.block(), 16),
new OreDictStack(STAR.block(), 64),
new ComparableStack(ModBlocks.machine_transformer_dnt, 8),
new ComparableStack(ModItems.coil_magnetized_tungsten, 24),
this.register(new GenericRecipe("ass.capacitorgold").setup(100, 100).outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_GOLD.ordinal()))
.inputItems(new OreDictStack(STEEL.plate(), 8),
new OreDictStack(GOLD.wireDense(), 16)));
this.register(new GenericRecipe("ass.capacitorniobium").setup(100, 1_000).outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_NIOBIUM.ordinal()))
.inputItems(new OreDictStack(ANY_PLASTIC.ingot(), 12),
new OreDictStack(NB.wireDense(), 24)));
this.register(new GenericRecipe("ass.capacitortantalum").setup(100, 10_000).outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_TANTALUM.ordinal()))
.inputItems(new OreDictStack(ANY_HARDPLASTIC.ingot(), 16),
new OreDictStack(TA.ingot(), 24)));
this.register(new GenericRecipe("ass.capacitorbismuth").setup(100, 25_000).outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_BISMUTH.ordinal()))
.inputItems(new OreDictStack(ANY_HARDPLASTIC.ingot(), 24),
new OreDictStack(BI.ingot(), 24),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CHIP_QUANTUM)));
this.register(new GenericRecipe("ass.capacitorspark").setup(100, 100_000).outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_SPARK.ordinal()))
.inputItems(new OreDictStack(CMB.plateCast(), 12),
new ComparableStack(ModItems.powder_spark_mix, 32),
new ComparableStack(ModItems.pellet_charged, 32),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CHIP_QUANTUM))
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 8_000))
.outputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 8_000)));
this.register(new GenericRecipe("ass.fensusan").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_battery_redd, 1))
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
new OreDictStack(CMB.plateCast(), 32),
new OreDictStack(MAGTUNG.wireDense(), 32),
new ComparableStack(ModItems.plate_dineutronium, 64),
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.plate_dineutronium, 24),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64))
.inputItemsEx(new ComparableStack(ModItems.ingot_electronium, 64),
new ComparableStack(ModBlocks.machine_dineutronium_battery, 16),
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.FERRO_PLATING),
new OreDictStack(STAR.block(), 64),
new ComparableStack(ModBlocks.machine_transformer_dnt, 8),
new ComparableStack(ModItems.coil_magnetized_tungsten, 24),
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.plate_dineutronium, 24),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
new OreDictStack(CMB.plateCast(), 64),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64)));
@ -451,12 +457,12 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16)));
this.register(new GenericRecipe("ass.orbus").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_orbus, 1))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new OreDictStack(BIGMT.plateCast(), 16), new ComparableStack(ModItems.coil_advanced_alloy, 24), new ComparableStack(ModItems.battery_sc_polonium, 1)));
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new OreDictStack(BIGMT.plateCast(), 16), new ComparableStack(ModItems.coil_advanced_alloy, 24), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210)));
// accelerators
this.register(new GenericRecipe("ass.cyclotron").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_cyclotron, 1))
.inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 3), new OreDictStack(ND.wireDense(), 32), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(STEEL.plate(), 32), new OreDictStack(AL.plate(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 24), new OreDictStack(RUBBER.ingot(), 24), new OreDictStack(CU.plateCast(), 8), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM), new OreDictStack(ND.wireDense(), 32), new OreDictStack(STEEL.plateCast(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 24), new OreDictStack(RUBBER.ingot(), 24), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ND.wireDense(), 32), new OreDictStack(AL.plateWelded(), 16), new OreDictStack(RUBBER.ingot(), 32), new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.CIRCUIT)));
this.register(new GenericRecipe("ass.beamline").setup(200, 100).outputItems(new ItemStack(ModBlocks.pa_beamline, 1))
.inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(CU.plate(), 16), new OreDictStack(GOLD.wireDense(), 4))
@ -487,7 +493,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.pabscco").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.BSCCO.ordinal())).inputItems(new OreDictStack(BSCCO.wireDense(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64)));
this.register(new GenericRecipe("ass.pachlorophyte").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.CHLOROPHYTE.ordinal())).inputItems(new OreDictStack(CU.wireDense(), 64), new OreDictStack(CU.wireDense(), 64), new ComparableStack(ModItems.powder_chlorophyte, 16)));
this.register(new GenericRecipe("ass.exposurechamber").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_exposure_chamber, 1))
.inputItems(new OreDictStack(AL.plateCast(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 12), new OreDictStack(ALLOY.wireDense(), 32), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModBlocks.capacitor_tantalium, 1), new ComparableStack(ModBlocks.glass_quartz, 16))
.inputItems(new OreDictStack(AL.plateCast(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 12), new OreDictStack(ALLOY.wireDense(), 32), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_TANTALUM), new ComparableStack(ModBlocks.glass_quartz, 16))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.LEAD_PLATING), new OreDictStack(ANY_HARDPLASTIC.ingot(), 24), new OreDictStack(ALLOY.wireDense(), 32), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.COMPUTER))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chip_quantum"));
@ -544,9 +550,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.LEAD_PLATING), new OreDictStack(ZR.plateWelded(), 1), new ComparableStack(ModItems.billet_ra226be, 3)));
// fusion reactor
this.register(new GenericRecipe("ass.fusionconductor").setup(100, 100).outputItems(new ItemStack(ModBlocks.fusion_conductor, 1))
.inputItems(new ComparableStack(ModItems.coil_advanced_alloy, 5)));
this.register(new GenericRecipe("ass.fusioncore").setup(600, 100).outputItems(new ItemStack(ModBlocks.struct_torus_core, 1))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(ANY_HARDPLASTIC.ingot(), 32), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BISMOID))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.PLASTIC), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID))
@ -579,7 +582,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.fusionmhdt").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.fusion_mhdt, 1))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 16), new OreDictStack(CU.plateWelded(), 64), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 16), new OreDictStack(SBD.wireDense(), 64), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.QUANTUM))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.PLASTIC), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 32), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.QUANTUM))
.setPools(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.fusioncoupler").setup(300, 100).outputItems(new ItemStack(ModBlocks.fusion_coupler, 1))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 4), new OreDictStack(CU.plate(), 32), new OreDictStack(BSCCO.wireDense(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new OreDictStack(BSCCO.wireDense(), 16), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.COMPUTER)));
@ -656,13 +659,9 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.overdrive3").setup(1_200, 100).outputItems(new ItemStack(ModItems.upgrade_overdrive_3, 1))
.inputItems(new ComparableStack(ModItems.upgrade_overdrive_2, 1), new ComparableStack(ModItems.upgrade_speed_3, 1), new ComparableStack(ModItems.upgrade_effect_3, 1), new OreDictStack(ANY_BISMOIDBRONZE.ingot(), 16), new ComparableStack(ModItems.ingot_cft, 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID)));
}
/*
this.register(new GenericRecipe("ass.").setup(, 100).outputItems(new ItemStack(ModBlocks., 1))
.inputItems());
*/
// rancid shit mob spawners
this.register(new GenericRecipe("ass.chopper").setup(1_200, 100).outputItems(new ItemStack(ModItems.spawn_chopper, 8))
this.register(new GenericRecipe("ass.chopper").setup(1_200, 100).outputItems(new ItemStack(ModItems.spawn_chopper, 1))
.inputItems(new OreDictStack(CMB.plateCast(), 24), new OreDictStack(STEEL.plate(), 32), new OreDictStack(MAGTUNG.wireFine(), 48), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_ADVANCED)));
this.register(new GenericRecipe("ass.ballsotron").setup(1_200, 100).outputItems(new ItemStack(ModItems.spawn_worm, 1))
.inputItems(new OreDictStack(TI.plateWelded(), 32), new OreDictStack(RUBBER.ingot(), 64), new ComparableStack(ModItems.motor, 64), new OreDictStack(GOLD.wireDense(), 64), new OreDictStack(U238.block(), 10), new ComparableStack(ModItems.mech_key, 1)));
@ -785,41 +784,36 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.bholegrenade").setup(1_200, 100).outputItems(new ItemStack(ModItems.grenade_black_hole, 1))
.inputItems(new OreDictStack(ANY_PLASTIC.ingot(), 6), new OreDictStack(OreDictManager.getReflector(), 3), new ComparableStack(ModItems.coil_magnetized_tungsten, 2), new ComparableStack(ModItems.black_hole, 1)));
/*
this.register(new GenericRecipe("ass.").setup(, 100).outputItems(new ItemStack(ModBlocks., 1))
.inputItems());
*/
// turrets
this.register(new GenericRecipe("ass.turretchekhov").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_chekhov, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 3), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.crate_iron, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 3), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.crate_iron, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turretfriendly").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_friendly, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), new OreDictStack(STEEL.pipe(), 3), new OreDictStack(GUNMETAL.mechanism(), 1), new ComparableStack(ModBlocks.crate_iron, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), new OreDictStack(STEEL.pipe(), 3), new OreDictStack(GUNMETAL.mechanism(), 1), new ComparableStack(ModBlocks.crate_iron, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turretjeremy").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_jeremy, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(STEEL.shell(), 3), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(STEEL.shell(), 3), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turrettauon").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_tauon, 1))
.inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(CU.ingot(), 32), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.battery_lithium, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_NIOBIUM), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(CU.ingot(), 32), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turretrichard").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_richard, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.shell(), 8), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.shell(), 8), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turrethoward").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_howard, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 10), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 10), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.maxwell").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_maxwell, 1))
.inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 4), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.magnetron, 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_NIOBIUM), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 4), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.magnetron, 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.fritz").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_fritz, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.barrel_steel))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.barrel_steel))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.arty").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.turret_arty, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 12), new OreDictStack(WEAPONSTEEL.mechanism(), 16), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 12), new OreDictStack(WEAPONSTEEL.mechanism(), 16), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "arty"));
this.register(new GenericRecipe("ass.himars").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.turret_himars, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), new OreDictStack(BIGMT.mechanism(), 8), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), new OreDictStack(BIGMT.mechanism(), 8), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "arty"));
this.register(new GenericRecipe("ass.himarssmall").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL))
.inputItems(new OreDictStack(STEEL.plate(), 24), new OreDictStack(ANY_PLASTIC.ingot(), 12), new ComparableStack(ModItems.rocket_fuel, 48), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 48), new ComparableStack(ModItems.circuit, 6, EnumCircuitType.BASIC)));
@ -879,7 +873,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.stealthmissile").setup(1_200, 100).outputItems(new ItemStack(ModItems.missile_stealth, 1))
.inputItems(new OreDictStack(TI.plate(), 20), new OreDictStack(AL.plate(), 20), new OreDictStack(KEY_BLACK, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(STEEL.bolt(), 32)));
this.register(new GenericRecipe("ass.shuttlemissile").setup(200, 100).outputItems(new ItemStack(ModItems.missile_shuttle, 1))
.inputItems(new ComparableStack(ModItems.missile_generic, 2), new ComparableStack(ModItems.missile_strong, 1), new OreDictStack(KEY_ORANGE, 5), new ComparableStack(ModItems.canister_full, 24, Fluids.GASOLINE_LEADED.getID()), new OreDictStack(FIBER.ingot(), 12), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 8), new OreDictStack(KEY_ANYPANE, 6), new OreDictStack(STEEL.plate(), 4)));
.inputItems(new ComparableStack(ModItems.missile_generic, 1), new ComparableStack(ModItems.missile_strong, 1), new OreDictStack(KEY_ORANGE, 5), new ComparableStack(ModItems.canister_full, 24, Fluids.GASOLINE_LEADED.getID()), new OreDictStack(FIBER.ingot(), 12), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 8), new OreDictStack(KEY_ANYPANE, 6), new OreDictStack(STEEL.plate(), 4)));
this.register(new GenericRecipe("ass.launchpad").setup(200, 100).outputItems(new ItemStack(ModBlocks.launch_pad_large, 1))
.inputItems(new OreDictStack(STEEL.plateCast(), 6), new OreDictStack(ANY_CONCRETE.any(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModBlocks.steel_scaffold, 24), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED)));
this.register(new GenericRecipe("ass.launchpadsilo").setup(200, 100).outputItems(new ItemStack(ModBlocks.launch_pad, 1))
@ -986,11 +980,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new ComparableStack(ModItems.seg_15, 1), new OreDictStack(WEAPONSTEEL.plate(), 32), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 16), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "controller"));
/*
this.register(new GenericRecipe("ass.").setup(, 100).outputItems(new ItemStack(ModItems., 1))
.inputItems());
*/
// weapons
this.register(new GenericRecipe("ass.schrabhammer").setup(6_000, 100).outputItems(new ItemStack(ModItems.schrabidium_hammer, 1))
.inputItems(
@ -1049,7 +1038,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()),
new ComparableStack(ModItems.photo_panel, 24),
new ComparableStack(ModItems.circuit, 12, EnumCircuitType.BASIC),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)));
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
this.register(new GenericRecipe("ass.satellitemapper").setup(600, 100).outputItems(new ItemStack(ModItems.sat_head_mapper, 1))
.inputItems(new OreDictStack(STEEL.shell(), 3),
new ComparableStack(ModItems.plate_desh, 4),
@ -1090,7 +1079,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.ingot_uranium_fuel, 6),
new ComparableStack(ModItems.circuit, 24, EnumCircuitType.BASIC),
new ComparableStack(ModItems.magnetron, 3),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)));
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
this.register(new GenericRecipe("ass.satelliteasteroidminer").setup(600, 100).outputItems(new ItemStack(ModItems.sat_miner, 1))
.inputItems(new OreDictStack(BIGMT.plate(), 24),
new ComparableStack(ModItems.motor_desh, 2),
@ -1100,7 +1089,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.thruster_small, 1),
new ComparableStack(ModItems.photo_panel, 12),
new ComparableStack(ModItems.centrifuge_element, 4),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)));
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
this.register(new GenericRecipe("ass.satellitelunarminer").setup(600, 100).outputItems(new ItemStack(ModItems.sat_lunar_miner, 1))
.inputItems(new ComparableStack(ModItems.ingot_meteorite, 4),
new ComparableStack(ModItems.plate_desh, 4),
@ -1110,7 +1099,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()),
new ComparableStack(ModItems.thruster_small, 1),
new ComparableStack(ModItems.photo_panel, 12),
new ComparableStack(ModBlocks.machine_lithium_battery, 1)));
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
this.register(new GenericRecipe("ass.gerald").setup(6_000, 100).outputItems(new ItemStack(ModItems.sat_gerald, 1))
.inputItems(new OreDictStack(SBD.plateCast(), 64),
new OreDictStack(SBD.plateCast(), 64),

View File

@ -19,6 +19,7 @@ import com.hbm.items.ItemEnums.EnumFuelAdditive;
import com.hbm.items.ItemGenericPart.EnumPartType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -155,6 +156,36 @@ public class ChemicalPlantRecipes extends GenericRecipes<GenericRecipe> {
.inputFluids(new FluidStack(Fluids.BITUMEN, 1_000))
.outputItems(new ItemStack(ModBlocks.asphalt, 16)));
/// BATTERIES ///
this.register(new GenericRecipe("chem.batterylead").setup(100, 100)
.inputItems(new OreDictStack(STEEL.plate(), 4),
new OreDictStack(PB.ingot(), 4))
.inputFluids(new FluidStack(Fluids.SULFURIC_ACID, 8_000))
.outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD.ordinal())));
this.register(new GenericRecipe("chem.batterylithium").setup(100, 1_000)
.inputItems(new OreDictStack(LI.dust(), 12),
new OreDictStack(CO.dust(), 8),
new OreDictStack(ANY_PLASTIC.ingot(), 4))
.inputFluids(new FluidStack(Fluids.OXYGEN, 2_000))
.outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM.ordinal())));
this.register(new GenericRecipe("chem.batterysodium").setup(100, 10_000)
.inputItems(new OreDictStack(NA.dust(), 24),
new OreDictStack(IRON.dust(), 24),
new OreDictStack(ANY_HARDPLASTIC.ingot(), 12))
.outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_SODIUM.ordinal())));
this.register(new GenericRecipe("chem.batteryschrabidium").setup(100, 25_000)
.inputItems(new OreDictStack(SA326.dust(), 24),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 8))
.inputFluids(new FluidStack(Fluids.HELIUM4, 8_000))
.outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_SCHRABIDIUM.ordinal())));
this.register(new GenericRecipe("chem.batteryquantum").setup(100, 100_000)
.inputItems(new OreDictStack(BSCCO.wireDense(), 24),
new ComparableStack(ModItems.pellet_charged, 32),
new ComparableStack(ModItems.ingot_cft, 16))
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 8_000))
.outputItems(new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()))
.outputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 8_000)));
/// SOLIDS ///
this.register(new GenericRecipe("chem.desh").setup(100, 100)
.inputItems(new ComparableStack(ModItems.powder_desh_mix))

View File

@ -16,6 +16,7 @@ import net.minecraft.item.ItemStack;
public class FusionRecipes extends GenericRecipes<FusionRecipe> {
public static final FusionRecipes INSTANCE = new FusionRecipes();
public long maxInput;
@Override public int inputItemLimit() { return 0; }
@Override public int inputFluidLimit() { return 3; }
@ -120,6 +121,18 @@ public class FusionRecipes extends GenericRecipes<FusionRecipe> {
.outputItems(new ItemStack(ModItems.powder_gold))); // eough
}
@Override
public void registerPost() {
super.registerPost();
this.maxInput = 0;
// set max value for creative klystron
for(FusionRecipe recipe : this.recipeOrderedList) {
if(recipe.ignitionTemp > this.maxInput) this.maxInput = recipe.ignitionTemp;
}
}
// foresight! yeah!
@Override
public void readExtraData(JsonElement element, FusionRecipe recipe) {

View File

@ -6,6 +6,8 @@ import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.FluidContainer;
import com.hbm.inventory.FluidContainerRegistry;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemBatterySC.EnumBatterySC;
import com.hbm.util.Tuple.Triplet;
import net.minecraft.init.Blocks;
@ -48,32 +50,11 @@ public class MachineRecipes {
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
fuels.add(new ItemStack(ModItems.battery_potato));
fuels.add(new ItemStack(ModItems.battery_potatos));
fuels.add(new ItemStack(ModItems.battery_generic));
fuels.add(new ItemStack(ModItems.battery_red_cell));
fuels.add(new ItemStack(ModItems.battery_red_cell_6));
fuels.add(new ItemStack(ModItems.battery_red_cell_24));
fuels.add(new ItemStack(ModItems.battery_advanced));
fuels.add(new ItemStack(ModItems.battery_advanced_cell));
fuels.add(new ItemStack(ModItems.battery_advanced_cell_4));
fuels.add(new ItemStack(ModItems.battery_advanced_cell_12));
fuels.add(new ItemStack(ModItems.battery_lithium));
fuels.add(new ItemStack(ModItems.battery_lithium_cell));
fuels.add(new ItemStack(ModItems.battery_lithium_cell_3));
fuels.add(new ItemStack(ModItems.battery_lithium_cell_6));
fuels.add(new ItemStack(ModItems.battery_schrabidium));
fuels.add(new ItemStack(ModItems.battery_schrabidium_cell));
fuels.add(new ItemStack(ModItems.battery_schrabidium_cell_2));
fuels.add(new ItemStack(ModItems.battery_schrabidium_cell_4));
fuels.add(new ItemStack(ModItems.battery_trixite));
fuels.add(new ItemStack(ModItems.battery_spark));
fuels.add(new ItemStack(ModItems.battery_spark_cell_6));
fuels.add(new ItemStack(ModItems.battery_spark_cell_25));
fuels.add(new ItemStack(ModItems.battery_spark_cell_100));
fuels.add(new ItemStack(ModItems.battery_spark_cell_1000));
fuels.add(new ItemStack(ModItems.battery_spark_cell_10000));
fuels.add(new ItemStack(ModItems.battery_spark_cell_power));
fuels.add(new ItemStack(ModItems.fusion_core));
fuels.add(new ItemStack(ModItems.energy_core));
for(EnumBatteryPack num : EnumBatteryPack.values()) fuels.add(new ItemStack(ModItems.battery_pack, 1, num.ordinal()));
for(EnumBatterySC num : EnumBatterySC.values()) fuels.add(new ItemStack(ModItems.battery_sc, 1, num.ordinal()));
fuels.add(new ItemStack(ModItems.battery_creative));
return fuels;
}

View File

@ -67,7 +67,7 @@ public class PedestalRecipes extends SerializableRecipe {
new OreDictStack(STAR.ingot()), new OreDictStack(DURA.plateCast()), new OreDictStack(STAR.ingot())));
register(new PedestalRecipe(new ItemStack(ModItems.gun_flamer_daybreaker),
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.JIZZ), new OreDictStack(GOLD.plateCast()),
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.SLIME), new OreDictStack(GOLD.plateCast()),
new OreDictStack(P_WHITE.ingot()), new ComparableStack(ModItems.gun_flamer), new OreDictStack(P_WHITE.ingot()),
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.stick_dynamite), new OreDictStack(GOLD.plateCast()))
.extra(PedestalExtraCondition.SUN));
@ -172,7 +172,7 @@ public class PedestalRecipes extends SerializableRecipe {
rec.recipeSet = obj.get("set").getAsInt();
}
this.recipes.add(rec);
this.register(rec);
}
@Override

View File

@ -26,6 +26,7 @@ import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ItemEnums.EnumChunkType;
import com.hbm.items.ModItems;
import com.hbm.items.food.ItemFlask.EnumInfusion;
import com.hbm.items.machine.ItemBatterySC.EnumBatterySC;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.util.Tuple.Pair;
@ -740,8 +741,6 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.scrap, 1)),
new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 1)),
new AnvilOutput(new ItemStack(Items.bread, 1), 0.5F),
new AnvilOutput(new ItemStack(ModItems.battery_generic, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.battery_advanced, 1), 0.1F),
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.01F)
}
@ -753,8 +752,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.scrap, 1)),
new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 2)),
new AnvilOutput(new ItemStack(Items.bread, 1), 0.5F),
new AnvilOutput(new ItemStack(ModItems.battery_lithium, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.battery_sc_uranium, 1), 0.1F),
new AnvilOutput(new ItemStack(ModItems.battery_sc, 1, EnumBatterySC.RA226.ordinal()), 0.1F),
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.05F)
}

View File

@ -7,6 +7,7 @@ import java.util.Locale;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.recipes.loader.GenericRecipes.ChanceOutput;
import com.hbm.inventory.recipes.loader.GenericRecipes.ChanceOutputMulti;
import com.hbm.inventory.recipes.loader.GenericRecipes.IOutput;
@ -59,16 +60,32 @@ public class GenericRecipe {
public GenericRecipe setIcon(Item item) { return this.setIcon(new ItemStack(item)); }
public GenericRecipe setIcon(Block block) { return this.setIcon(new ItemStack(block)); }
public GenericRecipe setNamed() { this.customLocalization = true; return this; }
public GenericRecipe setPools(String... pools) { this.blueprintPools = pools; for(String pool : pools) GenericRecipes.addToPool(pool, this); return this; }
public GenericRecipe setPools(String... pools) {
this.blueprintPools = pools;
for(String pool : pools) {
if(!GeneralConfig.enable528 && pool.startsWith(GenericRecipes.POOL_PREFIX_528)) throw new IllegalArgumentException("Tried initializing a recipe's default blueprint pool with a 528 blueprint - this is not allowed.");
GenericRecipes.addToPool(pool, this);
}
return this;
}
/** Only for recipe configs - same as regular except the anti 528 check doesn't exist */
public GenericRecipe setPoolsAllow528(String... pools) { this.blueprintPools = pools; for(String pool : pools) GenericRecipes.addToPool(pool, this); return this; }
public GenericRecipe setPools528(String... pools) { if(GeneralConfig.enable528) { this.blueprintPools = pools; for(String pool : pools) GenericRecipes.addToPool(pool, this); } return this; }
public GenericRecipe setGroup(String autoSwitch, GenericRecipes set) { this.autoSwitchGroup = autoSwitch; set.addToGroup(autoSwitch, this); return this; }
public GenericRecipe inputItems(AStack... input) { this.inputItem = input; for(AStack stack : this.inputItem) if(stack.stacksize > 64) throw new IllegalArgumentException("AStack in " + this.name + " exceeds stack limit!"); return this; }
public GenericRecipe inputItemsEx(AStack... input) { if(!GeneralConfig.enableExpensiveMode) return this; this.inputItem = input; for(AStack stack : this.inputItem) if(stack.stacksize > 64) throw new IllegalArgumentException("AStack in " + this.name + " exceeds stack limit!"); return this; }
public GenericRecipe inputItems(AStack... input) { this.inputItem = input; for(AStack stack : this.inputItem) if(exceedsStackLimit(stack)) throw new IllegalArgumentException("AStack in " + this.name + " exceeds stack limit!"); return this; }
public GenericRecipe inputItemsEx(AStack... input) { if(!GeneralConfig.enableExpensiveMode) return this; this.inputItem = input; for(AStack stack : this.inputItem) if(exceedsStackLimit(stack)) throw new IllegalArgumentException("AStack in " + this.name + " exceeds stack limit!"); return this; }
public GenericRecipe inputFluids(FluidStack... input) { this.inputFluid = input; return this; }
public GenericRecipe inputFluidsEx(FluidStack... input) { if(!GeneralConfig.enableExpensiveMode) return this; this.inputFluid = input; return this; }
public GenericRecipe outputItems(IOutput... output) { this.outputItem = output; return this; }
public GenericRecipe outputFluids(FluidStack... output) { this.outputFluid = output; return this; }
private boolean exceedsStackLimit(AStack stack) {
if(stack instanceof ComparableStack && stack.stacksize > ((ComparableStack) stack).item.getItemStackLimit(((ComparableStack) stack).toStack())) return true;
if(stack.stacksize > 64) return true;
return false;
}
public GenericRecipe outputItems(ItemStack... output) {
this.outputItem = new IOutput[output.length];

View File

@ -118,7 +118,7 @@ public abstract class GenericRecipes<T extends GenericRecipe> extends Serializab
if(obj.has("icon")) recipe.setIcon(this.readItemStack(obj.get("icon").getAsJsonArray()));
if(obj.has("named") && obj.get("named").getAsBoolean()) recipe.setNamed();
if(obj.has("blueprintpool")) recipe.setPools(obj.get("blueprintpool").getAsString().split(":"));
if(obj.has("blueprintpool")) recipe.setPoolsAllow528(obj.get("blueprintpool").getAsString().split(":"));
if(obj.has("nameWrapper")) recipe.setNameWrapper(obj.get("nameWrapper").getAsString());
if(obj.has("autoSwitchGroup")) recipe.setGroup(obj.get("autoSwitchGroup").getAsString(), this);
@ -327,6 +327,7 @@ public abstract class GenericRecipes<T extends GenericRecipe> extends Serializab
@Override
public void deserialize(JsonArray array) {
for(JsonElement element : array) {
if(element.isJsonPrimitive()) continue; // the array we get includes the "multi" tag, which is also the only primitive
ChanceOutput output = new ChanceOutput();
output.deserialize(element.getAsJsonArray());
pool.add(output);

View File

@ -9,6 +9,7 @@ import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPelletDepleted;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.tool.ItemBlowtorch;
import net.minecraft.init.Items;
@ -45,7 +46,7 @@ public class ItemPoolsComponent {
weighted(ModItems.coil_copper_torus, 0, 1, 2, 3),
weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 1, 8, 5),
weighted(ModItems.piston_selenium, 0, 1, 1, 3),
weighted(ModItems.battery_advanced_cell, 0, 1, 1, 3),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LEAD.ordinal(), 1, 1, 3),
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 2, 4),
weighted(ModItems.circuit, EnumCircuitType.PCB.ordinal(), 1, 3, 5),
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3),
@ -81,7 +82,7 @@ public class ItemPoolsComponent {
weighted(ModItems.missile_generic, 0, 1, 1, 4),
weighted(ModItems.missile_incendiary, 0, 1, 1, 4),
weighted(ModItems.gas_mask_m65, 0, 1, 1, 5),
weighted(ModItems.battery_advanced, 0, 1, 1, 5),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LEAD.ordinal(), 1, 1, 3),
weighted(ModItems.designator, 0, 1, 1, 5),
weighted(ModItems.thruster_small, 0, 1, 1, 5),
weighted(ModItems.thruster_medium, 0, 1, 1, 4),

View File

@ -4,6 +4,7 @@ import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.material.Mats;
import com.hbm.items.ItemEnums.EnumCasingType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
@ -52,8 +53,7 @@ public class ItemPoolsLegacy {
weighted(ModItems.casing, EnumCasingType.SMALL.ordinal(), 4, 10, 3),
weighted(ModItems.casing, EnumCasingType.SHOTSHELL.ordinal(), 4, 10, 3),
weighted(ModItems.cordite, 0, 4, 6, 5),
weighted(ModItems.battery_generic, 0, 1, 1, 4),
weighted(ModItems.battery_advanced, 0, 1, 1, 2),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_REDSTONE.ordinal(), 1, 1, 1),
weighted(ModItems.scrap, 0, 1, 3, 10),
weighted(ModItems.dust, 0, 2, 4, 9),
weighted(ModItems.bottle_opener, 0, 1, 1, 2),
@ -79,8 +79,7 @@ public class ItemPoolsLegacy {
weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 2, 3, 7),
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 1, 4),
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 2),
weighted(ModItems.battery_generic, 0, 1, 1, 4),
weighted(ModItems.battery_advanced, 0, 1, 1, 3),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_REDSTONE.ordinal(), 1, 1, 1),
weighted(ModItems.powder_iodine, 0, 1, 1, 1),
weighted(ModItems.powder_bromine, 0, 1, 1, 1),
weighted(ModBlocks.steel_poles, 0, 1, 4, 8),
@ -116,9 +115,7 @@ public class ItemPoolsLegacy {
weighted(ModItems.grenade_smart, 0, 1, 3, 3),
weighted(ModItems.grenade_mirv, 0, 1, 1, 2),
weighted(ModItems.stealth_boy, 0, 1, 1, 2),
weighted(ModItems.battery_advanced, 0, 1, 1, 3),
weighted(ModItems.battery_advanced_cell, 0, 1, 1, 2),
weighted(ModItems.battery_schrabidium, 0, 1, 1, 1),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LITHIUM.ordinal(), 1, 1, 1),
weighted(ModItems.syringe_awesome, 0, 1, 1, 1),
weighted(ModItems.fusion_core, 0, 1, 1, 4),
weighted(ModItems.bottle_nuka, 0, 1, 3, 6),
@ -215,7 +212,7 @@ public class ItemPoolsLegacy {
//spaceship double chests
new ItemPool(POOL_SPACESHIP) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.battery_advanced, 0, 1, 1, 5),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LEAD.ordinal(), 1, 1, 2),
weighted(ModItems.ingot_advanced_alloy, 0, 2, 16, 5),
weighted(ModItems.wire_fine, Mats.MAT_ALLOY.id, 8, 32, 5),
weighted(ModItems.coil_advanced_alloy, 0, 2, 16, 5),
@ -224,8 +221,8 @@ public class ItemPoolsLegacy {
weighted(ModItems.cell_antimatter, 0, 1, 1, 1),
weighted(ModItems.powder_neodymium, 0, 1, 1, 1),
weighted(ModItems.powder_niobium, 0, 1, 1, 1),
weighted(ModBlocks.fusion_conductor, 0, 2, 4, 5),
weighted(ModBlocks.fusion_heater, 0, 1, 3, 5),
weighted(ModItems.wire_dense, Mats.MAT_ALLOY.id, 2, 4, 5),
weighted(ModItems.wire_dense, Mats.MAT_GOLD.id, 1, 3, 5),
weighted(ModBlocks.pwr_fuel, 0, 1, 2, 5),
weighted(ModBlocks.block_tungsten, 0, 3, 8, 5),
weighted(ModBlocks.red_wire_coated, 0, 4, 8, 5),

View File

@ -42,7 +42,6 @@ public class ItemPoolsSingle {
new ItemPool(POOL_VAULT_STANDARD) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.ingot_desh, 0, 2, 6, 1),
weighted(ModItems.battery_advanced_cell_4, 0, 1, 1, 1),
weighted(ModItems.powder_desh_mix, 0, 1, 5, 1),
weighted(Items.diamond, 0, 3, 6, 1),
weighted(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD.ordinal(), 1, 1, 1),
@ -59,7 +58,6 @@ public class ItemPoolsSingle {
new ItemPool(POOL_VAULT_REINFORCED) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.ingot_desh, 0, 6, 16, 1),
weighted(ModItems.battery_lithium, 0, 1, 1, 1),
weighted(ModItems.powder_power, 0, 1, 5, 1),
weighted(ModItems.sat_chip, 0, 1, 1, 1),
weighted(Items.diamond, 0, 5, 9, 1),
@ -81,7 +79,6 @@ public class ItemPoolsSingle {
weighted(ModItems.gun_carbine, 0, 1, 1, 1),
weighted(ModItems.ammo_standard, EnumAmmo.R762_DU.ordinal(), 16, 32, 1),
weighted(ModItems.gun_congolake, 0, 1, 1, 1),
weighted(ModItems.battery_schrabidium_cell, 0, 1, 1, 1),
weighted(ModItems.circuit, EnumCircuitType.ADVANCED.ordinal(), 6, 12, 1)
};
}};

View File

@ -936,33 +936,6 @@ public class ModItems {
public static Item cap_fritz;
public static Item ring_pull;
public static Item bdcl;
//public static Item canned_beef;
//public static Item canned_tuna;
//public static Item canned_mystery;
//public static Item canned_pashtet;
//public static Item canned_cheese;
//public static Item canned_jizz;
//public static Item canned_milk;
//public static Item canned_ass;
//public static Item canned_pizza;
//public static Item canned_tube;
//public static Item canned_tomato;
//public static Item canned_asbestos;
//public static Item canned_bhole;
//public static Item canned_hotdogs;
//public static Item canned_leftovers;
//public static Item canned_yogurt;
//public static Item canned_stew;
//public static Item canned_chinese;
//public static Item canned_oil;
//public static Item canned_fist;
//public static Item canned_spam;
//public static Item canned_fried;
//public static Item canned_napalm;
//public static Item canned_diesel;
//public static Item canned_kerosene;
//public static Item canned_recursion;
//public static Item canned_bark;
public static ItemEnumMulti canned_conserve;
public static Item can_key;
@ -1627,42 +1600,45 @@ public class ModItems {
public static Item custom_schrab;
public static Item custom_fall;
public static Item battery_generic;
public static Item battery_advanced;
public static Item battery_lithium;
public static Item battery_schrabidium;
@Deprecated public static Item battery_generic;
@Deprecated public static Item battery_advanced;
@Deprecated public static Item battery_lithium;
@Deprecated public static Item battery_schrabidium;
@Deprecated public static Item battery_red_cell;
@Deprecated public static Item battery_red_cell_6;
@Deprecated public static Item battery_red_cell_24;
@Deprecated public static Item battery_advanced_cell;
@Deprecated public static Item battery_advanced_cell_4;
@Deprecated public static Item battery_advanced_cell_12;
@Deprecated public static Item battery_lithium_cell;
@Deprecated public static Item battery_lithium_cell_3;
@Deprecated public static Item battery_lithium_cell_6;
@Deprecated public static Item battery_schrabidium_cell;
@Deprecated public static Item battery_schrabidium_cell_2;
@Deprecated public static Item battery_schrabidium_cell_4;
@Deprecated public static Item battery_spark_cell_6;
@Deprecated public static Item battery_spark_cell_25;
@Deprecated public static Item battery_spark_cell_100;
@Deprecated public static Item battery_spark_cell_1000;
@Deprecated public static Item battery_spark_cell_2500;
@Deprecated public static Item battery_spark_cell_10000;
@Deprecated public static Item battery_spark_cell_power;
public static Item battery_pack;
public static Item battery_creative;
public static Item cube_power;
public static Item battery_spark;
public static Item battery_trixite;
public static Item battery_creative;
public static Item battery_red_cell;
public static Item battery_red_cell_6;
public static Item battery_red_cell_24;
public static Item battery_advanced_cell;
public static Item battery_advanced_cell_4;
public static Item battery_advanced_cell_12;
public static Item battery_lithium_cell;
public static Item battery_lithium_cell_3;
public static Item battery_lithium_cell_6;
public static Item battery_schrabidium_cell;
public static Item battery_schrabidium_cell_2;
public static Item battery_schrabidium_cell_4;
public static Item battery_spark_cell_6;
public static Item battery_spark_cell_25;
public static Item battery_spark_cell_100;
public static Item battery_spark_cell_1000;
public static Item battery_spark_cell_2500;
public static Item battery_spark_cell_10000;
public static Item battery_spark_cell_power;
public static Item cube_power;
public static Item battery_sc_uranium;
public static Item battery_sc_technetium;
public static Item battery_sc_plutonium;
public static Item battery_sc_polonium;
public static Item battery_sc_gold;
public static Item battery_sc_lead;
public static Item battery_sc_americium;
@Deprecated public static Item battery_sc_uranium;
@Deprecated public static Item battery_sc_technetium;
@Deprecated public static Item battery_sc_plutonium;
@Deprecated public static Item battery_sc_polonium;
@Deprecated public static Item battery_sc_gold;
@Deprecated public static Item battery_sc_lead;
@Deprecated public static Item battery_sc_americium;
public static Item battery_sc;
public static Item battery_potato;
public static Item battery_potatos;
@ -3868,42 +3844,44 @@ public class ModItems {
custom_schrab = new ItemCustomLore().setUnlocalizedName("custom_schrab").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_schrab");
custom_fall = new ItemCustomLore().setUnlocalizedName("custom_fall").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_fall");
battery_generic = new ItemBattery(5000, 100, 100).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_generic_new");
battery_advanced = new ItemBattery(20000, 500, 500).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_new");
battery_lithium = new ItemBattery(250000, 1000, 1000).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium");
battery_schrabidium = new ItemBattery(1000000, 5000, 5000).setUnlocalizedName("battery_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_new");
battery_spark = new ItemBattery(100000000, 2000000, 2000000).setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark");
battery_trixite = new ItemBattery(5000000, 40000, 200000).setUnlocalizedName("battery_trixite").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_trixite");
battery_creative = new Item().setUnlocalizedName("battery_creative").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_creative_new");
battery_red_cell = new ItemBattery(15000, 100, 100).setUnlocalizedName("battery_red_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell");
battery_red_cell_6 = new ItemBattery(15000 * 6, 100, 100).setUnlocalizedName("battery_red_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell_6");
battery_red_cell_24 = new ItemBattery(15000 * 24, 100, 100).setUnlocalizedName("battery_red_cell_24").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell_24");
battery_advanced_cell = new ItemBattery(60000, 500, 500).setUnlocalizedName("battery_advanced_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell");
battery_advanced_cell_4 = new ItemBattery(60000 * 4, 500, 500).setUnlocalizedName("battery_advanced_cell_4").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell_4");
battery_advanced_cell_12 = new ItemBattery(60000 * 12, 500, 500).setUnlocalizedName("battery_advanced_cell_12").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell_12");
battery_lithium_cell = new ItemBattery(750000, 1000, 1000).setUnlocalizedName("battery_lithium_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell");
battery_lithium_cell_3 = new ItemBattery(750000 * 3, 1000, 1000).setUnlocalizedName("battery_lithium_cell_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell_3");
battery_lithium_cell_6 = new ItemBattery(750000 * 6, 1000, 1000).setUnlocalizedName("battery_lithium_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell_6");
battery_schrabidium_cell = new ItemBattery(3000000, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell");
battery_schrabidium_cell_2 = new ItemBattery(3000000 * 2, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_2");
battery_schrabidium_cell_4 = new ItemBattery(3000000 * 4, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell_4").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_4");
battery_spark_cell_6 = new ItemBattery(100000000L * 6L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_6");
battery_spark_cell_25 = new ItemBattery(100000000L * 25L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_25").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_25");
battery_spark_cell_100 = new ItemBattery(100000000L * 100L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_100").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_100");
battery_spark_cell_1000 = new ItemBattery(100000000L * 1000L, 20000000, 20000000).setUnlocalizedName("battery_spark_cell_1000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_1000");
battery_spark_cell_2500 = new ItemBattery(100000000L * 2500L, 20000000, 20000000).setUnlocalizedName("battery_spark_cell_2500").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_2500");
battery_spark_cell_10000 = new ItemBattery(100000000L * 10000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_10000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_10000");
battery_spark_cell_power = new ItemBattery(100000000L * 1000000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_power").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_power");
battery_generic = new ItemBattery(5000, 100, 100).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_generic_new");
battery_advanced = new ItemBattery(20000, 500, 500).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_advanced_new");
battery_lithium = new ItemBattery(250000, 1000, 1000).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_lithium");
battery_schrabidium = new ItemBattery(1000000, 5000, 5000).setUnlocalizedName("battery_schrabidium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_schrabidium_new");
battery_spark = new Item().setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":battery_spark");
battery_trixite = new Item().setUnlocalizedName("battery_trixite").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":battery_trixite");
battery_red_cell = new ItemBattery(15000, 100, 100).setUnlocalizedName("battery_red_cell").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell");
battery_red_cell_6 = new ItemBattery(15000 * 6, 100, 100).setUnlocalizedName("battery_red_cell_6").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell_6");
battery_red_cell_24 = new ItemBattery(15000 * 24, 100, 100).setUnlocalizedName("battery_red_cell_24").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell_24");
battery_advanced_cell = new ItemBattery(60000, 500, 500).setUnlocalizedName("battery_advanced_cell").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_advanced_cell");
battery_advanced_cell_4 = new ItemBattery(60000 * 4, 500, 500).setUnlocalizedName("battery_advanced_cell_4").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_advanced_cell_4");
battery_advanced_cell_12 = new ItemBattery(60000 * 12, 500, 500).setUnlocalizedName("battery_advanced_cell_12").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_advanced_cell_12");
battery_lithium_cell = new ItemBattery(750000, 1000, 1000).setUnlocalizedName("battery_lithium_cell").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_lithium_cell");
battery_lithium_cell_3 = new ItemBattery(750000 * 3, 1000, 1000).setUnlocalizedName("battery_lithium_cell_3").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_lithium_cell_3");
battery_lithium_cell_6 = new ItemBattery(750000 * 6, 1000, 1000).setUnlocalizedName("battery_lithium_cell_6").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_lithium_cell_6");
battery_schrabidium_cell = new ItemBattery(3000000, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell");
battery_schrabidium_cell_2 = new ItemBattery(3000000 * 2, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell_2").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_2");
battery_schrabidium_cell_4 = new ItemBattery(3000000 * 4, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell_4").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_4");
battery_spark_cell_6 = new ItemBattery(100000000L * 6L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_6").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_6");
battery_spark_cell_25 = new ItemBattery(100000000L * 25L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_25").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_25");
battery_spark_cell_100 = new ItemBattery(100000000L * 100L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_100").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_100");
battery_spark_cell_1000 = new ItemBattery(100000000L * 1000L, 20000000, 20000000).setUnlocalizedName("battery_spark_cell_1000").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_1000");
battery_spark_cell_2500 = new ItemBattery(100000000L * 2500L, 20000000, 20000000).setUnlocalizedName("battery_spark_cell_2500").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_2500");
battery_spark_cell_10000 = new ItemBattery(100000000L * 10000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_10000").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_10000");
battery_spark_cell_power = new ItemBattery(100000000L * 1000000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_power").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_power");
battery_pack = new ItemBatteryPack().setUnlocalizedName("battery_pack").setTextureName(RefStrings.MODID + ":battery_generic_new");
battery_creative = new ItemBatteryCreative().setUnlocalizedName("battery_creative").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_creative_new");
cube_power = new ItemBattery(1000000000000000000L, 1000000000000000L, 1000000000000000L).setUnlocalizedName("cube_power").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":cube_power");
battery_sc_uranium = new ItemSelfcharger(5).setUnlocalizedName("battery_sc_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_uranium");
battery_sc_technetium = new ItemSelfcharger(25).setUnlocalizedName("battery_sc_technetium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_technetium");
battery_sc_plutonium = new ItemSelfcharger(100).setUnlocalizedName("battery_sc_plutonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_plutonium");
battery_sc_polonium = new ItemSelfcharger(500).setUnlocalizedName("battery_sc_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_polonium");
battery_sc_gold = new ItemSelfcharger(2500).setUnlocalizedName("battery_sc_gold").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_gold");
battery_sc_lead = new ItemSelfcharger(5000).setUnlocalizedName("battery_sc_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_lead");
battery_sc_americium = new ItemSelfcharger(10000).setUnlocalizedName("battery_sc_americium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_americium");
battery_sc_uranium = new ItemSelfcharger(5).setUnlocalizedName("battery_sc_uranium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_uranium");
battery_sc_technetium = new ItemSelfcharger(25).setUnlocalizedName("battery_sc_technetium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_technetium");
battery_sc_plutonium = new ItemSelfcharger(100).setUnlocalizedName("battery_sc_plutonium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_plutonium");
battery_sc_polonium = new ItemSelfcharger(500).setUnlocalizedName("battery_sc_polonium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_polonium");
battery_sc_gold = new ItemSelfcharger(2500).setUnlocalizedName("battery_sc_gold").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_gold");
battery_sc_lead = new ItemSelfcharger(5000).setUnlocalizedName("battery_sc_lead").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_lead");
battery_sc_americium = new ItemSelfcharger(10000).setUnlocalizedName("battery_sc_americium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_sc_americium");
battery_sc = new ItemBatterySC().setUnlocalizedName("battery_sc").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc");
battery_potato = new ItemBattery(1000, 0, 100).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
@ -4204,7 +4182,7 @@ public class ModItems {
public static void initializeItem2() {
ArmorMaterial aMatZirconium = EnumHelper.addArmorMaterial("HBM_ZIRCONIUM", 1000, new int[] { 2, 5, 3, 1 }, 100);
ArmorMaterial aMatZirconium = EnumHelper.addArmorMaterial("HBM_ZIRCONIUM", 1000, new int[] { 2, 5, 3, 1 }, 1000);
aMatZirconium.customCraftingMaterial = ModItems.ingot_zirconium;
zirconium_legs = new ArmorFSB(aMatZirconium, 2, RefStrings.MODID + ":textures/armor/zirconium_2.png").setUnlocalizedName("zirconium_legs").setTextureName(RefStrings.MODID + ":zirconium_legs");
@ -4266,7 +4244,7 @@ public class ModItems {
dieselsuit_legs = new ArmorDiesel(aMatDiesel, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", Fluids.DIESEL, 64_000, 500, 50, 1).cloneStats((ArmorFSB) dieselsuit_helmet).setUnlocalizedName("dieselsuit_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_legs");
dieselsuit_boots = new ArmorDiesel(aMatDiesel, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.DIESEL, 64_000, 500, 50, 1).cloneStats((ArmorFSB) dieselsuit_helmet).setUnlocalizedName("dieselsuit_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_boots");
ArmorMaterial aMatAJR = EnumHelper.addArmorMaterial("HBM_T45AJR", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatAJR = EnumHelper.addArmorMaterial("HBM_T45AJR", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatAJR.customCraftingMaterial = ModItems.plate_armor_ajr;
ajr_helmet = new ArmorAJR(aMatAJR, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25)
.enableVATS(true)
@ -4308,7 +4286,7 @@ public class ModItems {
rpa_legs = new ArmorRPA(aMatAJR, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_legs").setTextureName(RefStrings.MODID + ":rpa_legs");
rpa_boots = new ArmorRPA(aMatAJR, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_boots").setTextureName(RefStrings.MODID + ":rpa_boots");
ArmorMaterial aMatBJ = EnumHelper.addArmorMaterial("HBM_BLACKJACK", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatBJ = EnumHelper.addArmorMaterial("HBM_BLACKJACK", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatBJ.customCraftingMaterial = ModItems.plate_armor_lunar;
bj_helmet = new ArmorBJ(aMatBJ, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 1000, 100)
.enableVATS(true)
@ -4327,7 +4305,7 @@ public class ModItems {
bj_legs = new ArmorBJ(aMatBJ, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 1000, 100).cloneStats((ArmorFSB) bj_helmet).setUnlocalizedName("bj_legs").setTextureName(RefStrings.MODID + ":bj_legs");
bj_boots = new ArmorBJ(aMatBJ, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 1000, 100).cloneStats((ArmorFSB) bj_helmet).setUnlocalizedName("bj_boots").setTextureName(RefStrings.MODID + ":bj_boots");
ArmorMaterial aMatEnv = EnumHelper.addArmorMaterial("HBM_ENV", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatEnv = EnumHelper.addArmorMaterial("HBM_ENV", 150, new int[] { 3, 8, 6, 3 }, 10);
aMatEnv.customCraftingMaterial = ModItems.plate_armor_hev;
envsuit_helmet = new ArmorEnvsuit(aMatEnv, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0)
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1))
@ -4338,7 +4316,7 @@ public class ModItems {
envsuit_legs = new ArmorEnvsuit(aMatEnv, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_legs").setTextureName(RefStrings.MODID + ":envsuit_legs");
envsuit_boots = new ArmorEnvsuit(aMatEnv, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_boots").setTextureName(RefStrings.MODID + ":envsuit_boots");
ArmorMaterial aMatHEV = EnumHelper.addArmorMaterial("HBM_HEV", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatHEV = EnumHelper.addArmorMaterial("HBM_HEV", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatHEV.customCraftingMaterial = ModItems.plate_armor_hev;
hev_helmet = new ArmorHEV(aMatHEV, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0)
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1))
@ -4354,7 +4332,7 @@ public class ModItems {
jackt = new ModArmor(MainRegistry.aMatSteel, 1).setUnlocalizedName("jackt").setTextureName(RefStrings.MODID + ":jackt");
jackt2 = new ModArmor(MainRegistry.aMatSteel, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2");
ArmorMaterial aMatFau = EnumHelper.addArmorMaterial("HBM_DIGAMMA", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatFau = EnumHelper.addArmorMaterial("HBM_DIGAMMA", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatFau.customCraftingMaterial = ModItems.plate_armor_fau;
fau_helmet = new ArmorDigamma(aMatFau, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0)
.addEffect(new PotionEffect(Potion.jump.id, 20, 1))
@ -4370,7 +4348,7 @@ public class ModItems {
fau_legs = new ArmorDigamma(aMatFau, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).hides(EnumPlayerPart.LEFT_LEG, EnumPlayerPart.RIGHT_LEG).setFullSetForHide().setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs");
fau_boots = new ArmorDigamma(aMatFau, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_boots").setTextureName(RefStrings.MODID + ":fau_boots");
ArmorMaterial aMatDNS = EnumHelper.addArmorMaterial("HBM_DNT_NANO", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatDNS = EnumHelper.addArmorMaterial("HBM_DNT_NANO", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatDNS.customCraftingMaterial = ModItems.plate_armor_dnt;
dns_helmet = new ArmorDNT(aMatDNS, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115)
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 9))
@ -4389,7 +4367,7 @@ public class ModItems {
dns_legs = new ArmorDNT(aMatDNS, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_legs").setTextureName(RefStrings.MODID + ":dns_legs");
dns_boots = new ArmorDNT(aMatDNS, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_boots").setTextureName(RefStrings.MODID + ":dns_boots");
ArmorMaterial aMatTaurun = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatTaurun = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 10);
aMatTaurun.customCraftingMaterial = ModItems.plate_iron;
taurun_helmet = new ArmorTaurun(aMatTaurun, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 0))
@ -4399,7 +4377,7 @@ public class ModItems {
taurun_plate = new ArmorTaurun(aMatTaurun, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_plate").setTextureName(RefStrings.MODID + ":taurun_plate");
taurun_legs = new ArmorTaurun(aMatTaurun, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_legs").setTextureName(RefStrings.MODID + ":taurun_legs");
taurun_boots = new ArmorTaurun(aMatTaurun, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_boots").setTextureName(RefStrings.MODID + ":taurun_boots");
ArmorMaterial aMatTrench = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
ArmorMaterial aMatTrench = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatTrench.customCraftingMaterial = ModItems.plate_iron;
trenchmaster_helmet = new ArmorTrenchmaster(aMatTrench, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 2))
@ -5700,8 +5678,12 @@ public class ModItems {
GameRegistry.registerItem(battery_spark_cell_2500, battery_spark_cell_2500.getUnlocalizedName());
GameRegistry.registerItem(battery_spark_cell_10000, battery_spark_cell_10000.getUnlocalizedName());
GameRegistry.registerItem(battery_spark_cell_power, battery_spark_cell_power.getUnlocalizedName());
GameRegistry.registerItem(cube_power, cube_power.getUnlocalizedName());
GameRegistry.registerItem(battery_pack, battery_pack.getUnlocalizedName());
GameRegistry.registerItem(battery_sc, battery_sc.getUnlocalizedName());
GameRegistry.registerItem(battery_creative, battery_creative.getUnlocalizedName());
GameRegistry.registerItem(cube_power, cube_power.getUnlocalizedName());
GameRegistry.registerItem(battery_potato, battery_potato.getUnlocalizedName());
GameRegistry.registerItem(battery_potatos, battery_potatos.getUnlocalizedName());
GameRegistry.registerItem(battery_sc_uranium, battery_sc_uranium.getUnlocalizedName());

View File

@ -117,12 +117,12 @@ public class ArmorFSBPowered extends ArmorFSB implements IBatteryItem {
}
@Override
public long getChargeRate() {
public long getChargeRate(ItemStack stack) {
return chargeRate;
}
@Override
public long getDischargeRate() {
public long getDischargeRate(ItemStack stack) {
return 0;
}

View File

@ -20,6 +20,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import java.util.Random;
import javax.annotation.Nonnull;
public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider {
@ -89,6 +91,8 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
}
public static class InventoryCrate extends ItemInventory {
public static Random rand = new Random();
public InventoryCrate(EntityPlayer player, ItemStack crate) {
this.player = player;
@ -133,6 +137,11 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
public boolean hasCustomInventoryName() {
return target.hasDisplayName();
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
return player.getHeldItem() == this.target;
}
@Override
public void markDirty() { // You have been blessed by the unfuck
@ -140,6 +149,8 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
// Preserve existing NBT so we keep lock data and piders
NBTTagCompound nbt = target.stackTagCompound != null ? target.stackTagCompound : new NBTTagCompound();
int invSize = this.getSizeInventory();
nbt.removeTag("stacklock");
for(int i = 0; i < invSize; i++) {
@ -153,10 +164,9 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
stack.writeToNBT(slot);
nbt.setTag("slot" + i, slot);
}
if (nbt.hasNoTags()) {
nbt = null;
}
// never, ever fucking ever remove the tag compound here, lack of tack compound makes the crate stackable
nbt.setLong("stacklock", rand.nextLong()); // add shit that prevents crates from stacking
target.setTagCompound(nbt);
}
@ -168,6 +178,16 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
// Check for 6kb item vomit
target.setTagCompound(checkNBT(target.getTagCompound()));
player.inventoryContainer.detectAndSendChanges();
if(target.stackTagCompound != null) {
target.stackTagCompound.removeTag("stacklock");
if(target.stackTagCompound.hasNoTags()) {
target.setTagCompound(null); // if there's no tags left, clear compound to make the crate stackable again
} else {
target.stackTagCompound.setLong("stacklock", rand.nextLong()); // add shit that prevents crates from stacking
}
}
}
}
}

View File

@ -113,7 +113,7 @@ public class ItemConserve extends ItemEnumMulti {
MYSTERY(6, 0.5F),
PASHTET(4, 0.5F),
CHEESE(3, 1F),
JIZZ(15, 5F), // :3
SLIME(15, 5F),
MILK(5, 0.25F),
ASS(6, 0.75F), // :3
PIZZA(8, 075F),

View File

@ -111,12 +111,12 @@ public class ItemBattery extends Item implements IBatteryItem {
}
@Override
public long getChargeRate() {
public long getChargeRate(ItemStack stack) {
return chargeRate;
}
@Override
public long getDischargeRate() {
public long getDischargeRate(ItemStack stack) {
return dischargeRate;
}

View File

@ -0,0 +1,18 @@
package com.hbm.items.machine;
import api.hbm.energymk2.IBatteryItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemBatteryCreative extends Item implements IBatteryItem {
@Override public void chargeBattery(ItemStack stack, long i) { }
@Override public void setCharge(ItemStack stack, long i) { }
@Override public void dischargeBattery(ItemStack stack, long i) { }
@Override public long getCharge(ItemStack stack) { return Long.MAX_VALUE / 2L; }
@Override public long getMaxCharge(ItemStack stack) { return Long.MAX_VALUE; }
@Override public long getChargeRate(ItemStack stack) { return Long.MAX_VALUE / 100L; }
@Override public long getDischargeRate(ItemStack stack) { return Long.MAX_VALUE / 100L; }
}

View File

@ -0,0 +1,176 @@
package com.hbm.items.machine;
import java.util.List;
import com.hbm.interfaces.IOrderedEnum;
import com.hbm.items.ItemEnumMulti;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.util.BobMathUtil;
import com.hbm.util.EnumUtil;
import api.hbm.energymk2.IBatteryItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class ItemBatteryPack extends ItemEnumMulti implements IBatteryItem {
public ItemBatteryPack() {
super(EnumBatteryPack.class, true, false);
this.setMaxStackSize(1);
this.setCreativeTab(MainRegistry.controlTab);
}
public static enum EnumBatteryPack {
BATTERY_REDSTONE ("battery_redstone", 100L, false),
BATTERY_LEAD ("battery_lead", 1_000L, false),
BATTERY_LITHIUM ("battery_lithium", 10_000L, false),
BATTERY_SODIUM ("battery_sodium", 50_000L, false),
BATTERY_SCHRABIDIUM ("battery_schrabidium", 250_000L, false),
BATTERY_QUANTUM ("battery_quantum", 1_000_000L, 20 * 60 * 60),
CAPACITOR_COPPER ("capacitor_copper", 1_000L, true),
CAPACITOR_GOLD ("capacitor_gold", 10_000L, true),
CAPACITOR_NIOBIUM ("capacitor_niobium", 100_000L, true),
CAPACITOR_TANTALUM ("capacitor_tantalum", 500_000L, true),
CAPACITOR_BISMUTH ("capacitor_bismuth", 2_500_000L, true),
CAPACITOR_SPARK ("capacitor_spark", 10_000_000L, true);
public ResourceLocation texture;
public long capacity;
public long chargeRate;
public long dischargeRate;
private EnumBatteryPack(String tex, long dischargeRate, boolean capacitor) {
this(tex,
capacitor ? (dischargeRate * 20 * 30) : (dischargeRate * 20 * 60 * 15),
capacitor ? dischargeRate : dischargeRate * 10,
dischargeRate);
}
private EnumBatteryPack(String tex, long dischargeRate, long duration) {
this(tex, dischargeRate * duration, dischargeRate * 10, dischargeRate);
}
private EnumBatteryPack(String tex, long capacity, long chargeRate, long dischargeRate) {
this.texture = new ResourceLocation(RefStrings.MODID, "textures/models/machines/" + tex + ".png");
this.capacity = capacity;
this.chargeRate = chargeRate;
this.dischargeRate = dischargeRate;
}
public boolean isCapacitor() { return this.ordinal() > BATTERY_QUANTUM.ordinal(); }
public ItemStack stack() { return new ItemStack(ModItems.battery_pack, 1, this.ordinal()); }
}
@Override
public void chargeBattery(ItemStack stack, long i) {
if(stack.hasTagCompound()) {
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") + i);
} else {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", i);
}
}
@Override
public void setCharge(ItemStack stack, long i) {
if(stack.hasTagCompound()) {
stack.stackTagCompound.setLong("charge", i);
} else {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", i);
}
}
@Override
public void dischargeBattery(ItemStack stack, long i) {
if(stack.hasTagCompound()) {
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") - i);
} else {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", 0);
}
}
@Override
public long getCharge(ItemStack stack) {
if(stack.hasTagCompound()) {
return stack.stackTagCompound.getLong("charge");
} else {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", 0);
return stack.stackTagCompound.getLong("charge");
}
}
@Override
public long getMaxCharge(ItemStack stack) {
EnumBatteryPack pack = EnumUtil.grabEnumSafely(EnumBatteryPack.class, stack.getItemDamage());
return pack.capacity;
}
@Override
public long getChargeRate(ItemStack stack) {
EnumBatteryPack pack = EnumUtil.grabEnumSafely(EnumBatteryPack.class, stack.getItemDamage());
return pack.chargeRate;
}
@Override
public long getDischargeRate(ItemStack stack) {
EnumBatteryPack pack = EnumUtil.grabEnumSafely(EnumBatteryPack.class, stack.getItemDamage());
return pack.dischargeRate;
}
@Override public boolean showDurabilityBar(ItemStack stack) { return getDurabilityForDisplay(stack) != 0; }
@Override public double getDurabilityForDisplay(ItemStack stack) { return 1D - (double) getCharge(stack) / (double) getMaxCharge(stack); }
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
long maxCharge = this.getMaxCharge(itemstack);
long chargeRate = this.getChargeRate(itemstack);
long dischargeRate = this.getDischargeRate(itemstack);
long charge = maxCharge;
if(itemstack.hasTagCompound()) charge = getCharge(itemstack);
list.add(EnumChatFormatting.GREEN + "Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE (" + (charge * 1000 / maxCharge / 10D) + "%)");
list.add(EnumChatFormatting.YELLOW + "Charge rate: " + BobMathUtil.getShortNumber(chargeRate) + "HE/t");
list.add(EnumChatFormatting.YELLOW + "Discharge rate: " + BobMathUtil.getShortNumber(dischargeRate) + "HE/t");
list.add(EnumChatFormatting.GOLD + "Time for full charge: " + (maxCharge / chargeRate / 20 / 60D) + "min");
list.add(EnumChatFormatting.GOLD + "Charge lasts for: " + (maxCharge / dischargeRate / 20 / 60D) + "min");
}
public static ItemStack makeEmptyBattery(ItemStack stack) {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", 0);
return stack;
}
public static ItemStack makeFullBattery(ItemStack stack) {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", ((ItemBatteryPack) stack.getItem()).getMaxCharge(stack));
return stack;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
Enum[] order = theEnum.getEnumConstants();
if(order[0] instanceof IOrderedEnum) order = ((IOrderedEnum) order[0]).getOrder();
for(int i = 0; i < order.length; i++) {
list.add(makeEmptyBattery(new ItemStack(item, 1, order[i].ordinal())));
list.add(makeFullBattery(new ItemStack(item, 1, order[i].ordinal())));
}
}
}

View File

@ -0,0 +1,62 @@
package com.hbm.items.machine;
import java.util.List;
import com.hbm.items.ItemEnumMulti;
import com.hbm.main.MainRegistry;
import com.hbm.util.BobMathUtil;
import com.hbm.util.EnumUtil;
import api.hbm.energymk2.IBatteryItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemBatterySC extends ItemEnumMulti implements IBatteryItem {
public ItemBatterySC() {
super(EnumBatterySC.class, true, true);
this.setMaxStackSize(1);
this.setCreativeTab(MainRegistry.controlTab);
}
public static enum EnumBatterySC {
EMPTY( 0),
WASTE( 150),
RA226( 200),
TC99( 500),
CO60( 750),
PU238( 1_000),
PO210( 1_250),
AU198( 1_500),
PB209( 2_000),
AM241( 2_500);
public long power;
private EnumBatterySC(long power) {
this.power = power;
}
}
@Override public void chargeBattery(ItemStack stack, long i) { }
@Override public void setCharge(ItemStack stack, long i) { }
@Override public void dischargeBattery(ItemStack stack, long i) { }
@Override public long getChargeRate(ItemStack stack) { return 0; }
@Override public long getCharge(ItemStack stack) { return getMaxCharge(stack); }
@Override public long getDischargeRate(ItemStack stack) { return getMaxCharge(stack); }
@Override
public long getMaxCharge(ItemStack stack) {
EnumBatterySC pack = EnumUtil.grabEnumSafely(EnumBatterySC.class, stack.getItemDamage());
return pack.power;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
EnumBatterySC pack = EnumUtil.grabEnumSafely(EnumBatterySC.class, stack.getItemDamage());
if(pack.power > 0) list.add(EnumChatFormatting.YELLOW + "Discharge rate: " + BobMathUtil.getShortNumber(pack.power) + "HE/t");
}
}

View File

@ -43,12 +43,12 @@ public class ItemSelfcharger extends Item implements IBatteryItem {
}
@Override
public long getChargeRate() {
public long getChargeRate(ItemStack stack) {
return 0;
}
@Override
public long getDischargeRate() {
public long getDischargeRate(ItemStack stack) {
return charge;
}

View File

@ -243,6 +243,6 @@ public class ItemGlitch extends Item implements IBatteryItem {
@Override public void dischargeBattery(ItemStack stack, long i) { }
@Override public long getCharge(ItemStack stack) { return 200; }
@Override public long getMaxCharge(ItemStack stack) { return 200; }
@Override public long getChargeRate() { return 0; }
@Override public long getDischargeRate() { return 200; }
@Override public long getChargeRate(ItemStack stack) { return 0; }
@Override public long getDischargeRate(ItemStack stack) { return 200; }
}

View File

@ -7,6 +7,7 @@ import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
@ -180,10 +181,6 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.piston_selenium, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.canister_full, 16, Fluids.DIESEL.getID()));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.canister_full, 16, Fluids.BIOFUEL.getID()));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_advanced_cell_4, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_advanced_cell_4, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_excavator, 1));
@ -191,8 +188,8 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_cable, 64));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_wire_coated, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_pylon, 8));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_battery, 4));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_lithium_battery, 2));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_battery_socket, 4));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_pack, 4, EnumBatteryPack.BATTERY_LEAD.ordinal()));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_converter_he_rf, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_converter_rf_he, 1));
}
@ -382,7 +379,6 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator_range, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator_manual, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_schrabidium_cell_4, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_generic, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_strong, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_burst, 1));

View File

@ -3,12 +3,16 @@ package com.hbm.items.special;
import java.util.List;
import java.util.Random;
import org.apache.logging.log4j.Level;
import com.hbm.config.GeneralConfig;
import com.hbm.config.VersatileConfig;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.handler.ArmorModHandler;
import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import api.hbm.fluidmk2.IFillableItem;
@ -336,6 +340,9 @@ public class ItemSyringe extends Item {
HbmLivingProps.setContagion(entity, 3 * 60 * 60 * 20);
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
stack.stackSize--;
if(GeneralConfig.enableExtendedLogging)
MainRegistry.logger.log(Level.INFO, "[MKU] " + entityPlayer.getCommandSenderName() + " used an MKU syringe!");
}
}

View File

@ -111,12 +111,12 @@ public class ItemSwordAbilityPower extends ItemSwordAbility implements IBatteryI
}
@Override
public long getChargeRate() {
public long getChargeRate(ItemStack stack) {
return chargeRate;
}
@Override
public long getDischargeRate() {
public long getDischargeRate(ItemStack stack) {
return 0;
}

View File

@ -107,12 +107,12 @@ public class ItemToolAbilityPower extends ItemToolAbility implements IBatteryIte
}
@Override
public long getChargeRate() {
public long getChargeRate(ItemStack stack) {
return chargeRate;
}
@Override
public long getDischargeRate() {
public long getDischargeRate(ItemStack stack) {
return 0;
}

View File

@ -274,9 +274,10 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
public static void playAnimation(EntityPlayer player, ItemStack stack, GunAnimation type, int index) {
if(player instanceof EntityPlayerMP) {
PacketDispatcher.wrapper.sendTo(new HbmAnimationPacket(type.ordinal(), 0, index), (EntityPlayerMP) player);
setLastAnim(stack, index, type);
setAnimTimer(stack, index, 0);
}
setLastAnim(stack, index, type);
setAnimTimer(stack, index, 0);
}
@Override
@ -458,9 +459,9 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
for(int i = 0; i < confNo; i++) {
IHUDComponent[] components = gun.getConfig(stack, i).getHUDComponents(stack);
int bottomOffset = 0;
if(components != null) for(IHUDComponent component : components) {
int bottomOffset = 0;
component.renderHUDComponent(event, type, player, stack, bottomOffset, i);
bottomOffset += component.getComponentHeight(player, stack);
}

View File

@ -1,5 +1,7 @@
package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import com.hbm.interfaces.IOrderedEnum;
import com.hbm.items.ItemEnumMulti;
import com.hbm.items.ModItems;
@ -8,6 +10,8 @@ import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.lib.RefStrings;
@ -16,10 +20,12 @@ import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class GunFactory {
public static BulletConfig ammo_debug;
public static BulletConfig ammo_debug_shot;
public static SpentCasing CASING44 = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F, 1.0F, 1.5F).setColor(SpentCasing.COLOR_CASE_44);
@ -32,6 +38,7 @@ public class GunFactory {
/// BULLLET CFGS ///
ammo_debug = new BulletConfig().setItem(ModItems.ammo_debug).setSpread(0.01F).setRicochetAngle(45).setCasing(CASING44.clone().register("DEBUG0"));
ammo_debug_shot = new BulletConfig().setItem(ModItems.ammo_debug).setSpread(0.05F).setProjectiles(6).setRicochetAngle(45).setCasing(CASING44.clone().register("DEBUG1"));
/// GUNS ///
ModItems.gun_debug = new ItemGunBaseNT(WeaponQuality.DEBUG, new GunConfig()
@ -40,9 +47,15 @@ public class GunFactory {
.dmg(10F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 12).addConfigs(ammo_debug))
.offset(0.75, -0.0625, -0.3125D)
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE))
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD).pt(Lego.LAMBDA_TOGGLE_AIM)
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE),
new Receiver(1)
.dmg(5F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
.mag(new MagazineFullReload(1, 12).addConfigs(ammo_debug_shot))
.offset(0.75, -0.0625, -0.3125D)
.canFire(Lego.LAMBDA_SECOND_CAN_FIRE).fire(Lego.LAMBDA_SECOND_FIRE))
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).ps((stack, ctx) -> { Lego.clickReceiver(stack, ctx, 1); })
.pr(Lego.LAMBDA_STANDARD_RELOAD).pt(Lego.LAMBDA_TOGGLE_AIM)
.decider(LAMBDA_DEBUG_DECIDER)
.anim(Lego.LAMBDA_DEBUG_ANIMS)
).setUnlocalizedName("gun_debug");
@ -79,6 +92,17 @@ public class GunFactory {
MainRegistry.proxy.registerGunCfg();
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_DEBUG_DECIDER = (stack, ctx) -> {
int index = ctx.configIndex;
GunState lastState = ItemGunBaseNT.getState(stack, index);
GunStateDecider.deciderStandardFinishDraw(stack, lastState, index);
GunStateDecider.deciderStandardClearJam(stack, lastState, index);
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 0, index);
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 1, index);
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 0, index, () -> { return ItemGunBaseNT.getPrimary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 1, index, () -> { return ItemGunBaseNT.getSecondary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
};
public static enum EnumAmmo implements IOrderedEnum {
STONE, STONE_AP, STONE_IRON, STONE_SHOT,
M357_BP, M357_SP, M357_FMJ, M357_JHP, M357_AP, M357_EXPRESS,

Some files were not shown because too many files have changed in this diff Show More