forked from aurilisdev/Electrodynamics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up voxel shapes and properties
- Loading branch information
1 parent
1645e48
commit e58d614
Showing
65 changed files
with
2,111 additions
and
1,619 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package electrodynamics.api.tile; | ||
|
||
import electrodynamics.api.multiblock.subnodebased.Subnode; | ||
import electrodynamics.common.block.voxelshapes.VoxelShapeProvider; | ||
import net.minecraft.world.level.block.RenderShape; | ||
import net.minecraft.world.level.block.entity.BlockEntity; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
|
||
public interface IMachine { | ||
|
||
public BlockEntityType.BlockEntitySupplier<BlockEntity> getBlockEntitySupplier(); | ||
|
||
public int getLitBrightness(); | ||
|
||
public RenderShape getRenderShape(); | ||
|
||
public boolean isMultiblock(); | ||
|
||
public boolean propegatesLightDown(); | ||
|
||
public boolean isPlayerStorable(); | ||
|
||
public default Subnode[] getSubnodes() { | ||
return new Subnode[]{}; | ||
} | ||
|
||
public VoxelShapeProvider getVoxelShapeProvider(); | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
src/main/java/electrodynamics/api/tile/MachineProperties.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,58 @@ | ||
package electrodynamics.api.tile; | ||
|
||
import electrodynamics.api.multiblock.subnodebased.Subnode; | ||
import electrodynamics.common.block.voxelshapes.VoxelShapeProvider; | ||
import net.minecraft.world.level.block.RenderShape; | ||
|
||
public class MachineProperties { | ||
|
||
public boolean isMultiblock = false; | ||
public int litBrightness = 0; | ||
public RenderShape renderShape = RenderShape.MODEL; | ||
public boolean propegatesLightDown = false; | ||
public boolean isPlayerStorable = false; | ||
public Subnode[] subnodes = new Subnode[0]; | ||
public VoxelShapeProvider provider = VoxelShapeProvider.DEFAULT; | ||
|
||
public static final MachineProperties DEFAULT = new MachineProperties(); | ||
|
||
private MachineProperties() { | ||
|
||
} | ||
|
||
public MachineProperties setLitBrightness(int brightness) { | ||
this.litBrightness = brightness; | ||
return this; | ||
} | ||
|
||
public MachineProperties setPropegateLightDown() { | ||
propegatesLightDown = true; | ||
return this; | ||
} | ||
|
||
public MachineProperties setRenderShape(RenderShape shape) { | ||
renderShape = shape; | ||
return this; | ||
} | ||
|
||
public MachineProperties setPlayerStorable() { | ||
isPlayerStorable = true; | ||
return this; | ||
} | ||
|
||
public MachineProperties setSubnodes(Subnode[] subnodes) { | ||
isMultiblock = true; | ||
this.subnodes = subnodes; | ||
return this; | ||
} | ||
|
||
public MachineProperties setShapeProvider(VoxelShapeProvider provider) { | ||
this.provider = provider; | ||
return this; | ||
} | ||
|
||
public static MachineProperties builder() { | ||
return new MachineProperties(); | ||
} | ||
|
||
} |
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.