Jump to content

Eastonium

Members
  • Posts

    151
  • Joined

  • Last visited

Everything posted by Eastonium

  1. I don't need to be able to use 2 different weapons at once, just the same weapon in both hands when you're using it. Is there a simple way to do this?
  2. I need to be able to have the powered creeper effect on the player using the Player Render event, but I don't have very much experience with Rendering. DON'T SEND ME A LINK TO 3D ARMOR. It needs to be in effect while wearing armor, but it can't be from the armor itself. (I've tried that already.)
  3. I just needs to be a biped model. Not custom rendered armor. It also needs to have the powered Creeper effects to it. Please, don't send me a link to a 3D armor tutorial.
  4. I need to be able to render a biped model on the player every time the player is rendered, or at least when armor is normally rendered. I think I need my own renderer file, but I'm really not sure. Here's what I have so far. @SubscribeEvent public void renderOnPlayerArmor(RenderPlayerEvent.SetArmorModel event) {} And I have registered the file this is in for event subscribing.
  5. Forge could really use a hook that allows you to change mobs sizes. There's the setSize method in Entity already, but it's protected. If that could be hooked and able to be used outside of the classes that extend Entity, that would be great!
  6. I'm trying to spawn an entity in the world (a vanilla mob), but I need to be able to change the size of it when it spawns. the setSize method is protected, so I can't use that. I've tested a bit with the myEntitySize method that comes with forge, but it doesn't seem to change anything. I'm using a basic Entity entity = EntityList.createEntityByID(entityID, worldObj); worldObj.spawnEntityInWorld(entity); way of doing things. Does someone know how to do this?
  7. Thank you soo much! It worked perfectly! I had tried to do something similar, but I didn't know about the NBT compound thing, so that's what I needed! Thanks again! Case Solved!
  8. I have a throwable item, and when the entity that you get from throwing the item hits the ground, it needs to drop the exact item that you threw. I already can spawn a normal ItemStack, but it doesn't have NBT data or anything from my addInformation in my Item class. This is my line to throw the entity in my Item file: world.spawnEntityInWorld(new EntityKanokaTeleportation(world, entityPlayer)); and Here's my Entity File: package com.eastonium.bionicle.kanoka; import com.eastonium.bionicle.Bionicle; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.event.entity.living.EnderTeleportEvent; public class EntityKanokaTeleportation extends EntityThrowable { public EntityKanokaTeleportation(World par1World) { super(par1World); } public EntityKanokaTeleportation(World par1World, EntityLivingBase par2EntityLivingBase) { super(par1World, par2EntityLivingBase); } public EntityKanokaTeleportation(World par1World, double par2, double par4, double par6) { super(par1World, par2, par4, par6); } /** * Called when this EntityThrowable hits a block or entity. */ protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { if (!this.worldObj.isRemote) { ItemStack discDrop = new ItemStack(Bionicle.kanokaTeleportation); //This doesn't have any NBT data when it is dropped if(this.worldObj.getGameRules().getGameRuleBooleanValue("doTileDrops") && par1MovingObjectPosition.entityHit == null){ this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, discDrop)); } this.setDead(); } } } is there a way I can send the info from the item I threw into the entity so it knows what to spawn as the new item? And how?
  9. I actually ended up figuring something out, I ended up not using a random number, but anyways. you could call this thread SOLVED.
  10. My texture was working, but when i craft it and put it in my inventory it changes again, but doesn't change after that.
  11. Could someone answer my question about the texture changing?
  12. so... I have it somewhat working. I craft it in the crafting table and it has one texture, but when I take it out and then re-open my inventory it changes. it only changes once though. If it's possible, I'd like a different texture when it is crafted and then have it change according to the NBT data when you pick it up and craft it. I have it set so by default it chooses one of the textures, but here's what I have so far: package com.eastonium.bionicle.kanoka; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; import net.minecraft.world.World; import com.eastonium.bionicle.Bionicle; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemKanoka extends Item { private final String kanokaType; public int kanokaLoc = 6; @SideOnly(Side.CLIENT) private IIcon[] itemIcon; public ItemKanoka(String kanokaType) { super(); this.kanokaType = kanokaType; this.maxStackSize = 1; this.setCreativeTab(Bionicle.bioWeaponTab); } @Override public void registerIcons(IIconRegister iconRegister) { this.itemIcon = new IIcon[7]; for (int i = 1; i < 7; ++i) { this.itemIcon[i] = iconRegister.registerIcon(Bionicle.MODID + ":Kanoka_" + i); } } @SideOnly(Side.CLIENT) @Override public IIcon getIconIndex(ItemStack stack) { if (stack.hasTagCompound()) { kanokaLoc = stack.stackTagCompound.getByte("DiscLocation"); return itemIcon[kanokaLoc]; } return itemIcon[6]; } /*public void addInformation(ItemStack itemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { if(itemStack.stackTagCompound == null) itemStack.setTagCompound(new NBTTagCompound()); }*/ @Override public void onCreated(ItemStack itemStack, World world, EntityPlayer entityPlayer) { if(itemStack.stackTagCompound == null) itemStack.setTagCompound(new NBTTagCompound()); kanokaLoc = world.rand.nextInt(5) + 1; itemStack.stackTagCompound.setByte("DiscLocation", (byte)kanokaLoc); } @Override public boolean getShareTag(){return true;} }
  13. You should also override getShareTag() and return true here, if you want to share the NBT data with the client (in this case it's neccessary, since the Icon is clientside only) Ok, added what you suggested, but in the code you have the myIcon Array, being an array of Icons, do I just make one with all the names of my textures? Do I have to register them in my registerIcons method? I've done metadata, but this isn't like my other stuff.
  14. I'm trying to have an item's texture determined by the NBTdata (which is a random number). So when the item is created, the nbtdata should be set to a random interger and then have the texture be determined from that. is this possible? and how?
  15. No, that doesn't help at all. I already have custom armor with my own custom 3D model and it WORKS. I need to know how to use the creeper "armor" powered effects on the custom armor I created.
  16. I need to be able to make my own armor Renderer so I can apply effects to it like that of powered creepers "armor" effects. I can't find anyone who has tried to do this, only people wanting custom 3D armor. I have the 3D armor already. Is there a way to make/use my own armor Renderer class?
  17. So I used the tutorial you sent me to make the overlay, but now I need to know how to make it like the creeper's in that I want it to be "glowing" and moving and transparent. how can I accomplish this?
  18. I just want a simple expanded player model. basically like the armor, but a tiny bit more offset. I've tried to look at the RenderCreeper file, but that doesn't help me how to set it up.
  19. I don't know. That's the .rej file it said it wrote to.
  20. It would be triggered when you're wearing a certain piece of armor. I have a ServerTickHandler and ClientTickHandler if that helps.
  21. I really want to be able to overlay the player just like the creeper is when it is powered. Does anyone know how to do this?
  22. Here's whats in the file: ++++ REJECTED PATCH 2 if (k2 == 1) { p_76484_1_.func_147465_d(i2, p_76484_4_, j2, Blocks.field_150486_ae, 0, 2); - WeightedRandomChestContent[] aweightedrandomchestcontent = WeightedRandomChestContent.func_92080_a(field_111189_a, new WeightedRandomChestContent[] {Items.field_151134_bR.func_92114_b(p_76484_2_)}); TileEntityChest tileentitychest = (TileEntityChest)p_76484_1_.func_147438_o(i2, p_76484_4_, j2); if (tileentitychest != null) { - WeightedRandomChestContent.func_76293_a(p_76484_2_, aweightedrandomchestcontent, tileentitychest, ; + WeightedRandomChestContent.func_76293_a(p_76484_2_, ChestGenHooks.getItems(DUNGEON_CHEST, p_76484_2_), tileentitychest, ChestGenHooks.getCount(DUNGEON_CHEST, p_76484_2_)); } break label101; ++++ END PATCH
×
×
  • Create New...

Important Information

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