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

@@ -30,12 +30,12 @@ public abstract class ContainerMixin
@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)
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;
Slot slot_4 = slots.get(slotId);
@@ -594,12 +594,12 @@ public class Scoreboards {
return LazyValue.FALSE;
case "style":
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());
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;
case "value":
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 net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtIo;
import net.minecraft.nbt.PositionTracker;
import net.minecraft.nbt.NbtTagSizeTracker;
import net.minecraft.nbt.Tag;
import net.minecraft.nbt.TagReaders;
import net.minecraft.util.WorldSavePath;
@@ -233,7 +233,7 @@ public class FileArgument
else
{
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)