forked from Jorbon/cool_elytra
-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
66 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
- Fixed an issue with hud rendering on Forge introduced in a recent update. (#127) | ||
- Fixed Controlify 2.0 compatibility. | ||
- Updated Forge version to NeoForge 1.20.4. | ||
- LexForge will not be supported from now on. |
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
12 changes: 12 additions & 0 deletions
12
common/src/main/java/nl/enjarai/doabarrelroll/mixin/client/key/KeyBindingAccessor.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,12 @@ | ||
package nl.enjarai.doabarrelroll.mixin.client.key; | ||
|
||
import net.minecraft.client.option.KeyBinding; | ||
import net.minecraft.client.util.InputUtil; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(KeyBinding.class) | ||
public interface KeyBindingAccessor { | ||
@Accessor | ||
public InputUtil.Key getBoundKey(); | ||
} |
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
accessWidener v2 named | ||
|
||
accessible field net/minecraft/client/option/KeyBinding boundKey Lnet/minecraft/client/util/InputUtil$Key; |
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
32 changes: 32 additions & 0 deletions
32
.../main/java/nl/enjarai/doabarrelroll/WhyIsTherePublicTransportationInThisModLoaderMod.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,32 @@ | ||
package nl.enjarai.doabarrelroll; | ||
|
||
import net.minecraft.server.network.ServerPlayerEntity; | ||
import net.minecraft.util.Identifier; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.common.Mod; | ||
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; | ||
import net.neoforged.neoforge.network.event.RegisterPayloadHandlerEvent; | ||
import net.neoforged.neoforge.network.registration.IPayloadRegistrar; | ||
|
||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) | ||
public class WhyIsTherePublicTransportationInThisModLoaderMod { | ||
@SubscribeEvent | ||
public static void register(RegisterPayloadHandlerEvent event) { | ||
final IPayloadRegistrar registrar = event.registrar(DoABarrelRoll.MODID); | ||
registerChannel(registrar, DoABarrelRoll.HANDSHAKE_CHANNEL); | ||
registerChannel(registrar, DoABarrelRoll.ROLL_CHANNEL); | ||
} | ||
|
||
private static void registerChannel(IPayloadRegistrar registrar, Identifier id) { | ||
registrar.play(id, buf -> new SillyPayload(buf, id), (payload, ctx) -> { | ||
if (ctx.flow().getReceptionSide().isServer()) { | ||
DoABarrelRollForge.SERVER_LISTENERS.get(id).forEach( | ||
listener -> listener.accept(((ServerPlayerEntity) ctx.player().orElseThrow()).networkHandler, payload.buf(), | ||
replyBuf -> ctx.replyHandler().send(new SillyPayload(replyBuf, id)))); | ||
} else { | ||
DoABarrelRollForge.CLIENT_LISTENERS.get(id).forEach( | ||
listener -> listener.accept(payload.buf(), replyBuf -> ctx.replyHandler().send(new SillyPayload(replyBuf, id)))); | ||
} | ||
}); | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +0,0 @@ | ||
public net.minecraft.client.option.KeyBinding boundKey | ||
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