Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Fix merge conflicts for world-god-class #195

Closed
wants to merge 76 commits into from
Closed

Fix merge conflicts for world-god-class #195

wants to merge 76 commits into from

Conversation

JFronny
Copy link
Contributor

@JFronny JFronny commented Oct 6, 2020

This merges recent changes into #133 and should fix merge conflicts

florensie and others added 30 commits July 19, 2020 14:09
* ItemTooltipEvent

* Commiting before you push is helpful

* Remove useless import
* Move implementation of gatherCapabilities to CapabilityEvents

* Dispatch ForgeEventFactory.gatherCapabilities to CapabilityEvents

* Remove <T extends ICapabilityProvider> restriction on ForgeEventFactory
…106)

* Impl ModelBakeEvent, ModelRegistryEvent and some ModelLoader methods

* Apply suggestions from code review

Co-authored-by: Glitch <[email protected]>

* Rename AbstractModelLoader to SpecialModelProvider

* Simplify MixinModelLoader

* Add comments

* Apply suggestions from code review

Co-authored-by: famous1622 <[email protected]>

* Update ModelEventDispatcher.java

* Better mixin target

Co-authored-by: Glitch <[email protected]>
Co-authored-by: famous1622 <[email protected]>
* Move onLivingDrops to EntityEvents

