This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
forked from Strangerrrs/Raven-bS
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: smugvee <85663797+smugvee@users.noreply.github.com> Co-authored-by: Kg <88619756+KgDW@users.noreply.github.com>
- Loading branch information
1 parent
72ab748
commit 26f0c8a
Showing
125 changed files
with
2,306 additions
and
1,700 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
Binary file not shown.
Binary file not shown.
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
27 changes: 27 additions & 0 deletions
27
src/main/java/keystrokesmod/mixins/impl/entity/EntityLivingBaseAccessor.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,27 @@ | ||
package keystrokesmod.mixins.impl.entity; | ||
|
||
import net.minecraft.entity.EntityLivingBase; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(EntityLivingBase.class) | ||
public interface EntityLivingBaseAccessor { | ||
|
||
@Accessor("newPosX") | ||
double getNewPosX(); | ||
|
||
@Accessor("newPosY") | ||
double getNewPosY(); | ||
|
||
@Accessor("newPosZ") | ||
double getNewPosZ(); | ||
|
||
@Accessor("newRotationYaw") | ||
double getNewRotationYaw(); | ||
|
||
@Accessor("newRotationPitch") | ||
double getNewRotationPitch(); | ||
|
||
@Accessor("newPosRotationIncrements") | ||
int getNewPosRotationIncrements(); | ||
} |
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
20 changes: 20 additions & 0 deletions
20
src/main/java/keystrokesmod/mixins/impl/gui/MixinSplashProgress.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,20 @@ | ||
package keystrokesmod.mixins.impl.gui; | ||
|
||
|
||
import net.minecraftforge.fml.client.SplashProgress; | ||
import org.jetbrains.annotations.NotNull; | ||
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.CallbackInfoReturnable; | ||
|
||
@Mixin(value = SplashProgress.class, remap = false) | ||
public abstract class MixinSplashProgress { | ||
|
||
@Inject(method = "getString", at = @At("HEAD"), cancellable = true) | ||
private static void onGetString(@NotNull String name, String def, CallbackInfoReturnable<String> cir) { | ||
if (name.equals("logoTexture") && def.equals("textures/gui/title/mojang.png")) { | ||
cir.setReturnValue("keystrokesmod:textures/backgrounds/bluearacive.png"); | ||
} | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
src/main/java/keystrokesmod/mixins/impl/gui/MixinSplashProgressThread.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,71 @@ | ||
package keystrokesmod.mixins.impl.gui; | ||
|
||
|
||
import keystrokesmod.utility.Reflection; | ||
import net.minecraftforge.fml.client.SplashProgress; | ||
import org.lwjgl.opengl.GL11; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(targets = "net/minecraftforge/fml/client/SplashProgress$3", remap = false) | ||
public abstract class MixinSplashProgressThread { | ||
|
||
/** | ||
* To make a custom loading logo rendering fine. | ||
* <p> | ||
* Codes: | ||
* <p> | ||
* SplashProgress.logoTexture.texCoord(0, 0.0F, 0.0F); | ||
* <p> | ||
* GL11.glVertex2f(64.0F, -16.0F); | ||
* <p> | ||
* SplashProgress.logoTexture.texCoord(0, 0.0F, 1.0F); | ||
* <p> | ||
* GL11.glVertex2f(64.0F, 496.0F); | ||
* <p> | ||
* SplashProgress.logoTexture.texCoord(0, 1.0F, 1.0F); | ||
* <p> | ||
* GL11.glVertex2f(576.0F, 496.0F); | ||
* <p> | ||
* SplashProgress.logoTexture.texCoord(0, 1.0F, 0.0F); | ||
* <p> | ||
* GL11.glVertex2f(576.0F, -16.0F); | ||
* @see "Lnet/minecraftforge/fml/client/SplashProgress$3;run()V" | ||
*/ | ||
@Redirect(method = "run", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glVertex2f(FF)V")) | ||
private void onGlVertex2f(float x, float y) { | ||
final short type; | ||
if (x == 64.0F && y == -16.0F) { | ||
type = 0; | ||
} else if (x == 64.0F && y == 496.0F) { | ||
type = 1; | ||
} else if (x == 576.0F && y == 496.0F) { | ||
type = 2; | ||
} else if (x == 576.0F && y == -16.0F) { | ||
type = 3; | ||
} else { | ||
GL11.glVertex2f(x, y); | ||
return; | ||
} | ||
|
||
final Object texture = Reflection.getDeclared(SplashProgress.class, "logoTexture"); | ||
final float width = (float) Reflection.call(texture, "getWidth") / 2.0F / 2.0F; | ||
final float height = (float) Reflection.call(texture, "getHeight") / 2.0F / 2.0F; | ||
|
||
switch (type) { | ||
case 0: | ||
GL11.glVertex2f(-width, -height); | ||
break; | ||
case 1: | ||
GL11.glVertex2f(-width, height); | ||
break; | ||
case 2: | ||
GL11.glVertex2f(width, height); | ||
break; | ||
case 3: | ||
GL11.glVertex2f(width, -height); | ||
break; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.