Jump to content

sir_titi

Members
  • Posts

    58
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sir_titi

  1. https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/
  2. Wait what do you mean? Sorry me for being stupid
  3. Heya, i have taken a quick look at your TESR and you are setting the value in the render method, I would recommenced you to do this for example in the update method in your tileEntity (to update the value) and make setters and getters for that value in your tile. So then you can call this from your TESR. But you should also take care of the latency. Example to explain better : tile.getModelAngle() * partialTickTime <- if you are actually rotating the model and if the data (angle) doesn't change you give it just the tile.getModelAngle() real example : float rotation = tile.isModelRotating() ? tile.getModelAngle() + (tile.getModelAngle() - tile.getModelPrevAngle()) *partialTickTime : tile.getModelPrevAngle() + ( tile.getModelAngle() - tile.getModelPrevAngle()); GlStateManager.rotate(rotation, 0, 0, 1); Hope this helps you somehow. (NOTE: TESR is as far as i know multi-threaded meaning the same render method is called in "independent" threads so your "angle" in the TESR will have different values, cuss the different threads don't share there values/data to each other. So your rotation will always be broke. And the render method is only called when the player is actually looking at the block/tile, so is not rotating which is fine if it's just for aesthetic purpose ) Greets Sir_titi
  4. Ok thanks for pointing that out :). I do know that forge is just a library that we use cuss all my mod do still reference to the library. To be honest that's how i learned it :p.
  5. NO you don't need that, but as i said it keeps my project clear of the MC/Forge code, cuss this would mean for every project you will have, all the MC/Forge code+assets would be duplicated. And in my opinion that is foolish
  6. oow well do you have your MC code in a separate project? cuss i do and the base Main project is Minecraft (kinda logical). Meaning all the MC/Forge code is in that project and let's say mod core has only the core code+assets and my radio mod has all the radio thingy's in it's dedicated project. And if i want to run it i actually run the MC/Forge, core and my radio mod. Just as in my picture. /\ /\
  7. Well not that hard also :p. Let's say you are at that menu i showed (picture), well there you see your project run/debug configurations, you could just right click the Client/Server and do "duplicate", then you can change that one that will have the 2/or more mods to the run/debug thingy. (as showed before).
  8. Well yea it does, but you could make your own run/debug configuration , that has both mods for the Client and Server
  9. if you add method, fields what not then you always have to reboot. these are hard changes so yea you could change values of already set fields, ... but not new thingy's
  10. Well to keep it "simple" :p. Let's say project A needs project B, than the build-path of A would have the project added to it's build-path B (right click your project in Eclipse open the build-path "configure build-path", then go to tab projects and add your B 'core' mod to the build path of A) that's not all you have to do :p. (this is to be able to code 'dependency') You will now have to edit the run/debug click on "run/debug configuration" in there you have to go to tab "Class-path" and simply add the projects and you can run them all . Hope this helps you some how it's not that hard.
  11. No maybe not :p. But i do personally prefer this cuss it keeps every project separate (NOTE: i even go this far that i keep all MC/Forge separate also), but still you can edit/create all the projects from the same base folder with sub-folders. And if you make you Gradle setup multi-project also you can build all/or just the ones you want. It's keeps it nice and clear not one mess with all stuff in one location(M.H.O), but it's you that have to feel comfortable with the tools/"method off operations" you want to use. EDIT:did you make sure that your build-path in Eclipse is properly set-up? so that you can read/edit the two ore more mods, and even test run it? Greets Sir_titi (and sorry for late reply)
  12. If you use OBJ (wavefront) you could also use Blender for mobile (android) link, although it hasn't been updated for a while now
  13. meta data is limited to 16, ranging from 0 to 15.
  14. Hah yea, my bad :p. Nevertheless your issue is weird man :s, cuss your "text" is rendered properly, but the "drawing" doesn't.
  15. Is data synced to server? because i have noticed you set the position but on server from Client :s. This can not work. Oh sorry my bad not correct:p.
  16. hmmm, this is really weird :s. I'm afraid i might not be able to help you here, dammit.
  17. and the method does get called yes? cuss that is pretty weird wait a sec i'll take a look at my GUI's
  18. ah ok :p. And to be clear it's doesn't render anything (border)?
  19. well i extend the Gui rather than doing what you are doing Why do you do it this way if i may ask?
  20. then show me the GUI code, cuss it sure works i use it :s.
  21. Maybe this may be of use to you (comes from my core but feel free to use it) /**draws a rounded bordered box * @param centerToMousePosX * @param centerToMousePosY * @param height * @param boxLenght * @param innerColor * @param outerColor * @author kevin (Sir_titi)*/ public void drawRoundedBox(int centerToMousePosX,int centerToMousePosY,int height,int boxLenght,int innerColor,int outerColor){ drawRoundedFilledBox(centerToMousePosX, centerToMousePosY, height, boxLenght, innerColor); drawRoundedHollowBox(centerToMousePosX, centerToMousePosY, height, boxLenght, outerColor); } /**draws a hollow (border) * @param centerToMousePosX * @param centerToMousePosY * @param height * @param boxLenght * @param color * @author kevin (Sir_titi)*/ protected void drawRoundedHollowBox(int centerToMousePosX,int centerToMousePosY,int height,int boxLenght,int color){ drawVerticalLine(centerToMousePosX-5, centerToMousePosY-1-4, centerToMousePosY-height+3, color);//left drawHorizontalLine(centerToMousePosX, centerToMousePosX+boxLenght-1, centerToMousePosY-height, color);//upper line drawVerticalLine(centerToMousePosX+4+boxLenght, centerToMousePosY-1-4, centerToMousePosY-height+3, color);//right drawHorizontalLine(centerToMousePosX, centerToMousePosX+boxLenght-1, centerToMousePosY-2, color);//lower line for (int i=0;i<4;i++){ drawRect(centerToMousePosX-i, centerToMousePosY-2-i, centerToMousePosX-1-i, centerToMousePosY-1-i, color);//lower left drawRect(centerToMousePosX+i+boxLenght, centerToMousePosY-2-i, centerToMousePosX+1+i+boxLenght, centerToMousePosY-1-i, color);//lower right drawRect(centerToMousePosX-i, centerToMousePosY-height+i, centerToMousePosX-1-i, centerToMousePosY+1-height+i, color);//upper left drawRect(centerToMousePosX+i+boxLenght, centerToMousePosY-height+i, centerToMousePosX+1+boxLenght+i, centerToMousePosY+1-height+i, color);//upper right } } /**draws a full rounded box * @param centerToMousePosX * @param centerToMousePosY * @param height * @param boxLenght * @param color * @author kevin (Sir_titi)*/ protected void drawRoundedFilledBox(int centerToMousePosX,int centerToMousePosY,int height,int boxLenght,int color){ drawRect(centerToMousePosX, centerToMousePosY-2, centerToMousePosX+boxLenght, centerToMousePosY-height+1, color); for (int i=0;i<4;i++){ drawRect(centerToMousePosX-i, centerToMousePosY-2-i, centerToMousePosX-1-i, centerToMousePosY-height+1+i, color); drawRect(centerToMousePosX+boxLenght+i, centerToMousePosY-2-i, centerToMousePosX+boxLenght+1+i, centerToMousePosY-height+1+i,color); } } /**draws a squared box (+border) with default height of 14 pixels<br> * use {@linkplain GuiUtils#drawSquaredBox(int , int, int, int, int, int)} for custom height * @param CenterToMousePosX * @param CenterToMousePosY * @param BoxLenght * @param InnerColor * @param OuterColor * @author kevin (Sir_titi)*/ public void drawSquaredBox(int CenterToMousePosX,int CenterToMousePosY,int BoxLenght,int InnerColor,int OuterColor){ drawSquaredBox(CenterToMousePosX, CenterToMousePosY, 14, BoxLenght, InnerColor, OuterColor); } /**draws a squared box with border * @param CenterToMousePosX * @param CenterToMousePosY * @param height * @param BoxLenght * @param InnerColor * @param OuterColor * @author kevin (Sir_titi)*/ public void drawSquaredBox(int CenterToMousePosX,int CenterToMousePosY,int height,int BoxLenght,int InnerColor,int OuterColor){ drawRect(CenterToMousePosX, CenterToMousePosY-2, CenterToMousePosX+BoxLenght+1, CenterToMousePosY-height+1, InnerColor); drawHorizontalLine(CenterToMousePosX-1, CenterToMousePosX+BoxLenght+1, CenterToMousePosY-height, OuterColor); drawHorizontalLine(CenterToMousePosX, CenterToMousePosX+BoxLenght, CenterToMousePosY-2, OuterColor); drawVerticalLine(CenterToMousePosX-1, CenterToMousePosY-height, CenterToMousePosY-1, OuterColor); drawVerticalLine(CenterToMousePosX+BoxLenght+1, CenterToMousePosY-height, CenterToMousePosY-1, OuterColor); } EDIT: to explain some more the "drawVerticalLine(xPos,minY,maxY,color)" And the "drawHorizontalLine(minX,maxX,yPos,color)"
  22. this depends on whether you are using JSON or TESR rendering (note TESR isn't the best way (use this only for dynamic model)
×
×
  • Create New...

Important Information

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