Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/18/19 in all areas

  1. Use PlayerCapabilities::isCreativeMode to check if the player is in creative. The PlayerCapabilities of a player is stored in EntityPlayer::capabilities. You can use this on any instances of EntityPlayer (i.e. passed in to the method you are overriding) on the server. In addition, in your case, I would recommend overriding Block#onBlockHarvested instead of Block#breakBlock, as the former passes in the player that broke the block in the method's parameter.
    1 point
  2. Loot Slash Conquer mod’s problem. Remove it and report to its author.
    1 point
  3. The word is "your" it has four letters. This isn't twitter where you only have 144 characters, you can afford the time and effort to use proper spelling. Unless you mean the Mesopotamian city-state. No, you will need to rewrite it from the ground up. There is no way around this, as a standalone mod is going to be doing things that are fundamentally incompatible with the Forge ethos.
    1 point
  4. This is not the complaint thread. I'll leave that one to somebody else. It is, though, a question for those more familiar with the upcoming changes than I -- and all I know is what I read on Twitter. Is my time going to be better served by putting aside any further FastTESR / particle / GUI (?) changes and work on other aspects of the mod instead? Stuff changes. I get that. And if it is a change for the better, that's not a bad thing. But just the same, I don't want to spend a whole lot of time over the weekend working on something that's going to be discarded days later. Tks!
    1 point
  5. Thanks! @Override public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest) { if (willHarvest) { // Delay deletion of the block until after getDrops return true; } if (player.capabilities.isCreativeMode) { harvestBlock(world, player, pos, this.getDefaultState(), null); } return super.removedByPlayer(world, pos, player, willHarvest); }
    1 point
  6. Try overriding Block#removedByPlayer to call Block#harvestBlock if the player that destroyed the block is in creative mode.
    1 point
×
×
  • Create New...

Important Information

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