Jump to content

Recommended Posts

Posted

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

Posted

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

 

Posted

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...

Posted

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

Posted

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 #

Posted

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.

Posted

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.

Posted

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.

  • 2 weeks later...
Posted

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

Posted

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

Posted

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.

Posted

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.

Posted

theShaderGroup

is already public.

 

Capture.png

 

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.

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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