-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor packages; fix mapping crashes; fix UI textures
- Loading branch information
1 parent
2e6d651
commit 21a6877
Showing
42 changed files
with
168 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ Thumbs.db | |
.DS_Store | ||
local.properties | ||
.directory | ||
**.png~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/vivatech/api/block/entity/AbstractTieredMachineBlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package vivatech.api.block.entity; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.entity.BlockEntityType; | ||
import vivatech.api.block.ITieredBlock; | ||
import vivatech.api.util.BlockTier; | ||
|
||
public abstract class AbstractTieredMachineBlockEntity extends AbstractMachineBlockEntity implements ITieredBlockEntity { | ||
public AbstractTieredMachineBlockEntity(BlockEntityType<?> type) { | ||
super(type); | ||
} | ||
|
||
@Override | ||
public BlockTier getTier() { | ||
Block block = world.getBlockState(pos).getBlock(); | ||
if (block instanceof ITieredBlock) { | ||
return ((ITieredBlock) block).getTier(); | ||
} else { | ||
return BlockTier.MINIMAL; | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/vivatech/api/block/entity/IConduitBlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package vivatech.api.block.entity; | ||
|
||
public interface IConduitBlockEntity extends ITieredBlockEntity { | ||
int BASE_TRANSFER_RATE = 50; | ||
|
||
default int getTransferRate() { | ||
return (int) (BASE_TRANSFER_RATE * getTier().getEnergyMultiplier()); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/vivatech/api/block/entity/ITieredBlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package vivatech.api.block.entity; | ||
|
||
import vivatech.api.util.BlockTier; | ||
|
||
public interface ITieredBlockEntity { | ||
BlockTier getTier(); | ||
} |
9 changes: 0 additions & 9 deletions
9
src/main/java/vivatech/api/entity/AbstractTieredMachineEntity.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.