-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebalance electron tubes and add ender farm
- Loading branch information
Showing
36 changed files
with
617 additions
and
115 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
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
27 changes: 27 additions & 0 deletions
27
src/main/java/forestry/cultivation/blocks/PlanterProperties.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,27 @@ | ||
package forestry.cultivation.blocks; | ||
|
||
import com.google.common.base.Preconditions; | ||
|
||
import net.minecraft.item.Item; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
import forestry.api.core.IModelManager; | ||
import forestry.core.blocks.MachineProperties; | ||
import forestry.core.utils.ItemStackUtil; | ||
import forestry.cultivation.tiles.TilePlanter; | ||
|
||
public class PlanterProperties<T extends TilePlanter> extends MachineProperties<T> { | ||
|
||
PlanterProperties(Class<T> teClass, String name) { | ||
super(teClass, name); | ||
} | ||
|
||
@Override | ||
public void registerModel(Item item, IModelManager manager) { | ||
ResourceLocation itemNameFromRegistry = ItemStackUtil.getItemNameFromRegistry(item); | ||
Preconditions.checkNotNull(itemNameFromRegistry, "No registry name for item"); | ||
String identifier = itemNameFromRegistry.getResourcePath(); | ||
manager.registerItemModel(item, 0, identifier); | ||
manager.registerItemModel(item, 1, identifier); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/forestry/cultivation/tiles/TileFarmEnder.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,41 @@ | ||
package forestry.cultivation.tiles; | ||
|
||
import net.minecraft.init.Blocks; | ||
import net.minecraft.init.Items; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class TileFarmEnder extends TilePlanter { | ||
public TileFarmEnder() { | ||
super("farmEnder"); | ||
} | ||
|
||
@Override | ||
public ItemStack[] createGermlingStacks() { | ||
return new ItemStack[]{ | ||
new ItemStack(Blocks.CHORUS_FLOWER), | ||
new ItemStack(Blocks.CHORUS_FLOWER), | ||
new ItemStack(Blocks.CHORUS_FLOWER), | ||
new ItemStack(Blocks.CHORUS_FLOWER) | ||
}; | ||
} | ||
|
||
@Override | ||
public ItemStack[] createResourceStacks() { | ||
return new ItemStack[]{ | ||
new ItemStack(Blocks.END_STONE), | ||
new ItemStack(Blocks.END_STONE), | ||
new ItemStack(Blocks.END_STONE), | ||
new ItemStack(Blocks.END_STONE) | ||
}; | ||
} | ||
|
||
@Override | ||
public ItemStack[] createProductionStacks() { | ||
return new ItemStack[]{ | ||
new ItemStack(Blocks.CHORUS_FLOWER), | ||
new ItemStack(Items.CHORUS_FRUIT), | ||
new ItemStack(Items.CHORUS_FRUIT), | ||
new ItemStack(Blocks.CHORUS_FLOWER) | ||
}; | ||
} | ||
} |
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.