Jump to content

icecubert

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

icecubert's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I have looked at a couple of online documentations with the forge hierarchies but I couldn't find an answer. A BlockDoor is a block, so in both states (open and closed) it acts as a block. Does this mean that it technically takes up the whole "cube" and some of it is without collisions, or is it a special sized block. Is there any way to get the block adjacent to the door? I tried to look for location, adjacent, nearby, etc... methods but they don't seem to exist for a door. My next best bet was to implement a pressure plate mechanism, however when I checked the methods none of them seemed to explain the effect that pressure plates have. Any ideas about what those might be? tl;dr I want to be able to detect players on top of/nearby/in blocks. I tried to look online for the appropriate methods, but I couldn't find them. If they exist I apologize for the question. Thanks!
  2. Thanks for the info! I thought it had something to do with de-obfuscating the code but this definitely cleared stuff up about how it worked. I think I'll look more into how the whole process works and how people went about doing it, it seems pretty interesting.
  3. Thanks! I should probably do that too. Any ideas why the parameters are like that? Were they originally like that or did it happen through the whole process of decompiling the code and what not?
  4. I'm pretty familiar with normal naming conventions in Java, what I wanted to ask about is specifically the forge mc code and how existing modders change it. While making a few of my first basic mods, I encountered many parameters named "p_149727_4_", could I change those? Or is the convention to leave them like that? Also, if I were to change them... what do they mean? The code seems to be filled with random parameters and mysterious names. Did this happen because of de-obfuscation or did Notch/Jeb somehow work with this stuff. I mean maybe it all make sense I'm just not used to it!
  5. Good news!!!!! I love how all of us missed this. I named the method "onDoorActivated" when it should've been "onBlockActivated". Whoever told me to try @Override saved my life, because when I put it above the method it told me no method was being overridden which allowed me to see the mistake in naming. Thanks guys!
  6. Check the spoiler tags, I forgot about the code tag so I used spoilers, sorry. That should be all the code I added concerning this door.
  7. Errr that could be the case. But when I read the documentation online the DoorBlock had an onActivateMethod which was a response to a right click, so I just assumed that was the "door" I needed. I mean an actual block of wood wouldn't have such a method? No idea it seemed to simple but I'm going crazy.
  8. I guess this might be a pretty simple question, but for some reason I can't get this code to work. I'm familiar with java and it seems to be alright, it also produces no errors during compilation nor during testing with the client. So first I made a class called LevelTwoDoor which extended BlockDoor, the only real difference was adding a simple if statement that returned false if the player's level was lower than 2. Here is the class (the rest of the code is just copied from the original BlockDoor class). I added attempts at printing a message to the player before every possible return statement, but none showed. I also tried to kill them by setting their health to 0 before every return statement, and that never happened. So I'm assuming this whole class is somehow not actually in the game, although the item does appear. The if statement was added right at the beginning of the onBlockActivated method: Assuming that code isn't wrong (probably is considering this is my first attempt), the problem could be in me registering the LevelTwoDoor to the mod. The texture obviously doesn't appear, but the outline of the "level two door" does appear, and does switch orientation when I click it (below level 2 despite the if statement), and the messages never show up nor do I ever die as I should. I guess a problem could be in the casting of levelTwoDoor, but I did try to make it a LevelTwoDoor, a BlockDoor, and a Block, and I tried casting it in multiple ways. There's a chance I missed one, so if you think that's the problem let me know. Again I could be doing something completely wrong, or there could be a silly mistake, either way I'll appreciate any help I could get. Also, has no one implemented level-gated doors yet? I didn't find any when I searched around.
×
×
  • Create New...

Important Information

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