Jump to content

pelep

Members
  • Posts

    107
  • Joined

Posts posted by pelep

  1. @pelep, well that or start with a call to draw(), change texture to the one you need, startDrawing(), bunch of addVertexWithUV, draw(), rechange back to vanilla texture, startDrawingQuads() to resetup for vanilla drawing.

     

    yeah, but draw() returns an int which is used by MC afterward. according to the comments, it gets sent to the gpu. and i honestly don't know enough about how to handle gpu/hardware related stuff, so i decided not to mess with it and opted to use icons instead :)

  2. i might have ran into a similar problem before, but i can't say for sure since what you posted isn't the forge log. that's just a console dump. anyway, i did have an idea for how to solve it but i never really tried it since i figured out a different way to do things for my mod. if it is the same kind of error, maybe i could help you (and myself) figure it out.

     

    about your code, why are you checking only opcodes and not types? also, looking at "patchEntityPlayer", i'm assuming your intention was to modify only the first InsnNode, but you never actually set your boolean "first" to false.

  3. Even when using your tessellator code, I still get the same issue.

     

    What did pelep and gotolink mean with the icon thing by the way? Maybe that's the issue I'm having. I'm starting to think what I'm trying to do isn't possible for a normal mod... I can't think of any other mods which do it either.

     

    well, like i said, changing the texture there will change it for all the blocks in the chunk. and since your texture is black, you're effectively "plunging your world into darkness". and it's possible, i just did it. regarding icons, did you take a look at the methods i mentioned above? because you can learn how to use them from there.

  4. wth. why does your post have a thank you from me?o_o

     

    anyway, you can use hydroflame's suggestion. you just have to tweak it a little. since you say you're good in math, you should be able to understand this:

     

    take the player's position to be a point of origin then check what quadrant the entity's position is in relative to that point. if it's in quadrant 1, the difference in angle (hydroflame's suggestion) should be x degrees. if it's in quadrant 2, it should be something different, and so on

  5. When I tried using the ResourceLocation, very very strange things started happening... mostly involving chunks de-rendering :P

     

    i'm currently cleaning up my code right now and i'm currently removing tile entities that i was too lazy to use isimpleblockrenakdjsfak for and i ran into that. i haven't really looked into block rendering too much until now, but what i've been able to figure out is:

     

    mc renders in bulk. it doesn't render per block per chunk. it goes through each block in the chunk and adds the vertices but doesn't render them. once it's done with each block, that's when it renders everything. and since they're rendered in bulk, when you change the texture being used, you change it for every block in the chunk. so you're either gonna have to use icons to include your textures in the terrain texture (can icons be larger than 16x16? still gonna test it out later) or do what hydroflame suggested (but you'll have to figure out a way around the problem).. or something else. i dunno. i vote icons if they work

     

    if I put startDrawingQuads before everything, the game crashes.

     

    that's because it's already been called beforehand. and draw() is called after mc is done going through the blocks in the chunk. unless you want to do something else, all you really need to do is supply the vertices

     

    also, if you want it to render with the correct brightness, seems like you'll have to add it for each side yourself. depending on how you want that to work, it could go from a few lines of code to buttloads. basically, the more complicated your block is, the more tedious it gets. the plus side is that the code seems pretty straightforward and easy to read despite the amount of it

     

    anyway, like i said, i'm still digging through the rendering code. if i made a mistake, feel free to tell me :)

  6. Just read it. Didn't see anything mentioning the location of the logs.

     

    there is. a very brief mentioning of it. and just a comment to whoever wrote the eaq (and no offense to him/her or anything) but the common problems and solutions section isn't very legible.

  7. i tried recreating the error, but i didn't get any. but then i didn't really try too hard and i'm using 9.10.0.800. maybe try updating? or maybe try explicitly implementing it in the subclass as well and then just call the super in each method and see if that works

     

    edit: misunderstood your post. my new answer: i have no idea. but why not just implement it in your superclass as well? (does that question make sense or did i misunderstand again?)

  8. well.. depends on what you mean by core mod. hydroflame and diesieben actually just interpreted your question in two different ways. if you mean a core mod like those that go in the coremods folder (pre 1.6) then that would be for making changes to base classes without having to touch them directly. if you mean the other thing (like a library or something), then yeah, i think it'd be pretty pointless to make one if you only have one mod. if you do have multiple mods that use the same code or intermingle with each other, then a core mod would be a way of organizing and centralizing things

  9. no, you don't need to move anything. you can still register your mod by using the @mod annotation and keep it separate from the ifmlloadingplugin. and i don't think you need an access transformer for that. i read somewhere that during runtime (in mc, after reobfuscating) everything's turned to public so all you need to do is change it to public in your dev env as well. i don't really know if absolutely everything is turned public (i doubt it) but i'm guessing a lot is. anyway, i used to use an access transformer for some stuff but after finding out that piece of information, i got rid of it and my mod still works fine.

  10. You'd understand sarcasm or Irony not even if I smashed it in your face.

     

    Says the guy who can't even form a sentence right. and it's crashing because you're modifying the list while iterating through it. either replace only the entityitem's itemstack and not the entityitem itself or modify the list after you've iterated through it. and that's the last thing i'm saying. hydroflame and gotolink may be patient enough to deal with your immaturity and bs, but i'm certainly not. so byebye now

  11. Man, the time it took you to write all thoose walls of text could have been used to just post the damn code. Now get of your throne, you don't even remotely listen to what I'm telling you Java-Nerd.

     

    "Java-Nerd"? real mature. i suggest you listen to yourself and go learn basic java. i mean f*ck, i already told you how to do it, hydroflame confirmed it, and gotolink basically did it for you. and you still complain?? are you that much of a baby that can't be bothered to figure out the rest yourself? you need absolutely everything done for you? get over yourself

  12. I'd say I have to go with something like...

     

    event.entityLiving.removeItem(Item.leather.itemID)

     

    ...but it didn't work

     

    soooo close... try looking up arraylists if you don't know how to use them.

     

    So I was right when thinking you're the little smarty by reading all the miriads of your posts on this forums, telling people to learn something, instead of just helping them.

     

    and which posts did you read exactly? because as far as i remember i only answer like a dick when the answer to the question is annoyingly simple and can be figured out with just a bit of research (in your case, it shouldn't even take 10 minutes). or if i know the op to be a dick. but i still give answers which should be enough to help them

     

    Look, it gains you nothing in life to know so much about Java code. But it gains you a lot of envy by acting like a dick. And obviously I can't know as much about Java as you do, because clearly I have a life. It's not lag of skills or commitment, it's simply a lag of time.

     

    who says i know a lot about java? i learn java on my own and as a hobby. and i'm an architecture student (meaning my workload is ridiculous and i spend most of my time working that i barely get any sleep), but even then i still have a life outside of school and coding. and even then i don't need someone to spoon feed code for me to figure something out.

     

    Modding communitys are supposed to share and help each other, at least that's what we're doing over at Skyrim Community...seems like attitude over here is far more reserved and superior. Feel pleased about your skills, because that's probably all you got.

     

    help others by posting code for them to copy and paste without them understanding what it does? that's not helping at all. i post code when i see that the op knows what he's talking about. if he doesn't, i point them in the right direction so he can figure things out. a buttload of posts here are related to copied code that the ops don't understand and don't bother to... which is annoying.

     

    i pointed you to the answer, but if you're looking for code, i'm not posting any for this. think of me as a dick if you want to, but not everyone here is. i was about to say some guy named hydroflame is usually patient enough to help out a lot, so wait for him. but he already replied here and wadaya know? he said basically the same thing i did.. aaaannd gotolink just posted code.

     

    god damn this is a long post

  13. This would have an effect on the new items added or on any single item to be spawned by dead entitys, but does absolutely nothing to singled out vanilla drops. Except you want me to edit base files...:D

    The iteration did not seem to work on items dropped by mobs.

     

    erm.. cancelling an event doesn't require base class edits. and i just tried what i said earlier and it works. you're just not doing it right. also, that code you tried to modify is for recipes so i have no idea what you tried to do with it. i'd post code, but you clearly don't know what you're doing, so you're going to either have to try harder and figure it out yourself (which i recommend so you won't have to rely on the forums) or wait til someone's nice enough to post code. also, everything you need is already in your "public void onEntityDrop(LivingDropsEvent event)" method, so it shouldn't be too hard to figure out. you just need to change some stuff in there (and i already said what to do earlier). goodluck, ima head to bed

  14. If you'd happen to know something just speak it out loud, without acting all superior.

     

    i tend to be this way when i'm sleepy. so... get over it. at least i gave the answer (but apparently not enough)

     

    I wouldn't come here and ask if I haven't already tried my butt off. Obviously I'm already using event code:

     

    no, you never once mentioned you were using the events already. so no, not "obviously".

     

    But adding new drops isn't the same as removing the vanilla ones.

     

    obviously.

     

    anyway, to answer your question completely and properly:

     

    you can do what gotolink said, but that would stop all the entity's drops from spawning. if you want it that way, then go ahead. if you want to remove just a specific item, iterate through the list of drops and check if it's the item you want to replace, then replace it, if it is.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.