Compare commits

..

No commits in common. "b1a63ffa3003a433d4778a0f4b2d7728ea66ec93" and "83f794e33e059a97ec2da747b3a5dd65f6413bd2" have entirely different histories.

6 changed files with 27 additions and 138 deletions

View File

@ -190,41 +190,18 @@ After:
<details><summary>Fixes furnaces consuming the buckets as well when using lava buckets</summary> <details><summary>Fixes furnaces consuming the buckets as well when using lava buckets</summary>
Before:<br> Before:
<video controls src="https://i.imgur.com/BY0t3iG.mp4"/> <video controls src="https://i.imgur.com/BY0t3iG.mp4"/>
After: After:
<video controls src="https://i.imgur.com/4O7Fo8V.mp4" /> <video controls src="https://i.imgur.com/4O7Fo8V.mp4" />
</details> </details>
<br>
As well as a bunch of other minor issues not worth having before/after images such as grass block items being rendered incorrectly or the useless 10mb array wasting resources.
## Install
### Vanilla Launcher
- Download the Vanilla Launcher installer of Cursed Legacy Fabric from [https://minecraft-cursed-legacy.github.io/downloads.html](https://minecraft-cursed-legacy.github.io/downloads.html)
- Run the installer and let it finish
- Download the latest version of the mod
- Navigate your .minecraft > b1.7.3 > mods folder and drop the mod .jar file there
- Start the launcher and make sure you pick the Cursed Fabric profile before starting the game
### MultiMC / Prism Launcher
- Download the MultiMC archive of Cursed Legacy Fabric from [https://minecraft-cursed-legacy.github.io/downloads.html](https://minecraft-cursed-legacy.github.io/downloads.html)
- Open your MultiMC / Prism Launcher
- Drag the .zip file into the launcher (you can also choose a different name for this profile now) and click Ok
- Download the latest version of the mod
- Navigate to the newly created instance's location (easier way to do this is from your launcher right click on the profile and select Folder)
- Go in the .minecraft > mods folder and drop the mod .jar file there
- Go back to your launcher and start the Cursed Fabric profile you've just installed
## Troubleshooting ## Troubleshooting
**Q: My achievements screen is all messed up** **Q: My achievements screen is all messed up**
A: Its very likely you have the Cursed Legacy API installed, you do not need it for this mod to work and it actually causes more problems when installed (at least at the time of writing this) A: Its very likely you have the Cursed Legacy API installed, you do not need it for this mod to work and it might cause more problems by itself
**Q: Torches have corrupted textures**
A: Check the above answer
**Q: Entities and items don't seem to burn** **Q: Entities and items don't seem to burn**
A: Check the above answer A: Check the above answer

View File

@ -1,24 +1,14 @@
package xyz.pixelatedw.finalbeta; package xyz.pixelatedw.finalbeta;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.lang.reflect.Field; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.entity.player.Player;
public class WyHelper { public class WyHelper {
public static Minecraft getInstance() { public static boolean isDebug()
try { {
Field f = Minecraft.class.getDeclaredField("instance");
f.setAccessible(true);
return (Minecraft) f.get(null);
} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
public static boolean isDebug() {
return ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("-agentlib:jdwp") > 0; return ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("-agentlib:jdwp") > 0;
} }
@ -30,9 +20,8 @@ public class WyHelper {
return val < min ? min : Math.min(val, max); return val < min ? min : Math.min(val, max);
} }
// public static void cheatCommand(Player player) { public static void cheatCommand(Player player) {
// player.dropItem(new ItemInstance(Tile.SNOW)); Random rand = new Random();
// Random rand = new Random();
// player.level.playSound(player, "random.break", 1, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F); // player.level.playSound(player, "random.break", 1, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);
// player.dropItem(new ItemInstance(ItemType.hatchetDiamond, 1), false); // player.dropItem(new ItemInstance(ItemType.hatchetDiamond, 1), false);
@ -54,10 +43,10 @@ public class WyHelper {
// enemy.setPositionAndAngles(player.x + 2, player.y, player.z, 0.0f, 0.0f); // enemy.setPositionAndAngles(player.x + 2, player.y, player.z, 0.0f, 0.0f);
// player.level.spawnEntity(enemy); // player.level.spawnEntity(enemy);
// player.level.setLevelTime(0); player.level.setLevelTime(0);
// player.level.getProperties().setRaining(false); player.level.getProperties().setRaining(false);
// player.level.getProperties().setRainTime(0); player.level.getProperties().setRainTime(0);
// player.level.getProperties().setThundering(false); player.level.getProperties().setThundering(false);
// player.level.getProperties().setThunderTime(0); player.level.getProperties().setThunderTime(0);
// } }
} }

View File

@ -12,6 +12,7 @@ import net.minecraft.entity.player.ClientPlayer;
import net.minecraft.entity.player.Player; import net.minecraft.entity.player.Player;
import net.minecraft.inventory.Inventory; import net.minecraft.inventory.Inventory;
import xyz.pixelatedw.finalbeta.ModConfig; import xyz.pixelatedw.finalbeta.ModConfig;
import xyz.pixelatedw.finalbeta.WyHelper;
@Mixin(ClientPlayer.class) @Mixin(ClientPlayer.class)
public class ClientPlayerMixin { public class ClientPlayerMixin {
@ -20,10 +21,10 @@ public class ClientPlayerMixin {
@Inject(method = "method_136", at = @At("TAIL")) @Inject(method = "method_136", at = @At("TAIL"))
public void onKeyPressed(int key, boolean state, CallbackInfo ci) { public void onKeyPressed(int key, boolean state, CallbackInfo ci) {
// if (WyHelper.isDebug() && key == 25 && state) { if (WyHelper.isDebug() && key == 25 && state) {
// Player player = (Player) (Object) this; Player player = (Player) (Object) this;
// WyHelper.cheatCommand(player); WyHelper.cheatCommand(player);
// } }
} }
@Inject(method = "openChestScreen", at = @At("TAIL")) @Inject(method = "openChestScreen", at = @At("TAIL"))

View File

@ -1,26 +0,0 @@
package xyz.pixelatedw.finalbeta.mixin;
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;
import net.minecraft.tile.Tile;
@Mixin(Tile.class)
public class TileMixin {
@Inject(method = "getTextureForSide(I)I", at = @At("HEAD"), cancellable = true)
public void getTextureForSide(int i, CallbackInfoReturnable<Integer> ci) {
Tile tile = (Tile) (Object) this;
if (tile.id == Tile.GRASS.id) {
if (i == 1) {
ci.setReturnValue(0);
} else if (i == 0) {
ci.setReturnValue(2);
} else {
ci.setReturnValue(tile.tex);
}
}
}
}

View File

@ -1,13 +1,11 @@
package xyz.pixelatedw.finalbeta.mixin; package xyz.pixelatedw.finalbeta.mixin;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.client.colour.GrassColour;
import net.minecraft.client.render.Tessellator; import net.minecraft.client.render.Tessellator;
import net.minecraft.client.render.TileRenderer; import net.minecraft.client.render.TileRenderer;
import net.minecraft.tile.Tile; import net.minecraft.tile.Tile;
@ -18,55 +16,6 @@ public class TileRendererMixin {
@Shadow @Shadow
private int field_83; private int field_83;
// Grass block texture using side textures for top fix
@Inject(method = "method_48", at = @At("HEAD"), cancellable = true)
public void grassBlockRenderer(Tile arg, int i, float f, CallbackInfo ci) {
// Normal Blocks are rendered using this the 0 type, we're using this
// just as a safenet in case the tile is not grass
int type = arg.method_1621();
if (arg.id == Tile.GRASS.id && type == 0) {
Tessellator tess = Tessellator.INSTANCE;
TileRenderer renderer = (TileRenderer) (Object) this;
arg.method_1605();
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
tess.start();
tess.method_1697(0.0F, -1.0F, 0.0F);
renderer.method_46(arg, 0.0D, 0.0D, 0.0D, arg.getTextureForSide(0, i));
tess.draw();
// This bit controls the top texture specifically
float r = (GrassColour.getColour(0.96, 0.44) >> 16 & 255) / 255.0F;
float g = (GrassColour.getColour(0.96, 0.44) >> 8 & 255) / 255.0F;
float b = (GrassColour.getColour(0.96, 0.44) & 255) / 255.0F;
tess.start();
tess.method_1697(0.0F, 1.0F, 0.0F);
tess.colour(r * f, g * f, b * f);
renderer.method_55(arg, 0.0D, 0.0D, 0.0D, arg.getTextureForSide(1, i));
tess.draw();
tess.start();
tess.method_1697(0.0F, 0.0F, -1.0F);
renderer.method_61(arg, 0.0D, 0.0D, 0.0D, arg.getTextureForSide(2, i));
tess.draw();
tess.start();
tess.method_1697(0.0F, 0.0F, 1.0F);
renderer.method_65(arg, 0.0D, 0.0D, 0.0D, arg.getTextureForSide(3, i));
tess.draw();
tess.start();
tess.method_1697(-1.0F, 0.0F, 0.0F);
renderer.method_67(arg, 0.0D, 0.0D, 0.0D, arg.getTextureForSide(4, i));
tess.draw();
tess.start();
tess.method_1697(1.0F, 0.0F, 0.0F);
renderer.method_69(arg, 0.0D, 0.0D, 0.0D, arg.getTextureForSide(5, i));
tess.draw();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
ci.cancel();
}
}
// Torch rendering with a bottom texture fix
@Inject(method = "method_45", at = @At("HEAD"), cancellable = true) @Inject(method = "method_45", at = @At("HEAD"), cancellable = true)
public void torchRenderer(Tile arg, double x, double y, double z, double w, double h, CallbackInfo ci) { public void torchRenderer(Tile arg, double x, double y, double z, double w, double h, CallbackInfo ci) {
Tessellator tess = Tessellator.INSTANCE; Tessellator tess = Tessellator.INSTANCE;

View File

@ -26,8 +26,7 @@
"LivingEntityMixin", "LivingEntityMixin",
"FurnaceEntityMixin", "FurnaceEntityMixin",
"WorldRendererMixin", "WorldRendererMixin",
"VideoSettingsScreenMixin", "VideoSettingsScreenMixin"
"TileMixin"
], ],
"injectors": { "injectors": {
"defaultRequire": 1 "defaultRequire": 1