Jump to content

RedEnergy

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by RedEnergy

  1. In log gradle says "(use -source 8 or higher to enable lambda expressions)" doesn't "-source 8" an argument? Where can i specify it?
  2. But lambdas a fully working at the development eclipse environment. This error happens only at build time
  3. Hello, i tried to build my mod using Forge Gradle but got this error. I tried to add these lines to build.gradle targetCompatibility = '1.8' sourceCompatibility = '1.8' , but it didn't help. Is there any way to solve this problem? My gradle version is: > gradlew --version ------------------------------------------------------------ Gradle 2.0 ------------------------------------------------------------ Build time: 2014-07-01 07:45:34 UTC Build number: none Revision: b6ead6fa452dfdadec484059191eb641d817226c Groovy: 2.3.3 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_45 (Oracle Corporation 25.45-b02) OS: Windows 7 6.1 amd64
  4. Hello, i am currently developing mod, which bring clans into the game and i need pass the clan's icon from server to client. This icon have a light weight (it's 16x16) and i think it will be good to keep them all in ./icons folder of the Minecraft directory. But i don't know to convert File to ResourceLocation to render it in the game. Can somebody help me with this?
  5. Thanks for reply guys, i will try to move in this way
  6. I need to get player with the specified name. If you look at the code, to which I have reference, you will see that i am storing all parties and players in it on the server side. If something changes in party (for example new player joined) i am sending SyncPartyPacket to all players in party, in which i am sending only player names. After receiving packet by client it must search for player with the given name in it's client world and form new client party. But if player doesn't loaded it doesn't exists in client party, so client cannot deserialize party successfuly.
  7. Because i need player's health and coordinates. And i don't want to use events for updating information on client
  8. Hello, i need to get EntityPlayer representation of player in the world. To do it i am using this line of code EntityPlayer player = Minecraft.getMinecraft().theWorld.getPlayerEntityByName(playerName); It works fine but only for players who already loaded in client world, if player far from client it will return null. Why do i need it? I am currently making party mod for and i need to sync players from party on server and client. Here is this part of code
  9. I need to add multiline textbox. I am using 1.6.2. For text rendering i have slick2d library. I made textbox but now my problem is with setting position of cursor to the coords of mouse click. Source code of textbox: http://pastebin.com/td7JGSaq . I know that i need to use #mouseClick method, but have no idea how to do it.
  10. Hello, i think it's enough said in the title of the topic, i need to add more color codes, i looked through EnumChatFormatting.class, but... there is no anything similar for what i need.
  11. Wow, didn't know that there different kinds of buses, thanks!
  12. Hello folks, i need disable tree growth for some saplings. I tried to do it using SaplingGrowTreeEvent but encountered with 2 problems. First: it's doesn't called and i can't catch it with event handler (When i grow tree my event method doesn't called), second: i can't get type of tree from this event. All code below. [spoiler=My event] @SubscribeEvent public void onTreeGrow(SaplingGrowTreeEvent e) { Core.instance.logger.log(Level.INFO, "Sapling event fired"); if(e.world.getBiomeGenForCoords(e.x, e.z) == BiomeGenBase.taiga)//Here i need to add conditional if type of tree not equals spruce { e.setResult(Result.DENY); } } [spoiler=Event handler registration] public EventHandler events = new EventHandler(); MinecraftForge.EVENT_BUS.register(this.events); FMLCommonHandler.instance().bus().register(this.events);
  13. Hello folks, i need to do another kind of item frame but at first tried to copy vanilla, i made item (http://pastebin.com/BfPEgSHz), entity (http://pastebin.com/PACcJdLF) and render for it (http://pastebin.com/dWBjQDvA). I registered all of it in main class (http://pastebin.com/62AzbtHk). But as a result i got: [14:38:47] [Client thread/ERROR]: ########## GL ERROR ########## [14:38:47] [Client thread/ERROR]: @ Post render [14:38:47] [Client thread/ERROR]: 1284: Stack underflow My frame doesn't renders and items a not displayed. What i am doing wrong?
  14. Ok, but i dont realise how can i replace only 1 method in class.
  15. Found information about it on wiki, now my MANIFEST.MF looks like this: http://pastebin.com/wgYwV8Z7 . But still it doesn't works
  16. Didn't heard about META-INF for coremods. How to fill it?
  17. Nothing happens everywhere, may be i must register loading plugins somewhere?
  18. Hi folks, i need to disable projectiles to destroy item frame, i tried to do it with event but it's not possible. Now i want to do it using IClassTransformer. But it's not working, nothing happens. Code below. Core file: http://pastebin.com/3nxf5nQB , Loading plugin: http://pastebin.com/w3fTYwmE, ClassTransformer: http://pastebin.com/nm51AcC4.
  19. Hello, i need to cancel frame death if it's die by projectile, i tried to do this with event: @SubscribeEvent public void preventFrameDeath(LivingDeathEvent e) { if(e.entityLiving instanceof EntityItemFrame)//Here goes error "Incompatible conditional operand types EntityLivingBase and EntityItemFrame" if(e.source.isProjectile()) { e.setCanceled(true); } } but I ran into a problem, EntityItemFrame isn't "living" entity. What can i do with this?
  20. Hello, i need to increase player speed by 2. I tried using entity attributes but it's didn't anything. Code, which i tried to use: player.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D);
  21. Hello everyone, i need to change player damage if it's health is lower than 25%. Currently, i am using AttackEntity event but there is no anything similiar to attack damage. I also do not want to use IAttributeInstance because i need to change it dynamically. My code: @SubscribeEvent public void onPlayerAttack(AttackEntityEvent e) { if(e.entityPlayer.getHealth() > (e.entityPlayer.getMaxHealth() / 4)) { //Here i need to increase player damage by 2.0 } }
  22. I still dont understood how to do this, i tried to do in sush way @ForgeSubscribe public void onGuiRendering(RenderGameOverlayEvent.Post event) { this.width = event.resolution.getScaledWidth(); this.height = event.resolution.getScaledHeight(); if(event.type == ElementType.ALL) { GL11.glPushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); GL11.glScalef(1.7F, 1.7F,1.7F); GL11.glTranslated(1.7F, 1.7F, 1.7F); ri.renderItemIntoGUI(mc.fontRenderer, mc.getTextureManager(), new ItemStack(Item.pocketSundial), (int) ((int) (this.width / 2 ) / 1.7F), 100); GL11.glPopAttrib(); GL11.glPopMatrix(); } } But it still not in the middle of x-axis
  23. Hello everyone, i need to draw picture on screen and make it a bit larger. I am doing this code: @ForgeSubscribe public void onGuiRendering(RenderGameOverlayEvent.Post event) { this.width = event.resolution.getScaledWidth(); this.height = event.resolution.getScaledHeight(); if(event.type == ElementType.ALL) { GL11.glPushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); GL11.glScalef(1.7F, 1.7F,1.7F); //pic goes here GL11.glPopAttrib(); GL11.glPopMatrix(); } } My problem is in glScalef(), after this method picture move away from the position which i am rendering it on. How to return it?
×
×
  • Create New...

Important Information

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