Looke81 Posted December 27, 2014 Share Posted December 27, 2014 Hey all i have two questions about 1.8 I've pretty much updated everything in my apart from two things. First i want to know what has "world.setBlock(p_147449_1_, p_147449_2_, p_147449_3_, p_147449_4_)" been replaced by because i cant find it anywere. Secondly "mc.entityRenderer.theShaderGroup" is now private so how do i change the shaders in 1.8? Thanks in advance Looke81. Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
TheGreyGhost Posted December 27, 2014 Share Posted December 27, 2014 Hi setBlock has become setBlockState. BlockID and metadata are now combined into a single class called IBlockState. See here for more info: http://greyminecraftcoder.blogspot.co.at/2014/12/blocks-18.html Re the shader - I know zip about shaders. But it's quite easy to make a private field public; just use Reflection (there are several tutorials on using it for Forge, alternatively you could look at this example: https://github.com/TheGreyGhost/SpeedyTools/blob/master/src/main/java/speedytools/clientside/userinput/KeyBindingInterceptor.java (It uses Reflection to make four private fields in KeyBinding public). -TGG Quote Link to comment Share on other sites More sharing options...
Player131 Posted December 28, 2014 Share Posted December 28, 2014 Yes but the problem of reflexion is that you need the name of your field ! The problem is here, you can't have the exact name of the field because of obfuscation !!! When the game will be re-obfuscated, you'll not be able to get back your field by the name. Otherwise you know the obfuscated name + the de obfuscated name witch is in many cases impossible to get in the Minecraft Forge Gradle system... Quote Link to comment Share on other sites More sharing options...
Player131 Posted December 29, 2014 Share Posted December 29, 2014 Ok, i'll try the download snapshots because visibly the bot isn't working at all here is what i get when connecting to #mcpbot : [13:12] qwebirc v0.90 [13:12] Copyright (C) 2008-2010 Chris Porter and the qwebirc project. [13:12] http://www.qwebirc.org [13:12] Licensed under the GNU General Public License, Version 2. //I typed just cameraZoom (private field on the EntityRenderer) [13:12] Can't use this command in this window //Typed again to be sure [13:12] Can't use this command in this window //And finaly "help"... [13:12] Can't use this command in this window Quote Link to comment Share on other sites More sharing options...
Player131 Posted December 29, 2014 Share Posted December 29, 2014 I just clicked Chat Now >> link, and i entered Player131 on the username and #mcpbot on the channel name. And about the snapshots, how do you use them in the ForgeGradle because everytime i add mappings = 'stable_10' to my build.gradle, it refuses to compile saying that there is no longer class Item, no longer class Block no longer methods any methods on the Minecraft, so it's strange... EDIT : Visibly it's working without # Quote Link to comment Share on other sites More sharing options...
Draco18s Posted December 29, 2014 Share Posted December 29, 2014 I just clicked Chat Now >> link, and i entered Player131 on the username and #mcpbot on the channel name. MCPBot is not a channel. MCPBot is a user. You have to open a direct message window or MCPbot won't reply. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
shieldbug1 Posted December 29, 2014 Share Posted December 29, 2014 I believe the user is now 'MCPBot_Reborn' Quote BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials. Link to comment Share on other sites More sharing options...
Draco18s Posted December 29, 2014 Share Posted December 29, 2014 And this, kids, is why we use a REAL IRC client. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
TheGreyGhost Posted December 29, 2014 Share Posted December 29, 2014 And this, kids, is why we use a REAL IRC client. Not to mention why we could use a proper web interface to the database... -TGG Quote Link to comment Share on other sites More sharing options...
Draco18s Posted December 29, 2014 Share Posted December 29, 2014 And this, kids, is why we use a REAL IRC client. Not to mention why we could use a proper web interface to the database... Yes fucking please. There's the CSV files that are local buried inside an app-data folder such that you can only locate them if you know where to look. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Looke81 Posted January 7, 2015 Author Share Posted January 7, 2015 hmm i folowed a tutorial on how to use reflection and i came out with this. Field theshadergroup = ReflectionHelper.findField(EntityRenderer.class, "theShaderGroup"); theshadergroup.setAccessible(true); try { mc.entityRenderer.theShaderGroup = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), resourcelocation); } catch (JsonException e) { e.printStackTrace(); } mc.entityRenderer.theShaderGroup.createBindFramebuffers(mc.displayWidth, mc.displayHeight); but i get two errors. "Type mismatch: cannot convert from ShaderGroup to Field" and "The method createBindFramebuffers(int, int) is undefined for the type Field" Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Looke81 Posted January 7, 2015 Author Share Posted January 7, 2015 ok could you point me in the direction of a working tutorial or tell me whats wrong with it? Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Looke81 Posted January 7, 2015 Author Share Posted January 7, 2015 well this tutorial here http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html tells me how to get private strings using reflection but i want to make the field "theShaderGroup/field_147707_d" = null or = a new ResourceLocation. Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Looke81 Posted January 7, 2015 Author Share Posted January 7, 2015 well i followed it and this is what i got but this must be wrong because i got two errors "Unhandled exception type NoSuchFieldException" both of these were over the parts is bold. @Override public void setCurrentShader(ResourceLocation resourcelocation, World world, EntityPlayer player, IResourceManager iresourcemanager) { Minecraft mc = Minecraft.getMinecraft(); EntityRenderer entityrenderer = new EntityRenderer(mc, iresourcemanager); Field theShaderGroupField = EntityRenderer.class.getDeclaredField("EntityRenderer"); theShaderGroupField.setAccessible(true); ShaderGroup fieldValue = (ShaderGroup) theShaderGroupField.get(entityrenderer); try { fieldValue = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), resourcelocation); } catch (JsonException e) { e.printStackTrace(); } fieldValue.createBindFramebuffers(mc.displayWidth, mc.displayHeight); } } Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Looke81 Posted January 8, 2015 Author Share Posted January 8, 2015 well i tried surround it with a try/catch but the game doesn't open it just crashes. crash report if you want it: http://pastebin.com/BdgUTC1F Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Draco18s Posted January 8, 2015 Share Posted January 8, 2015 Fur the love. .. Its a No Such Field exception. Fukin read. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Looke81 Posted January 8, 2015 Author Share Posted January 8, 2015 so if it isn't a field how do i use reflection? Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Draco18s Posted January 8, 2015 Share Posted January 8, 2015 Correctly. Why are you trying to get a field from EntityRenderer that is called "EntityRenderer"? That field doesn't exist. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Looke81 Posted January 8, 2015 Author Share Posted January 8, 2015 Woooops thats embarrassing the field is meant to be theShaderGroup. I've changed it now but it is still saying its not a field and when i surround it with a try/catch it still crashes. Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Looke81 Posted January 8, 2015 Author Share Posted January 8, 2015 http://pastebin.com/RLuJJ9bb Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Draco18s Posted January 8, 2015 Share Posted January 8, 2015 theShaderGroup is already public. So I still don't know what you're trying to do. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Looke81 Posted January 8, 2015 Author Share Posted January 8, 2015 theShaderGroup is already public. Huh, not for me. they changed that in 1.7 to 1.8 (hence the topic title). and what im trying to do is change the shader like i was able to before in 1.8. Quote BioWarfare Mod: http://goo.gl/BYWQty Link to comment Share on other sites More sharing options...
Draco18s Posted January 9, 2015 Share Posted January 9, 2015 theShaderGroup is already public. Huh, not for me. Ah, a 1.8 change >..> Anyway, yeah. Do what diesieben07 said. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.