From 6d436a2c6a5d9b51070b8399c4fdb196603a8e82 Mon Sep 17 00:00:00 2001
From: Jakub <53441451+kuba6000@users.noreply.github.com>
Date: Sun, 14 Aug 2022 15:19:13 +0200
Subject: Add "Mob Drops" NEI page + Extreme Extermination Chamber (#1)
* First commit
* Mixins
* Merge the same items with diffrent damage
* Faster random in NEI
* More accuracy ?
* Update ClientProxy.java
* Renaming
* Update buildscript
* Use reserved MTE ID's
* EEC work
* Rework NEI page
* Fix inaccurate chances
* Basic equipment spawn
* Add config options
* Translations
* Add infernal drops
* Witchery fix
* Forestry fixes
* More fixes
* Default blacklist
* NEI sorting
* Comment out testing deps
* Clientsided check
* Blood Magic support
* LoaderReference
* Check if peacefull is allowed
* Add some XP output
* Add recipe
* Send Server config to Client
* Add command to reload config
* Translations
* Process MT additions
---
src/main/java/kubatech/loaders/RecipeLoader.java | 77 ++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 src/main/java/kubatech/loaders/RecipeLoader.java
(limited to 'src/main/java/kubatech/loaders/RecipeLoader.java')
diff --git a/src/main/java/kubatech/loaders/RecipeLoader.java b/src/main/java/kubatech/loaders/RecipeLoader.java
new file mode 100644
index 0000000000..99908a857f
--- /dev/null
+++ b/src/main/java/kubatech/loaders/RecipeLoader.java
@@ -0,0 +1,77 @@
+/*
+ * KubaTech - Gregtech Addon
+ * Copyright (C) 2022 kuba6000
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package kubatech.loaders;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_ModHandler;
+import kubatech.Tags;
+import kubatech.api.LoaderReference;
+import kubatech.api.enums.ItemList;
+import kubatech.common.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class RecipeLoader {
+
+ private static final Logger LOG = LogManager.getLogger(Tags.MODID + "[Recipe Loader]");
+ protected static final long bitsd = GT_ModHandler.RecipeBits.NOT_REMOVABLE
+ | GT_ModHandler.RecipeBits.REVERSIBLE
+ | GT_ModHandler.RecipeBits.BUFFERED
+ | GT_ModHandler.RecipeBits.DISMANTLEABLE;
+
+ private static int MTEID = 14201;
+ private static final int MTEIDMax = 14300;
+
+ public static void addRecipes() {
+ if (LoaderReference.EnderIO) {
+ ItemList.ExtremeExterminationChamber.set(new GT_MetaTileEntity_ExtremeExterminationChamber(
+ MTEID++, "multimachine.exterminationchamber", "Extreme Extermination Chamber")
+ .getStackForm(1L));
+ GT_ModHandler.addCraftingRecipe(ItemList.ExtremeExterminationChamber.get(1), bitsd, new Object[] {
+ "RCR",
+ "CHC",
+ "VVV",
+ 'R',
+ gregtech.api.enums.ItemList.Robot_Arm_EV,
+ 'C',
+ OrePrefixes.circuit.get(Materials.Data),
+ 'H',
+ gregtech.api.enums.ItemList.Hull_EV,
+ 'V',
+ GT_ModHandler.getModItem("OpenBlocks", "vacuumhopper", 1, new ItemStack(Blocks.hopper))
+ });
+ }
+ if (MTEID > MTEIDMax + 1) throw new RuntimeException("MTE ID's");
+ }
+
+ private static boolean lateRecipesInitialized = false;
+
+ public static void addRecipesLate() {
+ // Runs on server start
+ if (lateRecipesInitialized) return;
+ lateRecipesInitialized = true;
+
+ MobRecipeLoader.generateMobRecipeMap();
+ MobRecipeLoader.processMobRecipeMap();
+ }
+}
--
cgit
From 4ad580a05e475a912ff9964cdd09d5ff666b98e8 Mon Sep 17 00:00:00 2001
From: kuba6000
Date: Sun, 14 Aug 2022 21:46:59 +0200
Subject: LGPL 3.0
---
LICENSE | 774 +++++----------------
src/main/java/kubatech/ClientProxy.java | 20 +-
src/main/java/kubatech/CommonProxy.java | 20 +-
src/main/java/kubatech/Config.java | 20 +-
src/main/java/kubatech/FMLEventHandler.java | 19 +
src/main/java/kubatech/Tags.java | 20 +-
src/main/java/kubatech/api/Variables.java | 18 +-
.../java/kubatech/api/utils/InfernalHelper.java | 18 +-
src/main/java/kubatech/api/utils/ModUtils.java | 18 +-
.../java/kubatech/api/utils/ReflectionHelper.java | 18 +-
src/main/java/kubatech/commands/CommandConfig.java | 18 +-
.../java/kubatech/commands/CommandHandler.java | 18 +-
src/main/java/kubatech/commands/CommandHelp.java | 18 +-
...MetaTileEntity_ExtremeExterminationChamber.java | 18 +-
src/main/java/kubatech/kubatech.java | 18 +-
.../java/kubatech/loaders/MobRecipeLoader.java | 18 +-
src/main/java/kubatech/loaders/RecipeLoader.java | 18 +-
src/main/java/kubatech/nei/IMCForNEI.java | 18 +-
src/main/java/kubatech/nei/Mob_Handler.java | 18 +-
src/main/java/kubatech/nei/NEI_Config.java | 18 +-
.../java/kubatech/network/LoadConfigHandler.java | 18 +-
.../java/kubatech/network/LoadConfigPacket.java | 18 +-
src/main/resources/LICENSE | 19 +-
23 files changed, 372 insertions(+), 808 deletions(-)
(limited to 'src/main/java/kubatech/loaders/RecipeLoader.java')
diff --git a/LICENSE b/LICENSE
index 09c3f8ddd4..0a041280bd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,621 +1,165 @@
-GNU GENERAL PUBLIC LICENSE
+ GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/src/main/java/kubatech/ClientProxy.java b/src/main/java/kubatech/ClientProxy.java
index f25f41ee2c..4264536980 100644
--- a/src/main/java/kubatech/ClientProxy.java
+++ b/src/main/java/kubatech/ClientProxy.java
@@ -1,19 +1,19 @@
/*
- * kubatech - Gregtech Addon
+ * KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/CommonProxy.java b/src/main/java/kubatech/CommonProxy.java
index e844cd19d0..e1285a7b84 100644
--- a/src/main/java/kubatech/CommonProxy.java
+++ b/src/main/java/kubatech/CommonProxy.java
@@ -1,19 +1,19 @@
/*
- * kubatech - Gregtech Addon
+ * KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/Config.java b/src/main/java/kubatech/Config.java
index 439557d9a0..f258a9e088 100644
--- a/src/main/java/kubatech/Config.java
+++ b/src/main/java/kubatech/Config.java
@@ -1,19 +1,19 @@
/*
- * kubatech - Gregtech Addon
+ * KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/FMLEventHandler.java b/src/main/java/kubatech/FMLEventHandler.java
index e5acd58a36..6e4bfad541 100644
--- a/src/main/java/kubatech/FMLEventHandler.java
+++ b/src/main/java/kubatech/FMLEventHandler.java
@@ -1,3 +1,22 @@
+/*
+ * KubaTech - Gregtech Addon
+ * Copyright (C) 2022 kuba6000
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
+ *
+ */
+
package kubatech;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
diff --git a/src/main/java/kubatech/Tags.java b/src/main/java/kubatech/Tags.java
index eb89cfdb6d..6f2393c4e6 100644
--- a/src/main/java/kubatech/Tags.java
+++ b/src/main/java/kubatech/Tags.java
@@ -1,19 +1,19 @@
/*
- * kubatech - Gregtech Addon
+ * KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/api/Variables.java b/src/main/java/kubatech/api/Variables.java
index c989b45f6f..9dba10f6a6 100644
--- a/src/main/java/kubatech/api/Variables.java
+++ b/src/main/java/kubatech/api/Variables.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/api/utils/InfernalHelper.java b/src/main/java/kubatech/api/utils/InfernalHelper.java
index d4e416e9a5..60263b0a17 100644
--- a/src/main/java/kubatech/api/utils/InfernalHelper.java
+++ b/src/main/java/kubatech/api/utils/InfernalHelper.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/api/utils/ModUtils.java b/src/main/java/kubatech/api/utils/ModUtils.java
index 0802294974..0f598dcfa8 100644
--- a/src/main/java/kubatech/api/utils/ModUtils.java
+++ b/src/main/java/kubatech/api/utils/ModUtils.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/api/utils/ReflectionHelper.java b/src/main/java/kubatech/api/utils/ReflectionHelper.java
index 0e5d40e245..7c7301c1c8 100644
--- a/src/main/java/kubatech/api/utils/ReflectionHelper.java
+++ b/src/main/java/kubatech/api/utils/ReflectionHelper.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/commands/CommandConfig.java b/src/main/java/kubatech/commands/CommandConfig.java
index f3bcbb7754..e892ac885b 100644
--- a/src/main/java/kubatech/commands/CommandConfig.java
+++ b/src/main/java/kubatech/commands/CommandConfig.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/commands/CommandHandler.java b/src/main/java/kubatech/commands/CommandHandler.java
index 6f32839472..3bcfb352b2 100644
--- a/src/main/java/kubatech/commands/CommandHandler.java
+++ b/src/main/java/kubatech/commands/CommandHandler.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/commands/CommandHelp.java b/src/main/java/kubatech/commands/CommandHelp.java
index 0165e67c80..2ea9b00d76 100644
--- a/src/main/java/kubatech/commands/CommandHelp.java
+++ b/src/main/java/kubatech/commands/CommandHelp.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java b/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
index f02599f37f..ff6ed02363 100644
--- a/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
+++ b/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/kubatech.java b/src/main/java/kubatech/kubatech.java
index 893928ea60..d5407ff357 100644
--- a/src/main/java/kubatech/kubatech.java
+++ b/src/main/java/kubatech/kubatech.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/loaders/MobRecipeLoader.java b/src/main/java/kubatech/loaders/MobRecipeLoader.java
index fddfb03137..3c087961d9 100644
--- a/src/main/java/kubatech/loaders/MobRecipeLoader.java
+++ b/src/main/java/kubatech/loaders/MobRecipeLoader.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/loaders/RecipeLoader.java b/src/main/java/kubatech/loaders/RecipeLoader.java
index 99908a857f..ba6cbb7a1f 100644
--- a/src/main/java/kubatech/loaders/RecipeLoader.java
+++ b/src/main/java/kubatech/loaders/RecipeLoader.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/nei/IMCForNEI.java b/src/main/java/kubatech/nei/IMCForNEI.java
index 75228e19f1..636e028c31 100644
--- a/src/main/java/kubatech/nei/IMCForNEI.java
+++ b/src/main/java/kubatech/nei/IMCForNEI.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/nei/Mob_Handler.java b/src/main/java/kubatech/nei/Mob_Handler.java
index cd172a8797..a231eceffc 100644
--- a/src/main/java/kubatech/nei/Mob_Handler.java
+++ b/src/main/java/kubatech/nei/Mob_Handler.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/nei/NEI_Config.java b/src/main/java/kubatech/nei/NEI_Config.java
index 8b7123a416..a5bf1f58ca 100644
--- a/src/main/java/kubatech/nei/NEI_Config.java
+++ b/src/main/java/kubatech/nei/NEI_Config.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/network/LoadConfigHandler.java b/src/main/java/kubatech/network/LoadConfigHandler.java
index a950c1d849..7bf8bd9756 100644
--- a/src/main/java/kubatech/network/LoadConfigHandler.java
+++ b/src/main/java/kubatech/network/LoadConfigHandler.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/java/kubatech/network/LoadConfigPacket.java b/src/main/java/kubatech/network/LoadConfigPacket.java
index d386d6b071..48f3342486 100644
--- a/src/main/java/kubatech/network/LoadConfigPacket.java
+++ b/src/main/java/kubatech/network/LoadConfigPacket.java
@@ -2,18 +2,18 @@
* KubaTech - Gregtech Addon
* Copyright (C) 2022 kuba6000
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
*
*/
diff --git a/src/main/resources/LICENSE b/src/main/resources/LICENSE
index 49ca66a7bf..8d4cc1a2f3 100644
--- a/src/main/resources/LICENSE
+++ b/src/main/resources/LICENSE
@@ -1,14 +1,15 @@
+KubaTech - Gregtech addon
Copyright (C) 2022 kuba6000
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 3 of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program. If not, see .
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see .
--
cgit
From 76a2834cedfa4f3916d07e2893fc54121268489e Mon Sep 17 00:00:00 2001
From: kuba6000
Date: Wed, 17 Aug 2022 05:01:16 +0200
Subject: Structure
---
dependencies.gradle | 5 +
src/main/java/kubatech/FMLEventHandler.java | 2 +-
src/main/java/kubatech/api/LoaderReference.java | 1 +
.../api/network/CustomTileEntityPacket.java | 119 ++++++
.../kubatech/api/network/LoadConfigPacket.java | 74 ++++
.../tileentity/CustomTileEntityPacketHandler.java | 7 +
.../java/kubatech/api/utils/InfernalHelper.java | 1 +
src/main/java/kubatech/api/utils/MobUtils.java | 57 +++
.../java/kubatech/api/utils/ReflectionHelper.java | 9 +-
.../kubatech/client/effect/EntityRenderer.java | 144 +++++++
src/main/java/kubatech/commands/CommandConfig.java | 2 +-
.../java/kubatech/commands/CommandHandler.java | 1 +
src/main/java/kubatech/commands/CommandHelp.java | 7 +-
...MetaTileEntity_ExtremeExterminationChamber.java | 394 ------------------
src/main/java/kubatech/kubatech.java | 7 +-
.../java/kubatech/loaders/MobRecipeLoader.java | 22 +-
src/main/java/kubatech/loaders/RecipeLoader.java | 2 +-
src/main/java/kubatech/nei/Mob_Handler.java | 3 +-
.../java/kubatech/network/LoadConfigHandler.java | 36 --
.../java/kubatech/network/LoadConfigPacket.java | 61 ---
...MetaTileEntity_ExtremeExterminationChamber.java | 454 +++++++++++++++++++++
21 files changed, 893 insertions(+), 515 deletions(-)
create mode 100644 src/main/java/kubatech/api/network/CustomTileEntityPacket.java
create mode 100644 src/main/java/kubatech/api/network/LoadConfigPacket.java
create mode 100644 src/main/java/kubatech/api/tileentity/CustomTileEntityPacketHandler.java
create mode 100644 src/main/java/kubatech/api/utils/MobUtils.java
create mode 100644 src/main/java/kubatech/client/effect/EntityRenderer.java
delete mode 100644 src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
delete mode 100644 src/main/java/kubatech/network/LoadConfigHandler.java
delete mode 100644 src/main/java/kubatech/network/LoadConfigPacket.java
create mode 100644 src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
(limited to 'src/main/java/kubatech/loaders/RecipeLoader.java')
diff --git a/dependencies.gradle b/dependencies.gradle
index 39a4c44d2f..77f994b5c0 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -17,11 +17,16 @@ dependencies {
{
transitive = false
}
+ compileOnly("com.github.GTNewHorizons:bartworks:0.5.67:dev")
+ {
+ transitive = false
+ }
runtime("com.github.GTNewHorizons:Baubles:1.0.1.14:dev")
runtime("curse.maven:cofh-core-69162:2388751")
// For testing
//runtime("com.github.GTNewHorizons:OpenBlocks:1.6.9-GTNH:dev")
+ //runtime("com.github.GTNewHorizons:bartworks:0.5.67:dev")
//runtime("com.github.GTNewHorizons:CraftTweaker:3.2.9:dev")
//compile("com.github.GTNewHorizons:SpecialMobs:3.3.12:dev")
//compile("com.github.GTNewHorizons:twilightforest:2.3.8.15:dev")
diff --git a/src/main/java/kubatech/FMLEventHandler.java b/src/main/java/kubatech/FMLEventHandler.java
index 6e4bfad541..e74e7eeee0 100644
--- a/src/main/java/kubatech/FMLEventHandler.java
+++ b/src/main/java/kubatech/FMLEventHandler.java
@@ -21,7 +21,7 @@ package kubatech;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
-import kubatech.network.LoadConfigPacket;
+import kubatech.api.network.LoadConfigPacket;
import net.minecraft.entity.player.EntityPlayerMP;
public class FMLEventHandler {
diff --git a/src/main/java/kubatech/api/LoaderReference.java b/src/main/java/kubatech/api/LoaderReference.java
index aef8930905..418fe4a7ab 100644
--- a/src/main/java/kubatech/api/LoaderReference.java
+++ b/src/main/java/kubatech/api/LoaderReference.java
@@ -9,4 +9,5 @@ public class LoaderReference {
public static final boolean InfernalMobs = Loader.isModLoaded("InfernalMobs");
public static final boolean Thaumcraft = Loader.isModLoaded("Thaumcraft");
public static final boolean MineTweaker = Loader.isModLoaded("MineTweaker3");
+ public static final boolean Bartworks = Loader.isModLoaded("bartworks");
}
diff --git a/src/main/java/kubatech/api/network/CustomTileEntityPacket.java b/src/main/java/kubatech/api/network/CustomTileEntityPacket.java
new file mode 100644
index 0000000000..9236594647
--- /dev/null
+++ b/src/main/java/kubatech/api/network/CustomTileEntityPacket.java
@@ -0,0 +1,119 @@
+package kubatech.api.network;
+
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+import java.nio.charset.StandardCharsets;
+import kubatech.api.tileentity.CustomTileEntityPacketHandler;
+import kubatech.api.utils.ModUtils;
+import kubatech.kubatech;
+import net.minecraft.client.Minecraft;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
+public class CustomTileEntityPacket implements IMessage {
+ public int w, x, y, z;
+ public ByteBuf customdata = Unpooled.buffer();
+
+ @SuppressWarnings("unused")
+ public CustomTileEntityPacket() {}
+
+ public CustomTileEntityPacket(TileEntity te, byte[] customdata) {
+ this.w = te.getWorldObj().provider.dimensionId;
+ this.x = te.xCoord;
+ this.y = te.yCoord;
+ this.z = te.zCoord;
+ if (customdata != null && customdata.length > 0) this.customdata.writeBytes(customdata);
+ }
+
+ public void sendToAllAround(int range) {
+ kubatech.NETWORK.sendToAllAround(this, new NetworkRegistry.TargetPoint(w, x, y, z, range));
+ }
+
+ // Helper methods
+
+ public void resetHelperData() {
+ customdata.clear();
+ }
+
+ public void addData(byte[] data) {
+ customdata.writeBytes(data);
+ }
+
+ public void addData(byte data) {
+ customdata.writeByte(data);
+ }
+
+ public void addData(int data) {
+ customdata.writeInt(data);
+ }
+
+ public void addData(String data) {
+ byte[] bytes = data.getBytes(StandardCharsets.UTF_8);
+ addData(bytes.length);
+ addData(bytes);
+ }
+
+ public void getData(byte[] bytes) {
+ customdata.readBytes(bytes);
+ }
+
+ public byte[] getData(int len) {
+ byte[] bytes = new byte[len];
+ getData(bytes);
+ return bytes;
+ }
+
+ public int getDataInt() {
+ return customdata.readInt();
+ }
+
+ public String getDataString() {
+ return new String(getData(getDataInt()), StandardCharsets.UTF_8);
+ }
+
+ @Override
+ public void fromBytes(ByteBuf buf) {
+ w = buf.readInt();
+ x = buf.readInt();
+ y = buf.readInt();
+ z = buf.readInt();
+ customdata.clear();
+ buf.readBytes(customdata, buf.readInt());
+ }
+
+ @Override
+ public void toBytes(ByteBuf buf) {
+ buf.writeInt(w);
+ buf.writeInt(x);
+ buf.writeInt(y);
+ buf.writeInt(z);
+ buf.writeInt(customdata.readableBytes());
+ buf.writeBytes(customdata);
+ }
+
+ public static class Handler implements IMessageHandler {
+ @Override
+ public IMessage onMessage(CustomTileEntityPacket message, MessageContext ctx) {
+ if (!ModUtils.isClientSided) return null;
+ World w = Minecraft.getMinecraft().thePlayer.getEntityWorld();
+ if (message.w != w.provider.dimensionId) return null;
+ TileEntity e = w.getTileEntity(message.x, message.y, message.z);
+ if (e == null || e.isInvalid()) return null;
+ if (e instanceof IGregTechTileEntity && !((IGregTechTileEntity) e).isInvalidTileEntity()) {
+ IMetaTileEntity mte = ((IGregTechTileEntity) e).getMetaTileEntity();
+ if (mte == null) return null;
+ if (!(mte instanceof CustomTileEntityPacketHandler)) return null;
+ ((CustomTileEntityPacketHandler) mte).HandleCustomPacket(message);
+ return null;
+ } else if (!(e instanceof CustomTileEntityPacketHandler)) return null;
+ ((CustomTileEntityPacketHandler) e).HandleCustomPacket(message);
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/kubatech/api/network/LoadConfigPacket.java b/src/main/java/kubatech/api/network/LoadConfigPacket.java
new file mode 100644
index 0000000000..f38293642e
--- /dev/null
+++ b/src/main/java/kubatech/api/network/LoadConfigPacket.java
@@ -0,0 +1,74 @@
+/*
+ * KubaTech - Gregtech Addon
+ * Copyright (C) 2022 kuba6000
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
+ *
+ */
+
+package kubatech.api.network;
+
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import io.netty.buffer.ByteBuf;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import kubatech.Config;
+import kubatech.kubatech;
+import kubatech.loaders.MobRecipeLoader;
+
+public class LoadConfigPacket implements IMessage {
+
+ public static final LoadConfigPacket instance = new LoadConfigPacket();
+
+ public final HashSet mobsToLoad = new HashSet<>();
+
+ @Override
+ public void fromBytes(ByteBuf buf) {
+ if (!buf.readBoolean()) mobsToLoad.clear();
+ else {
+ mobsToLoad.clear();
+ int mobssize = buf.readInt();
+ for (int i = 0; i < mobssize; i++) {
+ byte[] sbytes = new byte[buf.readInt()];
+ buf.readBytes(sbytes);
+ mobsToLoad.add(new String(sbytes, StandardCharsets.UTF_8));
+ }
+ }
+ }
+
+ @Override
+ public void toBytes(ByteBuf buf) {
+ if (!Config.mobHandlerEnabled) buf.writeBoolean(false);
+ else {
+ buf.writeBoolean(true);
+ buf.writeInt(mobsToLoad.size());
+ mobsToLoad.forEach(s -> {
+ byte[] sbytes = s.getBytes(StandardCharsets.UTF_8);
+ buf.writeInt(sbytes.length);
+ buf.writeBytes(sbytes);
+ });
+ }
+ }
+
+ public static class Handler implements IMessageHandler {
+ @Override
+ public IMessage onMessage(LoadConfigPacket message, MessageContext ctx) {
+ kubatech.info("Received Mob Handler config, parsing");
+ MobRecipeLoader.processMobRecipeMap(message.mobsToLoad);
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/kubatech/api/tileentity/CustomTileEntityPacketHandler.java b/src/main/java/kubatech/api/tileentity/CustomTileEntityPacketHandler.java
new file mode 100644
index 0000000000..643ca70d0f
--- /dev/null
+++ b/src/main/java/kubatech/api/tileentity/CustomTileEntityPacketHandler.java
@@ -0,0 +1,7 @@
+package kubatech.api.tileentity;
+
+import kubatech.api.network.CustomTileEntityPacket;
+
+public interface CustomTileEntityPacketHandler {
+ void HandleCustomPacket(CustomTileEntityPacket customdata);
+}
diff --git a/src/main/java/kubatech/api/utils/InfernalHelper.java b/src/main/java/kubatech/api/utils/InfernalHelper.java
index 60263b0a17..4bd48274f3 100644
--- a/src/main/java/kubatech/api/utils/InfernalHelper.java
+++ b/src/main/java/kubatech/api/utils/InfernalHelper.java
@@ -27,6 +27,7 @@ import java.util.ArrayList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
+@SuppressWarnings("unchecked")
public class InfernalHelper {
private static Method isClassAllowed = null;
diff --git a/src/main/java/kubatech/api/utils/MobUtils.java b/src/main/java/kubatech/api/utils/MobUtils.java
new file mode 100644
index 0000000000..3e20adac1c
--- /dev/null
+++ b/src/main/java/kubatech/api/utils/MobUtils.java
@@ -0,0 +1,57 @@
+package kubatech.api.utils;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import java.lang.reflect.Field;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBox;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.entity.RendererLivingEntity;
+import net.minecraft.entity.EntityLiving;
+
+public class MobUtils {
+
+ private static Field mainmodelfield = null;
+
+ @SideOnly(Side.CLIENT)
+ public static float getDesiredScale(EntityLiving e, float desiredHeight) {
+ try {
+ if (mainmodelfield == null) {
+ mainmodelfield = RendererLivingEntity.class.getDeclaredField(
+ ModUtils.isDeobfuscatedEnvironment ? "mainModel" : "field_77045_g");
+ mainmodelfield.setAccessible(true);
+ }
+ float eheight = e.height;
+ float ewidth = e.width;
+ Render r = RenderManager.instance.getEntityRenderObject(e);
+ if (r instanceof RendererLivingEntity && mainmodelfield != null) {
+ ModelBase mainmodel = (ModelBase) mainmodelfield.get(r);
+ for (Object box : mainmodel.boxList) {
+ if (box instanceof ModelRenderer) {
+ float minY = 999f;
+ float minX = 999f;
+ float maxY = -999f;
+ float maxX = -999f;
+ for (Object cube : ((ModelRenderer) box).cubeList) {
+ if (cube instanceof ModelBox) {
+ if (minY > ((ModelBox) cube).posY1) minY = ((ModelBox) cube).posY1;
+ if (minX > ((ModelBox) cube).posX1) minX = ((ModelBox) cube).posX1;
+ if (maxY < ((ModelBox) cube).posY2) maxY = ((ModelBox) cube).posY2;
+ if (maxX < ((ModelBox) cube).posX2) maxX = ((ModelBox) cube).posX2;
+ }
+ }
+ float cubeheight = (maxY - minY) / 10f;
+ float cubewidth = (maxX - minX) / 10f;
+ if (eheight < cubeheight) eheight = cubeheight;
+ if (ewidth < cubewidth) ewidth = cubewidth;
+ }
+ }
+ }
+ return desiredHeight / eheight;
+ } catch (Exception ex) {
+ return 1f;
+ }
+ }
+}
diff --git a/src/main/java/kubatech/api/utils/ReflectionHelper.java b/src/main/java/kubatech/api/utils/ReflectionHelper.java
index 7c7301c1c8..48d07c6eee 100644
--- a/src/main/java/kubatech/api/utils/ReflectionHelper.java
+++ b/src/main/java/kubatech/api/utils/ReflectionHelper.java
@@ -25,7 +25,8 @@ import java.util.HashMap;
public class ReflectionHelper {
private static final HashMap> fields = new HashMap<>();
- public static T getField(Object obj, String fieldName, boolean useBasicTypes, T defaultvalue) {
+ @SuppressWarnings("unchecked")
+ public static T getField(Object obj, String fieldName, T defaultvalue) {
Class> cl = obj.getClass();
String clName = cl.getName();
HashMap classmap = fields.computeIfAbsent(clName, s -> new HashMap<>());
@@ -52,11 +53,7 @@ public class ReflectionHelper {
}
}
- public static T getField(Object obj, String fieldName, boolean useBasicTypes) {
- return getField(obj, fieldName, useBasicTypes, null);
- }
-
public static T getField(Object obj, String fieldName) {
- return getField(obj, fieldName, true, null);
+ return getField(obj, fieldName, null);
}
}
diff --git a/src/main/java/kubatech/client/effect/EntityRenderer.java b/src/main/java/kubatech/client/effect/EntityRenderer.java
new file mode 100644
index 0000000000..23f1a6e44a
--- /dev/null
+++ b/src/main/java/kubatech/client/effect/EntityRenderer.java
@@ -0,0 +1,144 @@
+package kubatech.client.effect;
+
+import static net.minecraft.client.renderer.entity.RenderManager.*;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import kubatech.api.utils.MobUtils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.particle.EntityFX;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.world.World;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+@SideOnly(Side.CLIENT)
+public class EntityRenderer extends EntityFX {
+ private EntityLiving entityToRender = null;
+
+ public EntityRenderer(World p_i1218_1_, double x, double y, double z, int age) {
+ super(p_i1218_1_, x + 0.5d, y, z + 0.5d);
+ this.particleMaxAge = age;
+ this.particleAge = 0;
+ }
+
+ public EntityRenderer(EntityRenderer r, int age) {
+ super(r.worldObj, r.posX, r.posY, r.posZ);
+ this.particleMaxAge = age;
+ this.particleAge = 0;
+ this.ticksExisted = r.ticksExisted;
+ this.entityToRender = r.entityToRender;
+ }
+
+ @Override
+ protected void entityInit() {}
+
+ @Override
+ public void onUpdate() {
+ if (this.entityToRender == null) return;
+ this.ticksExisted++;
+ if (ticksExisted % 20 == 0) entityToRender.hurtTime = 10;
+ else if (entityToRender.hurtTime > 0) entityToRender.hurtTime--;
+ if (this.particleAge++ == this.particleMaxAge) {
+ this.setDead();
+ }
+ }
+
+ @Override
+ public boolean shouldRenderInPass(int pass) {
+ return pass == 3;
+ }
+
+ @Override
+ public int getFXLayer() {
+ return 3;
+ }
+
+ public void setEntity(EntityLiving entity) {
+ this.entityToRender = entity;
+ }
+
+ @Override
+ public void renderParticle(
+ Tessellator p_70539_1_,
+ float p_70539_2_,
+ float p_70539_3_,
+ float p_70539_4_,
+ float p_70539_5_,
+ float p_70539_6_,
+ float p_70539_7_) {
+ if (entityToRender == null) return;
+
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_COLOR_MATERIAL);
+
+ entityToRender.worldObj = this.worldObj;
+ entityToRender.setPosition(this.posX, this.posY, this.posZ);
+
+ double rotation;
+ // double headrotation;
+ {
+ double x1 = this.posX;
+ double x2 = Minecraft.getMinecraft().thePlayer.posX;
+ double y1 = this.posZ;
+ double y2 = Minecraft.getMinecraft().thePlayer.posZ;
+ double k = Math.toDegrees(Math.atan2(x2 - x1, y1 - y2));
+ if (k < 0d) k += 360d;
+ k -= 180d;
+ rotation = k;
+ }
+ /*
+ {
+ double y1 = this.posY;
+ double y2 = Minecraft.getMinecraft().thePlayer.posY;
+ double d = Minecraft.getMinecraft()
+ .thePlayer
+ .getDistance(this.posX, Minecraft.getMinecraft().thePlayer.posY, this.posZ);
+ double k = Math.toDegrees(Math.atan2(y1 - y2, d));
+ if (k < 0d) k += 360d;
+ headrotation = k;
+ }
+
+ */
+
+ entityToRender.prevRotationYawHead = entityToRender.rotationYawHead;
+ entityToRender.prevRenderYawOffset = entityToRender.renderYawOffset;
+ // entityToRender.prevRotationPitch = entityToRender.rotationPitch;
+ entityToRender.renderYawOffset = (float) rotation;
+ entityToRender.rotationYawHead = (float) rotation;
+ // entityToRender.rotationPitch = (float)headrotation;
+
+ float p_147936_2_ = 0.5f;
+
+ float f1 = entityToRender.prevRotationYaw
+ + (entityToRender.rotationYaw - entityToRender.prevRotationYaw) * p_147936_2_;
+ int i = entityToRender.getBrightnessForRender(p_147936_2_);
+
+ if (entityToRender.isBurning()) {
+ i = 15728880;
+ }
+
+ int j = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j, (float) k);
+ GL11.glColor4f(1f, 1f, 1f, 1F);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(
+ (float) (this.posX - renderPosX), (float) (this.posY - renderPosY), (float) (this.posZ - renderPosZ));
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ float desiredScale = MobUtils.getDesiredScale(entityToRender, 2f);
+ if (desiredScale < 1f) GL11.glScalef(desiredScale, desiredScale, desiredScale);
+
+ instance.renderEntityWithPosYaw(entityToRender, 0f, 0f, 0f, f1, p_147936_2_);
+
+ GL11.glPopMatrix();
+
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_COLOR_MATERIAL);
+ }
+}
diff --git a/src/main/java/kubatech/commands/CommandConfig.java b/src/main/java/kubatech/commands/CommandConfig.java
index e892ac885b..a1c3659165 100644
--- a/src/main/java/kubatech/commands/CommandConfig.java
+++ b/src/main/java/kubatech/commands/CommandConfig.java
@@ -22,9 +22,9 @@ package kubatech.commands;
import static kubatech.commands.CommandConfig.Translations.*;
import kubatech.Config;
+import kubatech.api.network.LoadConfigPacket;
import kubatech.kubatech;
import kubatech.loaders.MobRecipeLoader;
-import kubatech.network.LoadConfigPacket;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
diff --git a/src/main/java/kubatech/commands/CommandHandler.java b/src/main/java/kubatech/commands/CommandHandler.java
index 3bcfb352b2..d1822a1ff8 100644
--- a/src/main/java/kubatech/commands/CommandHandler.java
+++ b/src/main/java/kubatech/commands/CommandHandler.java
@@ -74,6 +74,7 @@ public class CommandHandler extends CommandBase {
return "kubatech " + USAGE.get();
}
+ @SuppressWarnings("rawtypes")
@Override
public List getCommandAliases() {
return aliases;
diff --git a/src/main/java/kubatech/commands/CommandHelp.java b/src/main/java/kubatech/commands/CommandHelp.java
index 2ea9b00d76..dba8ab622d 100644
--- a/src/main/java/kubatech/commands/CommandHelp.java
+++ b/src/main/java/kubatech/commands/CommandHelp.java
@@ -73,8 +73,9 @@ public class CommandHelp extends CommandBase {
@Override
public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_) {
p_71515_1_.addChatMessage(new ChatComponentText(POSSIBLE_COMMANDS.get()));
- CommandHandler.commands.values().forEach(c -> {
- p_71515_1_.addChatMessage(new ChatComponentText("/kubatech " + c.getCommandUsage(p_71515_1_)));
- });
+ CommandHandler.commands
+ .values()
+ .forEach(c ->
+ p_71515_1_.addChatMessage(new ChatComponentText("/kubatech " + c.getCommandUsage(p_71515_1_))));
}
}
diff --git a/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java b/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
deleted file mode 100644
index ff6ed02363..0000000000
--- a/src/main/java/kubatech/common/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see .
- *
- */
-
-package kubatech.common.tileentity.gregtech.multiblock;
-
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
-import static gregtech.api.enums.Textures.BlockIcons.*;
-import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
-import static kubatech.api.Variables.Author;
-
-import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
-import WayofTime.alchemicalWizardry.api.event.RitualRunEvent;
-import WayofTime.alchemicalWizardry.api.rituals.Rituals;
-import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
-import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
-import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering;
-import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
-import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
-import com.gtnewhorizon.structurelib.structure.StructureDefinition;
-import cpw.mods.fml.common.eventhandler.EventPriority;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import crazypants.enderio.EnderIO;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
-import gregtech.api.render.TextureFactory;
-import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
-import gregtech.api.util.GT_Utility;
-import java.util.HashMap;
-import java.util.Random;
-import kubatech.Tags;
-import kubatech.api.LoaderReference;
-import kubatech.api.utils.FastRandom;
-import kubatech.api.utils.ReflectionHelper;
-import kubatech.loaders.MobRecipeLoader;
-import net.minecraft.block.Block;
-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.ChunkCoordinates;
-import net.minecraft.world.EnumDifficulty;
-import net.minecraft.world.World;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
-public class GT_MetaTileEntity_ExtremeExterminationChamber
- extends GT_MetaTileEntity_EnhancedMultiBlockBase {
-
- public static final HashMap MobNameToRecipeMap = new HashMap<>();
- public final Random rand = new FastRandom();
-
- public GT_MetaTileEntity_ExtremeExterminationChamber(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_ExtremeExterminationChamber(String aName) {
- super(aName);
- if (LoaderReference.BloodMagic) MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public void onRemoval() {
- if (LoaderReference.BloodMagic) MinecraftForge.EVENT_BUS.unregister(this);
- }
-
- private static final String WellOfSufferingRitualName = "AW013Suffering";
-
- private static final Item poweredSpawnerItem = Item.getItemFromBlock(EnderIO.blockPoweredSpawner);
- private static final int CASING_INDEX = 16;
- private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition STRUCTURE_DEFINITION =
- StructureDefinition.builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {"ccccc", "ccccc", "ccccc", "ccccc", "ccccc"},
- {"ccccc", "c---c", "c---c", "c---c", "ccccc"},
- {"ccccc", "c---c", "c---c", "c---c", "ccccc"},
- {"ccccc", "c---c", "c---c", "c---c", "ccccc"},
- {"ccccc", "c---c", "c---c", "c---c", "ccccc"},
- {"ccccc", "csssc", "csssc", "csssc", "ccccc"},
- {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"},
- }))
- .addElement('c', onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings2, 0)))
- .addElement(
- 'C',
- ofChain(
- onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings2, 0)),
- ofHatchAdder(
- GT_MetaTileEntity_ExtremeExterminationChamber::addOutputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_MetaTileEntity_ExtremeExterminationChamber::addEnergyInputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GT_MetaTileEntity_ExtremeExterminationChamber::addMaintenanceToMachineList,
- CASING_INDEX,
- 1)))
- .addElement(
- 's',
- LoaderReference.ExtraUtilities
- ? ofBlock(Block.getBlockFromName("ExtraUtilities:spike_base_diamond"), 0)
- : isAir())
- .build();
-
- private TileEntity masterStoneRitual = null;
- private TileEntity tileAltar = null;
- private boolean isInRitualMode = false;
- private int mCasing = 0;
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setBoolean("isInRitualMode", isInRitualMode);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- isInRitualMode = aNBT.getBoolean("isInRitualMode");
- }
-
- @Override
- public IStructureDefinition getStructureDefinition() {
- return STRUCTURE_DEFINITION;
- }
-
- @Override
- protected GT_Multiblock_Tooltip_Builder createTooltip() {
- GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Powered Spawner")
- .addInfo("Controller block for Extreme Extermination Chamber")
- .addInfo("Spawns and Exterminates monsters for you")
- .addInfo("Base energy usage: 2,000 EU/t")
- .addInfo("Recipe time is based on mob health")
- .addInfo("Also produces 120 Liquid XP per operation")
- .addInfo("If the mob spawns infernal")
- .addInfo("it will drain 8 times more power")
- .addInfo("You can enable ritual mode with a screwdriver")
- .addInfo("When in ritual mode and Well Of Suffering ritual is built directly on the machine in center")
- .addInfo("The mobs will start to buffer and die very slowly by a ritual")
- .addInfo(Author)
- .addSeparator()
- .beginStructureBlock(5, 7, 5, true)
- .addController("Front Bottom Center")
- .addCasingInfo("Solid Steel Machine Casing", 10)
- .addOutputBus("Any casing", 1)
- .addOutputHatch("Any casing", 1)
- .addEnergyHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
- .toolTipFinisher(Tags.MODNAME);
- return tt;
- }
-
- @Override
- public void construct(ItemStack itemStack, boolean b) {
- buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 2, 6, 0);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_ExtremeExterminationChamber(this.mName);
- }
-
- @Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
- if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER)
- .extFacing()
- .build(),
- TextureFactory.builder()
- .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
- .extFacing()
- .glow()
- .build()
- };
- }
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- super.onFirstTick(aBaseMetaTileEntity);
- }
-
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (!LoaderReference.BloodMagic) return;
- if (this.mMaxProgresstime > 0) {
- GT_Utility.sendChatToPlayer(aPlayer, "Can't change mode when running !");
- return;
- }
- isInRitualMode = !isInRitualMode;
- if (!isInRitualMode) {
- GT_Utility.sendChatToPlayer(aPlayer, "Ritual mode disabled");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Ritual mode enabled");
- if (connectToRitual()) GT_Utility.sendChatToPlayer(aPlayer, "Successfully connected to the ritual");
- else GT_Utility.sendChatToPlayer(aPlayer, "Can't connect to the ritual");
- }
- }
-
- @SuppressWarnings("unused")
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void onRitualPerform(RitualRunEvent event) {
- if (!isInRitualMode) return;
- if (masterStoneRitual == null) return;
- if (this.mMaxProgresstime == 0) return;
- if (event.mrs.equals(masterStoneRitual) && event.ritualKey.equals(WellOfSufferingRitualName)) {
- Rituals ritual = Rituals.ritualMap.get(WellOfSufferingRitualName);
- if (ritual != null && ritual.effect instanceof RitualEffectWellOfSuffering) {
- RitualEffectWellOfSuffering effect = (RitualEffectWellOfSuffering) ritual.effect;
- event.setCanceled(true); // we will handle that
- String owner = event.mrs.getOwner();
- int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
- World world = event.mrs.getWorld();
- int x = event.mrs.getXCoord();
- int y = event.mrs.getYCoord();
- int z = event.mrs.getZCoord();
-
- if (world.getWorldTime() % RitualEffectWellOfSuffering.timeDelay != 0) return;
-
- if (tileAltar == null || tileAltar.isInvalid()) {
- tileAltar = null;
- for (int i = -5; i <= 5; i++)
- for (int j = -5; j <= 5; j++)
- for (int k = -10; k <= 10; k++)
- if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar)
- tileAltar = world.getTileEntity(x + i, y + k, z + j);
- }
- if (tileAltar == null) return;
-
- if (currentEssence < effect.getCostPerRefresh() * 100) SoulNetworkHandler.causeNauseaToPlayer(owner);
-
- ((IBloodAltar) tileAltar)
- .sacrificialDaggerCall(
- 100
- * RitualEffectWellOfSuffering.amount
- * (effect.canDrainReagent(
- event.mrs,
- ReagentRegistry.offensaReagent,
- ReflectionHelper.getField(effect, "offensaDrain", true, 3),
- true)
- ? 2
- : 1)
- * (effect.canDrainReagent(
- event.mrs,
- ReagentRegistry.tenebraeReagent,
- ReflectionHelper.getField(effect, "tennebraeDrain", true, 5),
- true)
- ? 2
- : 1),
- true);
-
- SoulNetworkHandler.syphonFromNetwork(owner, effect.getCostPerRefresh() * 100);
- }
- }
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- if (aStack == null) return false;
-
- if (aStack.getItem() != poweredSpawnerItem) return false;
-
- if (aStack.getTagCompound() == null) return false;
- String mobType = aStack.getTagCompound().getString("mobType");
- if (mobType.isEmpty()) return false;
-
- MobRecipeLoader.MobRecipe recipe = MobNameToRecipeMap.get(mobType);
-
- if (recipe == null) return false;
- if (!recipe.isPeacefulAllowed
- && this.getBaseMetaTileEntity().getWorld().difficultySetting == EnumDifficulty.PEACEFUL) return false;
-
- this.mOutputItems = recipe.generateOutputs(rand, this);
-
- if (isInRitualMode && isRitualValid()) {
- this.mMaxProgresstime = 400;
- this.mEUt /= 4;
- this.mOutputFluids = new FluidStack[] {FluidRegistry.getFluidStack("xpjuice", 5000)};
- } else {
- calculateOverclockedNessMulti(this.mEUt, this.mMaxProgresstime, 2, getMaxInputVoltage());
- this.mOutputFluids = new FluidStack[] {FluidRegistry.getFluidStack("xpjuice", 120)};
- }
- if (this.mEUt > 0) this.mEUt = -this.mEUt;
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
-
- return true;
- }
-
- private boolean isRitualValid() {
- if (!isInRitualMode) return false;
- if (masterStoneRitual == null) return false;
- if (masterStoneRitual.isInvalid()
- || !(((TEMasterStone) masterStoneRitual).getCurrentRitual().equals(WellOfSufferingRitualName))) {
- masterStoneRitual = null;
- return false;
- }
- return true;
- }
-
- private boolean connectToRitual() {
- if (!LoaderReference.BloodMagic) return false;
- ChunkCoordinates coords = this.getBaseMetaTileEntity().getCoords();
- int[] abc = new int[] {0, -8, 2};
- int[] xyz = new int[] {0, 0, 0};
- this.getExtendedFacing().getWorldOffset(abc, xyz);
- xyz[0] += coords.posX;
- xyz[1] += coords.posY;
- xyz[2] += coords.posZ;
- TileEntity te = this.getBaseMetaTileEntity().getTileEntity(xyz[0], xyz[1], xyz[2]);
- if (te instanceof TEMasterStone) {
- if (((TEMasterStone) te).getCurrentRitual().equals(WellOfSufferingRitualName)) {
- masterStoneRitual = te;
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 6, 0)) return false;
- if (mCasing < 10 || mMaintenanceHatches.size() != 1 || mEnergyHatches.size() == 0) return false;
- if (isInRitualMode) connectToRitual();
- return true;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-}
diff --git a/src/main/java/kubatech/kubatech.java b/src/main/java/kubatech/kubatech.java
index d5407ff357..6973c281b4 100644
--- a/src/main/java/kubatech/kubatech.java
+++ b/src/main/java/kubatech/kubatech.java
@@ -24,8 +24,8 @@ import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;
-import kubatech.network.LoadConfigHandler;
-import kubatech.network.LoadConfigPacket;
+import kubatech.api.network.CustomTileEntityPacket;
+import kubatech.api.network.LoadConfigPacket;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -44,7 +44,8 @@ public class kubatech {
public static final SimpleNetworkWrapper NETWORK = new SimpleNetworkWrapper(Tags.MODID);
static {
- NETWORK.registerMessage(new LoadConfigHandler(), LoadConfigPacket.class, 0, Side.CLIENT);
+ NETWORK.registerMessage(new LoadConfigPacket.Handler(), LoadConfigPacket.class, 0, Side.CLIENT);
+ NETWORK.registerMessage(new CustomTileEntityPacket.Handler(), CustomTileEntityPacket.class, 1, Side.CLIENT);
}
private static final Logger LOG = LogManager.getLogger(Tags.MODID);
diff --git a/src/main/java/kubatech/loaders/MobRecipeLoader.java b/src/main/java/kubatech/loaders/MobRecipeLoader.java
index 3c087961d9..21c18897f4 100644
--- a/src/main/java/kubatech/loaders/MobRecipeLoader.java
+++ b/src/main/java/kubatech/loaders/MobRecipeLoader.java
@@ -21,7 +21,7 @@ package kubatech.loaders;
import static kubatech.api.utils.ModUtils.isClientSided;
import static kubatech.api.utils.ModUtils.isDeobfuscatedEnvironment;
-import static kubatech.common.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber.MobNameToRecipeMap;
+import static kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber.MobNameToRecipeMap;
import atomicstryker.infernalmobs.common.InfernalMobsCore;
import atomicstryker.infernalmobs.common.MobModifier;
@@ -39,10 +39,10 @@ import java.util.stream.Collectors;
import kubatech.Config;
import kubatech.Tags;
import kubatech.api.LoaderReference;
+import kubatech.api.network.LoadConfigPacket;
import kubatech.api.utils.InfernalHelper;
-import kubatech.common.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
import kubatech.nei.Mob_Handler;
-import kubatech.network.LoadConfigPacket;
+import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
import minetweaker.MineTweakerAPI;
import minetweaker.api.entity.IEntityDefinition;
import minetweaker.api.item.IItemStack;
@@ -102,6 +102,7 @@ public class MobRecipeLoader {
public final boolean alwaysinfernal;
public static droplist infernaldrops;
public final boolean isPeacefulAllowed;
+ public final EntityLiving entity;
@SuppressWarnings("unchecked")
public MobRecipe copy() {
@@ -111,7 +112,8 @@ public class MobRecipeLoader {
mMaxDamageChance,
infernalityAllowed,
alwaysinfernal,
- isPeacefulAllowed);
+ isPeacefulAllowed,
+ entity);
}
private MobRecipe(
@@ -120,13 +122,15 @@ public class MobRecipeLoader {
int mMaxDamageChance,
boolean infernalityAllowed,
boolean alwaysinfernal,
- boolean isPeacefulAllowed) {
+ boolean isPeacefulAllowed,
+ EntityLiving entity) {
this.mOutputs = mOutputs;
this.mDuration = mDuration;
this.mMaxDamageChance = mMaxDamageChance;
this.infernalityAllowed = infernalityAllowed;
this.alwaysinfernal = alwaysinfernal;
this.isPeacefulAllowed = isPeacefulAllowed;
+ this.entity = entity;
}
@SuppressWarnings("unchecked")
@@ -185,6 +189,7 @@ public class MobRecipeLoader {
mMaxDamageChance = maxdamagechance;
// Powered spawner with octadic capacitor spawns ~22/min ~= 0.366/sec ~= 2.72s/spawn ~= 54.54t/spawn
mDuration = 55 + 10 + (((int) e.getMaxHealth() / 5) * 10);
+ entity = e;
}
public ItemStack[] generateOutputs(Random rnd, GT_MetaTileEntity_ExtremeExterminationChamber MTE) {
@@ -460,7 +465,7 @@ public class MobRecipeLoader {
}
private static class dropCollector {
- HashMap damagableChecker = new HashMap<>();
+ final HashMap damagableChecker = new HashMap<>();
private boolean booksAlwaysRandomlyEnchanted = false;
public void addDrop(droplist fdrops, ArrayList listToParse, double chance) {
@@ -552,6 +557,7 @@ public class MobRecipeLoader {
return false;
}
+ @SuppressWarnings("rawtypes")
@Override
public List getEntitiesWithinAABB(Class p_72872_1_, AxisAlignedBB p_72872_2_) {
return new ArrayList();
@@ -727,7 +733,7 @@ public class MobRecipeLoader {
try {
Class> cl = e.getClass();
- boolean detectedException = false;
+ boolean detectedException;
do {
detectedException = false;
try {
@@ -894,6 +900,7 @@ public class MobRecipeLoader {
MobRecipe recipe = v.recipe;
if (recipe != null) recipe = recipe.copy();
+ @SuppressWarnings("unchecked")
ArrayList drops = (ArrayList) v.drops.clone();
// MT Scripts should already be loaded here
@@ -922,6 +929,7 @@ public class MobRecipeLoader {
GeneralMappedMob v = GeneralMobList.get(k);
MobRecipe recipe = v.recipe;
if (recipe != null) recipe = recipe.copy();
+ @SuppressWarnings("unchecked")
ArrayList drops = (ArrayList) v.drops.clone();
// MT Scripts should already be loaded here
diff --git a/src/main/java/kubatech/loaders/RecipeLoader.java b/src/main/java/kubatech/loaders/RecipeLoader.java
index ba6cbb7a1f..84c3603225 100644
--- a/src/main/java/kubatech/loaders/RecipeLoader.java
+++ b/src/main/java/kubatech/loaders/RecipeLoader.java
@@ -25,7 +25,7 @@ import gregtech.api.util.GT_ModHandler;
import kubatech.Tags;
import kubatech.api.LoaderReference;
import kubatech.api.enums.ItemList;
-import kubatech.common.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
+import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import org.apache.logging.log4j.LogManager;
diff --git a/src/main/java/kubatech/nei/Mob_Handler.java b/src/main/java/kubatech/nei/Mob_Handler.java
index a231eceffc..78294326c9 100644
--- a/src/main/java/kubatech/nei/Mob_Handler.java
+++ b/src/main/java/kubatech/nei/Mob_Handler.java
@@ -39,9 +39,9 @@ import kubatech.api.LoaderReference;
import kubatech.api.utils.FastRandom;
import kubatech.api.utils.InfernalHelper;
import kubatech.api.utils.ModUtils;
-import kubatech.common.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
import kubatech.kubatech;
import kubatech.loaders.MobRecipeLoader;
+import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiInventory;
@@ -277,7 +277,6 @@ public class Mob_Handler extends TemplateRecipeHandler {
GL11.glPushMatrix();
- ItemStack s = getIngredientStacks(recipe).get(0).item;
try {
EntityLiving e = currentrecipe.mob;
float eheight = e.height;
diff --git a/src/main/java/kubatech/network/LoadConfigHandler.java b/src/main/java/kubatech/network/LoadConfigHandler.java
deleted file mode 100644
index 7bf8bd9756..0000000000
--- a/src/main/java/kubatech/network/LoadConfigHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see .
- *
- */
-
-package kubatech.network;
-
-import cpw.mods.fml.common.network.simpleimpl.IMessage;
-import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
-import cpw.mods.fml.common.network.simpleimpl.MessageContext;
-import kubatech.kubatech;
-import kubatech.loaders.MobRecipeLoader;
-
-public class LoadConfigHandler implements IMessageHandler {
-
- @Override
- public IMessage onMessage(LoadConfigPacket message, MessageContext ctx) {
- kubatech.info("Received Mob Handler config, parsing");
- MobRecipeLoader.processMobRecipeMap(message.mobsToLoad);
- return null;
- }
-}
diff --git a/src/main/java/kubatech/network/LoadConfigPacket.java b/src/main/java/kubatech/network/LoadConfigPacket.java
deleted file mode 100644
index 48f3342486..0000000000
--- a/src/main/java/kubatech/network/LoadConfigPacket.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see .
- *
- */
-
-package kubatech.network;
-
-import cpw.mods.fml.common.network.simpleimpl.IMessage;
-import io.netty.buffer.ByteBuf;
-import java.nio.charset.StandardCharsets;
-import java.util.HashSet;
-import kubatech.Config;
-
-public class LoadConfigPacket implements IMessage {
-
- public static LoadConfigPacket instance = new LoadConfigPacket();
-
- public HashSet mobsToLoad = new HashSet<>();
-
- @Override
- public void fromBytes(ByteBuf buf) {
- if (!buf.readBoolean()) mobsToLoad.clear();
- else {
- mobsToLoad.clear();
- int mobssize = buf.readInt();
- for (int i = 0; i < mobssize; i++) {
- byte[] sbytes = new byte[buf.readInt()];
- buf.readBytes(sbytes);
- mobsToLoad.add(new String(sbytes, StandardCharsets.UTF_8));
- }
- }
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- if (!Config.mobHandlerEnabled) buf.writeBoolean(false);
- else {
- buf.writeBoolean(true);
- buf.writeInt(mobsToLoad.size());
- mobsToLoad.forEach(s -> {
- byte[] sbytes = s.getBytes(StandardCharsets.UTF_8);
- buf.writeInt(sbytes.length);
- buf.writeBytes(sbytes);
- });
- }
- }
-}
diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
new file mode 100644
index 0000000000..5971731fdd
--- /dev/null
+++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
@@ -0,0 +1,454 @@
+/*
+ * KubaTech - Gregtech Addon
+ * Copyright (C) 2022 kuba6000
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
+ *
+ */
+
+package kubatech.tileentity.gregtech.multiblock;
+
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static gregtech.api.enums.Textures.BlockIcons.*;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static kubatech.api.Variables.Author;
+
+import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
+import WayofTime.alchemicalWizardry.api.event.RitualRunEvent;
+import WayofTime.alchemicalWizardry.api.rituals.Rituals;
+import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
+import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
+import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering;
+import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
+import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import cpw.mods.fml.common.eventhandler.EventPriority;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import crazypants.enderio.EnderIO;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Utility;
+import java.util.HashMap;
+import java.util.Random;
+import kubatech.Tags;
+import kubatech.api.LoaderReference;
+import kubatech.api.network.CustomTileEntityPacket;
+import kubatech.api.tileentity.CustomTileEntityPacketHandler;
+import kubatech.api.utils.FastRandom;
+import kubatech.api.utils.ReflectionHelper;
+import kubatech.client.effect.EntityRenderer;
+import kubatech.loaders.MobRecipeLoader;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.EnumDifficulty;
+import net.minecraft.world.World;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GT_MetaTileEntity_ExtremeExterminationChamber
+ extends GT_MetaTileEntity_EnhancedMultiBlockBase
+ implements CustomTileEntityPacketHandler {
+
+ public static final HashMap MobNameToRecipeMap = new HashMap<>();
+ public final Random rand = new FastRandom();
+
+ public GT_MetaTileEntity_ExtremeExterminationChamber(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_ExtremeExterminationChamber(String aName) {
+ super(aName);
+ if (LoaderReference.BloodMagic) MinecraftForge.EVENT_BUS.register(this);
+ }
+
+ @Override
+ public void onRemoval() {
+ if (LoaderReference.BloodMagic) MinecraftForge.EVENT_BUS.unregister(this);
+ if (getBaseMetaTileEntity().isClientSide()) entityRenderer.setDead();
+ }
+
+ private static final String WellOfSufferingRitualName = "AW013Suffering";
+
+ private static final Item poweredSpawnerItem = Item.getItemFromBlock(EnderIO.blockPoweredSpawner);
+ private static final int CASING_INDEX = 16;
+ private static final String STRUCTURE_PIECE_MAIN = "main";
+ private static final IStructureDefinition STRUCTURE_DEFINITION =
+ StructureDefinition.builder()
+ .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
+ {"ccccc", "ccccc", "ccccc", "ccccc", "ccccc"},
+ {"cgggc", "g---g", "g---g", "g---g", "cgggc"},
+ {"cgggc", "g---g", "g---g", "g---g", "cgggc"},
+ {"cgggc", "g---g", "g---g", "g---g", "cgggc"},
+ {"cgggc", "g---g", "g---g", "g---g", "cgggc"},
+ {"cgggc", "gsssg", "gsssg", "gsssg", "cgggc"},
+ {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"},
+ }))
+ .addElement('c', onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings2, 0)))
+ .addElement(
+ 'C',
+ ofChain(
+ onElementPass(t -> t.mCasing++, ofBlock(GregTech_API.sBlockCasings2, 0)),
+ ofHatchAdder(
+ GT_MetaTileEntity_ExtremeExterminationChamber::addOutputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GT_MetaTileEntity_ExtremeExterminationChamber::addEnergyInputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GT_MetaTileEntity_ExtremeExterminationChamber::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 1)))
+ .addElement(
+ 'g',
+ LoaderReference.Bartworks
+ ? BorosilicateGlass.ofBoroGlassAnyTier()
+ : ofBlock(Blocks.glass, 0))
+ .addElement(
+ 's',
+ LoaderReference.ExtraUtilities
+ ? ofBlock(Block.getBlockFromName("ExtraUtilities:spike_base_diamond"), 0)
+ : isAir())
+ .build();
+
+ private TileEntity masterStoneRitual = null;
+ private TileEntity tileAltar = null;
+ private boolean isInRitualMode = false;
+ private int mCasing = 0;
+
+ @SideOnly(Side.CLIENT)
+ private EntityRenderer entityRenderer = null;
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setBoolean("isInRitualMode", isInRitualMode);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ isInRitualMode = aNBT.getBoolean("isInRitualMode");
+ }
+
+ @Override
+ public IStructureDefinition getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Powered Spawner")
+ .addInfo("Controller block for Extreme Extermination Chamber")
+ .addInfo("Spawns and Exterminates monsters for you")
+ .addInfo("Base energy usage: 2,000 EU/t")
+ .addInfo("Recipe time is based on mob health")
+ .addInfo("Also produces 120 Liquid XP per operation")
+ .addInfo("If the mob spawns infernal")
+ .addInfo("it will drain 8 times more power")
+ .addInfo("You can enable ritual mode with a screwdriver")
+ .addInfo("When in ritual mode and Well Of Suffering ritual is built directly on the machine in center")
+ .addInfo("The mobs will start to buffer and die very slowly by a ritual")
+ .addInfo(Author)
+ .addSeparator()
+ .beginStructureBlock(5, 7, 5, true)
+ .addController("Front Bottom Center")
+ .addCasingInfo("Solid Steel Machine Casing", 10)
+ .addOutputBus("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .toolTipFinisher(Tags.MODNAME);
+ return tt;
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean b) {
+ buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 2, 6, 0);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_ExtremeExterminationChamber(this.mName);
+ }
+
+ @Override
+ public ITexture[] getTexture(
+ IGregTechTileEntity aBaseMetaTileEntity,
+ byte aSide,
+ byte aFacing,
+ byte aColorIndex,
+ boolean aActive,
+ boolean aRedstone) {
+ if (aSide == aFacing) {
+ if (aActive)
+ return new ITexture[] {
+ Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build()
+ };
+ return new ITexture[] {
+ Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
+ .extFacing()
+ .glow()
+ .build()
+ };
+ }
+ return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @SideOnly(Side.CLIENT)
+ private void setupEntityRenderer(IGregTechTileEntity aBaseMetaTileEntity, int time) {
+ if (entityRenderer == null) {
+ ChunkCoordinates coords = this.getBaseMetaTileEntity().getCoords();
+ int[] abc = new int[] {0, -2, 2};
+ int[] xyz = new int[] {0, 0, 0};
+ this.getExtendedFacing().getWorldOffset(abc, xyz);
+ xyz[0] += coords.posX;
+ xyz[1] += coords.posY;
+ xyz[2] += coords.posZ;
+ entityRenderer = new EntityRenderer(aBaseMetaTileEntity.getWorld(), xyz[0], xyz[1], xyz[2], time);
+ } else {
+ entityRenderer.setDead();
+ entityRenderer = new EntityRenderer(entityRenderer, time);
+ }
+ Minecraft.getMinecraft().effectRenderer.addEffect(entityRenderer);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (aBaseMetaTileEntity.isClientSide()) {
+ if (aBaseMetaTileEntity.isActive() && aTick % 40 == 0) {
+ setupEntityRenderer(aBaseMetaTileEntity, 40);
+ }
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void HandleCustomPacket(CustomTileEntityPacket message) {
+ String mobType = message.getDataString();
+ MobRecipeLoader.MobRecipe r = MobNameToRecipeMap.get(mobType);
+ if (r != null) {
+ if (entityRenderer == null) setupEntityRenderer(getBaseMetaTileEntity(), 40);
+ entityRenderer.setEntity(r.entity);
+ } else entityRenderer.setEntity(null);
+ }
+
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (!LoaderReference.BloodMagic) return;
+ if (this.mMaxProgresstime > 0) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Can't change mode when running !");
+ return;
+ }
+ isInRitualMode = !isInRitualMode;
+ if (!isInRitualMode) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Ritual mode disabled");
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, "Ritual mode enabled");
+ if (connectToRitual()) GT_Utility.sendChatToPlayer(aPlayer, "Successfully connected to the ritual");
+ else GT_Utility.sendChatToPlayer(aPlayer, "Can't connect to the ritual");
+ }
+ }
+
+ @SuppressWarnings("unused")
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void onRitualPerform(RitualRunEvent event) {
+ if (!isInRitualMode) return;
+ if (masterStoneRitual == null) return;
+ if (this.mMaxProgresstime == 0) return;
+ if (event.mrs.equals(masterStoneRitual) && event.ritualKey.equals(WellOfSufferingRitualName)) {
+ Rituals ritual = Rituals.ritualMap.get(WellOfSufferingRitualName);
+ if (ritual != null && ritual.effect instanceof RitualEffectWellOfSuffering) {
+ RitualEffectWellOfSuffering effect = (RitualEffectWellOfSuffering) ritual.effect;
+ event.setCanceled(true); // we will handle that
+ String owner = event.mrs.getOwner();
+ int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
+ World world = event.mrs.getWorld();
+ int x = event.mrs.getXCoord();
+ int y = event.mrs.getYCoord();
+ int z = event.mrs.getZCoord();
+
+ if (world.getWorldTime() % RitualEffectWellOfSuffering.timeDelay != 0) return;
+
+ if (tileAltar == null || tileAltar.isInvalid()) {
+ tileAltar = null;
+ for (int i = -5; i <= 5; i++)
+ for (int j = -5; j <= 5; j++)
+ for (int k = -10; k <= 10; k++)
+ if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar)
+ tileAltar = world.getTileEntity(x + i, y + k, z + j);
+ }
+ if (tileAltar == null) return;
+
+ if (currentEssence < effect.getCostPerRefresh() * 100) SoulNetworkHandler.causeNauseaToPlayer(owner);
+
+ ((IBloodAltar) tileAltar)
+ .sacrificialDaggerCall(
+ 100
+ * RitualEffectWellOfSuffering.amount
+ * (effect.canDrainReagent(
+ event.mrs,
+ ReagentRegistry.offensaReagent,
+ ReflectionHelper.getField(effect, "offensaDrain", 3),
+ true)
+ ? 2
+ : 1)
+ * (effect.canDrainReagent(
+ event.mrs,
+ ReagentRegistry.tenebraeReagent,
+ ReflectionHelper.getField(effect, "tennebraeDrain", 5),
+ true)
+ ? 2
+ : 1),
+ true);
+
+ SoulNetworkHandler.syphonFromNetwork(owner, effect.getCostPerRefresh() * 100);
+ }
+ }
+ }
+
+ private CustomTileEntityPacket mobPacket = null;
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ if (getBaseMetaTileEntity().isClientSide()) return false;
+ if (aStack == null) return false;
+
+ if (aStack.getItem() != poweredSpawnerItem) return false;
+
+ if (aStack.getTagCompound() == null) return false;
+ String mobType = aStack.getTagCompound().getString("mobType");
+ if (mobType.isEmpty()) return false;
+
+ MobRecipeLoader.MobRecipe recipe = MobNameToRecipeMap.get(mobType);
+
+ if (recipe == null) return false;
+ if (!recipe.isPeacefulAllowed
+ && this.getBaseMetaTileEntity().getWorld().difficultySetting == EnumDifficulty.PEACEFUL) return false;
+
+ this.mOutputItems = recipe.generateOutputs(rand, this);
+
+ if (isInRitualMode && isRitualValid()) {
+ this.mMaxProgresstime = 400;
+ this.mEUt /= 4;
+ this.mOutputFluids = new FluidStack[] {FluidRegistry.getFluidStack("xpjuice", 5000)};
+ } else {
+ calculateOverclockedNessMulti(this.mEUt, this.mMaxProgresstime, 2, getMaxInputVoltage());
+ this.mOutputFluids = new FluidStack[] {FluidRegistry.getFluidStack("xpjuice", 120)};
+ }
+ if (this.mEUt > 0) this.mEUt = -this.mEUt;
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+
+ if (mobPacket == null) mobPacket = new CustomTileEntityPacket((TileEntity) this.getBaseMetaTileEntity(), null);
+ mobPacket.resetHelperData();
+ mobPacket.addData(mobType);
+ mobPacket.sendToAllAround(16);
+
+ return true;
+ }
+
+ private boolean isRitualValid() {
+ if (!isInRitualMode) return false;
+ if (masterStoneRitual == null) return false;
+ if (masterStoneRitual.isInvalid()
+ || !(((TEMasterStone) masterStoneRitual).getCurrentRitual().equals(WellOfSufferingRitualName))) {
+ masterStoneRitual = null;
+ return false;
+ }
+ return true;
+ }
+
+ private boolean connectToRitual() {
+ if (!LoaderReference.BloodMagic) return false;
+ ChunkCoordinates coords = this.getBaseMetaTileEntity().getCoords();
+ int[] abc = new int[] {0, -8, 2};
+ int[] xyz = new int[] {0, 0, 0};
+ this.getExtendedFacing().getWorldOffset(abc, xyz);
+ xyz[0] += coords.posX;
+ xyz[1] += coords.posY;
+ xyz[2] += coords.posZ;
+ TileEntity te = this.getBaseMetaTileEntity().getTileEntity(xyz[0], xyz[1], xyz[2]);
+ if (te instanceof TEMasterStone) {
+ if (((TEMasterStone) te).getCurrentRitual().equals(WellOfSufferingRitualName)) {
+ masterStoneRitual = te;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 6, 0)) return false;
+ if (mCasing < 10 || mMaintenanceHatches.size() != 1 || mEnergyHatches.size() == 0) return false;
+ if (isInRitualMode) connectToRitual();
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+}
--
cgit
From 24e5b1391b6a057d6508d1902f5f02bc27d508c8 Mon Sep 17 00:00:00 2001
From: Jakub <53441451+kuba6000@users.noreply.github.com>
Date: Mon, 29 Aug 2022 11:01:23 +0200
Subject: Tea line (#11)
* Add normal Tea
* Add Tea Line
Also removed red tea and butterfly tea
* Don't use item if in creative
* Move recipes
* Better MTE registration
* Always throw
* Add textures
---
dependencies.gradle | 6 +
src/main/java/kubatech/CommonProxy.java | 2 +-
src/main/java/kubatech/api/LoaderReference.java | 2 +
src/main/java/kubatech/api/enums/ItemList.java | 29 +++-
src/main/java/kubatech/kubatech.java | 14 +-
src/main/java/kubatech/loaders/ItemLoader.java | 57 ++++--
src/main/java/kubatech/loaders/RecipeLoader.java | 178 ++++++++++++++++++-
src/main/java/kubatech/loaders/item/ItemProxy.java | 17 +-
src/main/java/kubatech/loaders/item/KubaItems.java | 4 +-
src/main/java/kubatech/loaders/item/items/Tea.java | 158 ++---------------
.../kubatech/loaders/item/items/TeaCollection.java | 191 +++++++++++++++++++++
.../kubatech/loaders/item/items/TeaIngredient.java | 18 ++
.../kubatech/loaders/item/items/TeaUltimate.java | 2 +-
src/main/java/kubatech/nei/NEI_Config.java | 26 +--
...MetaTileEntity_ExtremeExterminationChamber.java | 1 +
src/main/resources/assets/kubatech/lang/en_US.lang | 62 +++++--
.../kubatech/textures/items/tea/black_tea.png | Bin 0 -> 7523 bytes
.../textures/items/tea/black_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/butterfly_tea.png | Bin 0 -> 7476 bytes
.../textures/items/tea/butterfly_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/earl_gray_tea.png | Bin 0 -> 7207 bytes
.../textures/items/tea/earl_gray_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/green_tea.png | Bin 0 -> 7341 bytes
.../textures/items/tea/green_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/lemon_tea.png | Bin 0 -> 7296 bytes
.../textures/items/tea/lemon_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/milk_tea.png | Bin 0 -> 7276 bytes
.../textures/items/tea/milk_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/oolong_tea.png | Bin 0 -> 7570 bytes
.../textures/items/tea/oolong_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/peppermint_tea.png | Bin 0 -> 7153 bytes
.../textures/items/tea/peppermint_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/pu-erh_tea.png | Bin 0 -> 7138 bytes
.../textures/items/tea/pu-erh_tea.png.mcmeta | 5 +
.../assets/kubatech/textures/items/tea/red_tea.png | Bin 0 -> 7655 bytes
.../kubatech/textures/items/tea/red_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/ultimate_tea.png | Bin 0 -> 2331 bytes
.../textures/items/tea/ultimate_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/white_tea.png | Bin 0 -> 7112 bytes
.../textures/items/tea/white_tea.png.mcmeta | 5 +
.../kubatech/textures/items/tea/yellow_tea.png | Bin 0 -> 7830 bytes
.../textures/items/tea/yellow_tea.png.mcmeta | 5 +
.../textures/items/teacollection/black_tea.png | Bin 7523 -> 0 bytes
.../items/teacollection/black_tea.png.mcmeta | 5 -
.../textures/items/teacollection/butterfly_tea.png | Bin 7476 -> 0 bytes
.../items/teacollection/butterfly_tea.png.mcmeta | 5 -
.../textures/items/teacollection/earl_gray_tea.png | Bin 7207 -> 0 bytes
.../items/teacollection/earl_gray_tea.png.mcmeta | 5 -
.../textures/items/teacollection/green_tea.png | Bin 7341 -> 0 bytes
.../items/teacollection/green_tea.png.mcmeta | 5 -
.../textures/items/teacollection/lemon_tea.png | Bin 7296 -> 0 bytes
.../items/teacollection/lemon_tea.png.mcmeta | 5 -
.../textures/items/teacollection/milk_tea.png | Bin 7276 -> 0 bytes
.../items/teacollection/milk_tea.png.mcmeta | 5 -
.../textures/items/teacollection/oolong_tea.png | Bin 7570 -> 0 bytes
.../items/teacollection/oolong_tea.png.mcmeta | 5 -
.../items/teacollection/peppermint_tea.png | Bin 7153 -> 0 bytes
.../items/teacollection/peppermint_tea.png.mcmeta | 5 -
.../textures/items/teacollection/pu-erh_tea.png | Bin 7138 -> 0 bytes
.../items/teacollection/pu-erh_tea.png.mcmeta | 5 -
.../textures/items/teacollection/red_tea.png | Bin 7655 -> 0 bytes
.../items/teacollection/red_tea.png.mcmeta | 5 -
.../textures/items/teacollection/ultimate_tea.png | Bin 2331 -> 0 bytes
.../items/teacollection/ultimate_tea.png.mcmeta | 5 -
.../textures/items/teacollection/white_tea.png | Bin 7112 -> 0 bytes
.../items/teacollection/white_tea.png.mcmeta | 5 -
.../textures/items/teacollection/yellow_tea.png | Bin 7830 -> 0 bytes
.../items/teacollection/yellow_tea.png.mcmeta | 5 -
.../items/teaingredient/black_tea_leaf.png | Bin 0 -> 6821 bytes
.../items/teaingredient/bruised_tea_leaf.png | Bin 0 -> 6911 bytes
.../items/teaingredient/fermented_tea_leaf.png | Bin 0 -> 6924 bytes
.../items/teaingredient/green_tea_leaf.png | Bin 0 -> 6910 bytes
.../items/teaingredient/oolong_tea_leaf.png | Bin 0 -> 6773 bytes
.../items/teaingredient/oxidized_tea_leaf.png | Bin 0 -> 6905 bytes
.../teaingredient/partially_oxidized_tea_leaf.png | Bin 0 -> 6938 bytes
.../items/teaingredient/pu-erh_tea_leaf.png | Bin 0 -> 6971 bytes
.../items/teaingredient/rolled_tea_leaf.png | Bin 0 -> 6994 bytes
.../items/teaingredient/steamed_tea_leaf.png | Bin 0 -> 6888 bytes
.../items/teaingredient/tea_leaf_dehydrated.png | Bin 0 -> 6688 bytes
.../items/teaingredient/white_tea_leaf.png | Bin 0 -> 6536 bytes
.../items/teaingredient/yellow_tea_leaf.png | Bin 0 -> 6725 bytes
81 files changed, 624 insertions(+), 273 deletions(-)
create mode 100644 src/main/java/kubatech/loaders/item/items/TeaCollection.java
create mode 100644 src/main/java/kubatech/loaders/item/items/TeaIngredient.java
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/black_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/black_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/butterfly_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/butterfly_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/earl_gray_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/earl_gray_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/green_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/green_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/lemon_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/lemon_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/milk_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/milk_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/oolong_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/oolong_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/peppermint_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/peppermint_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/pu-erh_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/pu-erh_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/red_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/red_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/ultimate_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/ultimate_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/white_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/white_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/yellow_tea.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/tea/yellow_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/black_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/black_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/butterfly_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/butterfly_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/earl_gray_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/earl_gray_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/green_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/green_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/lemon_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/lemon_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/milk_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/milk_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/oolong_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/oolong_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/peppermint_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/peppermint_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/pu-erh_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/pu-erh_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/red_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/red_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/ultimate_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/ultimate_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/white_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/white_tea.png.mcmeta
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/yellow_tea.png
delete mode 100644 src/main/resources/assets/kubatech/textures/items/teacollection/yellow_tea.png.mcmeta
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/black_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/bruised_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/fermented_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/green_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/oolong_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/oxidized_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/partially_oxidized_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/pu-erh_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/rolled_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/steamed_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/tea_leaf_dehydrated.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/white_tea_leaf.png
create mode 100644 src/main/resources/assets/kubatech/textures/items/teaingredient/yellow_tea_leaf.png
(limited to 'src/main/java/kubatech/loaders/RecipeLoader.java')
diff --git a/dependencies.gradle b/dependencies.gradle
index ad722e5fab..123bd89fc8 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -5,6 +5,10 @@ dependencies {
compile("com.github.GTNewHorizons:EnderCore:0.2.6:dev")
compile("com.github.GTNewHorizons:EnderIO:2.3.1.29:dev")
compile("com.github.GTNewHorizons:Infernal-Mobs:1.7.5-GTNH:dev")
+ compileOnly("com.github.GTNewHorizons:GTplusplus:1.7.76:dev")
+ {
+ transitive = false
+ }
compileOnly("com.github.GTNewHorizons:BloodMagic:1.3.10:dev")
{
transitive = false
@@ -29,6 +33,8 @@ dependencies {
runtime("curse.maven:cofh-core-69162:2388751")
// For testing
+ //runtime("com.github.GTNewHorizons:GTplusplus:1.7.76:dev")
+ //runtime("com.github.GTNewHorizons:harvestcraft:1.0.15-GTNH:dev")
//runtime("com.github.GTNewHorizons:NewHorizonsCoreMod:1.9.52:dev")
//runtime("com.github.GTNewHorizons:OpenBlocks:1.6.9-GTNH:dev")
//runtime("com.github.GTNewHorizons:bartworks:0.5.67:dev")
diff --git a/src/main/java/kubatech/CommonProxy.java b/src/main/java/kubatech/CommonProxy.java
index 6f9a187cc2..9f59dd02af 100644
--- a/src/main/java/kubatech/CommonProxy.java
+++ b/src/main/java/kubatech/CommonProxy.java
@@ -36,9 +36,9 @@ public class CommonProxy {
Config.init(event.getModConfigurationDirectory());
Config.synchronizeConfiguration();
- RecipeLoader.addRecipes();
FMLCommonHandler.instance().bus().register(new FMLEventHandler());
RegisterItems();
+ RecipeLoader.addRecipes();
}
public void init(FMLInitializationEvent event) {}
diff --git a/src/main/java/kubatech/api/LoaderReference.java b/src/main/java/kubatech/api/LoaderReference.java
index b41db59904..482da4204f 100644
--- a/src/main/java/kubatech/api/LoaderReference.java
+++ b/src/main/java/kubatech/api/LoaderReference.java
@@ -11,4 +11,6 @@ public class LoaderReference {
public static final boolean MineTweaker = Loader.isModLoaded("MineTweaker3");
public static final boolean Bartworks = Loader.isModLoaded("bartworks");
public static final boolean GTNHCoreMod = Loader.isModLoaded("dreamcraft");
+ public static final boolean GTPlusPlus = Loader.isModLoaded("miscutils");
+ public static final boolean HarvestCraft = Loader.isModLoaded("harvestcraft");
}
diff --git a/src/main/java/kubatech/api/enums/ItemList.java b/src/main/java/kubatech/api/enums/ItemList.java
index 270faf39cc..015a2b77b9 100644
--- a/src/main/java/kubatech/api/enums/ItemList.java
+++ b/src/main/java/kubatech/api/enums/ItemList.java
@@ -15,8 +15,20 @@ import net.minecraft.item.ItemStack;
public enum ItemList implements IItemContainer {
ExtremeExterminationChamber,
+ LegendaryBlackTea,
+ LegendaryButterflyTea,
+ LegendaryEarlGrayTea,
+ LegendaryGreenTea,
+ LegendaryLemonTea,
+ LegendaryMilkTea,
+ LegendaryOolongTea,
+ LegendaryPeppermintTea,
+ LegendaryPuerhTea,
+ LegendaryRedTea,
+ LegendaryWhiteTea,
+ LegendaryYellowTea,
+ LegendaryUltimateTea,
BlackTea,
- ButterflyTea,
EarlGrayTea,
GreenTea,
LemonTea,
@@ -24,10 +36,21 @@ public enum ItemList implements IItemContainer {
OolongTea,
PeppermintTea,
PuerhTea,
- RedTea,
WhiteTea,
YellowTea,
- UltimateTea,
+ BlackTeaLeaf,
+ GreenTeaLeaf,
+ OolongTeaLeaf,
+ PuerhTeaLeaf,
+ WhiteTeaLeaf,
+ YellowTeaLeaf,
+ TeaLeafDehydrated,
+ SteamedTeaLeaf,
+ RolledTeaLeaf,
+ OxidizedTeaLeaf,
+ FermentedTeaLeaf,
+ BruisedTeaLeaf,
+ PartiallyOxidizedTeaLeaf,
;
private ItemStack mStack;
diff --git a/src/main/java/kubatech/kubatech.java b/src/main/java/kubatech/kubatech.java
index 6a19eb3721..4c5f78ae10 100644
--- a/src/main/java/kubatech/kubatech.java
+++ b/src/main/java/kubatech/kubatech.java
@@ -19,13 +19,15 @@
package kubatech;
-import static kubatech.api.enums.ItemList.RedTea;
+import static kubatech.api.enums.ItemList.LegendaryRedTea;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;
+import java.util.List;
+import kubatech.api.enums.ItemList;
import kubatech.api.network.CustomTileEntityPacket;
import kubatech.api.network.LoadConfigPacket;
import net.minecraft.creativetab.CreativeTabs;
@@ -42,7 +44,7 @@ import org.apache.logging.log4j.Logger;
acceptedMinecraftVersions = "[1.7.10]",
dependencies = "required-after:gregtech; " + "required-after:spongemixins@[1.4.0,); " + "after:EnderIO; "
+ "after:AWWayofTime; " + "after:ExtraUtilities; " + "after: InfernalMobs; " + "after: Thaumcraft; "
- + "after: MineTweaker3; ")
+ + "after: MineTweaker3; " + "after: miscutils; " + "after: harvestcraft; ")
public class kubatech {
public static kubatech instance = null;
@@ -52,7 +54,7 @@ public class kubatech {
@Override
public ItemStack getIconItemStack() {
- if (iconItemStack == null) iconItemStack = RedTea.get(1);
+ if (iconItemStack == null) iconItemStack = LegendaryRedTea.get(1);
return iconItemStack;
}
@@ -65,6 +67,12 @@ public class kubatech {
public String getTranslatedTabLabel() {
return Tags.MODNAME;
}
+
+ @Override
+ public void displayAllReleventItems(List p_78018_1_) {
+ super.displayAllReleventItems(p_78018_1_);
+ p_78018_1_.add(ItemList.ExtremeExterminationChamber.get(1));
+ }
};
static {
diff --git a/src/main/java/kubatech/loaders/ItemLoader.java b/src/main/java/kubatech/loaders/ItemLoader.java
index 940f5274f9..7df248da60 100644
--- a/src/main/java/kubatech/loaders/ItemLoader.java
+++ b/src/main/java/kubatech/loaders/ItemLoader.java
@@ -24,6 +24,8 @@ import static kubatech.api.enums.ItemList.*;
import cpw.mods.fml.common.registry.GameRegistry;
import kubatech.loaders.item.KubaItems;
import kubatech.loaders.item.items.Tea;
+import kubatech.loaders.item.items.TeaCollection;
+import kubatech.loaders.item.items.TeaIngredient;
import kubatech.loaders.item.items.TeaUltimate;
public class ItemLoader {
@@ -31,18 +33,47 @@ public class ItemLoader {
public static void RegisterItems() {
GameRegistry.registerItem(kubaitems, "kubaitems");
- BlackTea.set(kubaitems.registerProxyItem(new Tea("black_tea")));
- ButterflyTea.set(kubaitems.registerProxyItem(new Tea("butterfly_tea")));
- EarlGrayTea.set(kubaitems.registerProxyItem(new Tea("earl_gray_tea")));
- GreenTea.set(kubaitems.registerProxyItem(new Tea("green_tea")));
- LemonTea.set(kubaitems.registerProxyItem(new Tea("lemon_tea")));
- MilkTea.set(kubaitems.registerProxyItem(new Tea("milk_tea")));
- OolongTea.set(kubaitems.registerProxyItem(new Tea("oolong_tea")));
- PeppermintTea.set(kubaitems.registerProxyItem(new Tea("peppermint_tea")));
- PuerhTea.set(kubaitems.registerProxyItem(new Tea("pu-erh_tea")));
- RedTea.set(kubaitems.registerProxyItem(new Tea("red_tea")));
- WhiteTea.set(kubaitems.registerProxyItem(new Tea("white_tea")));
- YellowTea.set(kubaitems.registerProxyItem(new Tea("yellow_tea")));
- UltimateTea.set(kubaitems.registerProxyItem(new TeaUltimate()));
+
+ // DON'T EVER CHANGE ORDER IN HERE, ADD NEW ITEMS ON BOTTOM
+
+ LegendaryBlackTea.set(kubaitems.registerProxyItem(new TeaCollection("black_tea")));
+ LegendaryButterflyTea.set(kubaitems.registerProxyItem(new TeaCollection("butterfly_tea")));
+ LegendaryEarlGrayTea.set(kubaitems.registerProxyItem(new TeaCollection("earl_gray_tea")));
+ LegendaryGreenTea.set(kubaitems.registerProxyItem(new TeaCollection("green_tea")));
+ LegendaryLemonTea.set(kubaitems.registerProxyItem(new TeaCollection("lemon_tea")));
+ LegendaryMilkTea.set(kubaitems.registerProxyItem(new TeaCollection("milk_tea")));
+ LegendaryOolongTea.set(kubaitems.registerProxyItem(new TeaCollection("oolong_tea")));
+ LegendaryPeppermintTea.set(kubaitems.registerProxyItem(new TeaCollection("peppermint_tea")));
+ LegendaryPuerhTea.set(kubaitems.registerProxyItem(new TeaCollection("pu-erh_tea")));
+ LegendaryRedTea.set(kubaitems.registerProxyItem(new TeaCollection("red_tea")));
+ LegendaryWhiteTea.set(kubaitems.registerProxyItem(new TeaCollection("white_tea")));
+ LegendaryYellowTea.set(kubaitems.registerProxyItem(new TeaCollection("yellow_tea")));
+ LegendaryUltimateTea.set(kubaitems.registerProxyItem(new TeaUltimate()));
+
+ BlackTea.set(kubaitems.registerProxyItem(new Tea("black_tea", 4, 0.3f)));
+ EarlGrayTea.set(kubaitems.registerProxyItem(new Tea("earl_gray_tea", 4, 0.3f)));
+ GreenTea.set(kubaitems.registerProxyItem(new Tea("green_tea", 4, 0.3f)));
+ LemonTea.set(kubaitems.registerProxyItem(new Tea("lemon_tea", 4, 0.3f)));
+ MilkTea.set(kubaitems.registerProxyItem(new Tea("milk_tea", 4, 0.3f)));
+ OolongTea.set(kubaitems.registerProxyItem(new Tea("oolong_tea", 4, 0.3f)));
+ PeppermintTea.set(kubaitems.registerProxyItem(new Tea("peppermint_tea", 4, 0.3f)));
+ PuerhTea.set(kubaitems.registerProxyItem(new Tea("pu-erh_tea", 4, 0.3f)));
+ WhiteTea.set(kubaitems.registerProxyItem(new Tea("white_tea", 4, 0.3f)));
+ YellowTea.set(kubaitems.registerProxyItem(new Tea("yellow_tea", 4, 0.3f)));
+
+ BlackTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("black_tea_leaf")));
+ GreenTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("green_tea_leaf")));
+ OolongTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("oolong_tea_leaf")));
+ PuerhTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("pu-erh_tea_leaf")));
+ WhiteTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("white_tea_leaf")));
+ YellowTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("yellow_tea_leaf")));
+
+ TeaLeafDehydrated.set(kubaitems.registerProxyItem(new TeaIngredient("tea_leaf_dehydrated")));
+ SteamedTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("steamed_tea_leaf")));
+ RolledTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("rolled_tea_leaf")));
+ OxidizedTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("oxidized_tea_leaf")));
+ FermentedTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("fermented_tea_leaf")));
+ BruisedTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("bruised_tea_leaf")));
+ PartiallyOxidizedTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("partially_oxidized_tea_leaf")));
}
}
diff --git a/src/main/java/kubatech/loaders/RecipeLoader.java b/src/main/java/kubatech/loaders/RecipeLoader.java
index 84c3603225..62d1594a30 100644
--- a/src/main/java/kubatech/loaders/RecipeLoader.java
+++ b/src/main/java/kubatech/loaders/RecipeLoader.java
@@ -19,15 +19,26 @@
package kubatech.loaders;
+import static kubatech.api.enums.ItemList.*;
+import static kubatech.api.enums.ItemList.YellowTea;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
+import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.core.lib.CORE;
+import java.lang.reflect.InvocationTargetException;
import kubatech.Tags;
import kubatech.api.LoaderReference;
import kubatech.api.enums.ItemList;
import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -43,10 +54,12 @@ public class RecipeLoader {
private static final int MTEIDMax = 14300;
public static void addRecipes() {
- if (LoaderReference.EnderIO) {
- ItemList.ExtremeExterminationChamber.set(new GT_MetaTileEntity_ExtremeExterminationChamber(
- MTEID++, "multimachine.exterminationchamber", "Extreme Extermination Chamber")
- .getStackForm(1L));
+ if (registerMTE(
+ ExtremeExterminationChamber,
+ GT_MetaTileEntity_ExtremeExterminationChamber.class,
+ "multimachine.exterminationchamber",
+ "Extreme Extermination Chamber",
+ LoaderReference.EnderIO)) {
GT_ModHandler.addCraftingRecipe(ItemList.ExtremeExterminationChamber.get(1), bitsd, new Object[] {
"RCR",
"CHC",
@@ -61,9 +74,48 @@ public class RecipeLoader {
GT_ModHandler.getModItem("OpenBlocks", "vacuumhopper", 1, new ItemStack(Blocks.hopper))
});
}
+ RegisterTeaLine();
if (MTEID > MTEIDMax + 1) throw new RuntimeException("MTE ID's");
}
+ private static boolean registerMTE(
+ ItemList item, Class extends MetaTileEntity> mte, String aName, String aNameRegional) {
+ return registerMTE(item, mte, aName, aNameRegional, true);
+ }
+
+ private static boolean registerMTE(
+ ItemList item, Class extends MetaTileEntity> mte, String aName, String aNameRegional, boolean... deps) {
+ boolean dep = true;
+ for (boolean i : deps)
+ if (!i) {
+ dep = false;
+ break;
+ }
+ return registerMTE(item, mte, aName, aNameRegional, dep);
+ }
+
+ private static boolean registerMTE(
+ ItemList item, Class extends MetaTileEntity> mte, String aName, String aNameRegional, boolean dep) {
+ if (MTEID > MTEIDMax) throw new RuntimeException("MTE ID's");
+ if (dep) {
+ try {
+ item.set(mte.getConstructor(int.class, String.class, String.class)
+ .newInstance(MTEID, aName, aNameRegional)
+ .getStackForm(1));
+ } catch (InvocationTargetException ex) {
+ Throwable original_ex = ex.getCause();
+ if (original_ex instanceof RuntimeException) throw (RuntimeException) original_ex;
+ throw new RuntimeException(original_ex.getMessage());
+ } catch (RuntimeException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ throw new RuntimeException(ex.getMessage());
+ }
+ }
+ MTEID++;
+ return dep;
+ }
+
private static boolean lateRecipesInitialized = false;
public static void addRecipesLate() {
@@ -74,4 +126,122 @@ public class RecipeLoader {
MobRecipeLoader.generateMobRecipeMap();
MobRecipeLoader.processMobRecipeMap();
}
+
+ private static void RegisterTeaLine() {
+ // TEA LINE //
+ if (LoaderReference.GTPlusPlus && LoaderReference.HarvestCraft) {
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {GameRegistry.findItemStack("harvestcraft", "tealeafItem", 1)},
+ null,
+ null,
+ new ItemStack[] {TeaLeafDehydrated.get(1)},
+ null,
+ 100,
+ 32);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {TeaLeafDehydrated.get(1)},
+ null,
+ null,
+ new ItemStack[] {WhiteTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+ GT_Values.RA.addMixerRecipe(
+ new ItemStack[] {TeaLeafDehydrated.get(1)},
+ new FluidStack[] {FluidRegistry.getFluidStack("water", 50)},
+ new ItemStack[] {SteamedTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {SteamedTeaLeaf.get(1)},
+ null,
+ null,
+ new ItemStack[] {YellowTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+ GT_Values.RA.addBenderRecipe(TeaLeafDehydrated.get(1), RolledTeaLeaf.get(1), 100, 32);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {RolledTeaLeaf.get(1)},
+ null,
+ null,
+ new ItemStack[] {GreenTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+ GT_Values.RA.addChemicalRecipe(
+ RolledTeaLeaf.get(1), GT_Utility.getIntegratedCircuit(1), OxidizedTeaLeaf.get(1), 100, 32);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {OxidizedTeaLeaf.get(1)},
+ null,
+ null,
+ new ItemStack[] {BlackTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+ GT_Values.RA.addChemicalRecipe(
+ RolledTeaLeaf.get(1), GT_Utility.getIntegratedCircuit(2), FermentedTeaLeaf.get(1), 200, 32);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {FermentedTeaLeaf.get(1)},
+ null,
+ null,
+ new ItemStack[] {PuerhTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+ GT_Values.RA.addCutterRecipe(
+ new ItemStack[] {TeaLeafDehydrated.get(1)},
+ new ItemStack[] {BruisedTeaLeaf.get(1)},
+ 100,
+ 32,
+ false);
+ GT_Values.RA.addChemicalRecipe(
+ BruisedTeaLeaf.get(1), GT_Utility.getIntegratedCircuit(1), PartiallyOxidizedTeaLeaf.get(1), 50, 32);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {PartiallyOxidizedTeaLeaf.get(1)},
+ null,
+ null,
+ new ItemStack[] {OolongTeaLeaf.get(1)},
+ null,
+ 100,
+ 32);
+
+ // Tea Assembly
+ GameRegistry.addSmelting(BlackTeaLeaf.get(1), BlackTea.get(1), 10);
+ GT_Values.RA.addMixerRecipe(
+ new ItemStack[] {BlackTea.get(1), GameRegistry.findItemStack("harvestcraft", "limejuiceItem", 1)},
+ null,
+ new ItemStack[] {EarlGrayTea.get(1)},
+ null,
+ 100,
+ 32);
+ GameRegistry.addSmelting(GreenTeaLeaf.get(1), GreenTea.get(1), 10);
+ GT_Values.RA.addMixerRecipe(
+ new ItemStack[] {BlackTea.get(1)},
+ new FluidStack[] {FluidRegistry.getFluidStack("potion.lemonjuice", 1000)},
+ new ItemStack[] {LemonTea.get(1)},
+ null,
+ 100,
+ 32);
+ GT_Values.RA.addMixerRecipe(
+ new ItemStack[] {BlackTea.get(1)},
+ new FluidStack[] {FluidRegistry.getFluidStack("milk", 1000)},
+ new ItemStack[] {MilkTea.get(1)},
+ null,
+ 100,
+ 32);
+ GameRegistry.addSmelting(OolongTeaLeaf.get(1), OolongTea.get(1), 10);
+ GT_Values.RA.addMixerRecipe(
+ new ItemStack[] {GameRegistry.findItemStack("harvestcraft", "peppermintItem", 1)},
+ new FluidStack[] {FluidRegistry.getFluidStack("water", 1000)},
+ new ItemStack[] {PeppermintTea.get(1)},
+ null,
+ 100,
+ 32);
+ GameRegistry.addSmelting(PuerhTeaLeaf.get(1), PuerhTea.get(1), 10);
+ GameRegistry.addSmelting(WhiteTeaLeaf.get(1), WhiteTea.get(1), 10);
+ GameRegistry.addSmelting(YellowTeaLeaf.get(1), YellowTea.get(1), 10);
+ }
+ }
}
diff --git a/src/main/java/kubatech/loaders/item/ItemProxy.java b/src/main/java/kubatech/loaders/item/ItemProxy.java
index 67491a0ba8..03ea390f74 100644
--- a/src/main/java/kubatech/loaders/item/ItemProxy.java
+++ b/src/main/java/kubatech/loaders/item/ItemProxy.java
@@ -37,7 +37,7 @@ public class ItemProxy {
private int itemID;
public ItemProxy(String unlocalizedName, String texture) {
- this.unlocalizedName = "item.kubaitem." + unlocalizedName;
+ this.unlocalizedName = "kubaitem." + unlocalizedName;
texturepath = Tags.MODID + ":" + texture;
}
@@ -61,21 +61,20 @@ public class ItemProxy {
return icon;
}
- public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {}
+ public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) {}
- public void onUpdate(
- ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) {}
+ public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) {}
- public EnumAction getItemUseAction(ItemStack p_77661_1_) {
+ public EnumAction getItemUseAction(ItemStack stack) {
return EnumAction.none;
}
- public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
- return p_77659_1_;
+ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entity) {
+ return stack;
}
- public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
- return p_77654_1_;
+ public ItemStack onEaten(ItemStack stack, World world, EntityPlayer entity) {
+ return stack;
}
public int getMaxItemUseDuration() {
diff --git a/src/main/java/kubatech/loaders/item/KubaItems.java b/src/main/java/kubatech/loaders/item/KubaItems.java
index fdc38ec0ba..17a97e3d70 100644
--- a/src/main/java/kubatech/loaders/item/KubaItems.java
+++ b/src/main/java/kubatech/loaders/item/KubaItems.java
@@ -105,9 +105,10 @@ public class KubaItems extends Item {
return super.getUnlocalizedName();
}
+ @SuppressWarnings("unchecked")
@Override
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {
- getItem(p_77624_1_).addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_);
+ getItem(p_77624_1_).addInformation(p_77624_1_, p_77624_2_, (List) p_77624_3_, p_77624_4_);
}
@Override
@@ -132,6 +133,7 @@ public class KubaItems extends Item {
return getItem(damage).getIcon();
}
+ @SuppressWarnings("unchecked")
@Override
public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) {
for (int i = 0; i < items.size(); i++) p_150895_3_.add(new ItemStack(p_150895_1_, 1, i));
diff --git a/src/main/java/kubatech/loaders/item/items/Tea.java b/src/main/java/kubatech/loaders/item/items/Tea.java
index d9f39bc06f..d5c1066af4 100644
--- a/src/main/java/kubatech/loaders/item/items/Tea.java
+++ b/src/main/java/kubatech/loaders/item/items/Tea.java
@@ -19,116 +19,44 @@
package kubatech.loaders.item.items;
-import java.util.LinkedList;
import java.util.List;
-import kubatech.api.utils.ModUtils;
-import kubatech.loaders.ItemLoader;
import kubatech.loaders.item.ItemProxy;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.entity.EntityClientPlayerMP;
-import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.stats.Achievement;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
-import net.minecraftforge.common.AchievementPage;
public class Tea extends ItemProxy {
- protected static TeaPage teapage;
- protected static LinkedList achievements;
- protected Achievement achievement;
- private final String achievementname;
+ private final int heal;
+ private final float saturation;
- public Tea(String unlocalizedName) {
- super("teacollection." + unlocalizedName, "teacollection/" + unlocalizedName);
- achievementname = "teacollection." + unlocalizedName;
+ public Tea(String unlocalizedName, int heal, float saturation) {
+ super("tea." + unlocalizedName, "tea/" + unlocalizedName);
+ this.heal = heal;
+ this.saturation = saturation;
}
- private static final int[][] achievement_poses = new int[][] {
- {0, 0},
- {2, 0},
- {3, 1},
- {4, 2},
- {4, 4},
- {3, 5},
- {2, 6},
- {0, 6},
- {-1, 5},
- {-2, 4},
- {-2, 2},
- {-1, 1},
- {1, 3}
- };
-
@Override
- public void ItemInit(int index) {
- super.ItemInit(index);
- if (teapage == null) {
- teapage = new TeaPage();
- AchievementPage.registerAchievementPage(teapage);
- achievements = teapage.getAchievementsOriginal();
- }
- achievements.add(
- achievement = new Achievement(
- achievementname,
- achievementname,
- achievement_poses[index][0],
- achievement_poses[index][1],
- new ItemStack(ItemLoader.kubaitems, 1, index),
- null)
- .registerStat());
+ public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) {
+ tooltipList.add("Tea");
}
@Override
- public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {
- if (p_77624_1_.stackTagCompound != null
- && p_77624_1_.stackTagCompound.hasKey("TeaOwner")
- && !p_77624_1_
- .stackTagCompound
- .getString("TeaOwner")
- .equals(p_77624_2_.getUniqueID().toString())) {
- p_77624_3_.add(EnumChatFormatting.GRAY + "" + EnumChatFormatting.BOLD + "" + EnumChatFormatting.ITALIC
- + StatCollector.translateToLocal("item.notyours"));
- return;
- }
- p_77624_3_.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("item.fromcollection"));
- p_77624_3_.add(EnumChatFormatting.GRAY + "" + EnumChatFormatting.BOLD + "" + EnumChatFormatting.ITALIC + ""
- + EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal("item.teacollection"));
- }
-
- @Override
- public EnumAction getItemUseAction(ItemStack p_77661_1_) {
+ public EnumAction getItemUseAction(ItemStack stack) {
return EnumAction.drink;
}
@Override
- public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
- if (p_77659_1_.stackTagCompound == null || !p_77659_1_.stackTagCompound.hasKey("TeaOwner")) return p_77659_1_;
- if (!p_77659_1_
- .stackTagCompound
- .getString("TeaOwner")
- .equals(p_77659_3_.getUniqueID().toString())) return p_77659_1_;
- p_77659_3_.setItemInUse(p_77659_1_, 32);
- return p_77659_1_;
+ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entity) {
+ entity.setItemInUse(stack, getMaxItemUseDuration());
+ return stack;
}
@Override
- public ItemStack onEaten(ItemStack stack, World p_77654_2_, EntityPlayer p_77654_3_) {
- if (p_77654_2_.isRemote) return stack;
- if (!(p_77654_3_ instanceof EntityPlayerMP)) return stack;
- if (stack.stackTagCompound == null || !stack.stackTagCompound.hasKey("TeaOwner")) return stack;
- if (!stack.stackTagCompound
- .getString("TeaOwner")
- .equals(p_77654_3_.getUniqueID().toString())) return stack;
- p_77654_3_.addChatComponentMessage(new ChatComponentText(
- EnumChatFormatting.GREEN + StatCollector.translateToLocal("item.teacollection.mmm")));
- p_77654_3_.triggerAchievement(achievement);
+ public ItemStack onEaten(ItemStack stack, World world, EntityPlayer entity) {
+ if (!entity.capabilities.isCreativeMode) --stack.stackSize;
+ entity.getFoodStats().addStats(heal, saturation);
+ world.playSoundAtEntity(entity, "random.burp", 0.5F, world.rand.nextFloat() * 0.1F + 0.9F);
return stack;
}
@@ -136,58 +64,4 @@ public class Tea extends ItemProxy {
public int getMaxItemUseDuration() {
return 32;
}
-
- @Override
- public String getDisplayName(ItemStack stack) {
- if (!ModUtils.isClientSided) return super.getDisplayName(stack);
- if (stack.stackTagCompound == null
- || (!stack.stackTagCompound.hasKey("TeaOwner")
- || stack.stackTagCompound
- .getString("TeaOwner")
- .equals(Minecraft.getMinecraft()
- .thePlayer
- .getUniqueID()
- .toString()))) return super.getDisplayName(stack);
- return EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "" + EnumChatFormatting.ITALIC + "???????";
- }
-
- @Override
- public void onUpdate(
- ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) {
- if (p_77663_2_.isRemote) return;
- if (!(p_77663_3_ instanceof EntityPlayerMP)) return;
- NBTTagCompound tag = p_77663_1_.stackTagCompound;
- if (tag == null) tag = p_77663_1_.stackTagCompound = new NBTTagCompound();
- if (tag.hasKey("display")) tag.removeTag("display");
- if (tag.hasKey("TeaOwner")) return;
- tag.setString("TeaOwner", p_77663_3_.getPersistentID().toString());
- }
-
- private static class TeaPage extends AchievementPage {
-
- public TeaPage() {
- super("Tea");
- }
-
- LinkedList unlockedAchievements = new LinkedList<>();
-
- @Override
- public List getAchievements() {
- if (!ModUtils.isClientSided) return super.getAchievements();
-
- if (new Throwable().getStackTrace()[1].getMethodName().equals("isAchievementInPages"))
- return super.getAchievements(); // 5HEAD FIX
-
- EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
- unlockedAchievements.clear();
- for (Achievement achievement : achievements)
- if (player.getStatFileWriter().hasAchievementUnlocked(achievement))
- unlockedAchievements.add(achievement);
- return unlockedAchievements;
- }
-
- private LinkedList getAchievementsOriginal() {
- return (LinkedList) super.getAchievements();
- }
- }
}
diff --git a/src/main/java/kubatech/loaders/item/items/TeaCollection.java b/src/main/java/kubatech/loaders/item/items/TeaCollection.java
new file mode 100644
index 0000000000..15e8565d3d
--- /dev/null
+++ b/src/main/java/kubatech/loaders/item/items/TeaCollection.java
@@ -0,0 +1,191 @@
+/*
+ * KubaTech - Gregtech Addon
+ * Copyright (C) 2022 kuba6000
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
+ *
+ */
+
+package kubatech.loaders.item.items;
+
+import java.util.LinkedList;
+import java.util.List;
+import kubatech.api.utils.ModUtils;
+import kubatech.loaders.ItemLoader;
+import kubatech.loaders.item.ItemProxy;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.EnumAction;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.stats.Achievement;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import net.minecraftforge.common.AchievementPage;
+
+public class TeaCollection extends ItemProxy {
+ protected static TeaPage teapage;
+ protected static LinkedList achievements;
+ protected Achievement achievement;
+ private final String achievementname;
+
+ public TeaCollection(String unlocalizedName) {
+ super("teacollection." + unlocalizedName, "tea/" + unlocalizedName);
+ achievementname = "teacollection." + unlocalizedName;
+ }
+
+ private static final int[][] achievement_poses = new int[][] {
+ {0, 0},
+ {2, 0},
+ {3, 1},
+ {4, 2},
+ {4, 4},
+ {3, 5},
+ {2, 6},
+ {0, 6},
+ {-1, 5},
+ {-2, 4},
+ {-2, 2},
+ {-1, 1},
+ {1, 3}
+ };
+
+ @Override
+ public void ItemInit(int index) {
+ super.ItemInit(index);
+ if (teapage == null) {
+ teapage = new TeaPage();
+ AchievementPage.registerAchievementPage(teapage);
+ achievements = teapage.getAchievementsOriginal();
+ }
+ achievements.add(
+ achievement = new Achievement(
+ achievementname,
+ achievementname,
+ achievement_poses[index][0],
+ achievement_poses[index][1],
+ new ItemStack(ItemLoader.kubaitems, 1, index),
+ null)
+ .registerStat());
+ }
+
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) {
+ if (stack.stackTagCompound != null
+ && stack.stackTagCompound.hasKey("TeaOwner")
+ && !stack.stackTagCompound
+ .getString("TeaOwner")
+ .equals(entity.getUniqueID().toString())) {
+ tooltipList.add(EnumChatFormatting.GRAY + "" + EnumChatFormatting.BOLD + "" + EnumChatFormatting.ITALIC
+ + StatCollector.translateToLocal("kubaitem.notyours"));
+ return;
+ }
+ tooltipList.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("kubaitem.fromcollection"));
+ tooltipList.add(EnumChatFormatting.GRAY + "" + EnumChatFormatting.BOLD + "" + EnumChatFormatting.ITALIC + ""
+ + EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal("kubaitem.teacollection"));
+ }
+
+ @Override
+ public EnumAction getItemUseAction(ItemStack stack) {
+ return EnumAction.drink;
+ }
+
+ @Override
+ public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
+ if (p_77659_1_.stackTagCompound == null || !p_77659_1_.stackTagCompound.hasKey("TeaOwner")) return p_77659_1_;
+ if (!p_77659_1_
+ .stackTagCompound
+ .getString("TeaOwner")
+ .equals(p_77659_3_.getUniqueID().toString())) return p_77659_1_;
+ p_77659_3_.setItemInUse(p_77659_1_, 32);
+ return p_77659_1_;
+ }
+
+ @Override
+ public ItemStack onEaten(ItemStack stack, World world, EntityPlayer entity) {
+ if (world.isRemote) return stack;
+ if (!(entity instanceof EntityPlayerMP)) return stack;
+ if (stack.stackTagCompound == null || !stack.stackTagCompound.hasKey("TeaOwner")) return stack;
+ if (!stack.stackTagCompound
+ .getString("TeaOwner")
+ .equals(entity.getUniqueID().toString())) return stack;
+ entity.addChatComponentMessage(new ChatComponentText(
+ EnumChatFormatting.GREEN + StatCollector.translateToLocal("kubaitem.teacollection.mmm")));
+ entity.triggerAchievement(achievement);
+ return stack;
+ }
+
+ @Override
+ public int getMaxItemUseDuration() {
+ return 32;
+ }
+
+ @Override
+ public String getDisplayName(ItemStack stack) {
+ if (!ModUtils.isClientSided) return super.getDisplayName(stack);
+ if (stack.stackTagCompound == null
+ || (!stack.stackTagCompound.hasKey("TeaOwner")
+ || stack.stackTagCompound
+ .getString("TeaOwner")
+ .equals(Minecraft.getMinecraft()
+ .thePlayer
+ .getUniqueID()
+ .toString()))) return super.getDisplayName(stack);
+ return EnumChatFormatting.GOLD + "" + EnumChatFormatting.BOLD + "" + EnumChatFormatting.ITALIC + "???????";
+ }
+
+ @Override
+ public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) {
+ if (world.isRemote) return;
+ if (!(entity instanceof EntityPlayerMP)) return;
+ NBTTagCompound tag = stack.stackTagCompound;
+ if (tag == null) tag = stack.stackTagCompound = new NBTTagCompound();
+ if (tag.hasKey("display")) tag.removeTag("display");
+ if (tag.hasKey("TeaOwner")) return;
+ tag.setString("TeaOwner", entity.getPersistentID().toString());
+ }
+
+ private static class TeaPage extends AchievementPage {
+
+ public TeaPage() {
+ super("Tea");
+ }
+
+ LinkedList unlockedAchievements = new LinkedList<>();
+
+ @Override
+ public List getAchievements() {
+ if (!ModUtils.isClientSided) return super.getAchievements();
+
+ if (new Throwable().getStackTrace()[1].getMethodName().equals("isAchievementInPages"))
+ return super.getAchievements(); // 5HEAD FIX
+
+ EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
+ unlockedAchievements.clear();
+ for (Achievement achievement : achievements)
+ if (player.getStatFileWriter().hasAchievementUnlocked(achievement))
+ unlockedAchievements.add(achievement);
+ return unlockedAchievements;
+ }
+
+ private LinkedList getAchievementsOriginal() {
+ return (LinkedList) super.getAchievements();
+ }
+ }
+}
diff --git a/src/main/java/kubatech/loaders/item/items/TeaIngredient.java b/src/main/java/kubatech/loaders/item/items/TeaIngredient.java
new file mode 100644
index 0000000000..8ba03c85fa
--- /dev/null
+++ b/src/main/java/kubatech/loaders/item/items/TeaIngredient.java
@@ -0,0 +1,18 @@
+package kubatech.loaders.item.items;
+
+import java.util.List;
+import kubatech.loaders.item.ItemProxy;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+
+public class TeaIngredient extends ItemProxy {
+ public TeaIngredient(String unlocalizedName) {
+ super("teaingredient." + unlocalizedName, "teaingredient/" + unlocalizedName);
+ }
+
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) {
+ tooltipList.add(EnumChatFormatting.GRAY + "This is Tea ingredient");
+ }
+}
diff --git a/src/main/java/kubatech/loaders/item/items/TeaUltimate.java b/src/main/java/kubatech/loaders/item/items/TeaUltimate.java
index 879d3117ad..431feeb83f 100644
--- a/src/main/java/kubatech/loaders/item/items/TeaUltimate.java
+++ b/src/main/java/kubatech/loaders/item/items/TeaUltimate.java
@@ -26,7 +26,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-public class TeaUltimate extends Tea {
+public class TeaUltimate extends TeaCollection {
public TeaUltimate() {
super("ultimate_tea");
}
diff --git a/src/main/java/kubatech/nei/NEI_Config.java b/src/main/java/kubatech/nei/NEI_Config.java
index 1d0e51ddeb..bbce6fe649 100644
--- a/src/main/java/kubatech/nei/NEI_Config.java
+++ b/src/main/java/kubatech/nei/NEI_Config.java
@@ -33,19 +33,19 @@ public class NEI_Config implements IConfigureNEI {
isAdded = false;
new Mob_Handler();
isAdded = true;
- API.hideItem(BlackTea.get(1));
- API.hideItem(ButterflyTea.get(1));
- API.hideItem(EarlGrayTea.get(1));
- API.hideItem(GreenTea.get(1));
- API.hideItem(LemonTea.get(1));
- API.hideItem(MilkTea.get(1));
- API.hideItem(OolongTea.get(1));
- API.hideItem(PeppermintTea.get(1));
- API.hideItem(PuerhTea.get(1));
- API.hideItem(RedTea.get(1));
- API.hideItem(WhiteTea.get(1));
- API.hideItem(YellowTea.get(1));
- API.hideItem(UltimateTea.get(1));
+ API.hideItem(LegendaryBlackTea.get(1));
+ API.hideItem(LegendaryButterflyTea.get(1));
+ API.hideItem(LegendaryEarlGrayTea.get(1));
+ API.hideItem(LegendaryGreenTea.get(1));
+ API.hideItem(LegendaryLemonTea.get(1));
+ API.hideItem(LegendaryMilkTea.get(1));
+ API.hideItem(LegendaryOolongTea.get(1));
+ API.hideItem(LegendaryPeppermintTea.get(1));
+ API.hideItem(LegendaryPuerhTea.get(1));
+ API.hideItem(LegendaryRedTea.get(1));
+ API.hideItem(LegendaryWhiteTea.get(1));
+ API.hideItem(LegendaryYellowTea.get(1));
+ API.hideItem(LegendaryUltimateTea.get(1));
}
@Override
diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
index 270fd7ff9e..e136191be1 100644
--- a/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
+++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
@@ -96,6 +96,7 @@ public class GT_MetaTileEntity_ExtremeExterminationChamber
public static final HashMap MobNameToRecipeMap = new HashMap<>();
public final Random rand = new FastRandom();
+ @SuppressWarnings("unused")
public GT_MetaTileEntity_ExtremeExterminationChamber(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
diff --git a/src/main/resources/assets/kubatech/lang/en_US.lang b/src/main/resources/assets/kubatech/lang/en_US.lang
index e3a37741a8..6d1b176ff2 100644
--- a/src/main/resources/assets/kubatech/lang/en_US.lang
+++ b/src/main/resources/assets/kubatech/lang/en_US.lang
@@ -27,24 +27,50 @@ command.config.success=§aConfig reloaded successfully !
command.config.usage=