• Posts

    • I was wondering if anyone knows what is causing this error / how to fix it.   The full error:   The modifier JSON: { "type": "enchantment_enhancements:midas_modifier", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "enchantment_enhancements:midas", "levels": { "min": 1 } } ] } } ], "curseItem": "minecraft:gold_nugget" }   How I'm registering the modifier serializer: package com.isensehostility.enchantment_enhancements.registries; import com.isensehostility.enchantment_enhancements.EnchantmentEnhancements; import com.isensehostility.enchantment_enhancements.loot_modifiers.MidasEnchantmentModifier; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.IForgeRegistry; @Mod.EventBusSubscriber(modid = EnchantmentEnhancements.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class SerializerRegistry { @SubscribeEvent public static void registerModifierSerializers(final RegistryEvent.Register< GlobalLootModifierSerializer<?>> event) { IForgeRegistry<GlobalLootModifierSerializer<?>> registry = event.getRegistry(); register(registry, new MidasEnchantmentModifier.Serializer(), "midas_modifier"); } private static void register(IForgeRegistry<GlobalLootModifierSerializer<?>> registry, GlobalLootModifierSerializer<?> serializer, String name) { registry.register(serializer.setRegistryName(EnchantmentEnhancements.locate(name))); } }   The modifier itself: package com.isensehostility.enchantment_enhancements.loot_modifiers; import com.google.gson.JsonObject; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.loot.LootContext; import net.minecraft.loot.conditions.ILootCondition; import net.minecraft.util.JSONUtils; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.common.loot.LootModifier; import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import java.util.List; public class MidasEnchantmentModifier extends LootModifier { private final Item curseItem; public MidasEnchantmentModifier(ILootCondition[] conditionsIn, Item nugget) { super(conditionsIn); this.curseItem = nugget; } @Nonnull @Override public List<ItemStack> doApply(List<ItemStack> generatedLoot, LootContext context) { generatedLoot.add(new ItemStack(curseItem)); return generatedLoot; } public static class Serializer extends GlobalLootModifierSerializer<MidasEnchantmentModifier> { @Override public MidasEnchantmentModifier read(ResourceLocation name, JsonObject object, ILootCondition[] conditionsIn) { Item gold_nugget = ForgeRegistries.ITEMS.getValue(new ResourceLocation(JSONUtils.getString(object, "curseItem"))); return new MidasEnchantmentModifier(conditionsIn, gold_nugget); } @Override public JsonObject write(MidasEnchantmentModifier instance) { return null; } } }   I thought I did everything correctly, but clearly that is not the case. Any help is appreciated.
    • I believe, someone correct if I am wrong, but Pixelmon was taken down by the request of Nintendo themselves. And that the mod should not be distributed. 
    • when i click install on the Pixelmon modpack it gets to 42% and mod 3 out of 7 and then gives me the error message: Timeout attempting to download: "https://edge.forgecdn.net/files/3072/298/pixelmon-1.12.2-8.1.2-universal.jar"   when i posted this i only got a response saying   "1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support." and the comments were closed after that so i could not ask any questions. This was not helpful at all. responding to what they said though: i had just downloaded minecraft yesterday on this new pc, and i have the "latest release" as one of the installations.
    • Hey, I'm trying to make an animated player model using GeckoLib. For that, the player has to implement the interface "IAnimatable". How do I overwrite the player class so I can implement it?  This is what I've tried package me.cirex.titans.entity; import com.mojang.authlib.GameProfile; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import software.bernie.geckolib3.core.IAnimatable; import software.bernie.geckolib3.core.manager.AnimationData; import software.bernie.geckolib3.core.manager.AnimationFactory; public class CustomPlayerEntity extends PlayerEntity implements IAnimatable { public CustomPlayerEntity(World p_i241920_1_, BlockPos p_i241920_2_, float p_i241920_3_, GameProfile p_i241920_4_) { super(p_i241920_1_, p_i241920_2_, p_i241920_3_, p_i241920_4_); System.out.println("Player was created"); } @Override public boolean isSpectator() { return false; } @Override public boolean isCreative() { return false; } @Override public void tick() { System.out.println("test"); super.tick(); } @Override public void registerControllers(AnimationData data) { } @Override public AnimationFactory getFactory() { return null; } } package me.cirex.titans.registry; import me.cirex.titans.entity.CustomPlayerEntity; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class TitanRegistry { public static final EntityType<?> playerType = EntityType.Builder .<CustomPlayerEntity>create(EntityClassification.MISC).disableSerialization().disableSummoning() .size(0.6F, 1.8F).trackingRange(32).func_233608_b_(2).build("minecraft:player").setRegistryName("minecraft:player"); @SubscribeEvent public void onRegisterEntity(RegistryEvent.Register<EntityType<?>> event) { if(event.getName().getPath().equalsIgnoreCase("player")) { event.setCanceled(true); } event.getRegistry().register(playerType); } }  
  • Topics

  • Who's Online (See full list)