Make main source set compile against 1.19.4
This commit is contained in:
parent
31268e33ef
commit
b6643a6dd3
@ -1,25 +0,0 @@
|
||||
package ru.dbotthepony.mc.otm.mixin;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
import static ru.dbotthepony.mc.otm.client.render.RenderHelperKt.popScissorRect;
|
||||
import static ru.dbotthepony.mc.otm.client.render.RenderHelperKt.pushScissorRect;
|
||||
|
||||
// because scissor stack fucking sucks.
|
||||
// mostly because it is not a stack at all.
|
||||
@Mixin(GuiGraphics.class)
|
||||
public abstract class GuiGraphicsMixin {
|
||||
@Overwrite
|
||||
public void enableScissor(int x0, int y0, int x1, int y1) {
|
||||
double scale = Minecraft.getInstance().getWindow().getGuiScale();
|
||||
pushScissorRect((int) (scale * x0), (int) (scale * y0), (int) (scale * (x1 - x0)), (int) (scale * (y1 - y0)));
|
||||
}
|
||||
|
||||
@Overwrite
|
||||
public void disableScissor() {
|
||||
popScissorRect();
|
||||
}
|
||||
}
|
@ -430,7 +430,7 @@ class ItemMonitorBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matte
|
||||
check(this.settings.put(UUID.fromString(key), ItemMonitorPlayerSettings().also { it.deserializeNBT(settings.getCompound(key)) }) == null)
|
||||
}
|
||||
|
||||
craftingGrid.deserializeNBT(nbt["crafting_grid"])
|
||||
craftingGrid.deserializeNBT(nbt["crafting_grid"] as? CompoundTag)
|
||||
}
|
||||
|
||||
fun getSettings(ply: ServerPlayer): ItemMonitorPlayerSettings {
|
||||
|
@ -44,10 +44,6 @@ open class MatteryCraftingContainer private constructor(private val listener: Ma
|
||||
parent.deserializeNBT(nbt)
|
||||
}
|
||||
|
||||
fun deserializeNBT(nbt: Tag?) {
|
||||
parent.deserializeNBT(nbt as? CompoundTag)
|
||||
}
|
||||
|
||||
override fun clearContent() {
|
||||
parent.clearContent()
|
||||
}
|
||||
@ -112,7 +108,7 @@ open class MatteryCraftingContainer private constructor(private val listener: Ma
|
||||
return parent.countItem(p_18948_)
|
||||
}
|
||||
|
||||
override fun hasAnyOf(p_18950_: MutableSet<Item>): Boolean {
|
||||
override fun hasAnyOf(p_18950_: Set<Item>): Boolean {
|
||||
return parent.hasAnyOf(p_18950_)
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,7 @@
|
||||
"InventoryChangeTriggerMixin",
|
||||
"MixinPlayer",
|
||||
"HopperBlockEntityMixin",
|
||||
"DispenserBlockEntityMixin",
|
||||
"GuiGraphicsMixin"
|
||||
"DispenserBlockEntityMixin"
|
||||
],
|
||||
"client": [
|
||||
"MixinGameRenderer",
|
||||
|
Loading…
Reference in New Issue
Block a user