mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 15:33:08 +00:00
Allow pure daisy inputs to be state-sensitive. Closes #2501
This commit is contained in:
1 parent
1b4566388a
commit
23377aeee9
3 files changed
+14
-8
No files matched your search
@@ -41,8 +41,8 @@ public class RecipePureDaisy {
|
||||
this.input = input;
|
||||
outputState = state;
|
||||
this.time = time;
|
||||
if(input != null && !(input instanceof String || input instanceof Block))
|
||||
throw new IllegalArgumentException("input must be an oredict String or a Block.");
|
||||
if(input != null && !(input instanceof String || input instanceof Block || input instanceof IBlockState))
|
||||
throw new IllegalArgumentException("input must be an oredict String, Block, or IBlockState");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,6 +52,9 @@ public class RecipePureDaisy {
|
||||
if(input instanceof Block)
|
||||
return state.getBlock() == input;
|
||||
|
||||
if(input instanceof IBlockState)
|
||||
return state == input;
|
||||
|
||||
ItemStack stack = new ItemStack(state.getBlock(), 1, state.getBlock().damageDropped(state));
|
||||
String oredict = (String) input;
|
||||
return isOreDict(stack, oredict);
|
||||
@@ -88,7 +91,7 @@ public class RecipePureDaisy {
|
||||
*/
|
||||
public boolean set(World world, BlockPos pos, SubTileEntity pureDaisy) {
|
||||
if(!world.isRemote)
|
||||
world.setBlockState(pos, outputState, 1 | 2);
|
||||
world.setBlockState(pos, outputState);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user