Everything posted by ObsequiousNewt
-
Localizing Block Name
I cannot do that because I am already using that to give the item its name. I want to give it a custom lore WITHOUT having to hard code the item names/lore into it manually. Oh. Well, you can use my code then. It works for multiple languages too. Here's the lang file, so you know how that works: No, the long lines of hashmarks are not necessary. I just use them to seperate languages.
-
How do I add a drop to leaves ?
You'll need a graphicsLevel variable, set up as in BlockLeaves and BlockLeavesBase. if graphicsLevel = "fancy": return True else: return super(self, blah).shouldSideBeRendered() Look at the BlockLeaves class, you can adapt the code where graphicsLevel is used (it's a boolean). You don't need to declare a new variable in your block class, just use the Block.leaves.graphicsLevel reference, since the variable is public. Good point. I guess I didn't want to bother doing more research than necessary
-
[1.5.2]Memory Heap
Yes. I need to see all of your config code. I have my doubts as to whether you're using it right anyway... Besides, you can't ship the config file with your mod.
-
Using custom structure as dimension portal?
world.setBlockId(x,y,z,myPortalBlock) Repeat as necessary, replacing myPortalBlock with whatever the structure is made of when necessary. Look at the end portal code as for how to code the portal block.
-
World load fails java.lang.OutOfMemoryError [resolved]
Are you doing anything with ArrayLists?
-
Questions about rights
Forge ModLoader is simply a set of conversion classes to allow ModLoader mods to work on Forge (it litterally remaps the functioncalls) Oh, and:
-
Localizing Block Name
LanguageRegistry.addName(new ItemStack(myItem,1,myMetadata),"My Item");
-
RotationYaw Confusions / Backstab Creation
You... I... um... what‽ Perhaps I should look at your code.
-
[SOLVED] Intermadiate Item Issue
Um, no. The EntityEnderman thing is because arrows have no effect on endermen. If your spear has effect on endermen, put those two lines outside of the if block.
-
EntityArrow
In line 439 of EntityArrow there is a local variable called f4 which determines the acceleration of the arrow. If you want to make it accelerate more slowly, decrease that variable. Unfortunately, that will require a base edit (Actually, if you override ItemArrow as well, then you can override EntityArrow and modify that.) As for the initial velocity, there are two places to modify it: (1) the third argument in line 64 of ItemArrow, which will not require base edits if you do it right, and (2) the fourth argument in line 116 of EntityArrow, which is slightly more difficult.
-
How do I add a drop to leaves ?
You'll need a graphicsLevel variable, set up as in BlockLeaves and BlockLeavesBase. if graphicsLevel = "fancy": return True else: return super(self, blah).shouldSideBeRendered() You'll also want to override isOpaqueCube: public boolean isOpaqueCube(){ return !this.graphicsLevel; } And you'll need two sets of icons, one opaque and one transparent. Look at BlockLeaves.iconArray for how it's done.
-
[SOLVED]Textures not loading IN Minecraft (they do in Eclipse)
Exactly. I think, Draco, that this should be put in our EAQ as well.
-
RotationYaw Confusions / Backstab Creation
What do you mean by "wildly different"? -180 and 180 are the same, so there'll have to be a special case when you're facing north.
-
ISimpleBlockRenderingHandler - Doesn't render is block's render pass is 1?
Maybe has something to do with shouldSideBeRendered()? Just an idea...
-
Inventory icons not aligned properly?
The entire Container code would help. GUI code might be telling as well. As it is, I can't see anything wrong.
-
Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError
It looks like it's crashing midway through ExtraCells. Try removing that mod.
-
[SOLVED]: Player inventory bound to GUI wont allow items to move
Yes; I replied to your PM.
-
[SOLVED*] Entity glitch
Bump (TRIPLE POST!) Am I really the only modder here courageous enough to brave vehicles? Nobody else has an example? Any entity would work. Especially given that the tractor glitches even when I'm not standing on it.
-
I have an odd question.
Whats the name of the book? I am always, ALWAYS looking for documentation on java so that I can learn more... If it's from 1.0.0, why would you want it? Besides, PYTHON RULES JAVA DROOLS
-
Add a texture to a block
Well, there should be a redirect to some updated tutorials on this board... ...The fifth most prolific poster in the forums is BACK! Also, did you get the SBFP OP done? Because, if you don't, I will.
-
How do I add a drop to leaves ?
Have you tried just having that function return "true"?
-
Adding inventory slot tooltips
I think you rather want to look at overriding mouseMovedOrUp() in your GUI class. Unfortunately, there are a lot of SRG variables in there...
-
[SOLVED] Intermadiate Item Issue
QUADRA POST! (Sorry, I was busy and couldn't help people.) Ugh, your English as well as your knowledge of Java pains me, but I'll try to help anyway. First of all, you don't want an ItemSpear attribute in your Entity, you want an ItemStack. When you initialize your entity (find the place in your ItemSpear where you call a new instance of EntitySpear), set theEntitySpear.Spear = this; Now look in your EntitySpear. I assume you copied onUpdate from EntityArrow? There's extra stuff in there you'll want to trim out, but for now, we can say: find the place where it says if(!(movingobjectposition.entityHit instanceof EntityEnderman)){ this.setDead(); } and add these lines (in bold): if(!(movingobjectposition.entityHit instanceof EntityEnderman)){ this.setDead(); [b]this.Stack.setItemDamage(this.Stack.getItemDamage()-whatever); this.entityDropItem(this.Stack,yOffset);[/b] } Replace "whatever" and "yOffset" with whatever you feel like.
-
EntityArrow
By "strong" do you mean damage, or speed?
-
[SOLVED]Textures not loading IN Minecraft (they do in Eclipse)
I didn't even need to see the coding, abyssmal or not. Replace "GraveyardResources/" with "mods/GraveyardResources/".
IPS spam blocked by CleanTalk.