-
Posts
751 -
Joined
-
Last visited
Everything posted by ObsequiousNewt
-
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.
-
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
-
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?
ObsequiousNewt replied to DELTA_12's topic in Modder Support
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]
ObsequiousNewt replied to Mageling's topic in Modder Support
Are you doing anything with ArrayLists? -
Forge ModLoader is simply a set of conversion classes to allow ModLoader mods to work on Forge (it litterally remaps the functioncalls) Oh, and:
-
LanguageRegistry.addName(new ItemStack(myItem,1,myMetadata),"My Item");
-
RotationYaw Confusions / Backstab Creation
ObsequiousNewt replied to Zetal's topic in Modder Support
You... I... um... what‽ Perhaps I should look at your code. -
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.
-
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.
-
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.
-
RotationYaw Confusions / Backstab Creation
ObsequiousNewt replied to Zetal's topic in Modder Support
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. -
Inventory icons not aligned properly?
ObsequiousNewt replied to intermediateuser's topic in Modder Support
The entire Container code would help. GUI code might be telling as well. As it is, I can't see anything wrong. -
[SOLVED]: Player inventory bound to GUI wont allow items to move
ObsequiousNewt replied to Neoublie's topic in Modder Support
Yes; I replied to your PM. -
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.
-
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
-
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.
-
Have you tried just having that function return "true"?
-
I think you rather want to look at overriding mouseMovedOrUp() in your GUI class. Unfortunately, there are a lot of SRG variables in there...
-
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.
-
By "strong" do you mean damage, or speed?