Jump to content

Elix_x

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by Elix_x

  1. There must error log in console when this happens. Please post it....
  2. Okay... so i'll have to do that... are you sure, that this isn't possible with worge or fml?
  3. What do you mean the client that you have made??? If it has nothing with forge, your question theoretically does not belong to this forum at all...
  4. And then new map with light opacities to change it back in certain conditions... Maybe, but there's no other way? (btw, my mod to do this already uses asm, so use it once more somewhere will not be hard... (but where exactly, i can't find...)) EDIT: maybe directly getLightOpacity with coords in block???
  5. Hi there, thanks for opening this topic. I was looking in vanilla source code trying to find a way to change light that block recieves to display shadow... In short, here's my problem: If you have any ideas how i could do this, please tell me... IF you have any questions - just ask!
  6. Models. Currently i'm working on mod, where players using special projector can project models into mc. All is ready, but to work on server, syncing between all players is needed. And that's why i need to send models from on to other... (then they are put in external folder in mc folder, which is meanwhile loadaed "as" external resourcepack). And also, server is sort of hub, because if no, if new player joins game and nobody is on server, he will not be synced...
  7. Hi there, i have a question: is there an easier way to sync a lot of data (folders of files) beetween client an server. Currently i found only few: using normal packets sytem and transfering byte[] via nbt or directly via to bytebuf (but how?) And is there an easier way to do this? Any help would be appreciated. If you have any questions, just ask!
  8. Nope, he needs cutom armor model. There's tutorial for that: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571595-1-7-2-how-to-code-custom-3d-armor-models-3d
  9. Oh and also, using box from world renderer and checking for collide with mine, selcts them all...
  10. One for entity is the case of not working translateD. Just adding right before it translateD, doesn't change a lot... Well to explain better, it doesn't raproaches it to center, just to one point far away from it... (i'll post pics here as soon as will have them, and sorry for long awaited post)...
  11. You cannot import directy .3ds, but you can .obj. It's same type of model (wavefront). To obtaint obj, import 3ds to blender and export as .obj... For the rendering it in mc you can find tutorials, but if you don't now java (or don't know well), i recommend to start from something else, neither than from this...
  12. 1) I tried using translateD, and for some reasons this is not working... (why???)... 2) I mean that only first layer of item is rendered. Example: leather armor has 2 layers of texture, but only one is rendered
  13. If you need any additional info, just ask!
  14. Hi there, I'm working on new mod, and i want to force to update world rendering in certain cases in certain areas. Force, because rendering of certain blocks depends of player's position. I already found array of all world renderers (and i can access it), but now i want to choose only those responsible for my area (i have the area specified via AxisAlignedBB)... Afterwards marking them needsUpdate will do the thing... Any ideas are welcome... And also, i can't mark all of them to be updated: this produces little frame drop and freezing...
  15. Key bindings... But first, i'll see if they are overridable via gui...
  16. Maybe, i'll see what i can do and return back here. How ever i still have to load this file each time right after game settings are loaded, to override some...
  17. Hi there, i have a question for you: is there (or will be) events for loadOptions and SaveOptions in GameSettings. Because, for my mod, it will be easier to save some data in settings file, then own config...
  18. I can tell you that onServerStarting, onServerStarted, onServerStopping and onServerStopped events will help you! (They are fired even in sigleplayer)
  19. Thanks, but that's exactly what i know i CAN'T USE. Because of reasons and mechanics... BTW, is pre client tick fired before input events?
  20. Okay... I tried to find other ways to do my task and found one, but i have question: While iterating through Mouse & Keyboard events of lwjgl, are they removed? Or am i able to iterate thorugh them multiple times???
  21. I know what is reflection and i know how to use it. BUT: when you have method where you need to a lot manipulate many private fields & methods... in this case transformers might be easier...
  22. Okay, force adding MANIFEST.MF (with FMLAT) in meta inf and re running commands - didn't help...
  23. Okay so, i used this method to write access transformers (.cfg, and META_INF args...): http://www.minecraftforge.net/wiki/Using_Access_Transformers#ForgeGradle_.2F_Minecraft_1.7.10 But now to continue, i need to see changes in workspace. I tryied to run this commands: gradlew clean gradlew setupDecompWorkspace But i see no changes in IDE. If i'm doing something wrong, please tell me! EDIT: I know what is reflection and i know how to use it. BUT: when you have method where you need to a lot manipulate many private fields & methods... in this case transformers might be easier...
  24. [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:transform:31]: ################################################## [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:transform:32]: Patching EntityTNTPrimed [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:patchEntityTNTPrimed:127]: ************************************************** [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:patchEntityTNTPrimed:128]: Patching onUpdate [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:patchEntityTNTPrimed:157]: Patching onUpdate Completed [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:patchEntityTNTPrimed:158]: ************************************************** [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:transform:35]: Patching EntityTNTPrimed Completed [12:50:44] [main/INFO] [sTDOUT]: [code.elix_x.coremods.avoidexplodingcreepers.core.AvoidExplodingCreepersTransformer:transform:36]: ################################################## [12:50:44] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NoClassDefFoundError: net/minecraft/entity/item/EntityTNTPrimed at net.minecraft.block.Block.registerBlocks(Block.java:289) ~[block.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:457) ~[bootstrap.class:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:323) ~[Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:141) ~[Main.class:?] ... 8 more Caused by: java.lang.ClassNotFoundException: net.minecraft.entity.item.EntityTNTPrimed at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at net.minecraft.block.Block.registerBlocks(Block.java:289) ~[block.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:457) ~[bootstrap.class:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:323) ~[Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:141) ~[Main.class:?] ... 8 more Caused by: java.lang.ClassFormatError: Illegal class name "code.elix_x.coremods.avoidexplodingcreepers.explosions.ExplosionSrcManager" in class file net/minecraft/entity/item/EntityTNTPrimed at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_25] at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_25] at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_25] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25] at net.minecraft.block.Block.registerBlocks(Block.java:289) ~[block.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:457) ~[bootstrap.class:?] at net.minecraft.client.Minecraft.<init>(Minecraft.java:323) ~[Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:141) ~[Main.class:?] ... 8 more Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
  25. Okay, i got it working... long time ago... But now i have problems with another coremod: I need to insert piece of code in onUpdate in EntityTNTPrimed (because there's no super call or any event there.) What i need to insert is this: ExplosionSrcManager.onUpdate(this); onUpdate modified should look like this: public void onUpdate() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.motionY -= 0.03999999910593033D; this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.9800000190734863D; this.motionY *= 0.9800000190734863D; this.motionZ *= 0.9800000190734863D; ExplosionSrcManager.onUpdate(this); if (this.onGround) { this.motionX *= 0.699999988079071D; this.motionZ *= 0.699999988079071D; this.motionY *= -0.5D; } if (this.fuse-- <= 0) { this.setDead(); if (!this.worldObj.isRemote) { this.explode(); } } else { this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); } } Here's TNT transformer method: private byte[] patchEntityTNTPrimed(String name, byte[] bytes) { String onUpdate = AvoidExplodingCreepersTranslator.getMapedMethodName("EntityTNTPrimed", "func_70071_h_", "onUpdate"); String onUpdateDesc = AvoidExplodingCreepersTranslator.getMapedMethodDesc("EntityTNTPrimed", "func_70071_h_", "()V"); ClassNode classNode = new ClassNode(); ClassReader classReader = new ClassReader(bytes); classReader.accept(classNode, 0); for(MethodNode method : classNode.methods){ if(method.name.equals(onUpdate) && method.desc.equals(onUpdateDesc)){ try{ System.out.println("**************************************************"); System.out.println("Patching onUpdate"); //PUTFIELD net/minecraft/entity/item/EntityTNTPrimed.motionZ : D AbstractInsnNode targetNode = null; for(AbstractInsnNode currentNode : method.instructions.toArray()){ if(currentNode.getOpcode() == Opcodes.PUTFIELD){ FieldInsnNode field = (FieldInsnNode) currentNode; if(field.owner.replace("/", ".").equals(EntityTNTPrimedClass) && field.name.equals(AvoidExplodingCreepersTranslator.getMapedFieldName("EntityTNTPrimed", "field_70179_y", "motionZ"))){ targetNode = currentNode; break; } } } InsnList list = new InsnList(); list.add(new LabelNode()); list.add(new VarInsnNode(Opcodes.ALOAD, 0)); list.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "code.elix_x.coremods.avoidexplodingcreepers.explosions.ExplosionSrcManager", "onUpdate", "(L" + EntityTNTPrimedClass.replace(".", "/") + ";)V")); method.instructions.insert(targetNode, list); System.out.println("Patching onUpdate Completed"); System.out.println("**************************************************"); }catch(Exception e){ System.out.println("Patching onUpdate Failed With Exception:"); e.printStackTrace(); System.out.println("**************************************************"); } } } ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS); classNode.accept(writer); return writer.toByteArray(); } Notes: 1)i need to insert this after position updates (because reasons) 2)don't worry about AvoidExplodingCreepersTranslator.something and (string->) EntityTNTPrimedClass.replace(".", "/") : they always return good values (i tested via console) output) 3)crash report is the same (java.lang.ClassNotFoundException: net.minecraft.entity.item.EntityTNTPrimed) Thanks for help...
×
×
  • Create New...

Important Information

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