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


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About henzo800

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for your quick reply spiritfilled. However, I'm still not sure how to load an OBJ model. My entity seems to be rendering Minecraft's included models just fine but I want to load an OBJ and MTL stored in the resources. Is there some way to convert an OBJ to parts. Although shouldn't I use the loader outlined in the forge doc's. Here is my renderer and model so far. public class CarEntityRender extends MobRenderer<CarEntity, CarModel> { public CarEntityRender(EntityRendererManager renderManagerIn) { super(renderManagerIn, new CarModel(), 1.0F); } @
  2. Hi all, I am trying to create a custom model for my entity. I am trying to load an obj model. I know I need to use the OBJLoader class during model registration but I cant seem to find a consistent way to do this as it seems to vary between entity types. So far I have a class extending the EntityModel and my entity as a generic. I assume this can then be put into a mob renderer but, again I'm not sure and I just seem to be getting lots of errors. I'm using the latest stable release 36.1.0. Any help would be greatly appreciated.
  3. Too easy, here's the the code if anyone needs it. @Override public IPacket<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } EDIT: Fixed as per diesieben07's reply
  4. Hi, I'm trying to create an entity based of a minecart but the entity appears to be invisible and unable to be interacted with. I'm not seeing any errors in the debug log. I have included my entity and renderer. I have not added any attributes to this entity as I don't think there is any way to add them to minecarts. I added a message during ticks that appears when its alive but the minecart itself does not. public class TrainEntity extends AbstractMinecartEntity { public TrainEntity(EntityType<?> p_i50126_1_, World p_i50126_2_) { super(p_i50126_1_, p_i50126_2_); } public Tra
  5. I used diesieben07 suggestion and got it all working. I have included my completed entity for anyone who needs it. Entity Class: public class TestEntity extends CowEntity { public static final String REG = "simple_entity"; public TestEntity(EntityType<? extends CowEntity> p_i48567_1_, World p_i48567_2_) { super(p_i48567_1_, p_i48567_2_); STAR.LOGGER.debug("STAR - Entity Constructed"); } public static AttributeModifierMap.MutableAttribute createAttributes() { return MobEntity.createMobAttributes().add(Attributes.MAX_HEALTH, 0.5D) .add(Attributes.M
  6. Ha, lol, I got confused between galloping and sprinting. Turns out horses gallop not sprint. Anyway I just override the gallop method instead and it works a treat. Thanks for your help
  7. Ok, so I have created my modifier like so, private static final UUID CAR_SPEED_MODIFIER_SPRINTING_UUID = UUID.fromString("889db856-9d63-45c8-8f9a-b9ac68b509a3"); private static final AttributeModifier CAR_SPEED_MODIFIER_SPRINTING = new AttributeModifier(CAR_SPEED_MODIFIER_SPRINTING_UUID, "Sprinting speed boost", 5.0D , AttributeModifier.Operation.MULTIPLY_TOTAL); //constructors and whatnot @Override //overriding net.minecraft.entity.LivingEntity.setSprinting public void setSprinting(boolean p_70031_1_) { this.setSharedFlag(3, p_70031_1_); ModifiableAttributeInstance modifiableat
  8. Hi, I'm trying to change the sprinting modifier for an entity extended from a HorseEntity. I have tried overriding the setSprinting method from LivingEntity like so. private static final UUID SPEED_MODIFIER_SPRINTING_UUID = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D"); private static final AttributeModifier SPEED_MODIFIER_SPRINTING = new AttributeModifier(SPEED_MODIFIER_SPRINTING_UUID, "Sprinting speed boost", 5.0D , AttributeModifier.Operation.MULTIPLY_TOTAL); @Override public void setSprinting(boolean p_70031_1_) { this.setSharedFlag(3, p_70031_1_); ModifiableAttri
  9. Ok, so I seem to have registered goals for the entity but I still have the problem that whenever I spawn it the game crashes. Here is my entity class so far. public class TestEntity extends CowEntity { public static final String REG = "simple_entity"; public static final EntityType<TestEntity> TYPE = //Entity type builder public static final AttributeModifierMap MAP = //Entity Attribute builder public TestEntity(EntityType<? extends CowEntity> p_i48567_1_, World p_i48567_2_) { super(p_i48567_1_, p_i48567_2_); Main.LOGGER.debug("STAR - Entity Constructed"); this.set
  10. Hi again, I'm trying to create a custom living entity but I keep running into this issue that causes a crash due to a ticking entity. Crash: [12:31:15] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception net.minecraft.crash.ReportedException: Ticking entity at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:855) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:787) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.
  11. Thanks for all your help. Here is the method that seems to register the attributes correctly. Entity Class: public class TestEntity extends CowEntity { public static final String REG = "simple_entity"; public static final EntityType<TestEntity> TYPE = EntityType.Builder.<TestEntity>of(TestEntity::new, EntityClassification.MISC) .sized(0.98F, 0.7F) .clientTrackingRange(8) .build(REG); public static final AttributeModifierMap MAP = AttributeModifierMap.builder().add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 20.0) .add(Attributes.FOLLOW_R
  12. Okay, so I've tried to add it as a subscribe event but it does not appear to exist. I'm using forge-1.16.4-35.1.4 in the eclipse IDE. Here is the event I created: @SubscribeEvent public void entityAttributeCreationEvent(EntityAttributeCreationEvent event) { //EntityAttributeCreateEvent cannot be resolved to a type } There don't seem to be any import candidates.
  13. Hi, I am trying to add a custom entity, however whenever I try to summon the entity I keep receiving the following error. [10:19:35] [Server thread/WARN] [minecraft/EntityType]: Exception loading entity: java.lang.NullPointerException: null at net.minecraft.entity.ai.attributes.AttributeModifierManager.getAttributeValue(AttributeModifierManager.java:67) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraft.entity.LivingEntity.getAttributeValue(LivingEntity.java:1849) ~[forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:
  • Create New...

Important Information

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