mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 06:52:58 +00:00
Merge branch 'master' of github.com:Vazkii/Botania into flattening_test
This commit is contained in:
commit
0d0eaeb121
67 files changed
+339
-402
No files matched your search
@@ -411,7 +411,7 @@ public final class BotaniaAPI {
|
||||
|
||||
/**
|
||||
* Registers a Pure Daisy Recipe with the default time
|
||||
* @param input The block that works as an input for the recipe. Can be a Block or an oredict String.
|
||||
* @param input The input for the recipe. Can be a Block (meta-insensitive), IBlockState (meta-sensitive), or an oredict String.
|
||||
* @param outputState The blockstate to be placed upon recipe completion.
|
||||
* @return The recipe created.
|
||||
*/
|
||||
@@ -421,7 +421,7 @@ public final class BotaniaAPI {
|
||||
|
||||
/**
|
||||
* Registers a Pure Daisy Recipe.
|
||||
* @param input The block that works as an input for the recipe. Can be a Block or an oredict String.
|
||||
* @param input The input for the recipe. Can be a Block (meta-insensitive), IBlockState (meta-sensitive), or an oredict String.
|
||||
* @param outputState The blockstate to be placed upon recipe completion.
|
||||
* @param time The amount of time in ticks to complete this recipe. Note that this is ticks on your block, not total time.
|
||||
* The Pure Daisy only ticks one block at a time in a round robin fashion.
|
||||
|
||||
@@ -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