Skip to content

Commit

Permalink
change prefix and naming of mixin methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Aug 26, 2024
1 parent 500367a commit 3d2673d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@Mixin(ClientPacketListener.class)
public class ClientPacketListenerMixin {
@Inject(method = "handleUpdateTags", at = @At("RETURN"))
private void runClientTagUpdateEvent(ClientboundUpdateTagsPacket packet, CallbackInfo ci) {
private void almostunified$onClientTagsUpdate(ClientboundUpdateTagsPacket packet, CallbackInfo ci) {
ClientTagUpdateEvent.invoke();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class RecipeManagerMixin {
@Shadow @Final private HolderLookup.Provider registries;

@Inject(method = "apply(Ljava/util/Map;Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)V", at = @At("HEAD"))
private void runTransformation(Map<ResourceLocation, JsonElement> recipes, ResourceManager resourceManager, ProfilerFiller profiler, CallbackInfo ci) {
private void almostunified$onRecipeReload(Map<ResourceLocation, JsonElement> recipes, ResourceManager resourceManager, ProfilerFiller profiler, CallbackInfo ci) {
try {
AlmostUnifiedCommon.onRecipeManagerReload(recipes, registries);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TagLoaderMixin {
@Shadow @Final private String directory;

@Inject(method = "build(Ljava/util/Map;)Ljava/util/Map;", at = @At("RETURN"))
private <T> void onCreateLoadResult(Map<ResourceLocation, List<TagLoader.EntryWithSource>> map, CallbackInfoReturnable<Map<ResourceLocation, Collection<T>>> cir) {
private <T> void almostunified$onTagUpdate(Map<ResourceLocation, List<TagLoader.EntryWithSource>> map, CallbackInfoReturnable<Map<ResourceLocation, Collection<T>>> cir) {
if (directory.equals("tags/item")) {
try {
Map<ResourceLocation, Collection<Holder<Item>>> tags = Utils.cast(cir.getReturnValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ArmorItemMixin {
@Shadow @Final protected Holder<ArmorMaterial> material;

@Inject(method = "isValidRepairItem", at = @At("HEAD"), cancellable = true)
private void unified$repairUnification(ItemStack stack, ItemStack repairCandidate, CallbackInfoReturnable<Boolean> cir) {
private void almostunified$onArmorRepair(ItemStack stack, ItemStack repairCandidate, CallbackInfoReturnable<Boolean> cir) {
AlmostUnifiedRuntime runtime = AlmostUnified.INSTANCE.getRuntime();
if (runtime == null) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TieredItemMixin {
@Shadow @Final private Tier tier;

@Inject(method = "isValidRepairItem", at = @At("HEAD"), cancellable = true)
private void unified$repairUnification(ItemStack stack, ItemStack repairCandidate, CallbackInfoReturnable<Boolean> cir) {
private void almostunified$onItemRepair(ItemStack stack, ItemStack repairCandidate, CallbackInfoReturnable<Boolean> cir) {
AlmostUnifiedRuntime runtime = AlmostUnified.INSTANCE.getRuntime();
if (runtime == null) return;

Expand Down

0 comments on commit 3d2673d

Please sign in to comment.