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.

BusyBeever

Members
  • Joined

  • Last visited

Everything posted by BusyBeever

  1. 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? public class AdamantArmorModel extends ModelBiped { // fields ModelRenderer head; ModelRenderer body; ModelRenderer rightarm; ModelRenderer leftarm; ModelRenderer rightleg; ModelRenderer leftleg; ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; public AdamantArmorModel() { textureWidth = 76; textureHeight = 32; head = new ModelRenderer(this, 0, 0); head.addBox(-4F, -8F, -4F, 8, 8, ; head.setRotationPoint(0F, 0F, 0F); head.setTextureSize(76, 32); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 16, 16); body.addBox(-4F, 0F, -2F, 8, 12, 4); body.setRotationPoint(0F, 0F, 0F); body.setTextureSize(76, 32); body.mirror = true; setRotation(body, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 40, 16); rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); rightarm.setRotationPoint(-5F, 2F, 0F); rightarm.setTextureSize(76, 32); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 40, 16); leftarm.addBox(-1F, -2F, -2F, 4, 12, 4); leftarm.setRotationPoint(5F, 2F, 0F); leftarm.setTextureSize(76, 32); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 16); rightleg.addBox(-2F, 0F, -2F, 4, 12, 4); rightleg.setRotationPoint(-2F, 12F, 0F); rightleg.setTextureSize(76, 32); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); leftleg = new ModelRenderer(this, 0, 16); leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); leftleg.setRotationPoint(2F, 12F, 0F); leftleg.setTextureSize(76, 32); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); Shape1 = new ModelRenderer(this, 44, 9); Shape1.addBox(0F, 0F, 0F, 3, 6, 1); Shape1.setRotationPoint(-4F, -8F, -5F); Shape1.setTextureSize(76, 32); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 32, 1); Shape2.addBox(0F, 0F, 0F, 1, 6, 4); Shape2.setRotationPoint(-5F, -8F, -5F); Shape2.setTextureSize(76, 32); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 40, 18); Shape3.addBox(0F, 0F, 0F, 1, 1, 1); Shape3.setRotationPoint(-2F, -4F, -6F); Shape3.setTextureSize(76, 32); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 40, 18); Shape3.addBox(0F, 0F, 0F, 1, 1, 1); Shape3.setRotationPoint(-5F, -4F, -6F); Shape3.setTextureSize(76, 32); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 52, 17); Shape3.addBox(0F, 0F, 0F, 2, 2, 1); Shape3.setRotationPoint(-4F, -7F, -6F); Shape3.setTextureSize(76, 32); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 56, 21); Shape4.addBox(0F, 0F, 0F, 4, 5, 6); Shape4.setRotationPoint(-2F, 0F, -3F); Shape4.setTextureSize(76, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 60, 11); Shape4.addBox(0F, 0F, 0F, 2, 4, 6); Shape4.setRotationPoint(2F, 0F, -3F); Shape4.setTextureSize(76, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 60, 11); Shape4.addBox(0F, 0F, 0F, 2, 4, 6); Shape4.setRotationPoint(-4F, 0F, -3F); Shape4.setTextureSize(76, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 54, 1); Shape4.addBox(0F, 0F, 0F, 5, 4, 6); Shape4.setRotationPoint(-9F, -1F, -3F); Shape4.setTextureSize(76, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape4.mirror = true; Shape4 = new ModelRenderer(this, 54, 1); Shape4.addBox(0F, 0F, 0F, 5, 4, 6); Shape4.setRotationPoint(4F, -1F, -3F); Shape4.setTextureSize(76, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape4.mirror = false; } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); head.render(f5); body.render(f5); rightarm.render(f5); leftarm.render(f5); rightleg.render(f5); leftleg.render(f5); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape3.render(f5); Shape3.render(f5); Shape4.render(f5); Shape4.render(f5); Shape4.render(f5); Shape4.render(f5); Shape4.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; }
  2. So. My Armor extends ModelBase (exported from Techne) how to make a ModelBiped out of it?
  3. 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
  4. at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:57) Show ur seed class
  5. 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; }
  6. Well thats the core of the problems. Dont do it. Never call it
  7. well. use ur ide to find out which arguments the constructor wants
  8. you can get the fontRendererObj via Minecraft.getMinecraft().fontRendererObj or sth like that. use ur ide to find the exact name
  9. It's most likely that you are spawning the dragon on client side where you should be spawning it on server side
  10. i guess u are using the event wrong. show the crash log and ur event
  11. 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
  12. 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
  13. did you adjust your blockstates file?
  14. you wont learn java only from reading a book, even if it will help
  15. 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
  16. read the crash log and u will realize that u dont necessarily hit an entity so it can be null
  17. 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
  18. 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
  19. 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
  20. Anyway, how about your gui handler? $5 says you don't have one or its not properly registered.
  21. the new capability system. did you ever work with it?
  22. this wont fix the crash. it is just good coding style

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.