Open main menu
Home
Random
Log in
Settings
About Forge Community Wiki
Disclaimers
Forge Community Wiki
Search
Changes
← Older edit
Newer edit →
Capabilities
(view source)
Revision as of 19:49, 4 March 2023
16 bytes added
,
19:49, 4 March 2023
m
fix code snippet with workaround
Line 160:
Line 160:
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction direction) {
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction direction) {
if (capability == ForgeCapabilities.ITEM_HANDLER
if (capability == ForgeCapabilities.ITEM_HANDLER
−
&& (direction == null
||
direction == Direction.UP
||
direction == Direction.DOWN)) {
+
&& (direction == null
{{!}}{{!}}
direction == Direction.UP
{{!}}{{!}}
direction == Direction.DOWN)) {
return this.inventoryOptional.cast();
return this.inventoryOptional.cast();
}
}
Random832
4
edits