forked from Jorbon/cool_elytra
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Please remind me to test this pleaese i beg
- Loading branch information
Showing
20 changed files
with
118 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
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
11 changes: 11 additions & 0 deletions
11
src/main/java/nl/enjarai/doabarrelroll/api/RollRenderState.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,11 @@ | ||
package nl.enjarai.doabarrelroll.api; | ||
|
||
public interface RollRenderState { | ||
boolean doABarrelRoll$isRolling(); | ||
|
||
void doABarrelRoll$setRolling(boolean rolling); | ||
|
||
float doABarrelRoll$getRoll(); | ||
|
||
void doABarrelRoll$setRoll(float roll); | ||
} |
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
34 changes: 34 additions & 0 deletions
34
src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/EntityRenderStateMixin.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,34 @@ | ||
package nl.enjarai.doabarrelroll.mixin.client.roll; | ||
|
||
import net.minecraft.client.render.entity.state.EntityRenderState; | ||
import nl.enjarai.doabarrelroll.api.RollRenderState; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
@Mixin(EntityRenderState.class) | ||
public class EntityRenderStateMixin implements RollRenderState { | ||
@Unique | ||
protected boolean rolling; | ||
@Unique | ||
protected float roll; | ||
|
||
@Override | ||
public boolean doABarrelRoll$isRolling() { | ||
return rolling; | ||
} | ||
|
||
@Override | ||
public void doABarrelRoll$setRolling(boolean rolling) { | ||
this.rolling = rolling; | ||
} | ||
|
||
@Override | ||
public float doABarrelRoll$getRoll() { | ||
return roll; | ||
} | ||
|
||
@Override | ||
public void doABarrelRoll$setRoll(float roll) { | ||
this.roll = roll; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/nl/enjarai/doabarrelroll/mixin/client/roll/EntityRendererMixin.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,26 @@ | ||
package nl.enjarai.doabarrelroll.mixin.client.roll; | ||
|
||
import net.minecraft.client.render.entity.EntityRenderer; | ||
import net.minecraft.client.render.entity.state.EntityRenderState; | ||
import net.minecraft.entity.Entity; | ||
import nl.enjarai.doabarrelroll.api.RollEntity; | ||
import nl.enjarai.doabarrelroll.api.RollRenderState; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(EntityRenderer.class) | ||
public class EntityRendererMixin { | ||
@Inject( | ||
method = "updateRenderState", | ||
at = @At("TAIL") | ||
) | ||
private void updateRollState(Entity entity, EntityRenderState state, float tickDelta, CallbackInfo ci) { | ||
var rollEntity = (RollEntity) entity; | ||
var rollState = (RollRenderState) state; | ||
|
||
rollState.doABarrelRoll$setRolling(rollEntity.doABarrelRoll$isRolling()); | ||
rollState.doABarrelRoll$setRoll(rollEntity.doABarrelRoll$getRoll(tickDelta)); | ||
} | ||
} |
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
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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
loom.platform=fabric | ||
|
||
# Global | ||
deps.yarn_build=1 | ||
deps.compat=\ | ||
controlify=2.0.0-beta.14+1.21-fabric | ||
deps.compat_runtime= | ||
|
||
# Fabric | ||
deps.fapi=0.106.1+1.21.2 | ||
deps.modmenu=12.0.0-beta.1 | ||
deps.yacl=3.6.0+1.21.2 | ||
deps.cicada=0.8.4-beta.1+1.21.2-and-above | ||
|
||
# Mod | ||
mod.mc_dep=>=1.21.2 <=1.21.2 | ||
mod.mc_title=1.21.2 | ||
mod.mc_targets=1.21.2 |