Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/30/18 in all areas

  1. If you want to have the tinted background and the tooltips display override the drawScreen method: @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); //Add this super.drawScreen(mouseX, mouseY, partialTicks); this.renderHoveredToolTip(mouseX, mouseY); //Add this }
    1 point
  2. Okay, I submitted issue: https://github.com/MinecraftForge/MinecraftForge/issues/4907
    1 point
  3. This is a logical fallacy when talking about proper code development. In most languages the compiler (or in this case JVM) has some leeway in some areas. For example, in some languages the way certain data types are stored can vary so if you depend on that your code might work "without a single problem" for you but then fail in weird ways for someone else. The way to avoid stepping into these subtleties is to understand the allowable variations in the compiler/JVM. In this case I think the main concern is that static initialization order is not guaranteed across classes. Besides registration, modders often run into this with crop blocks where the order of the seed item and the crop block get mixed up and the seed actually gets a null block because the seed gets instantiated before the block does.. So the general principle in coding, and particularly in modding related to singleton instantiation, is that you want to fully control the order and timing of the instantiation to be in proper place.
    1 point
  4. AxisAlignedBB boundingbox = new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ); List<Entity> entityList = worldIn.getEntitiesWithinAABB(playerIn.getClass(), boundingbox); for(int i = 0; i < entityList.size(); i++) { entity.get(i).sendMessage(new TextComponentString(player.getDisplayNameString() + " displays their MyNewItem")); } Parameters for the BoudingBox are "minX, minY, minZ, maxX, maxY, maxZ". So if you want to get all players in a cube of 20x20x20 around you, you would need to do. double minX = playerIn.posX - 10.0; double minY = playerIn.posY - 10.0; double minZ = playerIn.posZ - 10.0; double maxX = playerIn.posX + 10.0; double maxY = playerIn.posY + 10.0; double maxZ = playerIn.posZ + 10.0; The one below is probably more logical.
    1 point
  5. You can't just say "control fire and ice". What does that even mean? In programming you need to list out EXACTLY what you are trying to do. For example, you didn't mention whether you need an item to get the control, or whether this is a power that has some sort of mana that needs to be stored. Do you want to shoot fireballs, do you want to be immune from fire, can you control BOTH fire and ice or only one at a time? I don't know how you expect to get help without even describing what you want. And then you need to tell us what you've tried to do so far, share your code, and THEN we can help.
    1 point
  6. Super duuuuper necro post, but for anyone who finds themselves here after trying the srgExtra line, it's been changed in newer versions of gradle (2.2-SNAPSHOT I know, but maybe even earlier). Now instead of doing: minecraft { ... srgExtra "PK: ..." } You have to do: reobf { jar { extraLine "PK: ..." } } Relevant XKCD: https://xkcd.com/979/
    1 point
×
×
  • Create New...

Important Information

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