Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger updates related to full blocks properly for C&B Tiles.
- Loading branch information
1 parent
38d4d5e
commit e5844f0
Showing
7 changed files
with
94 additions
and
13 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
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,10 @@ | ||
package mod.chiselsandbits.helpers; | ||
|
||
import mod.chiselsandbits.chiseledblock.data.VoxelBlob; | ||
|
||
public interface IStateRef | ||
{ | ||
|
||
VoxelBlob getVoxelBlob(); | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/mod/chiselsandbits/render/chiseledblock/BlockStateRef.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,36 @@ | ||
package mod.chiselsandbits.render.chiseledblock; | ||
|
||
import mod.chiselsandbits.chiseledblock.data.VoxelBlob; | ||
import mod.chiselsandbits.helpers.IStateRef; | ||
|
||
public class BlockStateRef implements IStateRef | ||
{ | ||
final int stateID; | ||
|
||
public BlockStateRef( | ||
final int sid ) | ||
{ | ||
stateID = sid; | ||
} | ||
|
||
@Override | ||
public boolean equals( | ||
final Object obj ) | ||
{ | ||
if ( obj instanceof BlockStateRef ) | ||
{ | ||
return stateID == ( (BlockStateRef) obj ).stateID; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
@Override | ||
public VoxelBlob getVoxelBlob() | ||
{ | ||
final VoxelBlob b = new VoxelBlob(); | ||
b.fill( stateID ); | ||
return b; | ||
} | ||
|
||
}; |
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