Command rework (#1434)

* Network part finished.

* Should be more reasonable now

* This should be good enough.

* Orb finished, needs strings

* Bind finished. Needs strings.

* Reformat & Help subcommand

* Cleanup, strings, no negative amounts

* Removed TODOs

* Added missing MaxTier check for Blood Orbs.
Added TODO: Test with custom Blood Orbs.

* Ritual commands finished.
Check for valid placement might be optimized. (TODO)

* Access modifiers, moved TODO

* Added TODOs for localized strings

* DrainUtils postponed until the necessary functionality is available with SoulTickets (telling SoulTicket network from soul ticket, a list of all registered soul tickets per network)

* Replaced all occurrences of TextHelper with TextComponentTranslation in the commands section

* - Moved Teleports.java to teleport package
- added teleposer command
- added missing strings
- cleanup

* Fixed spelling of "Successful(ly)"

* getUsage() now returns translation keys.
getInfo() is now an explicit String

ritual creation command now has proper tab completions

help is an additional argument with "-h" or "?"

cleanup

* teleposerSet final
cleanup.

* Removed ritual removal command

Signed-off-by: tobias <angryaeon@icloud.com>

* Check if the tile has a ritual first

Signed-off-by: tobias <angryaeon@icloud.com>

* A bit more optimisation

Signed-off-by: tobias <angryaeon@icloud.com>

* Cleanup part 1

Signed-off-by: tobias <angryaeon@icloud.com>

* Cleanup part 2

Signed-off-by: tobias <angryaeon@icloud.com>

* Part 3

Signed-off-by: tobias <angryaeon@icloud.com>

* Part 4

Signed-off-by: tobias <angryaeon@icloud.com>

* Updated language file to reflect cleanup & continuity changes.

Signed-off-by: tobias <angryaeon@icloud.com>

* Change to use an abstract class that gets called instead of calling super on overriden execute() for commands

Signed-off-by: tobias <angryaeon@icloud.com>

* Use player facing for ritual creation.

Signed-off-by: tobias <angryaeon@icloud.com>
This commit is contained in:
Tobias Gremeyer 2019-02-01 01:46:02 +01:00 committed by Nick Ignoffo
parent 2a8e1f1271
commit 95d99c0a01
13 changed files with 990 additions and 323 deletions

View file

@ -2,6 +2,7 @@ package WayofTime.bloodmagic.block;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.client.IVariantProvider;
import WayofTime.bloodmagic.command.sub.SubCommandTeleposer;
import WayofTime.bloodmagic.item.ItemTelepositionFocus;
import WayofTime.bloodmagic.tile.TileTeleposer;
import WayofTime.bloodmagic.util.Constants;
@ -48,8 +49,10 @@ public class BlockTeleposer extends BlockContainer implements IVariantProvider,
@Override
public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) {
TileTeleposer tileTeleposer = (TileTeleposer) world.getTileEntity(blockPos);
if (tileTeleposer != null)
if (tileTeleposer != null) {
tileTeleposer.dropItems();
SubCommandTeleposer.teleposerSet.remove(tileTeleposer);
}
super.breakBlock(world, blockPos, blockState);
}