-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
[SOLVED] only getting blocks from itemstacks
Draco18s replied to Casual Dutchman's topic in Modder Support
When that happens, just go up a few lines and do this: ItemBlock b; Then it'll ask you to import (or create) the class ItemBlock. Just import it and the "incompatible" conditional error will go away. That error comes up when it doesn't know what type a class is, so the IDE can't make the comparison and check for validity. (After you import, you can delete the line) -
[1.7.2] Item name displaying wrong - no texture
Draco18s replied to mission712's topic in Modder Support
appleCream != appleicecream -
Rename your variables. Create new variables. Use your IDE's code hinting and error hinting capabilities. This is BASIC JAVA. I am not going to help you with that, as you should already know it.
-
public void preInit(FMLPreInitializationEvent event) { { CBingot = new CBingot(5000); CBingot = new CBingot(5001) .setMaxStackSize(16).setUnlocalizedName("genericIngot"); } @EventHandler public void load(FMLInitializationEvent event) { LanguageRegistry.addName(CBItem, "Generic Item"); LanguageRegistry.addName(CBIngot, "Generic Ingot"); // Stub Method } Ok, first off, don't name your variables the same as your class name. Second, you never defined nor declared CBItem.
-
And you still thought that it was a good idea to call the class constructor from inside the class constructor. Not to mention that that tutorial in no way has you doing that. Compare: package tutorial.generic; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class GenericItem extends Item { public GenericItem(int id) { super(id); // Constructor Configuration maxStackSize = 64; setCreativeTab(CreativeTabs.tabMisc); setUnlocalizedName("genericItem"); } } With public class CBingot extends Item { public CBingot(int par1) { super(par1); final Item CBingot = new CBingot(5000); //you added this line // Constructor Configuration setMaxStackSize(64); setCreativeTab(CreativeTabs.tabMaterials); setUnlocalizedName("Celestial Bronze Ingot"); LanguageRegistry.addName(CBingot, "Celestial Bronze Ingot"); }
-
I think you mean: public double getMaxRenderDistanceSquared() { return 4096.0D; } i think that if you increase that it can render further away. That's the bit, yes. (For reference, that value is 64 blocks, as a sphere)
-
Wow. So. Where are you calling CBingot()? Inside CBingot() You need to go learn Java.
-
Sort of. There's also a draw distance limit for TEs as well. It's longer, but not by a whole lot (I think there's a way to override that distance on a per-TE basis, but I do not recall how offhand).
-
Yes, yes it is.
-
If you're changing from one missing texture to another...
-
Is the value that controls your texture saved to NBT?
-
Thank you! However I never made a mod where I would have to sync packets. So I really dont know how this is done. Where should I put this? Inside your tile entity class. That's ALL you need to do in this case.
-
The cool thing is that vanilla handles 99% of it for you, just add this: public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); }
-
[Forge 1.5.2.] Need a little help with a mob animations.
Draco18s replied to DoorCloser's topic in Modder Support
Reminds me that a mob I have in a mod I stated I would not update until 1.7 was usable: It's based on the wolf (so model, renderer, an entity classes are copied wholesale, then the entity class modified to suit my purposes) and for some reason the tail just spins in a circle, passing through the dog's back and belly. When I first saw it happening I went, "Sigh. I really don't want to figure out why that's happening" because I hadn't made any changes to the render classes other than to change texture, and really really didn't want to work out the trig manually. -
armorNamePrefix = armorNamePrefix; ? Really? Do you ever initialize that variable to anything?
-
[1.6.4]Achievement/Creative tab name registration
Draco18s replied to Robosphinx's topic in Modder Support
Do it now. Putting it off will only lead to lots and lots of things needing to get done. With the one mod I've localized I had to go into 26 classes and add StatCollector.localize() calls to several strings in each class because I hadn't anticipated localization from the outset. 193 localization entries later... -
You're kind of on your own there. Every entity is rendered differently and those renderers tend to control the texture.
-
Example: EntityRegistry.registerModEntity(EntityClayGolem.class, "EntClayGolem", 0, this, 350, 5, false);
-
[1.7.2] Drawing a string on the top-left corner of the screen.
Draco18s replied to coolboy4531's topic in Modder Support
This. Also, your error happens at at com.coolboy4531.Tracker.doFunction(Tracker.java:115) Go there. Figure out why. You didn't even include enough code of that class for me to locate that line so I couldn't help you if I wanted to, which I don't, because you're making mistakes left and right (why does doFunction() return a boolean if that boolean is ignored? Why do you do a Minecraft.getMinecraft() both before calling the function and inside the function instead of passing it? Or better yet, what purpose is it being put to in the event listener class? StringBuilder().append().toString()? Was String s = "I need " + a_variable + " stringified" wasn't good enough?) -
[SOLVED] [1.7.2] Simple Block with Inventory
Draco18s replied to mercrutio's topic in Modder Support
Personally I'm waiting for more deobfuscation. I can handle the occasional func_* and field_* but when 95% of what I'm using looks like that, the code is unreadable and very hard to work with. -
I'm getting some strong negative energy from your workspace. Try facing east instead.
-
Try something for me: Does it always print the line, even when you're doing nothing? Does it only print the line while you're holding the button down? What?
-
Rather than setting up the entire MCP workspace as a git repository, do just the src directory and then gitignore what you don't need inside that.
-
java.lang.NullPointerException at denbukki.indestructibleTools.proxys.ClientProxy.register(ClientProxy.java:15) As I told someone else: Null pointer exception At line 15 in yourClientProxy. Go there. Figure out why. You kept walking around the door that is locked trying to figure out why you aren't getting inside instead of using the key, like a normal person. This is basic Java and we are not here to help you with basic Java.