Skip to content

Commit

Permalink
Update for 1.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LXGaming committed Mar 8, 2020
1 parent f93ffa1 commit c8cd087
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ targetCompatibility = 1.8

group = "io.github.lxgaming"
archivesBaseName = "Sledgehammer"
version = "1.14.4-2.0.0"
version = "1.15.2-2.0.0"

minecraft {
accessTransformer(file("src/main/resources/accesstransformer.cfg"))
mappings(channel: "stable", version: "58-1.14.4")
mappings(channel: "snapshot", version: "20200307-1.15.1")
runs {
client = {
properties("forge.logging.markers": "SCAN,REGISTRIES,REGISTRYDUMP")
Expand Down Expand Up @@ -85,7 +85,7 @@ repositories {
}

dependencies {
minecraft("net.minecraftforge:forge:1.14.4-28.2.0")
minecraft("net.minecraftforge:forge:1.15.2-31.1.0")
shadow("org.checkerframework:checker-qual:2.11.1")
testCompile("org.junit.jupiter:junit-jupiter-engine:5.5.2")
runtime("org.ow2.asm:asm-analysis:6.2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public class CoreMixinCategory {
@Setting(value = "invalid-translation", comment = "If 'true', prevents crashes caused by invalid translations.")
private boolean invalidTranslation = false;

@Mapping(value = "core.util.LazyLoadBaseMixin")
@Setting(value = "lazy-load-base-thread-safe", comment = "If 'true', makes LazyLoadBase Thread-safe.")
private boolean lazyLoadBaseThreadSafe = false;
@Mapping(value = "core.util.LazyValueMixin")
@Setting(value = "lazy-value-thread-safe", comment = "If 'true', makes LazyValue Thread-safe.")
private boolean lazyValueThreadSafe = false;

@Mapping(value = "core.network.play.ServerPlayNetHandlerMixin_Sleep")
@Setting(value = "leave-sleep", comment = "If 'true', allows players to exit the sleep screen.")
Expand All @@ -55,8 +55,8 @@ public boolean isInvalidTranslation() {
return invalidTranslation;
}

public boolean isLazyLoadBaseThreadSafe() {
return lazyLoadBaseThreadSafe;
public boolean isLazyValueThreadSafe() {
return lazyValueThreadSafe;
}

public boolean isLeaveSleep() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public abstract class MinecraftMixin {
private static Logger LOGGER;

@Inject(
method = "init",
method = "<init>",
at = @At(
value = "RETURN"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.entity.item.ItemEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
Expand All @@ -30,14 +29,14 @@ public abstract class MinecraftMixin_DropItem {
method = "processKeyBinds",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/entity/player/ClientPlayerEntity;dropItem(Z)Lnet/minecraft/entity/item/ItemEntity;"
target = "Lnet/minecraft/client/entity/player/ClientPlayerEntity;func_225609_n_(Z)Z"
)
)
private ItemEntity onDropItem(ClientPlayerEntity player, boolean dropAll) {
private boolean onDropItem(ClientPlayerEntity player, boolean dropAll) {
if (player.openContainer == null) {
return player.dropItem(dropAll);
return player.func_225609_n_(dropAll);
}

return null;
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

package io.github.lxgaming.sledgehammer.mixin.core.util;

import net.minecraft.util.LazyLoadBase;
import net.minecraft.util.LazyValue;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;

import java.util.function.Supplier;

@Mixin(value = LazyLoadBase.class)
public abstract class LazyLoadBaseMixin<T> {
@Mixin(value = LazyValue.class)
public abstract class LazyValueMixin<T> {

@Shadow
private Supplier<T> supplier;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mixins.sledgehammer.core.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"network.play.ServerPlayNetHandlerMixin_Sleep",
"util.text.TextFormattingMixin",
"util.text.TranslationTextComponentMixin",
"util.LazyLoadBaseMixin"
"util.LazyValueMixin"
],
"client": [
"client.GameSettingsMixin",
Expand Down

0 comments on commit c8cd087

Please sign in to comment.