Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Location
  • Personal Text
    I feel like I'm doing something wrong, but without the 'I feel like' part.

Recent Profile Visitors

579 profile views

ISenseHostility's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. You're right, the event wasn't fired. Turns out it was fired on the mod event bus instead of the forge one. Thank you!
  2. Hello, I have been trying to make a plant that has transparent parts. I'm pretty sure I need to set the RenderType to cutout for this, but what I have currently isn't doing anything. I'm pretty sure this is wrong: https://hastebin.com/focitibabo.swift Thanks
  3. Hello, I have been getting the error stated in the title when trying to start a new project on 1.17.1 The full error: I have attempted to go to this file location manually, but the 'bundled_repo' folder doesn't exist. I'm not sure where the problem is, so if I need to send anything please tell me. Thank you
  4. Here is a clip to explain: https://streamable.com/5xjofu Basically, when I walk out of range, I get a NullPointerException at LookController#setLookAt when it's being called from MeleeAttackGoal#tick. Here is the log: https://privatebin.net/?05d1c1f8826d8bb2#79SvshoEzUji3NxL2oqTR2fi3CVzq66JPfps4HV1xTDb Here is the class of the entity in question: package com.isensehostility.entity_testing.entities; import net.minecraft.entity.*; import net.minecraft.entity.ai.attributes.AttributeModifierMap; import net.minecraft.entity.ai.attributes.Attributes; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import javax.annotation.Nullable; public class GobletEntity extends CreatureEntity { public GobletEntity(EntityType<? extends CreatureEntity> type, World worldIn) { super(type, worldIn); } @Override protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(7, new WaterAvoidingRandomWalkingGoal(this, 1.0d)); this.goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.3D, true)); this.goalSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true)); } public static AttributeModifierMap.MutableAttribute setAttributes() { return MobEntity.createMobAttributes() .add(Attributes.MAX_HEALTH, 1.0D) .add(Attributes.MOVEMENT_SPEED, 0.25D) .add(Attributes.ATTACK_DAMAGE, 2.0D); } } I'm not sure what is causing the error, or how to fix it. Any help is appreciated.
  5. I forgot to say, this fixed the attribute problem.
  6. I am having a problem with entity attributes. I feel like have set them correctly, but when I launch the game I get multiple errors stating that I, in fact, have not. I'm not sure where the problem lies, so I was hoping someone could help me. Here is the log: https://privatebin.net/?0938f12eb189ae59#H5EKLWjp8BL2iZ6tAgVFmAyheUSmJDVhBgMcbHS12G79 Here is the entity class: Here is the registry class: Here is the main class: If more info is needed tell me and I will add it.
  7. It works now, I made a stupid spelling mistake in the global_loot_modifiers.json so it wasnt registering. Thank you for trying to help despite my dumb mistake.
  8. Oh my god sorry for wasting your time I see the spelling mistake in global_loot_modifiers.json
  9. global_loot_modifiers.json: { "replace": false, "entries": [ "enchantment_enchancements:midas_modifier" ] }
  10. Oops, I forgot to start the world there. This should be the correct one: https://privatebin.net/?642aefdf9db0e663#2KBFD9ZU3o57RkDcFYQQHyjU9p1yDpAtrK4B7NV3sVYu
  11. Link to a pastebin for the full log: https://privatebin.net/?88a5d5a33b23f589#3FDdN327mqNbckkHUsejGkMUuEVJcKhzbQrJ8qJbbsEp
  12. 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.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.