forked from orbwoi/AccurateBlockPlacement
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHANGELOG: [BUG FIX] - Removed emulation of vanilla auto-repeat as having both systems confused some users [FUTURE COMPAT] - Holding right click and changing selected item will now block auto placement until right click is release and pressed again - Added new check to make sure vanilla behavior is triggered when holding an 'usable' item - Added new check to make sure vanilla behavior is trigger when looking at an 'activatable' block - Added new double check to ensure no keystroke can ever be dropped by the system Signed-off-by: Clayborn <4501752+orbwoi@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
232 additions
and
61 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
5 changes: 5 additions & 0 deletions
5
src/main/java/net/clayborn/accurateblockplacement/IKeyBindingAccessor.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,5 @@ | ||
package net.clayborn.accurateblockplacement; | ||
|
||
public interface IKeyBindingAccessor { | ||
int accurateblockplacement_GetTimesPressed(); | ||
} |
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
19 changes: 19 additions & 0 deletions
19
src/main/java/net/clayborn/accurateblockplacement/mixin/KeyBindingMixin.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,19 @@ | ||
package net.clayborn.accurateblockplacement.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import net.clayborn.accurateblockplacement.IKeyBindingAccessor; | ||
import net.minecraft.client.options.KeyBinding; | ||
|
||
@Mixin(KeyBinding.class) | ||
public abstract class KeyBindingMixin implements IKeyBindingAccessor { | ||
@Shadow | ||
private int timesPressed; | ||
|
||
@Override | ||
public int accurateblockplacement_GetTimesPressed() | ||
{ | ||
return timesPressed; | ||
} | ||
} |
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