-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
HEEEELP
i dont get whats wrong with the move mixin (supposed to remove air friction) (also idk how to rotate the textures on the agony UV so they flow towards the front face)
1 parent
9c7850f
commit aa60756
Showing
8 changed files
with
245 additions
and
7 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
35 changes: 35 additions & 0 deletions
35
src/main/java/com/nuclearcrackhead/serverboss/mixin/MoveMixin.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,35 @@ | ||
package com.nuclearcrackhead.serverboss.mixin; | ||
|
||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.player.PlayerAbilities; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.data.DataTracked; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Debug; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
|
||
@Debug(export = true) | ||
@Mixin(PlayerEntity.class) | ||
public abstract class MoveMixin extends LivingEntity implements DataTracked { | ||
|
||
protected MoveMixin(EntityType<? extends LivingEntity> entityType, World world) { | ||
super(entityType, world); | ||
} | ||
|
||
@Final | ||
@Shadow private PlayerAbilities abilities; | ||
@Inject(method = "getVelocityMultiplier()F", at = @At("RETURN"), cancellable = true) | ||
private void injected(CallbackInfoReturnable<Float> cir) { | ||
cir.setReturnValue( | ||
( !this.isOnGround() ? 1/super.getVelocityMultiplier() : super.getVelocityMultiplier() ) //LivingEntity.getVelocityMultiplier() | ||
); | ||
} | ||
|
||
} |
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,7 +1,57 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"orientation=down_east": { | ||
"model": "svbcr:block/agony", | ||
"x": 90, | ||
"y": 90 | ||
}, | ||
"orientation=down_north": { | ||
"model": "svbcr:block/agony", | ||
"x": 90 | ||
}, | ||
"orientation=down_south": { | ||
"model": "svbcr:block/agony", | ||
"x": 90, | ||
"y": 180 | ||
}, | ||
"orientation=down_west": { | ||
"model": "svbcr:block/agony", | ||
"x": 90, | ||
"y": 270 | ||
}, | ||
"orientation=east_up": { | ||
"model": "svbcr:block/agony", | ||
"y": 90 | ||
}, | ||
"orientation=north_up": { | ||
"model": "svbcr:block/agony" | ||
}, | ||
"orientation=south_up": { | ||
"model": "svbcr:block/agony", | ||
"y": 180 | ||
}, | ||
"orientation=up_east": { | ||
"model": "svbcr:block/agony", | ||
"x": 270, | ||
"y": 270 | ||
}, | ||
"orientation=up_north": { | ||
"model": "svbcr:block/agony", | ||
"x": 270, | ||
"y": 180 | ||
}, | ||
"orientation=up_south": { | ||
"model": "svbcr:block/agony", | ||
"x": 270 | ||
}, | ||
"orientation=up_west": { | ||
"model": "svbcr:block/agony", | ||
"x": 270, | ||
"y": 90 | ||
}, | ||
"orientation=west_up": { | ||
"model": "svbcr:block/agony", | ||
"y": 270 | ||
} | ||
} | ||
} |
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,6 +1,89 @@ | ||
{ | ||
"parent": "minecraft:block/cube_all", | ||
"parent": "block/block", | ||
"textures": { | ||
"all": "svbcr:block/agony" | ||
} | ||
"bottom": "svbcr:block/agony", | ||
"top": "svbcr:block/agony", | ||
"north": "svbcr:block/agony_front", | ||
"south": "svbcr:block/agony_front", | ||
"west": "svbcr:block/agony", | ||
"east": "svbcr:block/agony", | ||
"particle": "#north" | ||
}, | ||
"elements": [ | ||
{ | ||
"from": [ | ||
0, | ||
0, | ||
0 | ||
], | ||
"to": [ | ||
16, | ||
16, | ||
16 | ||
], | ||
"faces": { | ||
"down": { | ||
"uv": [ | ||
0, | ||
0, | ||
16, | ||
16 | ||
], | ||
"texture": "#bottom", | ||
"cullface": "down" | ||
}, | ||
"up": { | ||
"uv": [ | ||
0, | ||
0, | ||
16, | ||
16 | ||
], | ||
"rotation": 180, | ||
"texture": "#top", | ||
"cullface": "up" | ||
}, | ||
"north": { | ||
"uv": [ | ||
0, | ||
0, | ||
16, | ||
16 | ||
], | ||
"texture": "#north", | ||
"cullface": "north" | ||
}, | ||
"south": { | ||
"uv": [ | ||
0, | ||
0, | ||
16, | ||
16 | ||
], | ||
"texture": "#south", | ||
"cullface": "south" | ||
}, | ||
"west": { | ||
"uv": [ | ||
0, | ||
0, | ||
16, | ||
16 | ||
], | ||
"texture": "#west", | ||
"cullface": "west" | ||
}, | ||
"east": { | ||
"uv": [ | ||
0, | ||
0, | ||
16, | ||
16 | ||
], | ||
"texture": "#east", | ||
"cullface": "east" | ||
} | ||
} | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/svbcr/textures/block/agony_front.png.mcmeta
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,6 @@ | ||
{ | ||
"animation": { | ||
"frametime": 2, | ||
"interpolate": true | ||
} | ||
} |
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