Posted December 27, 201410 yr 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. BioWarfare Mod: http://goo.gl/BYWQty
December 27, 201410 yr 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
December 28, 201410 yr 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...
December 29, 201410 yr 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
December 29, 201410 yr 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 #
December 29, 201410 yr 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. 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.
December 29, 201410 yr I believe the user is now 'MCPBot_Reborn' 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.
December 29, 201410 yr And this, kids, is why we use a REAL IRC client. 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.
December 29, 201410 yr 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
December 29, 201410 yr 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. 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.
January 7, 201510 yr Author 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" BioWarfare Mod: http://goo.gl/BYWQty
January 7, 201510 yr Author ok could you point me in the direction of a working tutorial or tell me whats wrong with it? BioWarfare Mod: http://goo.gl/BYWQty
January 7, 201510 yr Author 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. BioWarfare Mod: http://goo.gl/BYWQty
January 7, 201510 yr Author 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); } } BioWarfare Mod: http://goo.gl/BYWQty
January 8, 201510 yr Author 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 BioWarfare Mod: http://goo.gl/BYWQty
January 8, 201510 yr Fur the love. .. Its a No Such Field exception. Fukin read. 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.
January 8, 201510 yr Author so if it isn't a field how do i use reflection? BioWarfare Mod: http://goo.gl/BYWQty
January 8, 201510 yr Correctly. Why are you trying to get a field from EntityRenderer that is called "EntityRenderer"? That field doesn't exist. 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.
January 8, 201510 yr Author 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. BioWarfare Mod: http://goo.gl/BYWQty
January 8, 201510 yr theShaderGroup is already public. So I still don't know what you're trying to do. 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.
January 8, 201510 yr Author 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. BioWarfare Mod: http://goo.gl/BYWQty
January 9, 201510 yr theShaderGroup is already public. Huh, not for me. Ah, a 1.8 change >..> Anyway, yeah. Do what diesieben07 said. 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.
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.