Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Asweez

Forge Modder
  • Joined

  • Last visited

Everything posted by Asweez

  1. Ok it won't render. Here's what I have: Render: package com.apmods.swbf2.client; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import com.apmods.swbf2.entity.EntityGrenade; import com.apmods.swbf2.main.Battlefront; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderGrenade extends Render { private static final ResourceLocation arrowTextures = new ResourceLocation(Battlefront.MODID + ":textures/entity/grenade.png"); private static RenderItem itemRender = new RenderItem(); public ModelGrenade model; public RenderGrenade(){ model = new ModelGrenade(); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityGrenade entity, double par1, double par2, double par3, float par4, float par5) { this.bindTexture(arrowTextures); model.cube.showModel = true; model.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityGrenade p_110775_1_) { return arrowTextures; } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.getEntityTexture((EntityGrenade)p_110775_1_); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.doRender((EntityGrenade)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } } Model: package com.apmods.swbf2.client; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelGrenade extends ModelBase{ public ModelRenderer cube; public ModelGrenade(){ this.cube = new ModelRenderer(this, 0, 0); this.cube.addBox(-2.5f, 0, -2.5f, 5, 5, 5, 1); } public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { this.cube.render(p_78088_7_); } }
  2. I want to make one of my entities just a cube with a 5x5 px texture. How would I do that?
  3. Nope none of that worked Heres the code: public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase target, EntityLivingBase attacker) { if(attacker.isSprinting()){ System.out.println("sprint"); target.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer)attacker), 15); } return true; } "sprint" never comes up in the console. And I don't need to damage the sword so that's why that's not there.
  4. Could you give a code example because I'm not very experienced with Vectors and that kind of stuff?
  5. How do I make it farther out?
  6. I have a sword and want it to do more damage to something if the player hits it while the player is sprinting. How would I do so?
  7. Yes, there is already a thread for this. I was wondering, however, how I would make the second projectile offset from the player to create a faster fire effect? link to the other thread http://www.minecraftforge.net/forum/index.php?topic=21851.0
  8. I get all of that, but can someone show me what to do to open the Gui and what to put in my GuiHandler because that's where I'm confused
  9. Then how am I supposed to send the other player variable to the Guihandler which creates the container?
  10. Please anyone I need to know this
  11. No what method would make the GUI open?
  12. How would I make the game show a container with another players inv slots? And why would I need a GuiHandler?
  13. Anyone know? I'm stuck here with my mod and I can't do much right now until I get this solved.
  14. Exactly what the title says. How would I do so?
  15. Where do I put the GuiContainer and Container?
  16. Ok so I have an entity and whenever it hits another player I want it to show the player that created the entity to see, but not interact with, the hit player's inventory. I have it set up so the entity onImpact calls MainClass.proxy.method() and in that method in my client proxy I open a guiScreen for the players inventory. However, when I am on a server with another user, whenever the entity hits the other player, it calls the commonProxy method. How would I make this work?
  17. Ahh thanks everyone! It works now!
  18. Ok so i have a Tile Entity and block to go with it. I want one of my entities to set that block, then modify something in it's tile Entity. It keeps coming up with a NullPointerException. Code: Block: Relevant Entity code: TileEntity: Crash Report:
  19. No but how do I identify an entity based on its UUID
  20. How would I set the target based on UUID?
  21. I have an bird entity that I want to be able to attack other entities. I know how to do this, but I want the player to be able to change which entity nearby birds will attack. How would I make a sort of NBT that can hold the entity field that the player selects?
  22. Static, because you don't know, is a field/method that is available anywhere even if you don't have an instance of that class. And NBT Is not necessary because all instances of that sword will set fire. However, if you want some swords to set fire and others to do lightning but use the same item, then you should use NBT.
  23. Asweez replied to Asweez's topic in Modder Support
    Oops. Yea that solved it
  24. Asweez posted a topic in Modder Support
    So I made an entity that I create with a packet. I have the entity exploding when it hits the ground. It works, and all the particles and sound go off and the blocks are deleted. But whenever I try to go into the exploded area, it doesn't let me and the blocks that look like they were exploded come back as I get near them. Anyone know what's causing this? Code: @Override protected void onImpact(MovingObjectPosition mop) { this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3.0f, true); }
  25. Asweez replied to Asweez's topic in Modder Support
    Wow thanks!! That worked! Thanks for all the info everyone and helping me to understand how all this stuff works

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.