Commit Graph
734 Commits
Author SHA1 Message Date
KnightMiner d321e30a5d Add a fluid ingredient deserialize method using a JsonElement 2020-08-26 20:52:09 -04:00
KnightMiner 8de0584019 Improve JsonHelper.parseList
Parameters are now a bit cleaner
2020-08-26 20:51:45 -04:00
KnightMiner 24a9a1695a Add more general version of arrayToVector for the sake of other sizes
Can use for a vector2f, or a vector4f, or even a matrix
2020-08-23 15:35:26 -04:00
KnightMiner 7285888e46 Improve abstract recipe builder group
Group is just never null now, so no need for the getter
Add a set group method that takes a resource location
2020-08-21 10:36:29 -04:00
KnightMiner 31fec7b116 Update to 1.16.2
Remove some deprecated code
Rename ModelItem::isEmpty to ModelItem::isHidden
Add generics to ModuleScreen
2020-08-20 18:51:07 -04:00
KnightMiner e6d25b08f9 Fix retextured block items showing in all tabs 2020-08-10 16:24:54 -05:00
KnightMiner 46218ffbc4 Add a couple interfaces because Mojang adds too many methods to recipe interfaces 2020-08-10 13:08:57 -05:00
KnightMiner 2763a5b584 Add method to get a nonnull group to abstract recipe builder 2020-08-10 13:08:38 -05:00
KnightMiner bc9f895a65 Add support for a simple block model loader
Not registered as its redundant to vanilla. Instead, useful as an alternative if you need to optionally register another loader.
2020-08-09 13:49:46 -05:00
KnightMiner 5655cd60e2 Add empty inventory constant
Satisfies the nonnull requirement if its ever needed.
2020-08-09 13:48:21 -05:00
KnightMiner ea35fb298f Extract some base logic of translation helper more 2020-08-08 22:49:57 -05:00
KnightMiner 19d39efbcf Fix multimodule container nullability 2020-08-08 22:49:45 -05:00
KnightMiner 40b94cccf4 Use optionals in tile entity helper return
Keep old methods as deprecated
2020-08-08 22:49:36 -05:00
KnightMiner f7a6f26088 Move model loader registration back to the model registry event
Recent Forge commit fixed the race condition, so putting it back at the intended location.
2020-08-08 21:08:27 -05:00
KnightMiner 2d243a41aa Fix missing helpers in JEI 2020-08-06 00:00:07 -05:00
KnightMiner c6c4070c16 Future proof: for when Forge finally fixes the model data bug, prevent fetching connections if already fetched
Means a parent model can override connections data, or a TE as well. This PR
2020-08-05 21:34:52 -05:00
KnightMiner cb213db95f Add single property data and lazy load the instance in RetexturedTileEntity 2020-08-05 21:34:45 -05:00
KnightMiner 623a28f673 Disallow Blocks.AIR as a texture for models
Set to null so I do not need to check for two values every time
2020-08-05 21:34:16 -05:00
KnightMiner 65fa5cd869 Remove configurate version prop, its been removed 2020-08-05 21:10:18 -05:00
KnightMiner 7142f50d6a Update multipart block logic to better support latest Forge build
We now always call the model data version, but we still do not always get needed model data.
2020-08-05 21:07:59 -05:00
KnightMiner 99571cafba Port two data gen utilities from Inspirations
* Utility for adding config to recipes
* Utility for getting names and generic conditions in recipes
2020-08-03 00:32:59 -05:00
KnightMiner 5543aa202a Remove deobf jar
Legacy resource
2020-08-03 00:26:09 -05:00
KnightMiner f0e5bf0b81 Remove config module
Is unused without pulsar
2020-08-03 00:25:56 -05:00
KnightMiner bf801e8f8c Bit of resource cleanup 2020-08-03 00:18:23 -05:00
KnightMiner 99bf56c780 Clean up utilities
* Consistently naming utilities Helper instead of Utils
* Remove SlimeknightsException, I honestly have no idea why we needed our own exception
* Remove a couple unused utilities, not sure where they are from
* Add common block position NBT helper
* Remove getTagSafe helpers, vanilla added something similar recently and I'd rather avoid creating a throwing away a bunch of tags
2020-08-03 00:18:18 -05:00
KnightMiner bb8442d4f5 Move recipe match to a better package.
Deprecate it until I know whether we are keeping it
2020-08-03 00:18:05 -05:00
KnightMiner f883314a60 Add back JEI plugin and implement UI and retextured recipe logic 2020-08-03 00:18:00 -05:00
KnightMiner ecca746f3b Add dynamically retexturable blocks
Includes recipe, loot function, block, item, tile entity, and model
2020-08-02 22:26:09 -05:00
KnightMiner 6118f68379 Use capital case for inject objects
Since they are final
2020-08-02 22:22:03 -05:00
KnightMiner bf555f5797 Switch from using BlockModel in custom models to SimpleBlockModel
* SimpleBlockModel is simplier, containing only model elements, parent, and textures (textures for fallback)
* Most of the model properties are now fetched from the IModelConfig owner as its more accurate (makes inheritance better)
* To override textures and other basic properties, a ModelConfigurationWrapper is used
* To override model elements, a bake method taking a BlockPart list is available
* ConnectedModel, FluidsModel, and InventoryModel are updated to use this new system
2020-08-02 20:29:50 -05:00
KnightMiner 7c6c3b9cfd Register fluid model loader 2020-08-02 20:26:33 -05:00
KnightMiner 8dfed11d98 Repackaging: move model utilities to utility package
In preparation for a bunch of new model utilities
2020-08-02 20:26:03 -05:00
KnightMiner 594dbde3b2 Add better null safety
All get methods are now guarenteed nonnull. ItemObject and EnumObject both have a nullable getOrNull method now that throws no exceptions
2020-07-28 16:44:52 -05:00
KnightMiner 92a8ad7d32 A few missing javadocs 2020-07-28 13:26:26 -05:00
KnightMiner cbb0a52c18 Allow an ItemObject name to be fetched before registry events fire
Also remove a few constructors provided because of "what if they are needed", as I really doubt anyone will be extending this system. They can make a PR if they need them later
2020-07-28 13:25:02 -05:00
KnightMiner 9c5b8fb5af Add castDelegate helper, used in a few places 2020-07-28 13:07:52 -05:00
KnightMiner c8bff521e8 Merge BlockItemObject into ItemObject as they fill the same need
Both are a wrapper around a registry entry that implements IItemProvider
2020-07-28 13:06:59 -05:00
KnightMiner aee55e8dff Add EnumObject::getOrThrow
Saves calls to Object::requireNonNull. If nullable is allowed, use get as before
2020-07-28 02:34:36 -05:00
KnightMiner 5c26722425 Inspection errors 2020-07-28 02:09:21 -05:00
KnightMiner c518fac5f0 Rename ContainerTypeRegistryAdapter::registerType as the parameter is ambiguous 2020-07-28 02:03:51 -05:00
KnightMiner 5f4093c53a Allow a enum object with a higher type to be placed in a lower type builder 2020-07-28 02:01:54 -05:00
KnightMiner 1457a4ddf2 Add EnumObject::empty() to fetch an empty enum object
To avoid the need for null checks
2020-07-28 01:53:50 -05:00
KnightMiner 0abd41f1e1 Add EnumObject::forEach and a builder putDelegate
Both for common actions I am finding I am using
2020-07-28 01:30:31 -05:00
KnightMiner 67fee327a3 Missing methods for working with enum objects in item registry 2020-07-27 23:57:57 -05:00
alexbegt ca176a3e66 Update to the latest forge and latest mappings 2020-07-27 23:24:58 -04:00
KnightMiner eafa8da4b7 Add more methods to the item registry adapter that make use of default props
Also make default props parameter optional and add some missing javadocs
2020-07-27 21:55:21 -05:00
KnightMiner fe0f3297d9 Fix accidently caching an invalid texture atlas 2020-07-27 21:45:18 -05:00
KnightMiner 812bbe23fd Add helper to registry adapters to copy name from another object 2020-07-27 21:44:57 -05:00
KnightMiner ae8bba0162 Move injected helper to public context 2020-07-27 21:44:21 -05:00
KnightMiner 8f5999f37f Fix crash on data gen as minecraft instance is null 2020-07-27 21:44:06 -05:00