Skip to content
Success

Changes

Summary

  1. Create Key Binding API (details)
Commit 718a8ff37c36bbb76edb8a9bee017e1856757bd6 by AlgorithmX2
Create Key Binding API
* Added annotation to the API that allows certain items to bypass
KeyConflictContext activity checks, fixed an ItemStack null check,
replaced a class check with a method call, and clarified a description.

* Added method to the API the returns C&B key bindings.

* 1) Added optional argument to the KeyBindingContext annotation that
allows classes that use it to be added to ModConflictContext's active
class collection; 2) Added an IMC that searches the class hierarchies of
all classes of all of the sender's registered items for instances of the
annotation that have this argument; 3) Refactored the active class
collection to a hashset to avoid duplication.

* Optimized IMC annotation search.

* Remove nested type enum from ModKeyBinding and replaced the switch on
its type with a switch on all its values not in ClientSide.
The file was modifiedsrc/main/java/mod/chiselsandbits/core/ClientSide.java (diff)
The file was addedsrc/main/java/mod/chiselsandbits/api/KeyBindingContext.java
The file was addedsrc/main/java/mod/chiselsandbits/core/api/IMCHandlerKeyBindingAnnotations.java
The file was modifiedsrc/main/java/mod/chiselsandbits/client/ModConflictContext.java (diff)
The file was modifiedsrc/main/java/mod/chiselsandbits/core/api/IMCHandler.java (diff)
The file was modifiedsrc/main/java/mod/chiselsandbits/core/api/IMCHandlerIgnoreLogic.java (diff)
The file was addedsrc/main/java/mod/chiselsandbits/api/ModKeyBinding.java
The file was modifiedsrc/main/java/mod/chiselsandbits/core/api/ChiselAndBitsAPI.java (diff)
The file was addedsrc/main/java/mod/chiselsandbits/core/api/IMCHandlerKeyBinding.java
The file was modifiedsrc/main/java/mod/chiselsandbits/api/IgnoreBlockLogic.java (diff)
The file was modifiedsrc/main/java/mod/chiselsandbits/api/IChiselAndBitsAPI.java (diff)