Jump to content

a3626a

Members
  • Posts

    14
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

a3626a's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. HI i'm from future (1.12.2) Now we can walk around client-only method problem by passing empty IMessageHandler instance at server side (CommonProxy) I'm not sure when registerMessage started to take instance of IMessageHandler. CommonProxy.java public void registerPacketHandler() { HungryAnimals.simpleChannel.registerMessage(HandlerServerDGEditInt.class, PacketServerDGEditInt.class, 0, Side.SERVER); HungryAnimals.simpleChannel.registerMessage(HandlerServerDGEditDouble.class, PacketServerDGEditDouble.class, 1, Side.SERVER); HungryAnimals.simpleChannel.registerMessage(HandlerServerDGSet.class, PacketServerDGSet.class, 2, Side.SERVER); HungryAnimals.simpleChannel.registerMessage((message, ctx)->{return null;}, PacketClientSpawnParticle.class, 3, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage((message, ctx)->{return null;}, PacketClientSyncTamable.class, 4, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage((message, ctx)->{return null;}, PacketClientSyncHungry.class, 5, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage((message, ctx)->{return null;}, PacketClientSyncProducingFluid.class, 6, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage((message, ctx)->{return null;}, PacketClientSyncProducingInteraction.class, 7, Side.CLIENT); } ClientProxy.java @Override public void registerPacketHandler() { HungryAnimals.simpleChannel.registerMessage(HandlerServerDGEditInt.class, PacketServerDGEditInt.class, 0, Side.SERVER); HungryAnimals.simpleChannel.registerMessage(HandlerServerDGEditDouble.class, PacketServerDGEditDouble.class, 1, Side.SERVER); HungryAnimals.simpleChannel.registerMessage(HandlerServerDGSet.class, PacketServerDGSet.class, 2, Side.SERVER); HungryAnimals.simpleChannel.registerMessage(HandlerClientSpawnParticle.class, PacketClientSpawnParticle.class, 3, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage(HandlerClientSyncTamable.class, PacketClientSyncTamable.class, 4, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage(HandlerClientSyncHungry.class, PacketClientSyncHungry.class, 5, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage(HandlerClientSyncProducingFluid.class, PacketClientSyncProducingFluid.class, 6, Side.CLIENT); HungryAnimals.simpleChannel.registerMessage(HandlerClientSyncProducingInteraction.class, PacketClientSyncProducingInteraction.class, 7, Side.CLIENT); }
  2. you mean, i should mimic the algorithm of world random tick through WorldTickEvent?
  3. I want "tall grass" to grow on grass block naturally(on random block update). and I try this code : in @Mod.EventHandler public static void Init(FMLInitializationEvent event) { GameRegistry.addSubstitutionAlias("minecraft:grass", Type.BLOCK, new CustomBlock()); } (CustomBlock extends BlockGrass)
  4. I try to hook grass block's random tick event. I want to set a block on the grass when the event fired. I could find any built-in forge event about it. I also try "addSubstitutionAlias" to replace vanilla grass block, but I failed also. Please help me.
  5. I changed my code a little bit, public class TEMillStoneRenderer extends TileEntitySpecialRenderer{ private int light; private TEMillStone tileentity; @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float p_147500_8_) { //OpenGLdebugging.dumpAllIsEnabled(); this.tileentity = (TEMillStone) tileentity; GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); TEMillStone tileEntityYour = (TEMillStone)tileentity; renderMillStone(tileEntityYour, tileentity.getWorldObj(), tileentity.xCoord, tileentity.yCoord, tileentity.zCoord, ModBlocks.millStone); GL11.glPopMatrix(); } public void renderMillStone(TEMillStone tl, World world, int i, int j, int k, Block block) { Block material = tl.getMaterial(); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(tl.getRotation(), 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); GL11.glPushMatrix(); GL11.glTranslatef(1F, 1F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(0F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 1F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(90F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 1F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(180F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(1F, 1F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(270F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(1F, 0F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(0F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 0F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(90F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 0F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(180F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(1F, 0F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(270F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); } private void RenderBlock(Block material) { IIcon c; float u, v, U, V; double[] tempX; double[] tempY; double[] tempZ; double[] tempU; double[] tempV; c = material.getIcon(0, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 0.5, 1, 1, 0, 0 }; tempY = new double[] { 0, 0, 0, 0, 0 }; tempZ = new double[] { 0, 0.5, 1, 1, 0 }; tempU = new double[] { (u + U) / 2.0, U, U, u, u }; tempV = new double[] { v, (v + V) / 2.0, V, V, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(1, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 0, 0, 1, 1, 0.5 }; tempY = new double[] { 1, 1, 1, 1, 1 }; tempZ = new double[] { 0, 1, 1, 0.5, 0 }; tempU = new double[] { u, u, U, U, (u + U) / 2.0 }; tempV = new double[] { v, V, V, (v + V) / 2.0, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(3, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 1, 1, 0.5, 0.5 }; tempY = new double[] { 1, 0, 0, 1 }; tempZ = new double[] { 0.5, 0.5, 0, 0 }; tempU = new double[] { u, u, U, U }; tempV = new double[] { v, V, V, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(5, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 1, 1, 1, 1 }; tempY = new double[] { 1, 0, 0, 1 }; tempZ = new double[] { 1, 1, 0.5, 0.5 }; tempU = new double[] { (u + U) / 2.0, (u + U) / 2.0, U, U }; tempV = new double[] { v, V, V, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(2, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 0.5, 0.5, 0, 0 }; tempY = new double[] { 1, 0, 0, 1 }; tempZ = new double[] { 0, 0, 0, 0 }; tempU = new double[] { (u + U) / 2.0, (u + U) / 2.0, U, U }; tempV = new double[] { v, V, V, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); } public void drawPolygon(double[] X, double[] Y, double[] Z, double[] U, double[] V) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(GL11.GL_POLYGON); int brightness = tileentity.getBlockType().getMixedBrightnessForBlock(tileentity.getWorldObj(), tileentity.xCoord, tileentity.yCoord, tileentity.zCoord); tessellator.setBrightness(brightness); tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F); double[] temp = cross(X[1]-X[0],Y[1]-Y[0],Z[1]-Z[0],X[2]-X[0],Y[2]-Y[0],Z[2]-Z[0]); tessellator.setNormal((float)temp[0], (float)temp[1], (float)temp[2]); for (int i = 0; i < X.length; i++) { tessellator.addVertexWithUV(X[i], Y[i], Z[i], U[i], V[i]); } tessellator.draw(); } public double[] cross(double x1, double y1, double z1,double x2, double y2, double z2) { double[] ret = new double[3]; ret[0] = y1*z2 - z1*y2; ret[1] = z1*x2 - x1*z2; ret[2] = x1*y2 - y1*x2; double mag = Math.sqrt(ret[0]*ret[0] + ret[1]*ret[1] + ret[2]*ret[2]); ret[0] /= mag; ret[1] /= mag; ret[2] /= mag; return ret; } } but the problem still occurs. The texture changes immediately as I move my view angle. Furthermore, the texturing directly depends on player's view angle. It means there is a special interval of view angle that the texture renders well. Also I try dump, but there's no differences between them. : GL_VERTEX_ARRAY:false (Vertex array enable) GL_NORMAL_ARRAY:false (Normal array enable) GL_COLOR_ARRAY:false (RGBA color array enable) GL_INDEX_ARRAY:false (Color-index array enable) GL_TEXTURE_COORD_ARRAY:false (Texture coordinate array enable) GL_EDGE_FLAG_ARRAY:false (Edge flag array enable) GL_NORMALIZE:false (Current normal normalization on/off) GL_FOG:true (True if fog enabled) GL_LIGHTING:true (True if lighting is enabled) GL_COLOR_MATERIAL:true (True if color tracking is enabled) GL_LIGHT0:true (True if light 0 enabled) GL_LIGHT1:true (True if light 1 enabled) GL_LIGHT2:false (True if light 2 enabled) GL_LIGHT3:false (True if light 3 enabled) GL_LIGHT4:false (True if light 4 enabled) GL_LIGHT5:false (True if light 5 enabled) GL_LIGHT6:false (True if light 6 enabled) GL_LIGHT7:false (True if light 7 enabled) GL_POINT_SMOOTH:false (Point antialiasing on) GL_LINE_SMOOTH:false (Line antialiasing on) GL_LINE_STIPPLE:false (Line stipple enable) GL_CULL_FACE:true (Polygon culling enabled) GL_POLYGON_SMOOTH:false (Polygon antialiasing on) GL_POLYGON_OFFSET_POINT:false (Polygon offset enable for GL_POINT mode rasterization) GL_POLYGON_OFFSET_LINE:false (Polygon offset enable for GL_LINE mode rasterization) GL_POLYGON_OFFSET_FILL:false (Polygon offset enable for GL_FILL mode rasterization) GL_POLYGON_STIPPLE:false (Polygon stipple enable) GL_TEXTURE_1D:false (True if 1-D texturing enabled ) GL_TEXTURE_2D:true (True if 2-D texturing enabled ) GL_TEXTURE_GEN_S:false (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_T:false (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_R:false (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_Q:false (Texgen enabled (x is S, T, R, or Q)) GL_SCISSOR_TEST:false (Scissoring enabled) GL_ALPHA_TEST:true (Alpha test enabled) GL_STENCIL_TEST:false (Stenciling enabled) GL_DEPTH_TEST:true (Depth buffer enabled) GL_BLEND:false (Blending enabled) GL_DITHER:true (Dithering enabled) GL_INDEX_LOGIC_OP:false (Color index logical operation enabled) GL_COLOR_LOGIC_OP:false (RGBA color logical operation enabled) GL_AUTO_NORMAL:false (True if automatic normal generation enabled) I think the problem is getIcon(Maybe...). getIcon is made for block rendering, not tileentity. but for some reasons I use getIcon(I want to use vanila block's texture). I would try typical way to bind texture.
  6. I just learn some basic concepts of OpenGL. I use glPushMatrix correctly (to transform matrix). GL11.glDisable(GL11.GL_CULL_FACE) could be inserted anywhere in my code, but setBrightness, setColorOpque_F shoud be placed before tessellator.draw(). I set the orientation correctly so I don't need to disable GL11.GL_CULL_FACE. When I created a world, My model is rendered correctly a while, but after a while, it becomes strange. This is the image of proper rendering and wrong rendering. http://imgur.com/fYemWxM,J1iahuf#1 this depends on player's view point.
  7. does it matter? I don't know about advanced concept of OpenGL, I just use push/pop matrix method to transformer(translation, rotation) the model(vertex). And I get the model that i want, but texture. As player's view point, the texture sometimes is rendered properly, and sometimes not. Where should I insert? I have too many "glPushMatrix"
  8. Hello I'm trying to render custom tile entity with tessellator (not with ModelBase class) but the problem is texture(or lighting) The rendered tile entity has proper 3D Model, but texture. it's interesting that the texture sometimes rendered properly(but dark) with certain player's view(angle). It sometimes becomes white, black, brown, and pink. glColor4f(1.0f , 1.0f, 1.0f, 1.0f) doesn't work for me. No effect. public class TEMillStoneRenderer extends TileEntitySpecialRenderer{ private int light; @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float p_147500_8_) { GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); TEMillStone tileEntityYour = (TEMillStone)te; renderMillStone(tileEntityYour, te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, ModBlocks.millStone); GL11.glPopMatrix(); } public void renderMillStone(TEMillStone tl, World world, int i, int j, int k, Block block) { Block material = tl.getMaterial(); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(tl.getRotation(), 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); GL11.glPushMatrix(); GL11.glTranslatef(1F, 1F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(0F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 1F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(90F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 1F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(180F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(1F, 1F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(270F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(1F, 0F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(0F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 0F, 0F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(90F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(0F, 0F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(180F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslatef(1F, 0F, 1F); GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0, 0.5F); GL11.glRotatef(270F, 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0, -0.5F); RenderBlock(material); GL11.glPopMatrix(); GL11.glPopMatrix(); } private void RenderBlock(Block material) { IIcon c; float u, v, U, V; double[] tempX; double[] tempY; double[] tempZ; double[] tempU; double[] tempV; c = material.getIcon(0, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 0.5, 1, 1, 0, 0 }; tempY = new double[] { 0, 0, 0, 0, 0 }; tempZ = new double[] { 0, 0.5, 1, 1, 0 }; tempU = new double[] { (u + U) / 2.0, U, U, u, u }; tempV = new double[] { v, (v + V) / 2.0, V, V, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(1, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 0, 0, 1, 1, 0.5 }; tempY = new double[] { 1, 1, 1, 1, 1 }; tempZ = new double[] { 0, 1, 1, 0.5, 0 }; tempU = new double[] { u, u, U, U, (u + U) / 2.0 }; tempV = new double[] { v, V, V, (v + V) / 2.0, v }; drawPolygon(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(3, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 1, 1, 0.5, 0.5 }; tempY = new double[] { 1, 0, 0, 1 }; tempZ = new double[] { 0.5, 0.5, 0, 0 }; tempU = new double[] { u, u, U, U }; tempV = new double[] { v, V, V, v }; drawQuad(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(5, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 1, 1, 1, 1 }; tempY = new double[] { 1, 0, 0, 1 }; tempZ = new double[] { 1, 1, 0.5, 0.5 }; tempU = new double[] { (u + U) / 2.0, (u + U) / 2.0, U, U }; tempV = new double[] { v, V, V, v }; drawQuad(tempX, tempY, tempZ, tempU, tempV); c = material.getIcon(2, 0); u = c.getMinU(); v = c.getMinV(); U = c.getMaxU(); V = c.getMaxV(); tempX = new double[] { 0.5, 0.5, 0, 0 }; tempY = new double[] { 1, 0, 0, 1 }; tempZ = new double[] { 0, 0, 0, 0 }; tempU = new double[] { (u + U) / 2.0, (u + U) / 2.0, U, U }; tempV = new double[] { v, V, V, v }; drawQuad(tempX, tempY, tempZ, tempU, tempV); } public void drawTri(double[] X, double[] Y, double[] Z, double[] U, double[] V) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(GL11.GL_TRIANGLES); for (int i = 0; i < 3; i++) { tessellator.addVertexWithUV(X[i], Y[i], Z[i], U[i], V[i]); } tessellator.draw(); } public void drawQuad(double[] X, double[] Y, double[] Z, double[] U, double[] V) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(GL11.GL_QUADS); for (int i = 0; i < 4; i++) { tessellator.addVertexWithUV(X[i], Y[i], Z[i], U[i], V[i]); } tessellator.draw(); } public void drawPolygon(double[] X, double[] Y, double[] Z, double[] U, double[] V) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(GL11.GL_POLYGON); for (int i = 0; i < X.length; i++) { tessellator.addVertexWithUV(X[i], Y[i], Z[i], U[i], V[i]); } tessellator.draw(); } }
  9. I found CommandPardonPlayer that contains next code: MinecraftServer minecraftserver = MinecraftServer.getServer(); GameProfile gameprofile = minecraftserver.getConfigurationManager().func_152608_h().func_152703_a(p_71515_2_[0]); if (gameprofile == null) { throw new CommandException("commands.unban.failed", new Object[] {p_71515_2_[0]}); } else { minecraftserver.getConfigurationManager().func_152608_h().func_152684_c(gameprofile); func_152373_a(p_71515_1_, this, "commands.unban.success", new Object[] {p_71515_2_[0]}); } and I think I can rewrite for my purpose : MinecraftServer minecraftserver = MinecraftServer.getServer(); GameProfile gameprofile = minecraftserver.getConfigurationManager().func_152608_h().func_152703_a(String playername); minecraftserver.getConfigurationManager().func_152608_h().func_152684_c(gameprofile); I think this will work, but I can't debug it because I have another problem with running server... Anyway, Thank you!
  10. Hi guys. I ban player using next code: entityPlayerMP.playerNetServerHandler.kickPlayerFromServer("YOU ARE BANNED!"); I want to unban the player with his/her name and I found method: MinecraftServer.getServer().getConfigurationManager().allowUserToConnect(SocketAdress addr, GameProfile prf); but I think this method unban player with IP. Not the one I want.... Is there any method unban player with his/her name? or how can I use "allowUserToConnect" to unban player?
  11. I had a same problem with you! and finally solved it. I guess you tried to update your forge. http://www.minecraftforge.net/forum/index.php?topic=14048.0 this will be helpful for you. and I suggest you to do "gradlew.bat clean" and then try "gradlew.bat setupDecompWorkspace and gradlew.bat eclipse" if you try to update, you should clean up the gradle first!
  12. For example, Players can't move apples(or other items) from their inventory to any kind of inventory except wooden chest. For this, I think hooking the event is needed. However the event is hard to find...
×
×
  • Create New...

Important Information

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