Jump to content

ISenseHostility

Members
  • Posts

    19
  • Joined

  • Last visited

Converted

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

Recent Profile Visitors

3118 profile views

ISenseHostility's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Hello, As the title states, my mod attempts to load the client-only LocalPlayer class on the dedicated server, which crashes the server. Here is the log: https://www.toptal.com/developers/hastebin/erokehabir.sql Here is the github link to the class I believe is causing the problem: https://github.com/ISenseHostility/EnchantableStaffs/blob/latest/src/main/java/isensehostility/enchantable_staffs/item/Staff.java Any help is appreciated.
  2. That sadly doesn't work, as it wants this constructor (bottom constructor): It should use the top contructor, which it does when I remove the second one: However, I need the second constructor, because it is used in the createArrow method: Any ideas as to why it is doing this?
  3. I seem to be overlooking something as I am getting an error I'm not sure how to fix, as I thought I did it correctly. public class EntityInit { private static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, PrimitiveStart.MODID); public static void initialize() { ENTITIES.register(FMLJavaModLoadingContext.get().getModEventBus()); } public static final RegistryObject<EntityType<BoneArrow>> BONE_ARROW = ENTITIES.register("bone_arrow", () -> EntityType.Builder .of(BoneArrow::new, MobCategory.MISC) .sized(0.5F, 0.5F) .clientTrackingRange(4) .updateInterval(20) .build(new ResourceLocation(PrimitiveStart.MODID, "bone_arrow").toString()) ); } Above code seems to have the following problem: This is the BoneArrow class in question: public class BoneArrow extends AbstractArrow { public BoneArrow(EntityType<? extends AbstractArrow> p_36721_, Level p_36722_) { super(p_36721_, p_36722_); } public BoneArrow(LivingEntity p_36718_, Level p_36719_) { super(EntityInit.BONE_ARROW.get(), p_36718_, p_36719_); } @Override protected ItemStack getPickupItem() { return new ItemStack(ItemInit.BONE_ARROW.get()); } } Any help is appreciated.
  4. 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!
  5. 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
  6. 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
  7. 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.
  8. I forgot to say, this fixed the attribute problem.
  9. 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.
  10. 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.
  11. Oh my god sorry for wasting your time I see the spelling mistake in global_loot_modifiers.json
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.