-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
I'm still surprised by the number of people that think @Override performs magic. @Override updateTick(Magic moreMagic) { //this works, right? Why is it throwing an error telling me to remove the override? }
-
Ever solved a problem through the process of writing out the post requesting help? I once solved an issue (not a technical one, but what a recipe should be) in a dream. Well, less dream and more "how would I explain this to my mother?" exploration as I fell asleep.
-
Vert tiny render question. Just a tiny one.
Draco18s replied to SenpaiSubaraki's topic in Modder Support
I would be willing to bet that it also works for these items: Silk Redstone repeater Brewing stand Comparator (Plus cake, reeds, and cauldron) All seven of those items are instances of the same item class (ItemReed.java). I have no idea why. -
I think most IDEs and compilers will strip the comparison out and use the strait boolean.
-
Missed that when I glanced at his code. I've done that before.
-
Couple of reasons: 0) Are you actually creating different blocks?* 1) Are you registering the blocks' name with the LanguageRegistry? 2) Are you using setUnlocalizedName on the blocks? 3) Did you happen to not change either of the above to a different name?** *This one should be pretty straitforward and I don't expect that you're doing it wrong, but I've done this on a few occasions: blockA = new BlockA(...); blockB = new BlockA(...); //note how this is a BlockA, even though I'm assigning to the variable for blockB! **If you register two different names with the language registry, it won't work if both blocks set their own unlocalized name to the same string. I've done that before!
-
You might also want to register the items with the GameRegistry; GameRegistry.registerItem(ItemKnappingStone, "Knapping Stone");
-
I've posted that same image like eight times in the last week. Let's see, searching this forum for "textures..." Results 2, 4, 12, 14, 17 (this thread), 25, 26, and 30. Yeah, it's totally not anywhere.
-
Actually, you do need /mods folder both in .zip and /src on 1.5.2. I've just updated my mc, forge, mcp, mod to 1.5.2 and tried different ways, and the only one to work was having .zip/mods/%modname%/textures/[items/blocks]/%texturename%. Thanks for verifying. I hadn't got around to checking myself, but I was basing my info off someone in 1.5.2 getting a "texture at /%mod%/textures/block/%block.png% not found" (note the lack of the mod folder). So I've been cautious and saying "this works, if you're on 1.5.2, you might need to remove the /mods folder" as a thing to try.
-
How can people post these threads and not notice the half-dozen of them that have already been posted? Anway... When making the zip, you'll have two top-level folders inside your zip, the package that includes all of your compiled code (which will be in the reobf/ folder after compiling) and /mods (which will still be in the src/ directory). If you're running 1.5.2, mods/ isn't required (just shift everything else up).
-
Getting errors when trying to add texture override
Draco18s replied to zdrivesmp's topic in Modder Support
I'll tell you how you can do it later ok Says the guy with his own open thread asking how to do it. -
Getting errors when trying to add texture override
Draco18s replied to zdrivesmp's topic in Modder Support
Are you, perchance, using 1.5.2 and not 1.5.1? I have seen rumor that the "mods/" top-level folder is unneeded, so instead of: /mods/%modname%/textures/blocks/%block.png% it's: /%modname%/textures/blocks/%block.png% But I haven't verified that yet myself. -
Nope. Like this:
-
Getting errors when trying to add texture override
Draco18s replied to zdrivesmp's topic in Modder Support
Yikes! No! -
I'm pretty sure he didn't want it to drop items. Oh wait.
-
function void f (int a, int b) {} function void f (int a, int b, int c) {} These are two different functions. The second will only be called if the call passes three parameters, this is what's called an Overloaded Function. Specifying a new overload and not changing the caller isn't going to magically run the new function: the call is not passing those parameters! (I.e. specifying those parameters in your function will insure that it is NEVER called, unless you call it yourself). This is at the top of the damageItem function if (!(par2EntityLiving instanceof EntityPlayer) || !((EntityPlayer)par2EntityLiving).capabilities.isCreativeMode) If par2EntityLiving is not an instance of EntityPlayer it should bypass the block. In any case, you can use this instead: stack.setItemDamage(stack.getItemDamage() - 1)
-
1) Trigger how? 2) Look at the other redstone blocks, notably the Button.
-
Custom Block GUI - Why do my items fall out when picked up?
Draco18s replied to Draco18s's topic in Modder Support
Ok, so, here's the thing: In order to make a gui that is wider than it is tall, the texture doesn't render properly. I set xSize to 291 (256+35) and increase my texture's width by the same amount (transparent pixels on the right edge): http://s21.postimg.org/if7xg385z/2013_05_05_17_08_45.png[/img] Ok, so maybe the texture needs to be square, add 35 pixels to the height (centering it), and increase the GUI size to 291 tall as well. http://s18.postimg.org/h1f77j5mh/2013_05_05_17_10_58.png[/img] Yeah, I have no idea what's going on. -
Side note: I've seen evidence, but have not tested, that the "mods/" directory isn't needed in 1.5.2 and that everything else just shifts up.
-
You don't understand how overrides work. Just because a function has the same name doesn't mean it's going to be called in the same instances as the original function, but magically pull additional parameters. The @Override annotation does nothing but throw errors when the function you have isn't actually overriding anything. Because that's what it is. An annotation. A clue to the IDE that "hey, error check this in this special way please." In any case, you actually don't need a reference to the player there. If you open up ItemStack.java and look at that function, you'll find the only thing it needs the player for is to prevent item damage while in creative mode. If you pass null, the item will work and take damage JUST FINE.
-
Custom Block GUI - Why do my items fall out when picked up?
Draco18s replied to Draco18s's topic in Modder Support
I discovered late last night that placing the Slots at negative values is what does it: for (int i = 0; i < 6; i++) {//down for (int j = 0; j < 3; j++) {//across addSlotToContainer(new Slot(shopEntity, j + i * 3, mod -35 + j * 18, 0 + i * 18)); } } See that mod in there? It's equal to 35, so that when j is 0, the x position of the slot doesn't go negative. Which means the farthest left you can put a slot is where the left most hotbar item is. The problem is, I can't find a way to shift the leftmost edge of the Gui to the left, that is, make the actual GUI bigger. -
Ok, I have a working custom GUI with inventory slots and all that jazz. But here's the thing: I want to have some locked slots (effectively output slots), several storage slots (like a chest), and an input slot. But it seems that every time I move items from one slot to another in the code (e.g. taking the input stack and moving to an output slot or to a storage slot) when I go to pick that stack up, I pick up a stack of size one and drop it into the world. What gives? Update entity function:
-
Is it in the right place (com/big_Xplostion/xplosionCore/)? Did you add the compiled .class files to your zip (not the uncompiled .java)? (I've done this once or twice)