Advertisement
WackoMcGoose

Snippets from #risucraft that must be saved for all time

Feb 11th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.30 KB | None | 0 0
  1. Feb 11 2012 - How Do I Changed Object.class?
  2.  
  3. [19:45] <ekim350z> anyone here know java by chance? im trying to change some data inside the Object class
  4. [19:46] == Malqua [~Malqua@184-76-53-235.war.clearwire-wmx.net] has joined #risucraft
  5. [19:46] <Risugami> what witchcraft is this?
  6. [19:46] == Windaway has changed nick to Windwaker
  7. [19:47] <Risugami> you can't just edit Object
  8. [19:47] == LeonWildhart_ [webchat@208.66.88.197] has joined #risucraft
  9. [19:47] <Red_M> gonna play SMNC for the first time
  10. [19:47] <LeonWildhart_> Cant /topic
  11. [19:47] <AbrarSyed> lol
  12. [19:48] == Soundmaniac [~Soundmani@e212080.upc-e.chello.nl] has quit [Quit: Leaving]
  13. [19:48] <AbrarSyed> I don't know anything about reflection, but it might be possible to change the stuff in the Object class using that.
  14. [19:48] <AbrarSyed> most probably not
  15. [19:48] <LeonWildhart_> I cant see the rules...
  16. [19:48] == Risugami [risugami@72.173.8.118] has quit [Read error: Connection reset by peer]
  17. [19:49] == Risugami [risugami@72.173.8.118] has joined #risucraft
  18. [19:49] == mode/#risucraft [+o Risugami] by zsh
  19. [19:49] <ekim350z> Risugami, how do i get to the point of changing it?
  20. [19:49] <WackoMcGoose> Risugami: I've got an actually SANE question for you. How do I colorshift an INVENTORY block render? Like Block.colorMultiplier, but for RenderInvBlock
  21. [19:50] <Risugami> try glColor4f
  22. [19:51] <Ribor> what quality sound can you use for mc?
  23. [19:51] <immibis> ekim350z: what?
  24. [19:51] <WackoMcGoose> Risugami: Hex values RGBA I assume?
  25. [19:51] <immibis> the Object class doesn't store any data
  26. [19:51] <immibis> well, no data that's useful to you
  27. [19:51] <Forkk13> Riking, you still trying to get it working?
  28. [19:51] <fishtaco567> No
  29. [19:51] <fishtaco567> Floats
  30. [19:51] <fishtaco567> 0-1
  31. [19:52] <Risugami> yea... what would you possible need to change in object...
  32. [19:52] <Risugami> the hashcode?
  33. [19:52] <ekim350z> immibis, when i print map (Object map) out, i get {money=100}, how do i modify it to be {money=200}
  34. [19:52] <ekim350z> hashcode yes?
  35. [19:52] <immibis> no you don't want the hashcode
  36. [19:53] <immibis> you want to do what? i still don't understand your question
  37. [19:53] <Risugami> did you ever consider that Object reference might be a class that extends Object?
  38. [19:54] <AbrarSyed> you want to modify Object? you make a custom class
  39. [19:54] <ekim350z> I have Object map, when i print out map, i get {money=100}, so how would i modify map to give me {money=10}
  40. [19:54] <ekim350z> i have to make a custom class and copy it to it?
  41. [19:54] <AbrarSyed> depends on what is stored in teh map
  42. [19:54] <Risugami> ?javatut
  43. [19:54] <crow> Free java tutorials at http://download.oracle.com/javase/tutorial/ http://learn-java-tutorial.com/
  44. [19:54] == Shadow386 has changed nick to Shadow|Bed
  45. [19:54] <Samantha> I hope you have a dream about a thousand million curvy, "chocolate" covered kittens happily "drinking" a billion visible, furry cups of tea in a cute lounge of obsidian =D
  46. [19:54] <immibis> ekim350z: If you don't know java, learn that first
  47. [19:54] <Risugami> for the love of god start there
  48. [19:54] <AbrarSyed> it depends whcich class is in there
  49. [19:55] <AbrarSyed> ekim350z: I invited you to a private chat.
  50. [19:55] <AbrarSyed> *wich me luck on teaching the ignorant java :P
  51. [19:55] == armed_troop [~armed_tro@mobile-166-147-118-242.mycingular.net] has joined #risucraft
  52. [19:55] <ekim350z> its a linkedmaphash
  53.  
  54. (And the commentary from #evilmojang after I linked this paste)
  55. [19:49] <Jokiboy> Lol! How dumb was that guy?
  56. [19:50] <Jokiboy> One does not simply edit Object class!
  57. [19:50] <Shadow386> One does not simply override base classes
  58. [19:50] <clarjon1> One does not simply One does not simply.
  59. [19:51] <Jokiboy> One does not simply getover 256 terrain indexes.
  60. [19:51] <Pepper> One does not simply change a packet, change it back, and hope that it'll work
  61.  
  62. ===========================================================================================================
  63. Feb 13 2012 - lol use forge becuz it fasterer
  64.  
  65. [15:33] <Shadow386> No, you were pointing out compatibility, mentioning forge being compatible
  66. [15:33] <nallar> I pointed out using proxy classes, which would help with compatibility
  67. [15:33] <medsouz> !popcorn
  68. [15:33] <crow> http://i.imgur.com/2YPvY.gif
  69. [15:33] <nallar> it also means you can access protected fields/methods without reflection.
  70. [15:34] <Shadow386> And thus suggesting that we use forge, which we arent going to use
  71. [15:34] <nallar> no
  72. [15:34] <nallar> not suggestiing you use forge
  73. [15:34] <nallar> It would allow forge to work with it, that was JUST AN EXAMPLE.
  74. [15:34] <nallar> :P
  75. [15:34] <nallar> I give up, apparently I fail at getting what I mean across.
  76. [15:34] <Shadow386> I dont see why when we don't care for compatibility
  77. [15:35] <nallar> improved speed through less reflection, easier to write code through writing as if modifying hte base class.
  78. [15:36] <Shadow386> Alrighty, you take a look through the code and tell me the easier way we can do that
  79. [15:36] <nallar> http://pastebin.com/kN8RqMrb
  80. [15:36] <nallar> formatting is messed up, but that's an example.
  81. [15:36] <Riking> ?calc 932/147
  82. [15:36] <crow> Decimal approximation: 6.3401360544217687074829931972789115646258503401360544...
  83. [15:36] <medsouz> nallar: package wont work
  84. [15:37] <nallar> Works here.
  85. [15:37] <medsouz> you cannot import from the default package
  86. [15:37] <Risugami> need more decimal
  87. [15:37] <medsouz> when you compile it net.minecraft.src changes to the default package
  88. [15:37] <Riking> ?calc 95*464 > riking
  89. [15:37] <nallar> medsouz, compiler won't, but MCP will reobf to, so it doesn't matter.
  90. [15:37] <Riking> ?calc 95*464
  91. [15:37] <crow> no results
  92. [15:37] <Riking> .wa 95*464
  93. [15:37] <crow> Riking: Exact result: 44080. Number name: 44 thousand and 80
  94. [15:37] <Riking> GAH
  95. [15:37] <Riking> .wa approximate 95*464
  96. [15:37] <crow> Riking: no results
  97. [15:37] <Miclee> nallar: What are you and Shadow arguing about?
  98. [15:37] <Riking> >.>
  99. [15:38] <medsouz> also, proxies make it so conflicts dont crash but also stop the mods that conflict from working together
  100. [15:38] * Miclee wants the short story.
  101. [15:38] <medsouz> the one with the proxy takes control
  102. [15:38] <nallar> medsouz, I guess you're right.
  103. [15:38] <medsouz> Miclee: nallar says you're doing it wrong. Shadow386 says you're doing it right
  104. [15:38] <Miclee> We are doing it right.
  105. [15:38] <Miclee> nallar: What are we doing wrong, from your point of view?
  106. [15:38] <nallar> I'm only thinking about situations in whcih you can just do modifications to what the super class does, like adding 2 to the return value.
  107. [15:38] <nallar> actually modifying inner workings doesn't keep compatibility, unless you call the super then fix what it did
  108. [15:39] <medsouz> I guess by extending if they use different methods it would work
  109. [15:39] <Miclee> nallar: And fuck compatibility, most things will be incompatible anyways.
  110. [15:39] <medsouz> but thats about it
  111. [15:39] <nallar> and that means slow redundancy.
  112. [15:39] <TLUL> Shockah: So I just fixed some bugs, and now my stupid terrible kludge is working just fine.
  113. [15:39] <Shockah> lul
  114. [15:39] <nallar> so I guess my method's only a good idea in specific situations.
  115. [15:39] == SioxerNic [~chatzilla@0x573b2e4e.hknqu1.dynamic.dsl.tele.dk] has joined #risucraft
  116. [15:39] <medsouz> theres a reason I dont touch base classses
  117. [15:40] <medsouz> all of socialminer is through modloader, not base classes touched
  118. [15:40] <SioxerNic> Hi People, is there anyone who could possibly guide me to a way to implement BioSphere mod to SMP?
  119. [15:40] <TLUL> But you see my dilemma, right? I only have reflective access and I don't know the class names, so I have no way to get at EntityList or at classes like EntityCreeper
  120. [15:40] <WackoMcGoose> Yeah, but sometimes there's no way around touching base classes.
  121. [15:40] == Techie[Away] has changed nick to computertechie
  122. [15:40] <ashtheking> SioxerNic: ask Risu for permission first. Then look at the code and change worldgen.
  123. [15:40] <SioxerNic> It would be much appreciated.
  124. [15:40] <Samantha> wb
  125. [15:40] <nallar> Also, protip, never ever try to write a mod which needs reflection (any mod...) when the only javadocs you have access to are the java sources and you have no program to generate the javadocs from them.
  126. [15:40] <nallar> D:
  127. [15:40] == GUIpsp has changed nick to GUIpsp|away
  128. [15:40] <SioxerNic> I personally do not have much experience in coding for MineCraft
  129. [15:40] <WackoMcGoose> "Modern Winter Mode" would've never happened if I didn't turn BlockSnow into a spaghetti bowl of code.
  130. [15:40] <clone1018> ?lahspeak
  131. [15:40] <crow> lahwran's risucraft mumble server: host lahwran.net default port (64738)
  132. [15:41] <Shockah> TLUL, no, i don't see it, because i don't get why you have such a problem with using class names
  133. [15:41] <TLUL> Because it has to be compatible with multiple versions of Minecraft without altering the wrapper at all.
  134. [15:41] <medsouz> SioxerNic: ask Risugummibears :P
  135. [15:41] <WackoMcGoose> TLUL: ...........................
  136. [15:41] <Shockah> TLUL, lazy much?
  137. [15:41] <TLUL> Yes.
  138. [15:42] <TLUL> I take anywhere from a week to three months to update my mods.
  139. [15:42] <TLUL> Ergo, this is easier.
  140. [15:42] <SioxerNic> As I heard he has no plans to do an smp version of it?
  141. [15:42] <TLUL> Or at least, it was until I needed to identify Entity types
  142. [15:42] <Risugami> doesn't javassist help with that?
  143. [15:42] <Shockah> but you're spending much more time right now on doing that with reflection than you would by updating it like normal
  144. [15:42] <WackoMcGoose> Then wait for Mojang Time to catch up enough for the mod API to come out. Jeb said mod installs would be more persistent then.
  145. [15:42] <medsouz> actually since we're on the topic of biospheres, Risugami you should add a feature to modloader that allows us to add to the terrain gen list
  146. [15:42] <medsouz> unless that already exists
  147. [15:42] <medsouz> and you should also make biosphers on that list
  148. [15:42] <Shocky> RSS: 3m 34s ago | carnalizer: Design 101: If people read from left to right, put the important stuff on the left. Profile, trends et al is secondary function. #twitter | http://bit.ly/zhVkbs
  149. [15:42] <Risugami> like adding a new pass?
  150.  
  151. ===========================================================================================================
  152. Ran-dumb quotes:
  153. [20:14] <InsanityBringer> why do you have a medic zapping your penis with a medigun
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement