Commit graph

468 commits

Author SHA1 Message Date
David Quintana
28f7b5d885 Implement loader for ItemLayerModel.
Add support for specifying which layers are fullbright.
Fix improper generation of model edge. - Thanks to iChun and KnightMiner for the fix suggestions.
2020-06-04 16:04:09 +02:00
LexManos
0c0603dc91 Remove dead test classes. 2020-06-03 17:46:30 -07:00
LexManos
f24991f3bb Add --flat argument to data generators to not create data in mod specific directores.
Useful For Forge's test mods mainly.
Standardized data gen cache file's folder separators.
Added ItemModelProvider to BlockStateProvider for cleaner datagen code.
Added .gitattributes to fix datagen json's line endings correct on windows.
2020-06-03 16:57:07 -07:00
LexManos
d4f79882f9 Update MCP Mappings. 2020-05-15 12:17:25 -07:00
ichttt
8d3685439e
fix test mod and add warning comment to framebuffer (#6698) 2020-05-15 20:25:57 +02:00
Funwayguy
ec7d9d4179 Re-added patch to enable stencil buffer in net.minecraft.client.shader.Framebuffer
Add test for the stencil buffer feature. Only tests that it doesn't crash when enabling, for now. - giga
2020-05-15 19:49:55 +02:00
TheSilkMiner
765da1aca8
Allow Music Discs to be created with SoundEvent delegates. (#6523) 2020-05-15 10:38:19 -07:00
David Quintana
c23ea1e733 Model system fixes:
- Add "origin" key to determine what origin to use. This will default to the existing (broken) behaviour to avoid breaking changes.
- Fix interaction of transforms with variant transforms (transformation ordering).
- Fix OBJ loader ignoring "diffuseLighting" attribute from the json.
  This attribute will continue not being used if "ambientToFullbright" is on (default) to avoid breaking changes.
2020-05-15 19:25:26 +02:00
David Quintana
a7e4cdcc49 Patch the bucket logic to not hardcode some checks to WATER. Fixes not being able to place custom fluids into modded fluid-loggable blocks that accept fluids other than water. 2020-05-06 13:30:20 +02:00
Corey Frenette
1fa88ebd56
Fixed ChunkDataEvent.Save being fired with a null world if chunk isn't fully generated when unloaded. (#6628) 2020-05-03 13:27:06 -07:00
LexManos
3c5728f070 Fix Automatic Event Subscriber not detecting mod id defaults, and fix test mods. 2020-04-26 19:04:37 -07:00
David Quintana
aa5b9d12ea
Add "type" field to global loot modifier jsons. (#6554)
* Add "type" field to global loot modifier jsons and fix tests.
To avoid binary breaking, "type" defaults to be the same as the filename.
* Fix license headers.
2020-04-12 21:27:11 +02:00
Patrick Ocampo
5e554530ac
Fixed PlantType not extending IExtensibleEnum, Closes #6286 2020-04-08 17:17:38 -07:00
tterrag
b6dc5381ca Move global loot test data files out of generated folder 2020-03-31 20:15:55 -04:00
tterrag
559bacbd98 Add support for optional tag values to Tag.Builder
Add optional tag values to data gen test
Fix data gen test not running by correcting gui_light value
2020-03-31 20:15:09 -04:00
LexManos
23541ab175 Update gradle wrapper
Update MCPConfig to version that bypasses javac compiler bugs
Fix Global loot test compile errors.
2020-03-15 13:55:03 -07:00
Draco18s
58e5f33fad
Global Loot Functions (#6401) 2020-02-26 22:13:36 -08:00
DaemonUmbra
2ce4f5ece5
Updated ForgeDev MCP Mapping Version (#6532) 2020-02-25 19:45:14 -08:00
malte0811
3f292d5d42
Fixed ChunkWatchEvent.(Un)Watch not firing correctly (#6453) 2020-02-14 12:02:47 -08:00
David Quintana
a901d80dd5 Implement fluid overlay texture rendering for custom fluids. 2020-02-02 23:02:56 +01:00
David Quintana
509a28efd3 Hook "gui_light" value from the model into the IBakedModel implementations.
Apply some of the suggestions from the 1.14 models PR.
2020-01-23 22:54:54 +01:00
LexManos
c4e000dbe7 1.15.2 Initial Update 2020-01-22 13:44:03 -08:00
Scotteh
345387645e [1.15.x] Added entity nameplate rendering event hook (#6416) 2020-01-22 12:22:04 -07:00
David Quintana
1936eb1f36 Fix breaking overlay weirdness. applyBakedNormals was not transforming the baked normals when applying them. Fixes #6432 2020-01-16 03:29:46 +01:00
David Quintana
983a47a7d6 Fix dark spots in fullbright quad rendering.
Fix multi-layer model not declaring dependency on the particle texture.
Fix mistake in 2c054fca which I didn't intend to push when I did.
2020-01-13 23:20:46 +01:00
David Quintana
c1840abb0a Fix multi-layer model loader to actually work in a sane way. No more "base" model involved, and now transforms and overrides work as expected. 2020-01-13 19:38:52 +01:00
David Quintana
2c054fca76 Attempt to fix fullbright lighting.
Fix lightmap value calculation.
2020-01-13 13:19:36 +01:00
tterrag
bc878ddf19 Refactor BlockStateProvider to encapsulate a BlockModelProvider
Make most protected methods of data generators public
2020-01-05 14:27:20 -05:00
tterrag
90035ab084 Remove custom vertex format from BakedQuad 2020-01-04 23:36:56 -05:00
David Quintana
ca031ca33f Fix CompositeModel not respecting "display" transforms.
Remove leftovers from discarded feature.
2020-01-02 06:21:43 +01:00
David Quintana
ecb56054bc Allow model jsons to override the material library used by OBJ models.
Fix model loader test mod resources.
Update licenses.
2020-01-01 17:15:49 +01:00
tterrag
53747b0cb5 Apply baked-in lightmap data to rendering
- Fix ForgeHooksClient.fillNormal injecting data to lightmap
- Fix OBJModel not filling lightmap data
- Fix NewModelLoaderTest blockitem not linking with block
2019-12-30 16:12:14 -05:00
David Quintana
e1b0a8c153 Fix LightUtil.unpack to set the 4th component to 1 when expanding an xyz position into a 4-component vector.
Add TRSRTransformer test mod.
Fix signature of the bindTileEntityRenderer method, to account for covariance.
2019-12-29 17:16:27 +01:00
David Quintana
fc189c9aaf More model/rendering fixes:
- Breaking change: Change ClientRegistry.bindTileEntityRenderer to a factory, so mods don't have to manually specify the dispatcher.
- Breaking change: Delete obsolete SimpleModelState (the class was duplicated by mistake, see SimpleModelTransform) and ICustomModelState (part of the old loader API).
- Breaking change: Rename getTextureDependencies to getTextures, for consistency.
- Reinstate the getRenderLayer method, fixed appropriately to return the new RenderType value.
- Fix OBJ loader applying the model transform in the wrong reference frame.
- Fix vanilla bug in TransformationMatrix#func_227986_a_
- Fix QuadTransformer logic.
- Added new method to IModelConfiguration to retrieve the owner IUnbakedModel, needed in order to construct ItemOverrideLists when baking custom models.
- Reintroduce multi-layer model through the new model loader system.
2019-12-29 02:13:58 +01:00
David Quintana
e8ce61d4cd New batch of Model/rendering fixes:
- PerspectiveMapWrapper did not pass IModelData through to the wrapped model.
- CompositeModel did not store the returned textures from getTextureDependencies.
- VertexFormat used COLOR instead of UV to detect UV presence.
- QuadTransformer would crash due to index out of bounds.
- Small cleanup of TransformationHelper
2019-12-24 13:12:38 +01:00
David Quintana
ac61018806 Fix obj models having all faces in the same mesh, breaking material assignments and visibility in the process.
Reintroduce lost patch from the model loader, which would cause the custom values to be missing from generated models.
2019-12-20 18:14:09 +01:00
David Quintana
503d277033 Fix bucket model. Some mask textures were not added to the repository, and the bucket override generation was broken.
Fix OBJ loading crash due to a float value being parsed as int.
Fixes 6377
2019-12-20 02:44:27 +01:00
David Quintana
738abbb360 Finish converting the code from javax.vecmath to the vanilla vector classes. Forge is now vecmath-free! 2019-12-17 19:14:52 +01:00
tterrag
1558362583 Remove deprecations 2019-12-17 04:50:13 -05:00
tterrag
dec91dec68 Revert fluid change to use Material, fixes server crash 2019-12-16 23:22:13 -05:00
LexManos
1933d05e36 Update to 1.15
Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled.

Co-authored-by: David Quintana <gigaherz@gmail.com>
Co-authored-by: tterrag <tterrag1098@gmail.com>
Co-authored-by: Unnoen <theunnoen@gmail.com>
2019-12-17 03:38:12 +01:00
Richard Freimer
0e65f20f22 Add hooks to make it easier to add custom TNT blocks (#6290) 2019-11-20 19:19:34 -08:00
tterrag
ebd463e92f Fix lang generator escaping newlines, add lang generator test 2019-10-30 15:25:03 -04:00
tterrag
acaa470dea
Add Blockstate and Model data providers (#6241) 2019-10-24 22:33:24 -04:00
FireController1847
94cbf72e39 Re-add PlayerGiveXpEvent & PlayerChangeLevelEvent (#6165) 2019-10-14 10:37:44 -07:00
David Quintana
5e9380ab85
Fix forge blockstates and custom model loading (#6154)
* Reimplement forge blockstates variant through the use of a pseudo-model that handles the model loading, retexturing, custom data, etc. on behalf of the blockstates loader. This model gets injected into the model registry with an autogenerated unique name, to not collide with other model locations.
* Fix model loaders not being properly initialized by calling the reload method from the loader register function. In 1.12, registering a reload listener caused the listener to be called right away from the register method. This is not true anymore.
2019-10-08 00:18:29 +02:00
tterrag
2392a4c184 Fix new flower pot ctor not being usable with deferred register 2019-09-25 18:01:43 -04:00
tterrag
6fda1e968d Make FlowerPotBlock extensible and reusable for mods
- Change static lookup map to an instance variable
- Add an instance variable for the "empty pot" for the current block
- Keep one instance of the lookup map between the empty pot and all its full versions
- Convert everything to use delegates
2019-09-17 19:57:58 -04:00
David Quintana
58335d7bc0
Minor fixes to the fluids (#6150)
* Fixed vanilla rendering of fluids to take into account the alpha bits of the color, and fix usages accordingly.
* Fixed missing texture derp.
2019-09-12 17:33:19 +02:00
David Quintana
b0c9d7cce9
Some (sadly breaking) improvements to the Fluid API (#6110)
* Some (sadly breaking) improvements to the API, after feedback and concerns provided by users:
  - Moved calculation of the translation key to the FluidAttributes constructor, so that builders can be shared between still & flowing sub-fluids.
  - Moved biome-based coloring to a dedicated FluidAttributes.Water variant, which is not used by default.
  - Added logic to automatically gather fluid textures into the list of textures to bake.
  - Patched BucketItem and FlowingFluidBlock to avoid eager access to the fluid objects.
  - Added a ForgeFlowingFluid class, as a more user-friendly way to construct a new FlowingFluid.
2019-09-11 16:00:32 +02:00
LexManos
2c8c022034 Add a bunch of tags from the omnibus.
Fix test imports. And update patches for line numbers.
2019-09-03 18:51:09 -07:00
mcenderdragon
3f089e3add Added gravity as attribute to Entities (#5630) 2019-09-03 13:20:44 -07:00
David Quintana
d9f6659f2c
Fluid rework derp fixes. (#6098)
* Fix nulls returning from non-null methods, and null-check of non-nullable values.
* Fix missed computation of the isEmpty flag in FluidStack
* Cleanup getAmount/isEmpty calls.
* Remove redundant suppliers. That info is readily available from the vanilla Fluid / FluidState.
2019-08-29 21:09:42 +02:00
David Quintana
a788e8a475 Fix license headers so gradlew build is happy. 2019-08-29 03:18:42 +02:00
David Quintana
b7e1cc5f6b Fluid API rework (#5983)
- Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz
- Redesigned the Fluid API to be closer to the Items API. By King Lemming
Co-authored-by: King Lemming <kinglemming@gmail.com>
2019-08-29 03:18:41 +02:00
LexManos
e784a7f606 Recipe system cleanup. (#6014) 2019-08-29 03:18:41 +02:00
cpw
1af7b7603d
Move fml's PlayerEvent and TickEvent to forge. Update
`import net.minecraftforge.fml.common.gameevent.PlayerEvent;`
to
`import net.minecraftforge.event.entity.player.PlayerEvent;`
and
`import net.minecraftforge.fml.common.gameevent.TickEvent;`
to
`import net.minecraftforge.event.TickEvent;`

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-04 22:34:14 -04:00
its_meow
50e411b82a Add piston events (#5798) 2019-08-02 14:12:21 -07:00
cpw
c90b1732e9
Fix objloader registering at wrong time. Closes #5847. Added test
class as suggested in the issue.

Note: most tests are commented out at the present time, pending
rework. Tests that work, work.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-20 21:04:00 -04:00
tterrag
ef7b035f02 Fix ModelDataTest 2019-06-21 23:35:08 -04:00
tterrag
8c3e511538 Make sure test mods load, fix BlockstateRetextureTest 2019-06-21 19:35:32 -04:00
LexManos
f01b87fac7 Fix some compile errors in test classes. 2019-06-19 18:07:58 -07:00
tterrag
d5ee80a70a Add IContainerFactory for reading custom container data on the client 2019-06-10 18:14:49 -04:00
tterrag
35cd89c00c Fix issues preventing test mods loading 2019-06-09 00:19:29 -04:00
tterrag
892fea3df9 Add forge registry for container types, expose ScreenManager.registerFactory 2019-06-09 00:19:17 -04:00
LexManos
b74b72e44c Fix NamespacedWrapper not delegating a new getter. Fixing data loading spam at world start.
Update red/yellow/green tags with new vanilla item names.
Reenabled test source directory in project and made ModelDataTest compile.
2019-06-07 19:34:16 -07:00
LexManos
eae0858de6 Fix build script producing duplicated eclipse source folders.
Fix not including userdev source in sources jar.
Update license header of files that need it.
Delete patches_old folders. Most are unneeded in 1.13+ as the systems they effected were changed significantly. Any that need to be readdressed can be done as PRs.
2019-05-13 19:11:24 -07:00
tterrag
9e39570d49 Add ModelDataTest to test mods.toml 2019-05-11 23:22:24 -04:00
tterrag
01a0674490 Finish model loader debug mod 2019-05-11 18:58:45 -04:00
tterrag
e482793f69 Comment out test Mod/EventBusSubscriber annotations, fix up ModelLoaderRegistryTest 2019-05-11 18:58:45 -04:00
tterrag
9209c3cbfe
Add new system for model data, replacing extended states (#5564) 2019-05-09 02:10:38 -04:00
tterrag
416bf9e3bf Allow loading json constants outside of _constants 2019-04-25 19:22:43 -04:00
Thanh-Phuong
cb0cf2f04f Add a few events pertaining to villages (#5302) 2019-04-24 01:07:02 -04:00
Tyler Hancock
2ea475ad31 Fix special spawn event not firing in many cases. (#5389)
Co-authored-by: tterrag <tterrag1098@gmail.com>
2019-04-23 21:10:37 -04:00
Christopher Krier
ca973f053f Add EntityPlaceEvent (#5057)
Co-authored-by: tterrag <tterrag1098@gmail.com>
2019-04-23 19:58:09 -04:00
Ben Staddon
817546e4c8 Add a hook to allow continuously using items through stack changes (#4834) 2019-04-23 15:12:55 -04:00
Ben Staddon
f19fed0853 Add redirects to PotionEffect to respect registry replacement (#5213) 2019-04-23 14:47:47 -04:00
tterrag
65cfef1b2e Fix potion remove event not always firing, add expiry event 2019-04-13 11:17:00 -04:00
mcenderdragon
914fe91db5 added PotionHooks, closes #3867, #4375 (#4614) 2019-04-13 11:03:58 -04:00
ichttt
a67cce2f91 Add a hook for farmland watering (#4891) 2019-04-12 20:16:34 -04:00
Ben Staddon
fa708f93ee Allow items to control the rate of repair from mending (#5102) 2019-04-12 13:26:15 -04:00
Ben Staddon
e376172312 Improve context provided by potion icon rendering hooks (#5111) 2019-04-12 11:05:34 -04:00
mezz
5fa732d223 Remove uses of java.awt (#5591)
`java.awt` will statically load itself when `java.awt.Color`, `java.awt.Dimension`, etc are loaded.
This conflicts with lwjgl3 and must be avoided (except for in mojang's server gui).
2019-03-25 12:06:20 -07:00
LexManos
ca72710937 Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped.
DimensionType is not unique per Dimension. See DimensionManager for more details.
Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted.
2019-02-14 15:08:53 -08:00
cpw
f83500db11
Its 2019. Update licence headers to match.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 17:57:03 -05:00
m00nl1ght-dev
8084ca43b9 Port CommandEvent and custom entity selectors to 1.13 (#5411) 2019-02-08 17:41:50 -08:00
Justin
d2a3b5bed8 Fix RuntimeEnumExtender creating new enums with incorrect ordinal value (#5402) 2019-01-30 12:51:14 -08:00
cpw
56a3926b86 Fix up event naming, move them to sensible packages and document everything a bit. 2019-01-14 22:43:17 -05:00
XCompWiz
f2b54acd67 Allow providing a BufferedImage for banner render generation (#5041)
Ported to 1.13 using NativeImage

Co-authored-by: tterrag <tterrag1098@gmail.com>
2019-01-11 18:32:17 -05:00
Ben Staddon
c1bb5cb250 Patch PotionHelper to use registry delegates (#5142) 2019-01-11 18:32:17 -05:00
LexManos
440649bb95 Fix new launcher jar packaging.
Run license checker over new code.
2018-12-31 16:48:23 -08:00
mezz
dc12cda505
Clean progress bar code and fix TextureMap patch (#5304) 2018-12-28 18:05:05 -08:00
cpw
c6e7bbe18b Use the maven artifact code rather than our very outdated copy 2018-10-03 22:47:07 -04:00
LexManos
a0e217b1dc More because git likes to split to many 2018-09-21 02:17:20 -07:00
cpw
77c3310711 Zeroth pass on 1.13 2018-09-05 12:56:01 -07:00
cpw
689ebd8036 Dediserver runs and talks to clients. 2018-09-05 12:35:31 -07:00
cpw
506b51f189 A much more straightforward networking system. 2018-09-05 12:33:38 -07:00
cpw
4636365e30 Some beginnings of a network again. 2018-09-05 12:31:47 -07:00
cpw
d0ab0e166c Well, it works, for a game, now. 2018-09-05 12:30:02 -07:00
cpw
06b16aaa19 Some more stuffs. ObjectHolder's replacement? 2018-09-05 11:58:31 -07:00