Compare commits
No commits in common. "26d3b8207d553e73ec09fb96b63358070a63c2b6" and "9df7d3cc2c37cb311f5fdb4ce140ffece4254f4c" have entirely different histories.
26d3b8207d
...
9df7d3cc2c
|
@ -2,13 +2,13 @@
|
|||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
minecraft_version=b1.7.3
|
||||
loader_version=1.0.0
|
||||
plasma_build=22
|
||||
#This is actually 1.1.0, but that decided it didn't want to build on maven
|
||||
api_version=1.1.0.1
|
||||
minecraft_version=b1.7.3
|
||||
loader_version=1.0.0
|
||||
plasma_build=22
|
||||
#This is actually 1.1.0, but that decided it didn't want to build on maven
|
||||
api_version=1.1.0.1
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.0
|
||||
maven_group = xyz.pixelatedw.finalbeta
|
||||
archives_base_name = finalbeta
|
||||
mod_version = 1.0.0
|
||||
maven_group = xyz.pixelatedw.finalbeta
|
||||
archives_base_name = finalbeta
|
||||
|
|
|
@ -17,10 +17,9 @@ public class ModConfig {
|
|||
public static final Option<Boolean> SUGAR_CANE_ON_SAND = make("Sugar Cane on sand", true, "Allows sugar canes to be placed on sand");
|
||||
public static final Option<Boolean> ADD_MORE_SOUNDS = make("Add more sounds", true,
|
||||
"Links a few more sounds from your local 'resources' folder with the game, namely for item breaking, minecarts and chests");
|
||||
public static final Option<Boolean> ENABLE_CLOUDS = make("Enable Clouds", true, "Enables the rendering of clouds");
|
||||
public static final Option<Boolean> DISABLE_ID_TAGS = make("Disable ID Tags", true,
|
||||
"Disables id tags showing above entities in F3 mode");
|
||||
|
||||
public static final Option<Boolean> ENABLE_CLOUDS = make("Enable Clouds", true,
|
||||
"Enables the rendering of clouds");
|
||||
|
||||
public static final Option<Boolean> FIX_BOW_MODEL = make("Fix bow model", true,
|
||||
"Makes the box model held by players and skeletons bigger and facing forward");
|
||||
public static final Option<Boolean> FIX_MINECART_FLICKERING = make("Fix minecart flickering", true,
|
||||
|
@ -39,7 +38,7 @@ public class ModConfig {
|
|||
"Fixes saddles not dropping when killing saddled pigs");
|
||||
public static final Option<Boolean> FIX_FURNACE_LAVA_BUCKET = make("Fix furnace lava bucket", true,
|
||||
"Fixes furnaces consuming the bucket when using lava buckets as fuel");
|
||||
|
||||
|
||||
private static ModConfig instance = new ModConfig();
|
||||
public static final ModConfig instance() {
|
||||
return instance;
|
||||
|
@ -78,7 +77,7 @@ public class ModConfig {
|
|||
public <T> T get(Option<T> o) {
|
||||
return this.fileConfig.getOrElse(o.name, o.defaultValue);
|
||||
}
|
||||
|
||||
|
||||
public <T> T set(Option<T> o, T value) {
|
||||
return this.fileConfig.set(o.name, value);
|
||||
}
|
||||
|
@ -102,7 +101,7 @@ public class ModConfig {
|
|||
public T get() {
|
||||
return ModConfig.instance().get(this);
|
||||
}
|
||||
|
||||
|
||||
public void set(T value) {
|
||||
ModConfig.instance().set(this, value);
|
||||
}
|
||||
|
|
|
@ -2,11 +2,8 @@ package xyz.pixelatedw.finalbeta;
|
|||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.reflect.Field;
|
||||
import java.time.Duration;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.Player;
|
||||
import net.minecraft.stat.Stats;
|
||||
|
||||
public class WyHelper {
|
||||
|
||||
|
@ -21,25 +18,6 @@ public class WyHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static boolean isTimeBehind() {
|
||||
// int currentPlayTime = WyHelper.getInstance().statManager.getStatAmount(Stats.playOneMinute)
|
||||
return false;
|
||||
}
|
||||
|
||||
public static long getTicksPlayed() {
|
||||
return WyHelper.getInstance().statManager.getStatAmount(Stats.playOneMinute);
|
||||
}
|
||||
|
||||
public static long getRealDaysPlayed() {
|
||||
int seconds = WyHelper.getInstance().statManager.getStatAmount(Stats.playOneMinute) / 20;
|
||||
return Duration.ofSeconds(seconds).toDays();
|
||||
}
|
||||
|
||||
public static long getGameDaysPlayed() {
|
||||
int seconds = WyHelper.getInstance().statManager.getStatAmount(Stats.playOneMinute) / 20;
|
||||
return Duration.ofSeconds(seconds).toMinutes() / 20;
|
||||
}
|
||||
|
||||
public static boolean isDebug() {
|
||||
return ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("-agentlib:jdwp") > 0;
|
||||
}
|
||||
|
@ -52,8 +30,7 @@ public class WyHelper {
|
|||
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();
|
||||
// player.level.playSound(player, "random.break", 1, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);
|
||||
|
@ -82,5 +59,5 @@ public class WyHelper {
|
|||
// player.level.getProperties().setRainTime(0);
|
||||
// player.level.getProperties().setThundering(false);
|
||||
// player.level.getProperties().setThunderTime(0);
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package xyz.pixelatedw.finalbeta.mixin;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
|
@ -13,7 +12,6 @@ import net.minecraft.entity.player.ClientPlayer;
|
|||
import net.minecraft.entity.player.Player;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import xyz.pixelatedw.finalbeta.ModConfig;
|
||||
import xyz.pixelatedw.finalbeta.WyHelper;
|
||||
|
||||
@Mixin(ClientPlayer.class)
|
||||
public class ClientPlayerMixin {
|
||||
|
@ -22,10 +20,10 @@ public class ClientPlayerMixin {
|
|||
|
||||
@Inject(method = "method_136", at = @At("TAIL"))
|
||||
public void onKeyPressed(int key, boolean state, CallbackInfo ci) {
|
||||
if (WyHelper.isDebug() && key == Keyboard.KEY_Z && state) {
|
||||
Player player = (Player) (Object) this;
|
||||
WyHelper.cheatCommand(player);
|
||||
}
|
||||
// if (WyHelper.isDebug() && key == 25 && state) {
|
||||
// Player player = (Player) (Object) this;
|
||||
// WyHelper.cheatCommand(player);
|
||||
// }
|
||||
}
|
||||
|
||||
@Inject(method = "openChestScreen", at = @At("TAIL"))
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ContainerScreenMixin extends ScreenMixin {
|
|||
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/container/ContainerScreen;renderForeground()V", shift = Shift.AFTER))
|
||||
public void onRender(int i, int j, float f, CallbackInfo ci) {
|
||||
ContainerScreen screen = ((ContainerScreen) (Object) this);
|
||||
PlayerInventory selectedItem = this.minecraft.player.inventory;
|
||||
PlayerInventory selectedItem = minecraft.player.inventory;
|
||||
int posX = (screen.width - this.containerWidth) / 2;
|
||||
int posY = (screen.height - this.containerHeight) / 2;
|
||||
|
||||
|
@ -42,8 +42,10 @@ public class ContainerScreenMixin extends ScreenMixin {
|
|||
|
||||
if (selectedItem.getCursorItem() != null) {
|
||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
itemRenderer.renderItemInstance(this.minecraft.textRenderer, this.minecraft.textureManager, selectedItem.getCursorItem(), i - posX - 8, j - posY - 8);
|
||||
itemRenderer.method_1488(this.minecraft.textRenderer, this.minecraft.textureManager, selectedItem.getCursorItem(), i - posX - 8, j - posY - 8);
|
||||
itemRenderer.renderItemInstance(minecraft.textRenderer, minecraft.textureManager, selectedItem.getCursorItem(), i - posX - 8,
|
||||
j - posY - 8);
|
||||
itemRenderer.method_1488(minecraft.textRenderer, minecraft.textureManager, selectedItem.getCursorItem(), i - posX - 8,
|
||||
j - posY - 8);
|
||||
}
|
||||
|
||||
GL11.glDisable(32826);
|
||||
|
|
|
@ -2,14 +2,9 @@ package xyz.pixelatedw.finalbeta.mixin;
|
|||
|
||||
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.CallbackInfo;
|
||||
|
||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
||||
import net.minecraft.client.render.entity.model.EntityModel;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import xyz.pixelatedw.finalbeta.ModConfig;
|
||||
|
||||
@Mixin(LivingEntityRenderer.class)
|
||||
public class LivingEntityRendererMixin {
|
||||
|
@ -18,11 +13,4 @@ public class LivingEntityRendererMixin {
|
|||
|
||||
@Shadow
|
||||
protected EntityModel model;
|
||||
|
||||
@Inject(method = "method_821", at = @At("HEAD"), cancellable = true)
|
||||
public void method_821(LivingEntity entity, double d, double d1, double d2, CallbackInfo ci) {
|
||||
if (ModConfig.DISABLE_ID_TAGS.get()) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
package xyz.pixelatedw.finalbeta.mixin;
|
||||
|
||||
import org.objectweb.asm.Opcodes;
|
||||
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.Slice;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.DrawableHelper;
|
||||
import net.minecraft.client.gui.Overlay;
|
||||
import net.minecraft.client.render.TextRenderer;
|
||||
import xyz.pixelatedw.finalbeta.WyHelper;
|
||||
|
||||
@Mixin(Overlay.class)
|
||||
public class OverlayMixin extends DrawableHelper {
|
||||
|
||||
@Shadow
|
||||
private Minecraft minecraft;
|
||||
|
||||
@Inject(
|
||||
method = "render(FZII)V",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lorg/lwjgl/opengl/GL11;glPopMatrix()V"
|
||||
),
|
||||
slice = @Slice(
|
||||
from = @At(
|
||||
value = "INVOKE",
|
||||
target = "drawTextWithShadow(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V"
|
||||
),
|
||||
to = @At(
|
||||
value = "FIELD",
|
||||
target = "jukeboxMessageTime:I",
|
||||
opcode = Opcodes.GETFIELD
|
||||
)
|
||||
)
|
||||
)
|
||||
public void render(float f, boolean flag, int i, int j, CallbackInfo ci) {
|
||||
TextRenderer textRenderer = this.minecraft.textRenderer;
|
||||
this.drawTextWithShadow(textRenderer, "Days Played: " + WyHelper.getGameDaysPlayed() + " (" + WyHelper.getRealDaysPlayed() + ")", 2, 96, 14737632);
|
||||
}
|
||||
}
|
|
@ -27,8 +27,7 @@
|
|||
"FurnaceEntityMixin",
|
||||
"WorldRendererMixin",
|
||||
"VideoSettingsScreenMixin",
|
||||
"TileMixin",
|
||||
"OverlayMixin"
|
||||
"TileMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
Loading…
Reference in New Issue