This commit is contained in:
gnembon committed 2021-03-17 10:42:31 -03:00
1 parent 5276061f04
commit 0b93101248
4 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html # or better: https://modmuss50.me/fabric.html
minecraft_version=21w10a minecraft_version=21w10a
yarn_mappings=21w10a+build.15 yarn_mappings=21w10a+build.23
loader_version=0.11.3 loader_version=0.11.3
fabric_version=0.32.2+1.17 fabric_version=0.32.2+1.17
@@ -30,12 +30,12 @@ public abstract class ContainerMixin
@Shadow protected abstract void endQuickCraft(); @Shadow protected abstract void endQuickCraft();
@Shadow public abstract ItemStack method_34255(); @Shadow public abstract ItemStack getCursorStack();
@Inject( method = "internalOnSlotClick", at = @At(value = "HEAD"), cancellable = true) @Inject( method = "internalOnSlotClick", at = @At(value = "HEAD"), cancellable = true)
private void onThrowClick(int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfo ci) private void onThrowClick(int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfo ci)
{ {
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && this.method_34255().isEmpty() /* playerEntity.getInventory().getCursorStack().isEmpty()*/ && slotId >= 0) if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && this.getCursorStack().isEmpty() && slotId >= 0)
{ {
ItemStack itemStack_1 = ItemStack.EMPTY; ItemStack itemStack_1 = ItemStack.EMPTY;
Slot slot_4 = slots.get(slotId); Slot slot_4 = slots.get(slotId);
@@ -594,12 +594,12 @@ public class Scoreboards {
return LazyValue.FALSE; return LazyValue.FALSE;
case "style": case "style":
if(propertyValue == null) { if(propertyValue == null) {
return (_c, _t) -> StringValue.of(bossBar.getOverlay().getName()); return (_c, _t) -> StringValue.of(bossBar.getStyle().getName());
} }
BossBar.Style style = BossBar.Style.byName(propertyValue.getString()); BossBar.Style style = BossBar.Style.byName(propertyValue.getString());
if(style == null) throw new InternalExpressionException("'" + propertyValue.getString() + "' is not a valid value for property " + property); if(style == null) throw new InternalExpressionException("'" + propertyValue.getString() + "' is not a valid value for property " + property);
bossBar.setOverlay(style); bossBar.setStyle(style);
return LazyValue.TRUE; return LazyValue.TRUE;
case "value": case "value":
if(propertyValue == null) return (_c, _t) -> NumericValue.of(bossBar.getValue()); if(propertyValue == null) return (_c, _t) -> NumericValue.of(bossBar.getValue());
@@ -11,7 +11,7 @@ import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonReader;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtIo; import net.minecraft.nbt.NbtIo;
import net.minecraft.nbt.PositionTracker; import net.minecraft.nbt.NbtTagSizeTracker;
import net.minecraft.nbt.Tag; import net.minecraft.nbt.Tag;
import net.minecraft.nbt.TagReaders; import net.minecraft.nbt.TagReaders;
import net.minecraft.util.WorldSavePath; import net.minecraft.util.WorldSavePath;
@@ -233,7 +233,7 @@ public class FileArgument
else else
{ {
dataInput_1.readUTF(); dataInput_1.readUTF();
return TagReaders.of(byte_1).read(dataInput_1, 0, PositionTracker.DEFAULT); return TagReaders.of(byte_1).read(dataInput_1, 0, NbtTagSizeTracker.EMPTY);
} }
} }
catch (IOException ignored) catch (IOException ignored)