Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Less than 4096 actually. Powers of 2.
  2. He is updating, and when he updates I'll update my addon. There's no point in updating my addon before the base mod updates, it would be unusable.
  3. Next question: Where is the nbtcompound tag coming from? If you're instanciating it yourself, it's not going to save.
  4. Think of a vanilla block that's larger than one block, peek at its class code.
  5. Are you ever calling nbt.setString(...)?
  6. Can't update very far, the mod I'm writing needs to work with another mod, which is not compatible past 644 (and I'm on 639).
  7. isRemote returns true on the CLIENT Hence:
  8. Why do you extend Gui? Scratch that, You need this: RenderGameOverlayEvent.Pre or RenderGameOverlayEvent.Post not the RenderWorldLastEvent *Cough*
  9. Look at BlockSnow (the natural snow block), see if you can glean some information from it.
  10. None of their code is relevant. A large percentage of it has to do with Questology's...properties and variables. Another good portion is drawing some text that I don't need Of the remainder, it's what I have, plus some GUIscalar code, which shouldn't matter (except that it won't size my GUI object properly unless implemented).
  11. package draco18s.decay.client; import org.lwjgl.opengl.GL11; import draco18s.decay.PositiveDamage; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiIngame; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.client.event.RenderWorldLastEvent; public class OverhealGUIHandler extends Gui { private final Minecraft mc = Minecraft.getMinecraft(); @ForgeSubscribe public void drawOverlay(RenderWorldLastEvent event) { System.out.println("Rendering"); //this prints mc.renderEngine.bindTexture("/mods/DecayingWorld/textures/gui/overheal.png"); drawTexturedModalRect(244, 382, 0, 0, 162, 16); } }
  12. Seriously, look at the source code for my phase stone. It updates its neighbors just fine.
  13. That part worked fine, the function is being called, but NOTHING IS DRAWN.
  14. package draco18s.economy.inventory; import draco18s.economy.EconBankAccounts; import draco18s.economy.entities.EntityShop; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class MySlot extends Slot { public int sellprice = 0; public MySlot(IInventory par1iInventory, int par2, int par3, int par4) { super(par1iInventory, par2, par3, par4); } public boolean canTakeStack(EntityPlayer shopper) { return true; } public boolean isItemValid(ItemStack par1ItemStack) { return false; //returning false prevents the player from putting items into the slot } }
  15. That's not true. world.setBlockMetadataWithNotify(...); takes an integer flag as its last parameter. Pass a 3.
  16. Ok, I've got Questology's code, but I can't get anything to draw. The only thing I can figure is that it's because net.minecraftforge.client.event.RenderGameOverlayEvent doesn't exist any more. The function is being called, but nothing is getting drawn. :<
  17. I've been blindly poking at WorldSaveData, which I think creates nbts, but I'm honestly not sure. *Checks the save of the one mod that's using that* Well I'll be. That's the one, alright!
  18. Alright, I can't figure this out. I'm trying to add a new HUD item and I have a class that implements ITickHandler and I've registered it with the TickRegistry, but its methods are never called! I have this in my main mod class TickRegistry.registerTickHandler(new MyGUI(), Side.CLIENT); And this is my GUI class
  19. Yes, but I'm not sure how.
  20. Generally you tell the NTB to save/load the same datatype as the object you wish to save. eg, to save an int nbt.setInteger("myInt", myInt); to get it back myInt = nbt.getInteger("myInt");
  21. The redstone wire code is good code to look at. You can also take a peek at my sourcecode here.
  22. if(the ID passed == this.blockID) { look at all six neighbors if one of them has metadata I don't have make my metadata the same }
  23. If you're using a TileEntity, there's a read/write NBTCompound function. Just use that. It's pretty strait forward, actually.
  24. You're welcome. I just find it absurd that every texture-not-loading issue comes down to people not-reading the documentation, tutorials, and prior threads related to their issue. I have single-handedly solved this issue successfully for over 14 different people in the last two weeks. That's about one a day.
  25. Jesus christ. Use a freaking string. Don't try to reference the @Mod annotation. He said use what's IN the annotation.
×
×
  • Create New...

Important Information

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