-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: SoundEntryProvider uses the wrong modid if you don't call it from GT. * fix: material tooltips on non-GT items. * fix: add ChemicalHelper to KJS bindings * fix: stone can be crafted to dust in crafting table, other issues like that * fix: tools only have "digger" enchantments * fix #488 * try to fix #458 * chore: changelog, version bump * revert fix. didn't fix. * feat: fluid tooltips (untested this laptop is too slow) * feat: fluid tooltips (untested this laptop is too slow) * final fixes to stuff stop adding tooltips to other mods' items as a temp fix to it being _really_ slow to compute * todo comment Co-authored-by: Mikerooni <[email protected]> * Update common/src/main/java/com/gregtechceu/gtceu/api/data/chemical/ChemicalHelper.java Co-authored-by: Mikerooni <[email protected]> --------- Co-authored-by: Mikerooni <[email protected]>
- Loading branch information
Showing
23 changed files
with
293 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# ChangeLog | ||
|
||
* fix feature order cycle on fabric | ||
* make some API methods more addon dev friendly | ||
* add tags for all purified/refined ores | ||
* fix tools only accepting digger enchantments | ||
* fix stone, netherrack, hay being craftable to 9 dust in a crafting table | ||
* fix machines sometimes crashing when auto-output is toggled rapidly, resulting in it being enabled but no output side being set | ||
* fix SoundEntryProvider always placing the JSON in /assets/gtceu/sounds.json | ||
* add material tooltips for non-GT items | ||
* add KJS binding for ChemicalHelper |
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
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
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
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
44 changes: 44 additions & 0 deletions
44
common/src/main/java/com/gregtechceu/gtceu/core/mixins/MixinEnchantmentCategory.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,44 @@ | ||
package com.gregtechceu.gtceu.core.mixins; | ||
|
||
import com.gregtechceu.gtceu.api.item.GTToolItem; | ||
import com.gregtechceu.gtceu.api.item.tool.GTToolType; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.enchantment.EnchantmentCategory; | ||
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.CallbackInfoReturnable; | ||
|
||
@Mixin(targets = {"net.minecraft.world.item.enchantment.EnchantmentCategory$6", | ||
"net.minecraft.world.item.enchantment.EnchantmentCategory$7", | ||
"net.minecraft.world.item.enchantment.EnchantmentCategory$9", | ||
"net.minecraft.world.item.enchantment.EnchantmentCategory$11", | ||
"net.minecraft.world.item.enchantment.EnchantmentCategory$13"}) | ||
public class MixinEnchantmentCategory { | ||
|
||
@Inject(method = "canEnchant(Lnet/minecraft/world/item/Item;)Z", at = @At("RETURN"), cancellable = true) | ||
private void gtceu$canEnchantTool(Item item, CallbackInfoReturnable<Boolean> cir) { | ||
if (item instanceof GTToolItem gtItem) { | ||
cir.setReturnValue(switch ((EnchantmentCategory)(Object)this) { | ||
case WEAPON -> gtItem.getToolType() == GTToolType.SWORD || | ||
gtItem.getToolType() == GTToolType.BUTCHERY_KNIFE || | ||
gtItem.getToolType() == GTToolType.KNIFE; | ||
case DIGGER -> gtItem.getToolType() == GTToolType.AXE || | ||
gtItem.getToolType() == GTToolType.PICKAXE || | ||
gtItem.getToolType() == GTToolType.SHOVEL || | ||
gtItem.getToolType() == GTToolType.HOE || | ||
gtItem.getToolType() == GTToolType.MINING_HAMMER || | ||
gtItem.getToolType() == GTToolType.SAW || | ||
gtItem.getToolType() == GTToolType.HARD_HAMMER || | ||
gtItem.getToolType() == GTToolType.SOFT_MALLET || | ||
gtItem.getToolType() == GTToolType.WRENCH || | ||
gtItem.getToolType() == GTToolType.FILE || | ||
gtItem.getToolType() == GTToolType.CROWBAR || | ||
gtItem.getToolType() == GTToolType.SCREWDRIVER || | ||
gtItem.getToolType() == GTToolType.SCYTHE || | ||
gtItem.getToolType() == GTToolType.PLUNGER; | ||
default -> cir.getReturnValueZ(); | ||
}); | ||
} | ||
} | ||
} |
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.