Jump to content

Recommended Posts

Posted

Hello again. I have this problem:

width=800 height=449https://dl.dropbox.com/u/100634244/2012-12-21_16.09.21.png[/img]

 

My Codes:

 

RENDER AS SNOWBALL

 

NO MODEL

 

ENTITY

 

package ***;

 

import net.minecraft.src.*;

 

public class EntityMagicBullet extends EntityThrowable

{

        public EntityMagicBullet(World world)

        {

                super(world);

        }      public EntityMagicBullet(World world, EntityLiving entityliving)

        {

                super(world, entityliving);

        }

        public EntityMagicBullet(World world, double d, double d1, double d2)

        {

                super(world, d, d1, d2);

        }      protected void onImpact(MovingObjectPosition movingobjectposition)

        {

                if (movingobjectposition.entityHit != null)

                {

                        if (!movingobjectposition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, thrower), 4));

                }

                for (int i = 0; i < 1; i++)

                {

                        worldObj.spawnParticle("portal", posX, posY, posZ, 0.0D, 0.0D, 0.0D);

                }

                {

                        setDead();

                }

        }

}

 

 

BASE MOD FILE

A lot of information, but I cut out only the main

	public void addRenderer(Map map)
  {
   map.put(net.smcrafting.src.EntityMagicBullet.class, new RenderSnowball(this.MagicBullet.getIconFromDamage(0)));
  }

	private void registerEntity2(Class <? extends Entity> entityClass, Render renderer, String entityName, String description, int id, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates) {
	  RenderingRegistry.registerEntityRenderingHandler(entityClass, renderer);
	  EntityRegistry.registerModEntity(EntityMummy.class, "Magic Bullet", 8002, this, 250, 5, false);
	  LanguageRegistry.instance().addStringLocalization("entity.Bullet" + entityName + ".name", description);
	 }

@Init
public void load(FMLInitializationEvent event){
registerEntity2(EntityMagicBullet.class, new RenderSnowball(0), "Magic Bullet", "Magic Bullet", 1, 64, 10, true);

 

CLIENT PROXY

  RenderingRegistry.registerEntityRenderingHandler(EntityMagicBullet.class, new RenderSnowball(BaseMod.MagicBullet.getIconFromDamage(0)));

 

Thank you for help

Posted

Well, this one is easy to fix:

 

map.put(net.smcrafting.src.EntityMagicBullet.class, new RenderSnowball(this.MagicBullet.getIconFromDamage(0)));

 

You said it to get icon index 0. If you go into RenderSnowBall, you can see that in doRender it uses: this.loadTexture("/gui/items.png");

And  icon index 0 in items.png is, you guessed it, a leather helmet.

 

So there's no other way then to create a custom render class (like RenderMagicBullet) and do this.loadTexture("your path here"); in the doRender method. (You can copy the RenderSnowBall class for this I guess...)

 

When you're done, don't forget to change

map.put(net.smcrafting.src.EntityMagicBullet.class, new RenderSnowball(this.MagicBullet.getIconFromDamage(0)));

to:

map.put(net.smcrafting.src.EntityMagicBullet.class, new RenderMagicBullet(this.MagicBullet.getIconFromDamage(0)));

Posted

Nothing has changed.

this.loadTexture("/SMCrafting/stealerslain/smcrafting/client/items.png");

+

public void addRenderer(Map map)
  {
   map.put(net.smcrafting.src.EntityMagicBullet.class, new RenderMagicBullet(this.MagicBullet.getIconFromDamage(0)));
  }

=

White Leather Helmet.

And yes, I create RenderMagicBullet class.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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