-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and forge 1.20.2 support
- Loading branch information
Showing
105 changed files
with
4,576 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
out | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...-1.18.2/src/main/java/org/anti_ad/mc/common/vanilla/accessors/menu/ItemCombinerMenuAcc.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Inventory Profiles Next | ||
* | ||
* Copyright (c) 2023 Plamen K. Kosseff <p.kosseff@gmail.com> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.anti_ad.mc.common.vanilla.accessors.menu | ||
|
||
import net.minecraft.client.gui.screen.ingame.AnvilScreen | ||
import net.minecraft.screen.ForgingScreenHandler | ||
|
||
|
||
@Suppress("UnusedReceiverParameter") | ||
val ForgingScreenHandler.`(inputSlotIndices)` | ||
get() = listOf(ForgingScreenHandler.FIRST_INPUT_SLOT_INDEX, ForgingScreenHandler.SECOND_INPUT_SLOT_INDEX) | ||
|
||
val AnvilScreen.`(nameField)` | ||
get() = this.nameField | ||
|
||
var AnvilScreen.`(nameFieldText)` | ||
get() = this.nameField.text | ||
set(value) { | ||
this.nameField.text = value | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...orms/fabric-1.18.2/src/main/java/org/anti_ad/mc/ipnext/mixin/MixinAnvilScreenHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Inventory Profiles Next | ||
* | ||
* Copyright (c) 2023 Plamen K. Kosseff <p.kosseff@gmail.com> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.anti_ad.mc.ipnext.mixin; | ||
|
||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.screen.AnvilScreenHandler; | ||
import org.anti_ad.mc.common.vanilla.Vanilla; | ||
import org.anti_ad.mc.ipnext.event.AnvilHandler; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(AnvilScreenHandler.class) | ||
public class MixinAnvilScreenHandler { | ||
|
||
@Inject(at = @At("HEAD"), method = "Lnet/minecraft/screen/AnvilScreenHandler;onTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V") | ||
public void onTakeOutputPre(PlayerEntity player, ItemStack stack, CallbackInfo ci) { | ||
if (Vanilla.INSTANCE.mc().isOnThread()) { | ||
AnvilHandler.INSTANCE.onTakeOutPre((AnvilScreenHandler) ((Object)this)); | ||
} | ||
} | ||
|
||
@Inject(at = @At("TAIL"), method = "Lnet/minecraft/screen/AnvilScreenHandler;onTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V") | ||
public void onTakeOutputPost(PlayerEntity player, ItemStack stack, CallbackInfo ci) { | ||
if (Vanilla.INSTANCE.mc().isOnThread()) { | ||
AnvilHandler.INSTANCE.onTakeOutPost((AnvilScreenHandler) ((Object)this)); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ic-1.19/src/main/java/org/anti_ad/mc/common/vanilla/accessors/menu/ItemCombinerMenuAcc.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Inventory Profiles Next | ||
* | ||
* Copyright (c) 2023 Plamen K. Kosseff <p.kosseff@gmail.com> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.anti_ad.mc.common.vanilla.accessors.menu | ||
|
||
import net.minecraft.client.gui.screen.ingame.AnvilScreen | ||
import net.minecraft.screen.ForgingScreenHandler | ||
|
||
|
||
@Suppress("UnusedReceiverParameter") | ||
val ForgingScreenHandler.`(inputSlotIndices)` | ||
get() = listOf(ForgingScreenHandler.FIRST_INPUT_SLOT_INDEX, ForgingScreenHandler.SECOND_INPUT_SLOT_INDEX) | ||
|
||
val AnvilScreen.`(nameField)` | ||
get() = this.nameField | ||
|
||
var AnvilScreen.`(nameFieldText)` | ||
get() = this.nameField.text | ||
set(value) { | ||
this.nameField.text = value | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
platforms/fabric-1.19/src/main/java/org/anti_ad/mc/ipnext/mixin/MixinAnvilScreenHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Inventory Profiles Next | ||
* | ||
* Copyright (c) 2023 Plamen K. Kosseff <p.kosseff@gmail.com> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.anti_ad.mc.ipnext.mixin; | ||
|
||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.screen.AnvilScreenHandler; | ||
import org.anti_ad.mc.common.vanilla.Vanilla; | ||
import org.anti_ad.mc.ipnext.event.AnvilHandler; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(AnvilScreenHandler.class) | ||
public class MixinAnvilScreenHandler { | ||
|
||
@Inject(at = @At("HEAD"), method = "Lnet/minecraft/screen/AnvilScreenHandler;onTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V") | ||
public void onTakeOutputPre(PlayerEntity player, ItemStack stack, CallbackInfo ci) { | ||
if (Vanilla.INSTANCE.mc().isOnThread()) { | ||
AnvilHandler.INSTANCE.onTakeOutPre((AnvilScreenHandler) ((Object)this)); | ||
} | ||
} | ||
|
||
@Inject(at = @At("TAIL"), method = "Lnet/minecraft/screen/AnvilScreenHandler;onTakeOutput(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)V") | ||
public void onTakeOutputPost(PlayerEntity player, ItemStack stack, CallbackInfo ci) { | ||
if (Vanilla.INSTANCE.mc().isOnThread()) { | ||
AnvilHandler.INSTANCE.onTakeOutPost((AnvilScreenHandler) ((Object)this)); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...-1.20.2/src/main/java/org/anti_ad/mc/common/vanilla/accessors/menu/ItemCombinerMenuAcc.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Inventory Profiles Next | ||
* | ||
* Copyright (c) 2023 Plamen K. Kosseff <p.kosseff@gmail.com> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.anti_ad.mc.common.vanilla.accessors.menu | ||
|
||
import net.minecraft.client.gui.screen.ingame.AnvilScreen | ||
import net.minecraft.screen.ForgingScreenHandler | ||
|
||
val ForgingScreenHandler.`(inputSlotIndices)` | ||
get() = this.inputSlotIndices | ||
|
||
val AnvilScreen.`(nameField)` | ||
get() = this.nameField | ||
|
||
var AnvilScreen.`(nameFieldText)` | ||
get() = this.nameField.text | ||
set(value) { | ||
this.nameField.text = value | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.