* Dispatch from patchwork-god-classes to EntityEvents
…istryEntry (#131)

* Change IForgeRegistryEntry.setRegistryName to return V, not IForgeRegistryEntry

* ExtendedForgeRegistryEntry

* Appease checkstyle
* Add LootTableLoadEvent, methods on LootPool/LootTable

The mixin to LootManager is messy, and I'm open to alternative ways to
doing it, even if it involves scrapping the 'forge way' of doing it and
doing it a different way. For now, I'm going to get this up so that
bikeshedding can happen.

I'm using the "net.patchworkmc.api.*.Forge<classname>" pattern for
interfaces that describe public methods added by Forge for use by mods
in this commit. This is up for bikeshedding.

This is untested other than starting up Minecraft and opening a world.

* Fix LocalCapture.PRINT that I forgot about

* Implement FMLServerStoppedEvent

* Dispatch from the god classes for the events added in this PR

* prevent memory leak

* fixup! checkstype

* Make slightly less hacky!

The idea is to add an inject in the same place as the method we would be
redirecting (but are instead cancelling) so that we can capture locals,
and grab the builder that we would otherwise be missing.

The downside is that we are effectively overwriting the lambda that
vanilla uses in favor of our own.

* Make the implicit "overwrite" explicit.

* Make requested changes.

Mainly adding Override annotations to methods for interfaces, but a few
other things as well.
* Use World Load event in fabric api introduced by 0.15.0

* Workaround: Fire overworld load event later

* Add dep on fabric api to patchwork-events-world.

TODO: we should go through and accurately state our fabric api
dependencies for all modules.
* Add forge tag API support

* Checkstyle

* Fix license

* Fixed accessWidener not found in fabric.mod.json issue

* Use newlines at end of file

* Fix more newlines

Gotta take this low effort all the way to the max

* Fix issues

* Oh god I think I fucked up git

Co-authored-by: Ramid Khan <[email protected]>
* Implement ChunkWatchEvent.UnWatch

NOTE: This implementation follows upstream 1.14.4 Forge, not the commit
we're tracking which doesn't implement it at all.

* fix error

Co-authored-by: Glitch <[email protected]>
* Move InputEvent firing to a new class, InputEvents

* Dispatch from ForgeHooksClient to InputEvents

* Fixup! mixin didn't actually implement interface.
Add BlockEvent.HarvestDropsEvent and its respective firing method, WorldEvents.fireBlockHarvesting
* Implement AnimalTameEvent

* Missed MCP -> Yarn names in a JavaDoc

* HorseBoneWithPlayerGoal -> HorseBondWithPlayerGoal

* Make event cancelable.

* Remove unneeded ISE

Co-authored-by: Glitch <[email protected]>
…OutEvent (#118)

* Impl PlayerChangedDimensionEvent, PlayerRespawnEvent and
PlayerLoggedOutEvent

* Impl ItemPickupEvent, ItemCraftedEvent, ItemSmeltedEvent in PlayerEvent

* Add methods to the god class

* Apply leo60228's suggestion
* Implement ItemFishedEvent

* Make event cancelable

* Actually use the event's rod damage

* </p> nit

Co-authored-by: TheGlitch76 <[email protected]>
* Implement AnimalTameEvent

* Missed MCP -> Yarn names in a JavaDoc

* HorseBoneWithPlayerGoal -> HorseBondWithPlayerGoal

* Make event cancelable.

* Remove unneeded ISE

* Replace cursed Inject with less cursed Redirect

* Remove trailing whitespace

Co-authored-by: Glitch <[email protected]>
* Added patchwork-key-bindings

* Added patchwork keybinding for Patcher


Cleaning up remaining absolute imports

* Fix missing import

* Fix archive base name

* Fix folders, paths and project names

* Fix KeyBinding names and add @unique

* Should probably respect keybind context

* Remove now incorrect comment

Co-authored-by: Glitch <[email protected]>

Co-authored-by: Glitch <[email protected]>
* Impl TickEvent.ServerTickEvent with FAPI Lifecycle Events V1

* Impl TickEvent.RenderTickEvent

* Add ServerTick and RenderTick events to BasicEventHooks

* Fix style

* Shift hookRenderTickEnd to match Forge

* Fix style after merge conflict resolution

* Reduce ordinal on hookRenderTickEvent with slice
rikka0w0 and others added 28 commits August 14, 2020 19:35
* Add ChunkEvent

* Update patchwork-events-world/src/main/java/net/patchworkmc/impl/event/world/WorldEventsClient.java

Co-authored-by: Glitch <[email protected]>

Co-authored-by: Glitch <[email protected]>
* Impl removedByPlayer and canHarvestBlock in IForgeBlock

* Apply kitlith's suggestions

* Fix ThreadLocal memory leakage

* Apply suggestions

* Remove unneeded dependency

* Disable an unnecessary 1.15 patch

* Move BlockEvent from events-world to extensions-block.

This removes a unnecessary dependency.

* Replace a redirect with injection

* Apply suggestions

* Merge remote-tracking branch 'origin/master' into feature/block-harvest

Conflicts:
	patchwork-events-world/src/main/java/net/patchworkmc/impl/event/world/WorldEvents.java

Co-authored-by: TheGlitch76 <[email protected]>
* Construct Forge mods at the correct place

* Remove the unused Fabric mod entry

* Remove debug outputs & add comments

* Fix the order of events on client

* Fix crashing on dedicated server

* Fix FMLServerStartingEvent to accommodate the new mod loading procedure

* Fix a mixin applied on the wrong side
* Add extensions-blockentity module

* implements IForgeTileEntity.onLoad and onChunkUnloaded

* Impl IForgeTileEntity.getTileData()

* Implements IForgeTileEntity.getRenderBoundingBox and canRenderBreaking

* Add FastTESR support and Forge's BER registration method

* Add BlockEntityRender register method to the god class, Add readme

* Fix potential ThreadLocal memory leakage

* Update patchwork-extensions-blockentity/src/main/java/net/minecraftforge/common/extensions/IForgeTileEntity.java

Co-authored-by: Glitch <[email protected]>

* Apply suggestions

* Revert "Apply suggestions"

This reverts commit 5188613.

* Apply suggestions

Co-authored-by: Glitch <[email protected]>
* Add FakePlayer

* Add FakePlayerFactory

* Invoke FakePlayerFactory#unloadWorld

* Fix license

* Improve code quality of `FakePlayerFactory`:
 - Make some private static fields final
 - Remove an explicit generic type that was inferrable
 - Simplify logic in `unloadWorld` to mirror the logic in `getMinecraft`
 - Add javadoc for `unloadWorld`

* Fix formatting in a couple of comments

* Improve `FakePlayerFactory#get`:
 - username -> profile (shouldn't break anything)
 - switch to using computeIfAbsent

* Move fake players into a new module

* Update fake players unloading to use `fabric-lifecycle-events-v1`

* Fix style

* Update patchwork-extensions/src/main/resources/fabric.mod.json

* Update patchwork-fake-players/build.gradle

Co-authored-by: qouteall <[email protected]>
Co-authored-by: Glitch <[email protected]>
* Impl IForgeItem.getArmorTexture

* Impl IForgeItem.onArmorTick

* Fix getArmorModel not being called properly

* Apply suggestions
* Add forge energy
Pretty much exact from YarnForge, with formatting changes

* Fix license

* Update fabric.mod.json

* Move energy to patchwork-capabilities

* Remove patchwork-energy
Any org member is encourage
* Add EntityItemPickupEvent
(It should really be named ItemEntityPickupEvent but w/e)

* Add EntityTravelToDimensionEvent

* Fix checkstyle

* Add Forge behavioural change w.r.t teleporting `StorageMinecartEntity`s
* Faster building, hopefully better actions workflow

* More!!!

* Another test

* fix

* Hopefully fix Bintray publishing while we're at it

* Checkstyle doesn't need to wait until build is done anymore

* One last oopsie and we're good for merge.
For the full changelog see v0.8.0...v0.9.0

This release is notable for (hopefully) being the first version with a maven publication that isn't broken.

Development pace has significantly slowed as school starts back up--don't expect to see a whole lot from us until winter.

1.15 will happen! It is currently waiting on some changes to Patcher to be written before we can start on API.

If you'd like to contribute, please join our [discord](https://discord.gg/YYZtNBG) and we can get you started.
This is a bugfix release, see https://github.com/PatchworkMC/patchwork-api/releases/tag/v0.9.0 for the changelog since the previous major release.

This version fixes some errors involving publishing artifacts.
This is a bugfix release, see https://github.com/PatchworkMC/patchwork-api/releases/tag/v0.9.0 for the changelog since the previous major release.

This version fixes the (hopefully) last publishing error, and some other issues in the Github Actions workflows.
…t` as deprecated (#186)

* Fix energy capability not being registered

* Fix checkstyle + license

* Mark `@CapabilityInject` as deprecated
* Implement getHeight and setHeight on AbstractButtonWidget

* Fixed code style on commit 0b87d35
* Added the `patchwork-access-modifications` module and publicized `MinecraftClient#textureManager`.

* Fixed requested changes

* Moved Access Widener to patchwork-fml. Didn't bump the version

* Fixed
Also removes the duplicate ClientRegistry class in god-classes and fixes a
missed patchwork-api-base dependency
This was meant to happen but the old gradle script for it only
worked if you used the old, deprecated  method.
This also adds support for the checkstyle plugin.
# Conflicts:
#	patchwork-events-world/src/main/java/net/patchworkmc/impl/event/world/WorldEvents.java
#	patchwork-events-world/src/main/java/net/patchworkmc/mixin/event/world/MixinThreadedAnvilChunkStorage.java
#	patchwork-god-classes/build.gradle
#	patchwork-god-classes/src/main/java/net/minecraftforge/common/ForgeHooks.java
#	patchwork-god-classes/src/main/resources/fabric.mod.json
@JFronny JFronny closed this Oct 16, 2020
@JFronny JFronny deleted the world-god-class branch October 16, 2020 18:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.