Skip to content
Success

Changes

Summary

  1. Rework screen event (#28) (commit: c5559bf) (details)
Commit c5559bfa285283ceccf41a985216700cd2cf4ed7 by noreply
Rework screen event (#28)

* Use Fabric events instead of mixins

* Better event line

* Better type + event firing handling

* Fix creative inventory firing event for normal one

* Rewrite screen name handling

* Initialize `TYPE_MAP` first

* Use a mixin to support `context.switched`

* `switched` -> `previous_screen_type`

* creative screen is opened from inventory screen

* Shadow `currentScreen`

* Remove TODO

* Add `previous_screen_type` to meta

* Add `from` switch

* Clearer comment

* Use access wideners for `DetailsScreen`

* Clarify screen name generation with comment

* Fix typo

* Move screen name mapping to a separate class

* Move special case handling to the mixin
(commit: c5559bf)
The file was addedsrc/main/resources/clientizen.accesswidener
The file was modifiedbuild.gradle (diff)
The file was addedsrc/main/java/com/denizenscript/clientizen/util/ScreenNameMapping.java
The file was modifiedsrc/main/java/com/denizenscript/clientizen/events/ScreenOpenCloseEvent.java (diff)
The file was modifiedsrc/main/resources/fabric.mod.json (diff)
The file was modifiedsrc/main/java/com/denizenscript/clientizen/mixin/MinecraftClientMixin.java (diff)
The file was modifiedsrc/main/java/com/denizenscript/clientizen/util/Utilities.java (diff)