Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About feldim2425

  • Rank
    Tree Puncher


  • Gender
  1. I don't know if thats a good solution but the way I do it, I give the Y argument a negative number when calling the player.openGui(...) so the Y value in getClientGuiElement() is also negative. (TE's & Blocks should not exist at a negative Y Coordinate) So the X can be set to entity.getEntityId(). And you can get the Entity Object back by calling world.getEntityByID(x) @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if(y==-10 && ID == 0){ Entity entity = world.getEntityByID(x); if(entity!=null){ retur
  2. No the Capabilities are for stuff thats similar to other tile entities and stuff that should be compatible with other mods (like Inventory, FluidTank , ...) Normal data (as you sayed some integer and booleans) are still stored in NBT with the writeToNBT() and readFromNBT() method
  3. Let the BlockEnergyGeneratorCoal class extend BlockContainer and not Block.
  4. I forgot to say, that I want use dynamic colors. If this is possible EDIT: Forgot that it's possible to set a color overlay
  5. Hi. I want to render a gradient rectangle in the world but it doesn't render the gradient. render.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR); render.pos(length, -beamWidth, beamWidth).color(r2, g2, b2, alpha).endVertex(); render.pos(length, beamWidth, beamWidth).color(r2, g2, b2, alpha).endVertex(); render.pos(0, beamWidth, beamWidth).color(r, g, b, alpha).endVertex(); render.pos(0, -beamWidth, beamWidth).color(r, g, b, alpha).endVertex(); tes.draw(); How can I render a gradient rectangle in the world with the Tessellator and the WorldRenderer?
  6. You also have a problem in the switch-case. You have to check if the id from the getClientGuiObject (id is the first integer value) is equal to your GUI id (you choose 6) switch(id){ case 6: //6 is the GUI id. return new GuiJournalThree(); } return null;
  7. In my code the init function shuold get called in the preInit function in the Main Mod class or in the common proxy.
  8. Does the id is equal to the id from the switch-case in the getClientGuiElement() function? Have you registred the Gui handler? Maybe you also need to check the side, because the Server element is null.
  9. Something like this should work: public class GuiHandler implements IGuiHandler{ public static void init(){ NetworkRegistry.INSTANCE.registerGuiHandler(<Mod instance>, new GuiHandler()); } @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch(id){ case 0: return new GuiJournalThree(); } return null;
  10. If nothing works, you can try a GUIHandler and open the gui with player.openGui(<Mod instance>, <GUI-ID>, world, 0, 0, 0); But this is also Server Side. EDIT: Can you post the last crash report / log file?
  11. onItemRightClick() is also called on the ServerSide. On the Server Side Minecraft.getMinecraft().displayGuiScreen() doesn't work. Try: if(world.isRemote){ Minecraft.getMinecraft().displayGuiScreen(new GuiJournalThree()); } return itemstack;
  12. I found the problem it seems like withProperty() for the IUnlistedProperty doesn't change the state, it just returns the new state. For everyone who has the same problem, here is the new method: public IBlockState getExtendedState(IBlockState state) { checkConnections(); return ((IExtendedBlockState) state).withProperty(PROPERTY_CONNECTION, this.connections).withProperty(PROPERTY_TYPE, this.type); } I also use a unlisted Byte property, where the first 6 bits are the 6 sides of the block.
  13. I have a MCMultipart cable. I can write the 6 directions to the Extendet Blockstate without problem, but if I get the Property Value, the function returns null. Cable Class public class PartRfCable extends Multipart implements IOccludingPart, ISlottedPart, ITickable, IEnergyHandler { public static IUnlistedProperty<Boolean>[] sides = PropertyCableConnection.getPropertyList(); public static IProperty<EnumCableType> cableType = new EnumCableType.PropertyCableType(); private HashMap<EnumFacing, Boolean> connections = new HashMap<>(); private boo
  14. Is there a way in 1.8 to render a item in a item? Like the /dev/null from ExtraUtilities.
  15. Hi. I want to add a additional drop to a Minecart but I can't access the class (Vanilla minecart). Is there an event that triggers on entity or minecart death?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.