Skip to content

Commit

Permalink
Fun times (not really)
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Jan 22, 2024
1 parent 5b9d53f commit 8bd509f
Show file tree
Hide file tree
Showing 18 changed files with 198 additions and 264 deletions.
111 changes: 0 additions & 111 deletions .github/workflows/publish.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/publish_all.yml

This file was deleted.

6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
- As an exception to existing limitations, thrusting will now be allowed when the player is an operator on a Realm.
This does not apply to normal servers.
- Changed the default toggle keybind to I to avoid conflicting with the advancements button.
- Fixed an incompatibility with Keybind Fix.
- Separated 1.20 and 1.20.2 support into separate jars.
- Added support for Forge & NeoForge 1.20.1.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Modrinth](https://img.shields.io/modrinth/dt/do-a-barrel-roll)](https://modrinth.com/mod/do-a-barrel-roll)
[![CurseForge](https://cf.way2muchnoise.eu/full_663658_downloads.svg)](https://curseforge.com/minecraft/mc-mods/do-a-barrel-roll)

Do a Barrel Roll is a lightweight, fully clientside mod for Fabric that changes
Do a Barrel Roll is a lightweight, fully clientside mod that changes
elytra flight to be more fun and semi-realistic.
It achieves this by redesigning movement with a
completely unlocked camera orientation in mind,
Expand Down Expand Up @@ -52,10 +52,6 @@ All the following configurations are valid:

## Disclaimers

The Forge version of this mod will no longer receive any updates.
This has to do with my personal preferences and lack of knowledge about Forge,
due to which, maintaining a port was severely limiting what I could do with the mod.

This mod does not actually modify the flight physics themselves,
so in most cases it shouldn't trigger anticheat.
However, doing things like loop de loops looks to the server like rapid camera movement
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
plugins {
id 'dev.architectury.loom' version '1.4-SNAPSHOT' apply(false)
id 'me.fallenbreath.yamlang' version '1.2.1' apply(false)
id "me.modmuss50.mod-publish-plugin" version "0.4.4"
}

version = "${mod_version}+${minecraft_version}"

subprojects {
apply plugin: 'java'
apply plugin: 'me.fallenbreath.yamlang'
apply plugin: "me.modmuss50.mod-publish-plugin"

version = "${mod_version}+${minecraft_version}"

Expand Down Expand Up @@ -109,7 +111,7 @@ subprojects {
mod_credits : mod_credits,
mod_description : mod_description,
mod_url : mod_url,
mod_sources_url : mod_sources_url,
mod_github : mod_github,
mod_issue_tracker_url : mod_issue_tracker_url,
]
inputs.properties replaceProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.util.Identifier;
import nl.enjarai.doabarrelroll.api.event.ServerEvents;
import nl.enjarai.doabarrelroll.config.ModConfigServer;
import nl.enjarai.doabarrelroll.fabric.net.HandshakeServerFabric;
import nl.enjarai.doabarrelroll.net.HandshakeServer;
import nl.enjarai.doabarrelroll.net.ServerConfigHolder;
import nl.enjarai.doabarrelroll.platform.Services;
Expand All @@ -29,5 +30,9 @@ public static void init() {
CONFIG_HOLDER = new ServerConfigHolder<>(configFile,
ModConfigServer.CODEC, ModConfigServer.DEFAULT, ServerEvents::updateServerConfig);
HANDSHAKE_SERVER = new HandshakeServer(CONFIG_HOLDER, player -> !ModConfigServer.canModify(player));

// Register server-side listeners for config syncing, this is done on
// both client and server to ensure everything works in LAN worlds as well.
HandshakeServerFabric.init();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nl.enjarai.doabarrelroll;

import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
Expand All @@ -15,11 +16,13 @@
import nl.enjarai.doabarrelroll.config.LimitedModConfigServer;
import nl.enjarai.doabarrelroll.config.ModConfig;
import nl.enjarai.doabarrelroll.config.ModConfigServer;
import nl.enjarai.doabarrelroll.fabric.net.HandshakeClientFabric;
import nl.enjarai.doabarrelroll.flight.RotationModifiers;
import nl.enjarai.doabarrelroll.net.HandshakeClient;
import nl.enjarai.doabarrelroll.render.HorizonLineWidget;
import nl.enjarai.doabarrelroll.render.MomentumCrosshairWidget;
import nl.enjarai.doabarrelroll.util.MixinHooks;
import nl.enjarai.doabarrelroll.util.StarFoxUtil;
import org.jetbrains.annotations.Nullable;
import org.joml.Vector2d;

Expand Down Expand Up @@ -68,6 +71,21 @@ public static void init() {
});

ClientEvents.SERVER_CONFIG_UPDATE.register(ModConfig.INSTANCE::notifyPlayerOfServerConfig);

ModConfig.touch();
HandshakeClientFabric.init();

// Register keybindings on fabric
ModKeybindings.FABRIC.forEach(KeyBindingHelper::registerKeyBinding);

// Init barrel rollery.
StarFoxUtil.register();

ClientTickEvents.END_CLIENT_TICK.register(client -> {
ModKeybindings.clientTick(client);

StarFoxUtil.clientTick(client);
});
}

public static void onRenderCrosshair(DrawContext context, float tickDelta, int scaledWidth, int scaledHeight) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ public class DoABarrelRollFabric implements ModInitializer {
public void onInitialize() {
// Init server and client common code.
DoABarrelRoll.init();

// Register server-side listeners for config syncing, this is done on
// both client and server to ensure everything works in LAN worlds as well.
HandshakeServerFabric.init();
}
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
package nl.enjarai.doabarrelroll.fabric;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import nl.enjarai.doabarrelroll.DoABarrelRollClient;
import nl.enjarai.doabarrelroll.ModKeybindings;
import nl.enjarai.doabarrelroll.config.ModConfig;
import nl.enjarai.doabarrelroll.fabric.net.HandshakeClientFabric;
import nl.enjarai.doabarrelroll.util.StarFoxUtil;

public class DoABarrelRollFabricClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
DoABarrelRollClient.init();

ModConfig.touch();
HandshakeClientFabric.init();

// Register keybindings on fabric
ModKeybindings.FABRIC.forEach(KeyBindingHelper::registerKeyBinding);

// Init barrel rollery.
StarFoxUtil.register();

ClientTickEvents.END_CLIENT_TICK.register(client -> {
ModKeybindings.clientTick(client);

StarFoxUtil.clientTick(client);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public abstract class InGameHudMixin {
method = "render",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/math/MathHelper;lerp(FFF)F"
target = "Lnet/minecraft/util/math/MathHelper;lerp(FFF)F",
ordinal = 0
)
)
private void doABarrelRoll$renderPeppy(DrawContext context, float tickDelta, CallbackInfo ci) {
Expand Down
Loading

0 comments on commit 8bd509f

Please sign in to comment.