Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. Reinstall Minecraft & Forge. I had a bug like this in 1.5 or something. I fixed by deleting my player data file on the server. You could try this, It is probably a bad solution, and you will loose everything in your inventory (and all your other player data)
  2. it is however still supported. 1) Post your log in a spoiler not a text file we have to download. 2) 9:54:25 FML The coremod io.prplz.mousedelayfix.FMLLoadingPlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft this might be part of the problem 3) 19:54:21 launcher Have local file C:/Users\AhmedMalad\AppData\Roaming\.minecraft\libraries\org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar but don't know what size or hash it should be. Have to assume it's good. 4) I stopped reading it's way too painful reading off a text file, post your log in a spoiler
  3. ...remove this Why was this ever in your mods folder
  4. disable your weather mod, try again and post updated logs
  5. ...Back to the OP's post
  6. In short you shouldn't. If you are still planning on doing this, try @MDW01's approach. There are some other (possibly better) approaches but they are OS specific, what are you running?
  7. After ≈ 6 days of solid work I have made it work, I hope this helps someone. you find your y rotation through Math.atan2(originX - pointX, originZ - pointZ); and your up down (z/x) rotation through Math.atan2(originY - pointY, Math.sqrt(originX * originX + originZ * originZ) - Math.sqrt(pointX * pointX + pointZ * pointZ); then you convert both from radians to degrees. then you rotate around your y axis by your y rotation GlStateManager.rotate((float) yAngle + 90, 0, 1, 0); then you rotate around your x or z angle (I chose z because a) your normal rotation order is Y, Z, X and b) I was already using x for rotating my object 180 degrees from straight down to straight up) GlStateManager.rotate(90 - (float) _Angle, 0, 0, 1); I really hope this helps someone. Here is the full java code that I used Entity Position code (removes render shake) Rotation code //get Y angle double yAngle = Math.atan2(0 - dX, 0 - dZ); //convert angle to degrees yAngle = yAngle * (180 / Math.PI); yAngle = yAngle < 0 ? 360 - (-yAngle) : yAngle; //rotate by angle GlStateManager.rotate((float) yAngle + 90, 0, 1, 0); //rotate object (It starts facing down, I want it to start facing up) GlStateManager.rotate(180, 1, 0, 0); //get Up/Down (X/Z) angle double _Angle = Math.atan2(dY, Math.sqrt(dX * dX + dZ * dZ)); //convert angle to degrees _Angle = _Angle * (180 / Math.PI); _Angle = _Angle < 0 ? 360 - (-_Angle) : _Angle; //rotate by angle GlStateManager.rotate(90 - (float) _Angle, 0, 0, 1); //...draw object GitHub perma-link (High-accuracy entity positioning and object rotation) https://github.com/Cadiboo/WIPTech/blob/1bc15df55251b6631d31b6d101ae5a729ed2a4ca/src/main/java/cadiboo/wiptech/client/render/tileentity/TESRWire.java#L77-L126
  8. Hmmm... are any mods working? It looks like you have BiomesOPlenty, Industrialcraft, MineColonies, Morphing Mod, Thermal Foundation and Weather Storms Tornadoes Mod installed, none seem to be loaded, do any of them work?
  9. All good thanks for the help!
  10. Thanks! The maths for quaternions is over my head for the moment (I’m trying to fix this). You specified that because I was using Euler angles the axis were also rotated, do you know (off the top of your head) if there is a way use quaternions to avoid this?
  11. Maybe for some small performance benefit when only checking if the capability exists and not actually using the capability? Cases of this would be rare, but not nonexistent. Rendering functions like TESRs and HUDs come to mind
  12. I believe there is a method called something like getAllEntitiesInAABB (from memory it’s used in entity arrow maybe?) just loop the the returned List from that function and do an instanceof check on each mob to see if they are the mod that you are looking for.
  13. But when you finally solve that painful thing that you’ve been working on for a week it’s all worth it
  14. What is the 4th axis??? (time aha?) Its not gimbal lock so much as that when I rotate on 1 axis the other 2 axis rotate with it. This is as everything should be, but for my code I NEED them not to rotate (or better maths). I also don't understand Matrixes (Matricies??) or Quaternions at all and I don't really understand vectors very well either. I've set myself to fail pretty badly
  15. Answer all the questions so we can help please does this mean that you are using the Default 1.12 minecraft an existing forge profile or something else? exact link to the mod please there are ALWAYS log files, no exceptions (even if you just open the launcher) It shows up under Mods when minecraft is running?
  16. is there anywhere that has a tutorial on MCPBot syntax? I've actually had to go through quite a lot of source code and understand it and I would like to put my experience into the MCPBot
  17. you probably want subscribe events if they exist
  18. I think its important to note that MCP was NOT made by Mojang, and that amazing amounts of work have to be put into this tool every version to keep it up to date and readable! Every variable in Minecraft source code has obfuscated names and every variable in Decompiled code that has a logical name was named by someone who took the time to understand the variable and what it does enough to name it.
  19. I would recommend taking a look at how Actually Additions does it in the item Tooltip event. They did it really well https://github.com/Ellpeck/ActuallyAdditions/blob/7608a3af3d5184c78b422a095ca42b2c98069462/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java#L74-L172
  20. why not have the overlay as a block model & render the animated stuff inside it with a TESR or SmartModel
  21. This is not an excuse for staying on an outdated version AND is easily fixable AntVenom got one of his friends to make a mod (I think it was even server-side only) that allowed you to toggle 1.9 pvp on or off.
  22. in eclipse hover over the method...
  23. Does anyone know how I would rotate an object to look at a point (xyz entity location) in my TESR? I've gotten my 3 axis rotating perfectly when I only do one of them, but when I try to do all 3 of them, it doesn't work at all. (I'm using GlStateManager.rotate(angle, x, y, z) rather that Quaternions because I just cannot understand them). I'm relatively new to rendering, and haven't rendered anything more complex than ItemBlocks & Models in my TESRs before. Any help would be greatly appreciated. Link to the file in my GitHub: https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/client/render/tileentity/TESRWire.java Same code but with most comments removed @Override public void render(TileEntityWire tileEntity, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { if (tileEntity.electrocutionTime > 0) { double dX; //entity xy&z - set later double dY; double dZ; final int NumberOfBranches = 1; //for rendering the electricity final int NumberOfPossibleSubBranches = 2; List<Entity> entities = tileEntity.getAllEntitiesWithinRangeAt(tileEntity.getPos().getX(), tileEntity.getPos().getY(), tileEntity.getPos().getZ(), 113); for (int i = 0; i < entities.size(); i++) { GlStateManager.pushMatrix(); GlStateManager.translate(x + 0.5, y + 0.5, z + 0.5); dX = entities.get(i).posX - tileEntity.getPos().getX() - 0.5; dY = entities.get(i).posY - tileEntity.getPos().getY() - 0.5; dZ = entities.get(i).posZ - tileEntity.getPos().getZ() - 0.5; //Y rotation double aa = dX; double bb = dZ; double cc = Math.sqrt(aa * aa + bb * bb); double angle = 180F / Math.PI * Math.acos((bb * bb - (-cc * cc) - aa * aa) / (2 * bb * cc)); GlStateManager.rotate(90F + (float) angle * (aa < 0 ? -1 : 1), 0, 1, 0); //X rotation aa = dY; bb = dX; cc = Math.sqrt(aa * aa + bb * bb); angle = 180F / Math.PI * Math.acos((bb * bb - (-cc * cc) - aa * aa) / (2 * bb * cc)); //GlStateManager.rotate(70F + (float) angle * (aa < 0 ? -1 : 1), 0, 0, 1); //Z rotation aa = dY; bb = dZ; cc = Math.sqrt(aa * aa + bb * bb); angle = 180F / Math.PI * Math.acos((bb * bb - (-cc * cc) - aa * aa) / (2 * bb * cc)); GlStateManager.rotate(270F + (float) angle * (aa < 0 ? 1 : -1), 1, 0, 0); //... render electricity GlStateManager.popMatrix(); } } //... render wires }
  24. Misread the question ^^^ He makes a good point why would forge ever make something for you that you should make yourself by overriding about 3 methods? You can have your tile entities extend a Base class that automagically handles this for you... If this is what you would like, try looking at https://www.programcreek.com/java-api-examples/?code=canitzp/Metalworks/Metalworks-master/src/main/java/de/canitzp/metalworks/machine/TileBase.java# and https://www.programcreek.com/java-api-examples/?code=canitzp/Metalworks/Metalworks-master/src/main/java/de/canitzp/metalworks/packet/PacketSyncTileEntity.java# It automagically writes all your capabilities to NBT & syncs it every half second. I had quite a few problems with it (Not syncing even when explicitly told to, writing every face to NBT, syncing way too often). I've solved them so you might want to check out my implementation of it (my version can also write stuff other than caps to NBT) My version of the Base tile class https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/tileentity/TileEntityBase.java My Sync Packet class and my networking class https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/handler/network/PacketSyncTileEntity.java https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/handler/network/PacketHandler.java 2 classes that use it in my mod (Turbine is very simple, but only writes capabilities while Wire also writes "lastRecieved") https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/tileentity/TileEntityTurbine.java https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/tileentity/TileEntityWire.java
  25. Probably not, about Metadata, here is a (badly named) thread about metadata (or lack of it) in 1.13. Basically you need a new block for Variants, but Facing is stored in your block state (Properties, setDefaultState.withProperty, everything the same, but without the old getStateFromMeta & getMetaFromState functions) Your 11 blocks each with 4 variants would yes, become 44 blocks. They would be probably be instantiated something like this block1_variant1 = new Block("block1_variant1"); block1_variant2 = new Block("block1_variant2"); block1_variant3 = new Block("block1_variant3"); block1_variant4 = new Block("block1_variant4"); block2_variant1 = new Block("block2_variant1"); //...
×
×
  • Create New...

Important Information

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