Skip to content

Commit

Permalink
Removed null
Browse files Browse the repository at this point in the history
  • Loading branch information
Pulverizer committed Feb 25, 2020
1 parent f552f4b commit 61884e8
Show file tree
Hide file tree
Showing 28 changed files with 17 additions and 42 deletions.
Binary file modified .gradle/4.4/fileContent/annotation-processors.bin
Binary file not shown.
Binary file modified .gradle/4.4/fileContent/fileContent.lock
Binary file not shown.
Binary file modified .gradle/4.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/4.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/4.4/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/4.4/taskHistory/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/4.4/taskHistory/taskHistory.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
}

group = 'io.github.pulverizer.movecraft'
version = '0.1.0'
description = 'Movecraft for Sponge'

repositories {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/libs/movecraft.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions build/resources/main/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{
"modid": "movecraft",
"name": "Movecraft for Sponge",
"version": "0.1.0",
"description": "Allows players to create moving things out of blocks. Airships, Defensive Turrets, Submarines, Etc.",
"version": "0.2.1",
"description": "Allows players to create moving things out of blocks. Airships, Turrets, Submarines, Etc.",
"url": "https://github.com/Pulverizer/Movecraft-for-Sponge",
"authorList": [
"BernardisGood",
Expand Down
4 changes: 2 additions & 2 deletions build/tmp/generateMetadata/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{
"modid": "movecraft",
"name": "Movecraft for Sponge",
"version": "0.1.0",
"description": "Allows players to create moving things out of blocks. Airships, Defensive Turrets, Submarines, Etc.",
"version": "0.2.1",
"description": "Allows players to create moving things out of blocks. Airships, Turrets, Submarines, Etc.",
"url": "https://github.com/Pulverizer/Movecraft-for-Sponge",
"authorList": [
"BernardisGood",
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/pulverizer/movecraft/Movecraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
@Plugin(
id = "movecraft",
name = "Movecraft for Sponge",
description = "Allows players to create moving things out of blocks. Airships, Defensive Turrets, Submarines, Etc.",
version = "0.1.0",
description = "Allows players to create moving things out of blocks. Airships, Turrets, Submarines, Etc.",
version = "0.2.1",
url = "https://github.com/Pulverizer/Movecraft-for-Sponge",
authors = {"BernardisGood", "https://github.com/Pulverizer/Movecraft-for-Sponge/graphs/contributors"})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private void detectSinking(){
int count = 0;

for (BlockType blockType : blockTypes) {
count += blockMap.get(blockType).size();
count += blockMap.containsKey(blockType) ? blockMap.get(blockType).size() : 0;
}

foundFlyBlocks.put(blockTypes, count);
Expand All @@ -198,15 +198,18 @@ private void detectSinking(){
int count = 0;

for (BlockType blockType : blockTypes) {
count += blockMap.get(blockType).size();
count += blockMap.containsKey(blockType) ? blockMap.get(blockType).size() : 0;
}

foundMoveBlocks.put(blockTypes, count);
});

totalNonAirBlocks = craft.getHitBox().size() - blockMap.get(BlockTypes.AIR).size();
totalNonAirBlocks = craft.getHitBox().size() - (blockMap.containsKey(BlockTypes.AIR) ? blockMap.get(BlockTypes.AIR).size() : 0);

totalNonAirWaterBlocks = craft.getHitBox().size() - (blockMap.get(BlockTypes.AIR).size() + blockMap.get(BlockTypes.FLOWING_WATER).size() + blockMap.get(BlockTypes.WATER).size());
totalNonAirWaterBlocks = craft.getHitBox().size() - (
(blockMap.containsKey(BlockTypes.AIR) ? blockMap.get(BlockTypes.AIR).size() : 0)
+ (blockMap.containsKey(BlockTypes.AIR) ? blockMap.get(BlockTypes.FLOWING_WATER).size() : 0)
+ (blockMap.containsKey(BlockTypes.AIR) ? blockMap.get(BlockTypes.WATER).size() : 0));

// now see if any of the resulting percentages
// are below the threshold specified in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,10 @@ public int getTickCooldown() {
if(state == CraftState.SINKING)
return type.getSinkRateTicks();

double chestPenalty = blockMap.get(BlockTypes.CHEST).size() + blockMap.get(BlockTypes.TRAPPED_CHEST).size();
double chestPenalty = 0;

chestPenalty += (blockMap.containsKey(BlockTypes.CHEST) ? blockMap.get(BlockTypes.CHEST).size() : 0)
+ (blockMap.containsKey(BlockTypes.TRAPPED_CHEST) ? blockMap.get(BlockTypes.TRAPPED_CHEST).size() : 0);

chestPenalty *= type.getChestPenalty();

Expand Down
30 changes: 0 additions & 30 deletions src/main/java/io/github/pulverizer/movecraft/utils/SignUtils.java

This file was deleted.

0 comments on commit 61884e8

Please sign in to comment.