-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor InvMove singleton a bit to avoid a crash
- Loading branch information
1 parent
055a0ec
commit e487b37
Showing
21 changed files
with
140 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
crossversion/common/src/main/java/me/pieking1215/invmove/InvMoveNoOp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package me.pieking1215.invmove; | ||
|
||
import net.minecraft.client.KeyMapping; | ||
import net.minecraft.network.chat.MutableComponent; | ||
|
||
import java.io.File; | ||
import java.util.Optional; | ||
|
||
public class InvMoveNoOp extends InvMove { | ||
@Override | ||
public Optional<String> modidFromClass(Class<?> c) { | ||
return Optional.empty(); | ||
} | ||
|
||
@Override | ||
public String modNameFromModid(String modid) { | ||
return "???"; | ||
} | ||
|
||
@Override | ||
public File configDir() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected void registerKeybind(KeyMapping key) { | ||
|
||
} | ||
|
||
@Override | ||
public MutableComponent translatableComponent(String key) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public MutableComponent literalComponent(String text) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean optionToggleCrouch() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void setOptionToggleCrouch(boolean toggleCrouch) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.