Everything posted by Draco18s
-
[1.5.2]Configuration Files
Less than 4096 actually. Powers of 2.
-
Registering/Using ITickHandler
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.
-
How to use NBT
Next question: Where is the nbtcompound tag coming from? If you're instanciating it yourself, it's not going to save.
-
[Unsolved] Setting bounding boxes for block and handheld icon [1.5.2]
Think of a vanilla block that's larger than one block, peek at its class code.
-
How to use NBT
Are you ever calling nbt.setString(...)?
-
Registering/Using ITickHandler
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).
-
[Unsolved]Weird code behaviour...?
isRemote returns true on the CLIENT Hence:
-
Registering/Using ITickHandler
Why do you extend Gui? Scratch that, You need this: RenderGameOverlayEvent.Pre or RenderGameOverlayEvent.Post not the RenderWorldLastEvent *Cough*
-
Block collision bounds are "static" (Java term)
Look at BlockSnow (the natural snow block), see if you can glean some information from it.
-
Registering/Using ITickHandler
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).
-
Registering/Using ITickHandler
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); } }
-
energy framework-esque thing won't work and i can't figure out why it won't work
Seriously, look at the source code for my phase stone. It updates its neighbors just fine.
-
Registering/Using ITickHandler
That part worked fine, the function is being called, but NOTHING IS DRAWN.
-
Container: Function to check if Item is a specified Item
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 } }
-
energy framework-esque thing won't work and i can't figure out why it won't work
That's not true. world.setBlockMetadataWithNotify(...); takes an integer flag as its last parameter. Pass a 3.
-
Registering/Using ITickHandler
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. :<
-
How to use NBT
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!
-
Registering/Using ITickHandler
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
-
How to use NBT
Yes, but I'm not sure how.
-
How to use NBT
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");
-
energy framework-esque thing won't work and i can't figure out why it won't work
The redstone wire code is good code to look at. You can also take a peek at my sourcecode here.
-
energy framework-esque thing won't work and i can't figure out why it won't work
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 }
-
How to use NBT
If you're using a TileEntity, there's a read/write NBTCompound function. Just use that. It's pretty strait forward, actually.
-
Texture and lang issues
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.
-
Custom furnace and armor texture problem
Jesus christ. Use a freaking string. Don't try to reference the @Mod annotation. He said use what's IN the annotation.
IPS spam blocked by CleanTalk.