Commented out the dev cheat command
parent
b92398ac40
commit
b1a63ffa30
|
@ -4,7 +4,6 @@ import java.lang.management.ManagementFactory;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.Player;
|
|
||||||
|
|
||||||
public class WyHelper {
|
public class WyHelper {
|
||||||
|
|
||||||
|
@ -31,7 +30,7 @@ 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));
|
// 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);
|
||||||
|
@ -55,10 +54,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);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ 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 {
|
||||||
|
@ -21,10 +20,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"))
|
||||||
|
|
Loading…
Reference in New Issue