Skip to content

Commit

Permalink
refactor(loot): rename serializers
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Apr 4, 2022
1 parent 926dd1a commit 678e841
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Expand Up @@ -17,6 +17,6 @@ private static RegistryObject<LootItemConditionType> register(String id, Seriali
return LOOT_CONDITION_TYPES.register(id, () -> new LootItemConditionType(serializer));
}

public static final RegistryObject<LootItemConditionType> MOD_LOADED = register("mod_loaded", new ModLoadedCondition.SerializerX());
public static final RegistryObject<LootItemConditionType> MOD_LOADED = register("mod_loaded", new ModLoadedCondition.Serializer());

}
Expand Up @@ -18,7 +18,7 @@ private static RegistryObject<LootItemFunctionType> register(String id, Serializ
return LOOT_FUNCTION_TYPES.register(id, () -> new LootItemFunctionType(serializer));
}

public static final RegistryObject<LootItemFunctionType> SET_RANDOM_POTION = register("set_random_potion", new SetRandomPotionFunction.SerializerX());
public static final RegistryObject<LootItemFunctionType> SET_CUSTOM_EFFECTS = register("set_custom_effects", new SetCustomEffectsFunction.SerializerX());
public static final RegistryObject<LootItemFunctionType> SET_RANDOM_POTION = register("set_random_potion", new SetRandomPotionFunction.Serializer());
public static final RegistryObject<LootItemFunctionType> SET_CUSTOM_EFFECTS = register("set_custom_effects", new SetCustomEffectsFunction.Serializer());

}
Expand Up @@ -39,7 +39,7 @@ protected ItemStack run(ItemStack stack, LootContext ctx) {
}


public static class SerializerX extends Serializer<SetCustomEffectsFunction> {
public static class Serializer extends LootItemConditionalFunction.Serializer<SetCustomEffectsFunction> {

public void serialize(JsonObject json, SetCustomEffectsFunction instance, JsonSerializationContext ctx) {}

Expand Down
Expand Up @@ -62,7 +62,7 @@ private static Potion getRandomPotion() {
}


public static class SerializerX extends Serializer<SetRandomPotionFunction> {
public static class Serializer extends LootItemConditionalFunction.Serializer<SetRandomPotionFunction> {

public void serialize(JsonObject json, SetRandomPotionFunction instance, JsonSerializationContext ctx) {}

Expand Down
Expand Up @@ -6,7 +6,6 @@
import org.auioc.mods.arnicalib.server.loot.AHLootItemConditions;
import net.minecraft.util.GsonHelper;
import net.minecraft.world.level.storage.loot.LootContext;
import net.minecraft.world.level.storage.loot.Serializer;
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType;
import net.minecraftforge.fml.ModList;
Expand All @@ -30,7 +29,7 @@ public LootItemConditionType getType() {
}


public static class SerializerX implements Serializer<ModLoadedCondition> {
public static class Serializer implements net.minecraft.world.level.storage.loot.Serializer<ModLoadedCondition> {

@Override
public void serialize(JsonObject json, ModLoadedCondition instance, JsonSerializationContext ctx) {}
Expand Down

0 comments on commit 678e841

Please sign in to comment.