BusyBeever
-
Posts
201 -
Joined
-
Last visited
Posts posted by BusyBeever
-
-
So. My Armor extends ModelBase (exported from Techne) how to make a ModelBiped out of it?
-
hey everyone,
I am working on a mod with custom armor models (I got them as .java)
So right now I dont know how to make minecraft use these custom models.
Any1 here that know how to do so?
Greetz BusyBeever
-
at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:57)
Show ur seed class
-
It's the cap
-
The method gets called if you register your event handler correct (try adding a sysout to be sure)
yes you would use getCapability to get the caps.
The varialbes get saved in the implementation of your Capability. If you want to get/set the values of the cap just add the methods you need to the inferface and implement them in the implementation
public interface IManaHandler { int getMana(); int getMaxMana(); void setMana(int mana); void setMaxMana(int maxMana); boolean consumeMana(int mana); boolean regenerateMana(int mana); } public class ManaHandler implements IManaHandler, INBTSerializable<NBTTagCompound>{ private int mana, maxMana; public ManaHandler(int maxMana, int mana) { this.mana = mana; this.maxMana = maxMana; } public ManaHandler() { this(100,100); } @Override public NBTTagCompound serializeNBT() { NBTTagCompound compound = new NBTTagCompound(); compound.setInteger("mana", getMana()); compound.setInteger("maxmana", getMaxMana()); System.out.println("saving cap"); return compound; } @Override public void deserializeNBT(NBTTagCompound compound) { setMana(compound.getInteger("mana")); setMaxMana(compound.getInteger("maxmana")); } @Override public boolean consumeMana(int mana) { if(this.mana<mana) return false; this.mana-=mana; return true; } @Override public boolean regenerateMana(int mana) { if(this.mana==maxMana) return false; else { this.mana +=mana; if(this.mana>maxMana)this.mana=maxMana; return true; } } @Override public int getMana() { return mana; } @Override public int getMaxMana() { return maxMana; } @Override public void setMana(int mana) { this.mana = mana; } @Override public void setMaxMana(int maxMana) { this.maxMana =maxMana; }
-
I was testing things out, that was one of them.
Well thats the core of the problems. Dont do it. Never call it
-
well. use ur ide to find out which arguments the constructor wants
-
you can get the fontRendererObj via Minecraft.getMinecraft().fontRendererObj or sth like that. use ur ide to find the exact name
-
It's most likely that you are spawning the dragon on client side where you should be spawning it on server side
-
i guess u are using the event wrong. show the crash log and ur event
-
if you just want persistent data without caring on which world you are you should be using simple java io to save the data and read it when u need it
-
what exactly are you triing to save?
one way would be to use good old java io, but you would need a unique identifier for each server / world
-
did you adjust your blockstates file?
-
you wont learn java only from reading a book, even if it will help
-
-
There is no crash log, but i take the advice
@Override
protected void onImpact(MovingObjectPosition movingobjectposition) {
if (movingobjectposition.entityHit != null)
{
if (movingobjectposition.entityHit instanceof EntityLivingBase) {
EntityLivingBase entity= (EntityLivingBase)movingobjectposition.entityHit;
entity.heal(4.0F);
}
}
}
Remove it, I realized diesieben is right and I missed a part. If your mod is crashing in mp only your proxies are probbly broken
-
read the crash log and u will realize that u dont necessarily hit an entity so it can be null
-
whenever the blockstate changes minecraft adds a new tileentity to the block, until you tell it to not do so.
There was a method you need to override, sadly I am unable to locate it right now
-
1. Why are you opening another thread with the exact same question?
2. Already told you once to remove that mess of it's inside the switch
-
Yes capabilites are created once. Yes they are safing tons of processing time bc reading from nbt is a bitch :b
If you want to know how it works just look at the AttachCapabilities event and F3(eclipse) the addCap method. Helped me a lot
-
i put it up there
Anyway, how about your gui handler?
$5 says you don't have one or its not properly registered.
-
the new capability system. did you ever work with it?
-
this wont fix the crash. it is just good coding style
-
so. whats the problem?
[1.9]Use .java for armor model
in Modder Support
Posted
Just made my armor estend ModelBiped and it works..
But the armor is glitchy and not really following the player when he moves
Any idea why?