Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [20:12] <@ChickenBones> tterrag: That depends on how your recipes are stored
- [20:12] <fry> Well, be aware that all operators that end with a colon are reverse-ordered (a : b === b.:(a))
- [20:12] <MageRooster> I thought the copy method was usually =
- [20:12] <fry> Also, for making a copy you might want to make an unary prefix operator, something like ~a or &a
- [20:12] <@ChickenBones> that's assignment
- [20:12] <tterrag> ChickenBones: they arent much different other than making it recognize a certain item's NBT
- [20:13] <@ChickenBones> ~a would probable be a scale by -1. The only thing about unary operators is precedence
- [20:14] <@ChickenBones> see, generally, one would do something like a.copy.add(b).scale(2).crossProduct(c)
- [20:14] <MageRooster> I've seen = overloaded to be copy as well. Although if you want both, I could see the problem.
- [20:14] <fry> But I'd make a value-based library, not reference-based one, unless your primitives are massive. Everywhere I read says taht JVM is designed to handle a large number of small fast-dying objects :P
- [20:14] <@ChickenBones> and yet... such is not the case :L
- [20:15] <fry> You could always add implicit pools and stuff :P
- [20:15] <tterrag> ChickenBones: where should I start?
- [20:15] <fry> Programming with values is sooo much easier and fun :P
- [20:15] <tterrag> I think there's an interface that I need to implement, right?
- [20:15] <@ChickenBones> fry: you are correct on both of those points
- [20:15] <fry> (/me will dig operator precedence now for a bit)
- [20:16] <@ChickenBones> tterrag: First thing you need is a plugin class. See EnderStorage for an example
- [20:16] <tterrag> ok, I'm using EnderIO as a reference for now as it has it's own NEI plugin
- [20:16] <@ChickenBones> ok
- [20:16] * Unh0ly_Tigg ([email protected]) has joined #ChickenBones
- [20:16] <fry> Hmm, you could only have +, -, ! or ~ as an prefix operator
- [20:17] <@ChickenBones> Then you should make an instance of TemplateRecipeHandler, and see the existing handlers for examples
- [20:17] <@ChickenBones> and register it to the API
- [20:17] <tterrag> right, ok
- [20:17] <tterrag> I think I remember that
Advertisement
Add Comment
Please, Sign In to add comment