crops crops crops, canola atleast...
|
@ -14,7 +14,7 @@ c93b89c4b673b6063148666b2eb13dec98918532 assets/actuallyadditions/blockstates/bl
|
|||
ac5d75bda4dc24894fb380d5e3ec751a0aa5c498 assets/actuallyadditions/blockstates/black_quartz_stair.json
|
||||
146faa2ebbb31f320f8b336f6e675fce6faac2db assets/actuallyadditions/blockstates/black_quartz_wall.json
|
||||
5dea2f0e554a5ecb9b7f547526d745ff85353a40 assets/actuallyadditions/blockstates/breaker.json
|
||||
273dff01ca0d0738f05639086aa4f1b6bf3fde3c assets/actuallyadditions/blockstates/canola_crop.json
|
||||
e3b6949dc703f984bc10cb5794171ab1623f7bad assets/actuallyadditions/blockstates/canola.json
|
||||
5101139337dd4e5a057333e9e424df47f7138c93 assets/actuallyadditions/blockstates/canola_press.json
|
||||
c8d5786cd66f324b82d201e6e4eb0ae0a5978d13 assets/actuallyadditions/blockstates/charcoal_block.json
|
||||
998b11d1f63e153ab2f8bd11830405611c8886a2 assets/actuallyadditions/blockstates/chiseled_black_quartz_block.json
|
||||
|
@ -146,7 +146,10 @@ f277709029801d7292d300b13876189a32d1b3a4 assets/actuallyadditions/models/block/b
|
|||
93b61ddd8e53f61ca25c4768de3a3b95a23297b4 assets/actuallyadditions/models/block/black_quartz_wall_post.json
|
||||
1c617e7845d3211b4f7cda38a9bee59208de8c23 assets/actuallyadditions/models/block/black_quartz_wall_side.json
|
||||
46c7aa812a7af600d4f927eba5fa3f5b4956fa28 assets/actuallyadditions/models/block/black_quartz_wall_side_tall.json
|
||||
f399ee0d5977015e82c733336cd6317dee65aefe assets/actuallyadditions/models/block/canola_crop.json
|
||||
ee7cee63dc7889fac05160a97ab0664920269ed7 assets/actuallyadditions/models/block/canola_1.json
|
||||
981ceb96a82d90cdf636fd5c763c39dae7c923b5 assets/actuallyadditions/models/block/canola_2.json
|
||||
ca75d2ce24c66949daf7cd966a89a3a6e19d6ac5 assets/actuallyadditions/models/block/canola_3.json
|
||||
ead34cc4f003d8b748dc723f2bbff74e03f90270 assets/actuallyadditions/models/block/canola_4.json
|
||||
49e551c7f9943bd24b1fa09fb65836bae48096df assets/actuallyadditions/models/block/charcoal_block.json
|
||||
48a6232ced27b9a35fc236705adb2ea817a03b3f assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json
|
||||
85a969896c0aad4f70878d4c075c6c0885a5ade4 assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json
|
||||
|
@ -250,8 +253,7 @@ dfb8604b25fc7a671c371a81e3384410c69cc7b1 assets/actuallyadditions/models/item/bl
|
|||
ea2f5b2bf99670f4df05889ab67c73686a26a58b assets/actuallyadditions/models/item/black_quartz_stair.json
|
||||
be227e074a54982e1e9f9f304e63df3095006955 assets/actuallyadditions/models/item/black_quartz_wall.json
|
||||
3679056a9aee03821a997a2616b8808af7bfe4b7 assets/actuallyadditions/models/item/breaker.json
|
||||
e1b2c741f6da5cfb51392b1a722c4d664ae2400e assets/actuallyadditions/models/item/canola.json
|
||||
89b4704399440cae3ffdee004e5df95cbc0ab0d8 assets/actuallyadditions/models/item/canola_crop.json
|
||||
3c7aff42e6babc0cc4d06900ad73bb7c2b233ce0 assets/actuallyadditions/models/item/canola.json
|
||||
e4b8fbed9602c0cf96eff84111586799412982fc assets/actuallyadditions/models/item/canola_oil_bucket.json
|
||||
08c70d561c219bb4c6d21b5f56192df81f054e0a assets/actuallyadditions/models/item/canola_press.json
|
||||
0507025fadef30e363cbc825265576c782880f7b assets/actuallyadditions/models/item/canola_seeds.json
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "actuallyadditions:block/canola_crop"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "actuallyadditions:block/canola_crop"
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"parent": "actuallyadditions:block/canola",
|
||||
"textures": {
|
||||
"layer0": "actuallyadditions:item/canola"
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "actuallyadditions:block/canola_crop"
|
||||
}
|
|
@ -10,7 +10,9 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.api.farmer;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IFarmer;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -45,4 +47,12 @@ public interface IFarmerBehavior {
|
|||
default Integer getPrioInt() {
|
||||
return getPriority();
|
||||
}
|
||||
|
||||
static void initBehaviors() {
|
||||
ActuallyAdditionsAPI.addFarmerBehavior(new DefaultFarmerBehavior());
|
||||
ActuallyAdditionsAPI.addFarmerBehavior(new CactusFarmerBehavior());
|
||||
ActuallyAdditionsAPI.addFarmerBehavior(new NetherWartFarmerBehavior());
|
||||
ActuallyAdditionsAPI.addFarmerBehavior(new ReedFarmerBehavior());
|
||||
ActuallyAdditionsAPI.addFarmerBehavior(new MelonPumpkinFarmerBehavior());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package de.ellpeck.actuallyadditions.data;
|
|||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SlabBlock;
|
||||
import net.minecraft.block.StairsBlock;
|
||||
import net.minecraft.block.WallBlock;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -117,8 +114,18 @@ public class BlockStateGenerator extends BlockStateProvider {
|
|||
buildLitState(ActuallyBlocks.LAMP_BLACK);
|
||||
|
||||
// TO BE SORTED
|
||||
getVariantBuilder(ActuallyBlocks.CANOLA.get()).partialState()
|
||||
.with(CropsBlock.AGE, 0).modelForState().modelFile(models().crop("canola_1", modLoc("block/canola_stage_1"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 1).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 2).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 3).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 4).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 5).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 6).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel().partialState()
|
||||
.with(CropsBlock.AGE, 7).modelForState().modelFile(models().crop("canola_4", modLoc("block/canola_stage_4"))).addModel();
|
||||
|
||||
buildCubeAll(ActuallyBlocks.RICE);
|
||||
buildCubeAll(ActuallyBlocks.CANOLA);
|
||||
//buildCubeAll(ActuallyBlocks.CANOLA);
|
||||
buildCubeAll(ActuallyBlocks.FLAX);
|
||||
buildCubeAll(ActuallyBlocks.COFFEE);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.CommonConfig;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes;
|
||||
|
@ -119,6 +120,7 @@ public class ActuallyAdditions {
|
|||
|
||||
eventBus.addListener(this::setup);
|
||||
eventBus.addListener(this::clientSetup);
|
||||
IFarmerBehavior.initBehaviors();
|
||||
}
|
||||
|
||||
private static void reloadEvent(AddReloadListenerEvent event) {
|
||||
|
|
|
@ -79,6 +79,8 @@ public class ActuallyAdditionsClient {
|
|||
RenderTypeLookup.setRenderLayer(InitFluids.CRYSTALIZED_OIL.getFlowing(), RenderType.translucent());
|
||||
RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.get(), RenderType.translucent());
|
||||
RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.getFlowing(), RenderType.translucent());
|
||||
|
||||
RenderTypeLookup.setRenderLayer(ActuallyBlocks.CANOLA.get(), RenderType.cutout());
|
||||
}
|
||||
|
||||
private static void setupSpecialRenders() {
|
||||
|
|
|
@ -2,9 +2,21 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.BlockNamedItem;
|
||||
|
||||
public class AABlockItem extends BlockItem {
|
||||
public AABlockItem(Block blockIn, Properties builder) {
|
||||
super(blockIn, builder);
|
||||
}
|
||||
|
||||
public static class AASeedItem extends BlockNamedItem {
|
||||
public AASeedItem(Block block, Properties properties) {
|
||||
super(block, properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescriptionId() {
|
||||
return this.getOrCreateDescriptionId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.AACrops;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
|
||||
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.Crystals;
|
||||
|
@ -20,11 +21,14 @@ import net.minecraft.block.*;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.IItemProvider;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public final class ActuallyBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID);
|
||||
public static final DeferredRegister<TileEntityType<?>> TILES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, ActuallyAdditions.MODID);
|
||||
|
@ -259,17 +263,11 @@ public final class ActuallyBlocks {
|
|||
(b) -> new AABlockItem(b, defaultBlockItemProperties));
|
||||
|
||||
|
||||
//public static final AABlockReg<> WILD_PLANT = new AABlockReg<>("wild", BlockWildPlant::new); //TODO: what is this?
|
||||
public static Supplier<Block> CANOLA = BLOCKS.register("canola", () -> new AACrops(defaultCropProps(), ActuallyItems.CANOLA_SEEDS));
|
||||
public static Supplier<Block> RICE = BLOCKS.register("rice", () -> new AACrops(defaultCropProps(), ActuallyItems.RICE_SEEDS));
|
||||
public static Supplier<Block> FLAX = BLOCKS.register("flax", () -> new AACrops(defaultCropProps(), ActuallyItems.FLAX_SEEDS));
|
||||
public static Supplier<Block> COFFEE = BLOCKS.register("coffee", () -> new AACrops(defaultCropProps(), ActuallyItems.COFFEE_SEEDS));
|
||||
|
||||
//TODO: Are plants normal blocks / blockitems? i have no idea... news at 11...
|
||||
public static final AABlockReg<BlockPlant, AABlockItem, ?> RICE = new AABlockReg<>("rice", () -> new BlockPlant(ActuallyItems.RICE_SEEDS),
|
||||
(b) -> new AABlockItem(b, defaultBlockItemProperties));
|
||||
public static final AABlockReg<BlockPlant, AABlockItem, ?> CANOLA = new AABlockReg<>("canola_crop", () -> new BlockPlant(ActuallyItems.CANOLA_SEEDS),
|
||||
(b) -> new AABlockItem(b, defaultBlockItemProperties));
|
||||
public static final AABlockReg<BlockPlant, AABlockItem, ?> FLAX = new AABlockReg<>("flax", () -> new BlockPlant(ActuallyItems.FLAX_SEEDS),
|
||||
(b) -> new AABlockItem(b, defaultBlockItemProperties));
|
||||
public static final AABlockReg<BlockPlant, AABlockItem, ?> COFFEE = new AABlockReg<>("coffee", () -> new BlockPlant(ActuallyItems.COFFEE_SEEDS),
|
||||
(b) -> new AABlockItem(b, defaultBlockItemProperties));
|
||||
public static final AABlockReg<BlockGreenhouseGlass, AABlockItem, ?> GREENHOUSE_GLASS = new AABlockReg<>("greenhouse_glass", BlockGreenhouseGlass::new,
|
||||
(b) -> new AABlockItem(b, defaultBlockItemProperties));
|
||||
|
||||
|
@ -281,6 +279,10 @@ public final class ActuallyBlocks {
|
|||
return AbstractBlock.Properties.of(Material.STONE).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).strength(1.5F, 10.0F).sound(SoundType.STONE);
|
||||
}
|
||||
|
||||
public static AbstractBlock.Properties defaultCropProps() {
|
||||
return AbstractBlock.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP);
|
||||
}
|
||||
|
||||
public static void init(IEventBus evt) {
|
||||
BLOCKS.register(evt);
|
||||
TILES.register(evt);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
@ -24,17 +25,25 @@ import net.minecraft.util.math.shapes.VoxelShape;
|
|||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockFarmer extends DirectionalBlock.Container {
|
||||
|
||||
public BlockFarmer() {
|
||||
super(ActuallyBlocks.defaultPickProps(0));
|
||||
}
|
||||
|
||||
//@Override
|
||||
public TileEntity newBlockEntity(IBlockReader worldIn) {
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return new TileEntityFarmer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||
return this.openGui(worldIn, player, pos, TileEntityFarmer.class);
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.base;
|
||||
|
||||
import net.minecraft.block.CropsBlock;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IItemProvider;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class AACrops extends CropsBlock {
|
||||
Supplier<Item> itemSupplier;
|
||||
public AACrops(Properties p_i48421_1_, Supplier<Item> seedSupplier) {
|
||||
super(p_i48421_1_);
|
||||
this.itemSupplier = seedSupplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemProvider getBaseSeedId() {
|
||||
return this.itemSupplier.get();
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks.metalists;
|
||||
/*package de.ellpeck.actuallyadditions.mod.blocks.metalists;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
|
@ -19,7 +19,7 @@ import net.minecraft.util.IStringSerializable;
|
|||
@Deprecated
|
||||
public enum TheWildPlants implements IStringSerializable {
|
||||
|
||||
CANOLA("canola", Rarity.RARE, ActuallyBlocks.CANOLA.getBlock()),
|
||||
CANOLA("canola", Rarity.RARE, ActuallyBlocks.CANOLA.get()),
|
||||
FLAX("flax", Rarity.RARE, ActuallyBlocks.FLAX.getBlock()),
|
||||
RICE("rice", Rarity.RARE, ActuallyBlocks.RICE.getBlock()),
|
||||
COFFEE("coffee", Rarity.RARE, ActuallyBlocks.COFFEE.getBlock());
|
||||
|
@ -46,4 +46,4 @@ public enum TheWildPlants implements IStringSerializable {
|
|||
public Block getNormalVersion() {
|
||||
return this.normal;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
|
|
@ -11,9 +11,23 @@ public class CommonConfig {
|
|||
|
||||
static {
|
||||
OTHER.build();
|
||||
MACHINES.build();
|
||||
COMMON_CONFIG = BUILDER.build();
|
||||
}
|
||||
|
||||
public static class MACHINES {
|
||||
public static ForgeConfigSpec.IntValue FARMER_AREA;
|
||||
|
||||
public static void build() {
|
||||
BUILDER.comment("Machine Settings").push("machineSettings");
|
||||
|
||||
FARMER_AREA = BUILDER.comment("The size of the farmer's farming area. Default is 9x9, must be an odd number.").defineInRange("farmerArea", 9, 1, Integer.MAX_VALUE);
|
||||
|
||||
BUILDER.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class OTHER {
|
||||
public static ForgeConfigSpec.BooleanValue SOLID_XP_ALWAYS_ORBS;
|
||||
public static ForgeConfigSpec.BooleanValue DO_UPDATE_CHECK;
|
||||
|
@ -39,6 +53,7 @@ public class CommonConfig {
|
|||
|
||||
|
||||
public static void build() {
|
||||
|
||||
BUILDER.comment("Everything else").push("other");
|
||||
|
||||
SOLID_XP_ALWAYS_ORBS = BUILDER.comment("If true, Solidified Experience will always spawn orbs, even for regular players.")
|
||||
|
|
|
@ -77,13 +77,6 @@ public enum ConfigIntValues {
|
|||
300000,
|
||||
Integer.MAX_VALUE,
|
||||
"The amount of power the atomic reconstructor can store."),
|
||||
FARMER_AREA(
|
||||
"Farmer Area",
|
||||
ConfigCategories.MACHINE_VALUES,
|
||||
9,
|
||||
1,
|
||||
Integer.MAX_VALUE,
|
||||
"The size of the farmer's farming area. Default is 9x9, must be an odd number."),
|
||||
MINING_LENS_USE(
|
||||
"Mining Lens Energy",
|
||||
ConfigCategories.MACHINE_VALUES,
|
||||
|
|
|
@ -44,11 +44,9 @@ public class GuiFarmer extends AAScreen<ContainerFarmer> {
|
|||
super.init();
|
||||
|
||||
this.energy = new EnergyDisplay(this.leftPos + 33, this.topPos + 6, this.farmer.storage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderLabels(@Nonnull MatrixStack matrices, int x, int y) {
|
||||
AssetUtil.displayNameString(matrices, this.font, this.imageWidth, -10, this.farmer);
|
||||
titleLabelX = (int) (imageWidth / 2.0f - font.width(title) / 2.0f);
|
||||
titleLabelY = -10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,6 +13,8 @@ package de.ellpeck.actuallyadditions.mod.items;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.AABlockItem;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemArmorAA;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemHoeAA;
|
||||
|
@ -189,10 +191,10 @@ public final class ActuallyItems {
|
|||
public static final RegistryObject<Item> HAIRY_BALL = ITEMS.register("hairy_ball", ItemHairBall::new);
|
||||
public static final RegistryObject<Item> COFFEE_BEANS = ITEMS.register("coffee_beans", ItemCoffeeBean::new);
|
||||
|
||||
public static final RegistryObject<Item> RICE_SEEDS = ITEMS.register("rice_seeds", ItemBase::new); //() -> new ItemSeed("seedRice", ActuallyBlocks.RICE.get(), FOOD.get(), TheFoods.RICE.ordinal()));
|
||||
public static final RegistryObject<Item> CANOLA_SEEDS = ITEMS.register("canola_seeds", ItemBase::new); //() -> new ItemFoodSeed("seedCanola", ActuallyBlocks.CANOLA, itemMisc, 0, 1, 0.01F, 10).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 0), 0.2F));
|
||||
public static final RegistryObject<Item> FLAX_SEEDS = ITEMS.register("flax_seeds", ItemBase::new); //() -> new ItemSeed("seedFlax", ActuallyBlocks.FLAX, Items.STRING, 0));
|
||||
public static final RegistryObject<Item> COFFEE_SEEDS = ITEMS.register("coffee_seeds", ItemBase::new); //() -> new ItemSeed("seedCoffeeBeans", ActuallyBlocks.COFFEE, COFFEE_BEANS, 0));
|
||||
public static final RegistryObject<Item> RICE_SEEDS = ITEMS.register("rice_seeds", () -> new AABlockItem.AASeedItem(ActuallyBlocks.RICE.get(), ActuallyItems.defaultProps())); //() -> new ItemSeed("seedRice", ActuallyBlocks.RICE.get(), FOOD.get(), TheFoods.RICE.ordinal()));
|
||||
public static final RegistryObject<Item> CANOLA_SEEDS = ITEMS.register("canola_seeds", () -> new AABlockItem.AASeedItem(ActuallyBlocks.CANOLA.get(), ActuallyItems.defaultProps())); //() -> new ItemFoodSeed("seedCanola", ActuallyBlocks.CANOLA, itemMisc, 0, 1, 0.01F, 10).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 0), 0.2F));
|
||||
public static final RegistryObject<Item> FLAX_SEEDS = ITEMS.register("flax_seeds", () -> new AABlockItem.AASeedItem(ActuallyBlocks.FLAX.get(), ActuallyItems.defaultProps())); //() -> new ItemSeed("seedFlax", ActuallyBlocks.FLAX, Items.STRING, 0));
|
||||
public static final RegistryObject<Item> COFFEE_SEEDS = ITEMS.register("coffee_seeds", () -> new AABlockItem.AASeedItem(ActuallyBlocks.COFFEE.get(), ActuallyItems.defaultProps())); //() -> new ItemSeed("seedCoffeeBeans", ActuallyBlocks.COFFEE, COFFEE_BEANS, 0));
|
||||
|
||||
// TOOLS & ARMOR
|
||||
public static final RegistryObject<Item> QUARTZ_HELMET = ITEMS.register("quartz_helmet", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, EquipmentSlotType.HEAD));
|
||||
|
|
|
@ -20,12 +20,15 @@ import net.minecraft.item.BlockItem;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.loot.LootContext;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.Tags;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -83,12 +86,11 @@ public class DefaultFarmerBehavior implements IFarmerBehavior {
|
|||
return this.doFarmerStuff(state, world, pos, farmer);
|
||||
}
|
||||
}
|
||||
// TODO: [port] come back and see what this is actually doing
|
||||
// else if (CropsBlock.AGE.equals(block.getBlockState().getProperty("age"))) {
|
||||
// if (state.get(BlockStateProperties.AGE_0_7) >= 7 && !(block instanceof StemBlock)) {
|
||||
// return this.doFarmerStuff(state, world, pos, farmer);
|
||||
// }
|
||||
// }
|
||||
else if (state.hasProperty(BlockStateProperties.AGE_25)) {
|
||||
if (state.getValue(BlockStateProperties.AGE_25) >= 7 && !(block instanceof StemBlock)) {
|
||||
return this.doFarmerStuff(state, world, pos, farmer);
|
||||
}
|
||||
}
|
||||
}
|
||||
return FarmerResult.FAIL;
|
||||
}
|
||||
|
@ -177,15 +179,13 @@ public class DefaultFarmerBehavior implements IFarmerBehavior {
|
|||
if (!player.mayUseItemAt(pos.relative(Direction.UP), Direction.UP, itemstack)) {
|
||||
return ActionResultType.FAIL;
|
||||
} else {
|
||||
/* int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(itemstack, player, world, pos);
|
||||
/* int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(itemstack, player, world, pos);
|
||||
if (hook != 0) {
|
||||
return hook > 0
|
||||
? ActionResultType.SUCCESS
|
||||
: ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
BlockState iblockstate = world.getBlockState(pos);
|
||||
Block block = iblockstate.getBlock();
|
||||
|
||||
if (world.isEmptyBlock(pos.above())) {
|
||||
if (block == Blocks.GRASS || block == Blocks.GRASS_PATH) {
|
||||
|
@ -204,8 +204,7 @@ public class DefaultFarmerBehavior implements IFarmerBehavior {
|
|||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}*/
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
|
|||
this.storage.extractEnergyInternal(ENERGY_USED, false);
|
||||
if (this.brewTime >= TIME_USED) {
|
||||
this.brewTime = 0;
|
||||
ItemStack output = new ItemStack(ActuallyBlocks.COFFEE.getItem());
|
||||
ItemStack output = new ItemStack(ActuallyItems.COFFEE_BEANS.get());
|
||||
for (int i = 3; i < this.inv.getSlots(); i++) {
|
||||
if (StackUtil.isValid(this.inv.getStackInSlot(i))) {
|
||||
CoffeeIngredient ingredient = ItemCoffee.getIngredientFromStack(this.inv.getStackInSlot(i));
|
||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.farmer.FarmerResult;
|
|||
import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IFarmer;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.CommonConfig;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFarmer;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
|
||||
|
@ -33,6 +34,7 @@ import net.minecraft.util.Direction;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
@ -92,7 +94,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer
|
|||
this.waitTime--;
|
||||
|
||||
if (this.waitTime <= 0) {
|
||||
int area = ConfigIntValues.FARMER_AREA.getValue();
|
||||
int area = CommonConfig.MACHINES.FARMER_AREA.get();
|
||||
if (area % 2 == 0) {
|
||||
area++;
|
||||
}
|
||||
|
@ -130,6 +132,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer
|
|||
SORTED_FARMER_BEHAVIORS.clear();
|
||||
SORTED_FARMER_BEHAVIORS.addAll(ActuallyAdditionsAPI.FARMER_BEHAVIORS);
|
||||
Collections.sort(SORTED_FARMER_BEHAVIORS, (b1, b2) -> b2.getPrioInt().compareTo(b1.getPrioInt()));
|
||||
sorted = true;
|
||||
}
|
||||
|
||||
private void checkBehaviors(BlockPos query) {
|
||||
|
@ -237,7 +240,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer
|
|||
|
||||
@Override
|
||||
public ITextComponent getDisplayName() {
|
||||
return StringTextComponent.EMPTY;
|
||||
return new TranslationTextComponent("container.actuallyadditions.farmer");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
|
@ -295,7 +295,7 @@
|
|||
"item.actuallyadditions.coffee": "Cup with Coffee",
|
||||
"item.actuallyadditions.coffee_seed": "Coffee Seeds",
|
||||
"item.actuallyadditions.coffee_beans": "Coffee Beans",
|
||||
"item.actuallyadditions.canola_seed": "Canola Seeds",
|
||||
"item.actuallyadditions.canola_seeds": "Canola Seeds",
|
||||
"item.actuallyadditions.canola": "Canola",
|
||||
"item.actuallyadditions.resonant_rice": "Resonant Rice",
|
||||
"item.actuallyadditions.drill_upgrade_speed": "Drill Speed Augment I",
|
||||
|
|
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 3.5 KiB |