• 0

    posted a message on [1.7.2]Problem with spawning Entity Items
    So in a attempted to make something look cool, I ran into a small bug. When I spawn a Item entity into the world, spawns two into the world. One of them works fine but the other just becomes a phantom, It's there but you can't interact with it. Any help and/or suggestions would be amazing!

    The code!

    The TileEntity

    package magic.entitys;
    
    import java.util.Random;
    import net.minecraft.client.Minecraft;
    import net.minecraft.entity.item.EntityItem;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.Timer;
    
    public class TileEntityWandAltar extends TileEntity {
    
    public ItemStack itemStack;
    private Timer timer;
    private float time = 10;
    private float curTime = 0;
    private Random rand = new Random();
    
    public TileEntityWandAltar() {
    super();
    timer = new Timer(20);
    }
    
    @Override
    public void updateEntity() {
    if (itemStack == null) return;
    
    timer.updateTimer();
    
    if (curTime < time) curTime = curTime + 2f * timer.elapsedTicks;
    if (curTime >= time) {
    GivePlayerItem(Minecraft.getMinecraft().thePlayer);
    }
    System.out.println(curTime);
    }
    
    private boolean GivePlayerItem(EntityPlayer player) {
    EntityItem entity = new EntityItem(worldObj, xCoord, yCoord, zCoord, itemStack);
    worldObj.spawnEntityInWorld(entity);
    itemStack = null;
    return true;
    }
    
    @Override
    public void readFromNBT(NBTTagCompound nbt) {
    super.readFromNBT(nbt);
    }
    
    @Override
    public void writeToNBT(NBTTagCompound nbt) {
    super.writeToNBT(nbt);
    }
    }


    The Block
    package magic.block;
    import magic.entitys.TileEntityWandAltar;
    import net.minecraft.block.ITileEntityProvider;
    import net.minecraft.block.material.Material;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.init.Items;
    import net.minecraft.item.ItemStack;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.world.World;
    
    public class BlockWandAltar extends BlockMagic implements ITileEntityProvider{
    
    protected BlockWandAltar() {
    super("wandAltar", Material.wood);
    }
    
    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
    ItemStack item = player.inventory.getCurrentItem();
    if (item != null) {
    TileEntityWandAltar tileEntity = (TileEntityWandAltar) world.getTileEntity(x, y, z);
    if (item.getItem() == Items.stick && tileEntity != null && tileEntity.itemStack == null) {
    tileEntity.itemStack = new ItemStack(Items.stick);
    if (!player.capabilities.isCreativeMode) item.stackSize--;
    }
    }
    return false;
    }
    
    @Override
    public TileEntity createNewTileEntity(World world, int var2) {
    return new TileEntityWandAltar();
    }
    }


    Thanks!
    Posted in: Modification Development
  • 0

    posted a message on [1.7.2]Problem with spawning Entity Items
    So in a attempted to make something look cool, I ran into a small bug. When I spawn a Item entity into the world, spawns two into the world. One of them works fine but the other just becomes a phantom, It's there but you can't interact with it. Any help and suggestions would be amazing!

    The code!
    package magic.entitys;
    
    import java.util.Random;
    import net.minecraft.client.Minecraft;
    import net.minecraft.entity.item.EntityItem;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.Timer;
    public class TileEntityWandAltar extends TileEntity {
    public ItemStack itemStack;
    private Timer timer;
    private float time = 10;
    private float curTime = 0;
    private Random rand = new Random();
    public TileEntityWandAltar() {
    super();
    timer = new Timer(20);
    }
    @Override
    public void updateEntity() {
    if (itemStack == null) return;
    timer.updateTimer();
    if (curTime < time) curTime = curTime + 2f * timer.elapsedTicks;
    if (curTime >= time) {
    GivePlayerItem(Minecraft.getMinecraft().thePlayer);
    }
    System.out.println(curTime);
    }
    private boolean GivePlayerItem(EntityPlayer player) {
    EntityItem entity = new EntityItem(worldObj, xCoord, yCoord, zCoord, itemStack);
    worldObj.spawnEntityInWorld(entity);
    itemStack = null;
    return true;
    }
    @Override
    public void readFromNBT(NBTTagCompound nbt) {
    super.readFromNBT(nbt);
    }
    @Override
    public void writeToNBT(NBTTagCompound nbt) {
    super.writeToNBT(nbt);
    }
    }
    Posted in: Modification Development
  • 0

    posted a message on I NEED A TEAM
    Hello McCricket,
    This is a very interesting idea, and I would love to be apart of it. now I do have work and family so I don't always have free time but I do have four years of coding experience, I don't have any mods out to the public but I have been working with forge for a good few months and I think I can help.
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Help Wanted!(Need Coders, Modelers, Animators and SoundTrack Artists)
    Hello,
    this looks very interesting. But before I sigh up for anything I would like to know a little about the project I'll be working on. And how will you be contribute to the project.
    Posted in: Mods Discussion
  • 0

    posted a message on How do you make "tabs" on a GUI screen and custom structure generation position question.
    Hmm, how many tabs do you plan on having?
    -Roda1265, 1Love
    Posted in: Modification Development
  • 0

    posted a message on [1.3.2] map.put/AddRenderer question
    http://www.minecraftforge.net/wiki/Tutorials/Upgrading_To_Forge_for_1.3.1
    A really great tut for all the new things with forge!
    -Roda1265, 1Love
    Posted in: Modification Development
  • 0

    posted a message on HELP Mod Not WORKING
    Hmm, looks like your going to haveing alot of missing file errors. This is esay to fix just re-setup your mcp folder and you should be fine
    -Roda1265, 1Love
    Posted in: Modification Development
  • 0

    posted a message on NBTTag Help
    hello everyone,
    im currently working on a mod, but i need a varabile saved, now i have tryed this and for some reason it's refusing to save, i'v tryed everything i could possibly think of so any help would be greatly appreciated.


    This is the code i am using...
    package


    mod.magic;

    import


    net.minecraft.src.NBTTagCompound;

    public


    class ManaStats {

    private int mana;

    private final int maxMana = 100;


    public void addMana(int hm) {

    mana = getMana() + hm;
    System.
    out.println(getMana());
    }


    public void takeMana(int hm) {

    mana -= 0;

    if (mana < 0) {

    mana = 0;
    }
    System.
    out.println(getMana());
    }


    public int getMana() {

    return mana;
    }


    public int getMaxMana() {

    return maxMana;
    }


    public void readFromNBT(NBTTagCompound nbt) {

    mana = nbt.getInteger("Mana");
    System.
    out.println(getMana());
    }


    public void writeToNBT(NBTTagCompound nbt) {
    nbt.setInteger(
    "Mana", mana);
    System.
    out.println(getMana());
    }

    }
    Posted in: Mods Discussion
  • 1

    posted a message on NullPointerException Error
    NullPointerExecption means that something equals null when it's called, no take a look at the error meassage, the first line is an error in ModLoader.addName, at line 436, and because that was not a line you made that's not the problem, move on. Same with the next line, but when we look at the third line, its you mod class. So we can see what line is has the error. So the line is "ModLoader.addName(Cutter, "Cutter");", now that we know what line is errored we can fix it. We now its a that something equals null, and only one object is being used, Cutter, now with all this it's simple you have Cutter initalized to far in the method your going to need to move it into farther up so it can get called before ModLoader.addName,

    Sorry if this was bit of a handfull, i think it's best to help you throught it then just telling you where and how to fix it.
    -Roda1265, OneLove
    Posted in: Mods Discussion
  • 0

    posted a message on [1.8.1] SteamCraft - SOURCE CODE RELEASED[ML][v0.5.4][WIP]
    I love this mod... and so i shall update.
    Posted in: WIP Mods
  • 0

    posted a message on A new mod idea....
    Hello my fellower Minecrafters,
    Me and a friend, had a amazing idea. Why not space in Minecraft? So a I took a look into it, and of course some other people have already done the same thing, but all of them have them as a new type as Dimension... That to me do not seem like space (not to hate on them, all of the, look really good.) So I wanted to mod thats more like an expansion.

    I already have a few ideas, seemless planet travel, atmosphere, spaceships. These are just a few ideas... but i need the communtiys input, because i will HAVE to override some base files.

    All input is greatly appreciated.

    -Roda1265
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on The Betterverse. Private Devs, better plugins, excellent communities. [1.6]
    Name: Roda1265
    Age: 16
    Link: http://www.minecraft...t&f=45&t=335188

    BetterCraft, BetterAnarchy or Both?: BetterCraft!

    Why BetterVerse?: I'v been hunting for a nice server, and out of all the one's I have seen your's is the best.

    How did you find us?: Recomend by a family member.

    Did anyone assist you with your application/understanding the process?: Nope.

    Anything else you want to say: I'v been with Minecraft since it first came out... (Those where the days!)
    Posted in: PC Servers
  • 0

    posted a message on Crysis Mod
    I've been lookiing myself... and to my luck no provel... but I wanna help, you my friend have given me a great idea ;3
    Posted in: Mods Discussion
  • 0

    posted a message on [1.0.0] Skyrim Mod!

    You have a few typos. Like some helmets are called 'helments' and the Chestplates are 'ChestPlates'

    i will look into that thanks!
    Quote from gameplayer2014

    i hope THIS ONE works
    NOPE

    What do you mean?
    Posted in: Minecraft Mods
  • 1

    posted a message on [1.0.0] Skyrim Mod!
    Quote from Apollo451

    Great! Now I can literally play skyrim 24/7.

    As if skyrim's mods weren't enough to keep me staring at a screen, theres a skyrim MINECRAFT mod!

    Question:
    Do swords swing faster than axes and axes faster than maces? And do maces do the most damage where as swords do the least?
    If not, then it should be like that :tongue.gif:

    No but thats a great idea thanks!
    Posted in: Minecraft Mods
  • To post a comment, please .