Compare commits

..

No commits in common. "860215e7c11ceb4a7c8145612b5e8596b374ac49" and "6263e819ab5b554982925c7e5d5f527405df0ed7" have entirely different histories.

12 changed files with 51 additions and 44 deletions

10
port.MD
View file

@ -45,12 +45,12 @@
- [ ] Improve the coffee maker's ui by putting the water meter actually into the ui
- [ ] Rename phantom boosters to range boosters (since they work for other stuff too)
- [ ] Make worms use that new forge event/hook to keep the ground watered instead of trying to re-water it every few ticks
- [x] Give ender star an enchantment glint
- [ ] Give ender star an enchantment glint
- [ ] Make miner lens far more expensive to use, mmm power creep
- [x] Make coffee beans and seeds be the same item or I might get killed by someone finally
- [ ] Make coffee beans and seeds be the same item or I might get killed by someone finally
# Keep As Is
- [X] Battery box
- [ ] Battery box
- [ ] Item interfaces and item laser system
- [ ] Farmer
- [x] Empowerer and display stands
@ -70,7 +70,7 @@
- [ ] Crusher and double crusher
- [ ] Heat collectors
- [x] Precision dropper
- [x] Engineer's goggles
- [ ] Engineer's goggles
- [ ] Laser relay modifiers and wrench
- [ ] Handheld filler
- [ ] Sacks
@ -89,7 +89,7 @@
- [ ] Drills and drill upgrades
- [ ] Batteries
- [x] Crafting table on a stick
- [x] Leaf blowers
- [ ] Leaf blowers
- [ ] The book
- [x] The Crystal Flux name and rainbow effect
- [ ] Engineer's village house and engineer villager

View file

@ -260,6 +260,7 @@ bbf723238f6536295339f0b0b5b052cf89b92d5b assets/actuallyadditions/models/item/co
1d676d4abc4c67c3da2d15499ecb585f436f3893 assets/actuallyadditions/models/item/coffee_beans.json
28fc61074cb1a60ef5904e4bba7f6ad3c42b55fd assets/actuallyadditions/models/item/coffee_cup.json
082ecd5232059fadaa447a99a623437e3adab3ef assets/actuallyadditions/models/item/coffee_machine.json
6765c06218d8940c06daeff92aeb44516ac6ff4a assets/actuallyadditions/models/item/coffee_seeds.json
7698ec0e672b1209e6a664dfee5c3bbaa1a612c7 assets/actuallyadditions/models/item/crafter_on_a_stick.json
1e7e61701473dbf3dfc18bb5b9fa7be91b443dd8 assets/actuallyadditions/models/item/crusher.json
aeacd7ca465c19d6cbcef25e61023397c4472ab3 assets/actuallyadditions/models/item/crusher_double.json
@ -477,7 +478,7 @@ f3df22f203e8c00ee7ee004bb9b4edfd522f069a data/actuallyadditions/loot_tables/bloc
6df5538ba7cf057d19728f8e615862a84b9d4bb1 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json
092e8773d46f16d80d0c489c4a2d2f8bd5a78799 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json
bf7743c27757cf5b0dbab9b3e15d1d5ca1ece818 data/actuallyadditions/loot_tables/blocks/coal_generator.json
01ed45d18335029de7725ae4490077c9280eedd1 data/actuallyadditions/loot_tables/blocks/coffee.json
66ee33930c8392b29710ce2bc117f99907e336df data/actuallyadditions/loot_tables/blocks/coffee.json
3285202e3f840d091b8d85dc2c721199fcc96240 data/actuallyadditions/loot_tables/blocks/coffee_machine.json
317d0377327250f2fe15ff549a1ffa1b7bdade14 data/actuallyadditions/loot_tables/blocks/crusher.json
b087c6f44cf0236f52471ec54c026ee30ba0d273 data/actuallyadditions/loot_tables/blocks/crusher_double.json

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "actuallyadditions:item/coffee_seeds"
}
}

View file

@ -22,7 +22,7 @@
},
{
"type": "minecraft:item",
"name": "actuallyadditions:coffee_beans"
"name": "actuallyadditions:coffee_seeds"
}
]
}
@ -44,7 +44,7 @@
}
}
],
"name": "actuallyadditions:coffee_beans"
"name": "actuallyadditions:coffee_seeds"
}
],
"conditions": [

View file

@ -190,7 +190,7 @@ public class LootTableGenerator extends LootTableProvider {
addCrop(ActuallyBlocks.CANOLA, ActuallyItems.CANOLA, ActuallyItems.CANOLA_SEEDS);
addCrop(ActuallyBlocks.RICE, ActuallyItems.RICE, ActuallyItems.RICE_SEEDS);
addCrop(ActuallyBlocks.FLAX, () -> Items.STRING, ActuallyItems.FLAX_SEEDS);
addCrop(ActuallyBlocks.COFFEE, ActuallyItems.COFFEE_BEANS, ActuallyItems.COFFEE_BEANS);
addCrop(ActuallyBlocks.COFFEE, ActuallyItems.COFFEE_BEANS, ActuallyItems.COFFEE_SEEDS);
}
private void addCrop(Supplier<Block> block, Supplier<Item> item, Supplier<Item> seed) {

View file

@ -262,7 +262,7 @@ public final class ActuallyBlocks {
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_BEANS));
public static Supplier<Block> COFFEE = BLOCKS.register("coffee", () -> new AACrops(defaultCropProps(), ActuallyItems.COFFEE_SEEDS));
public static final AABlockReg<BlockGreenhouseGlass, AABlockItem, ?> GREENHOUSE_GLASS = new AABlockReg<>("greenhouse_glass", BlockGreenhouseGlass::new,
(b) -> new AABlockItem(b, defaultBlockItemProperties));

View file

@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.items.ItemBattery;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
@ -23,8 +22,6 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
@ -40,19 +37,10 @@ public class BlockBatteryBox extends BlockContainerBase {
// public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
// return BlockSlabs.AABB_BOTTOM_HALF;
// }
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return Shapes.BATBOX_SHAPE;
}
@Override
public boolean hasTileEntity(BlockState state) {
return true;
}
@Nullable
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
//@Override
public TileEntity newBlockEntity(IBlockReader worldIn) {
return new TileEntityBatteryBox();
}
@ -63,15 +51,15 @@ public class BlockBatteryBox extends BlockContainerBase {
TileEntityBatteryBox box = (TileEntityBatteryBox) tile;
ItemStack stack = player.getItemInHand(hand);
if (!stack.isEmpty()) {
if (stack.getItem() instanceof ItemBattery && box.inv.getStackInSlot(0).isEmpty()) {
if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemBattery && !StackUtil.isValid(box.inv.getStackInSlot(0))) {
box.inv.setStackInSlot(0, stack.copy());
player.setItemInHand(hand, ItemStack.EMPTY);
return ActionResultType.SUCCESS;
}
} else {
ItemStack inSlot = box.inv.getStackInSlot(0);
if (!inSlot.isEmpty()) {
if (StackUtil.isValid(inSlot)) {
player.setItemInHand(hand, inSlot.copy());
box.inv.setStackInSlot(0, ItemStack.EMPTY);
return ActionResultType.SUCCESS;

View file

@ -12,7 +12,6 @@ public class Shapes {
static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(Block.box(13, 0, 1, 15, 15.5, 3), Block.box(2, 0, 2, 14, 6, 14), Block.box(2, 10, 2, 14, 15, 14), Block.box(3, 6, 3, 13, 10, 13), Block.box(1, 0, 1, 3, 15.5, 3), Block.box(1, 0, 13, 3, 15.5, 15), Block.box(13, 0, 13, 15, 15.5, 15), Block.box(0.9, 0, 0.9, 3.1, 0.5, 3.1), Block.box(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.box(0.9, 5, 12.9, 3.1, 6.5, 15.1), Block.box(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.box(12.9, 5, 12.9, 15.1, 6.5, 15.1), Block.box(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.box(0.9, 9.5, 12.9, 3.1, 11, 15.1), Block.box(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.box(12.9, 9.5, 12.9, 15.1, 11, 15.1), Block.box(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.box(12.9, 0, 0.9, 15.1, 0.5, 3.1), Block.box(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.box(12.9, 15.5, 0.9, 15.1, 16, 3.1), Block.box(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.box(0.9, 15.5, 0.9, 3.1, 16, 3.1), Block.box(0.9, 15.5, 12.9, 3.1, 16, 15.1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(Block.box(5, 4, 5, 10, 19, 10), Block.box(4, 0, 4, 11, 5, 11), Block.box(3, 0, 3, 5, 4, 5), Block.box(10, 0, 3, 12, 2, 5), Block.box(12, 0, 4, 13, 1, 5), Block.box(11, 0, 5, 12, 1, 6), Block.box(10, 0, 10, 12, 3, 12), Block.box(3, 0, 10, 5, 1, 12), Block.box(9, 0, 3, 10, 3, 4), Block.box(8, 0, 2, 11, 1, 4), Block.box(4, 0, 2, 5, 2, 3), Block.box(5, 0, 3, 7, 1, 4), Block.box(2, 0, 4, 4, 1, 6), Block.box(3, 0, 5, 4, 3, 6.5), Block.box(3, 0, 9, 4, 2, 10), Block.box(2, 0, 8, 4, 1, 10), Block.box(5, 0, 11, 7, 2, 13), Block.box(7, 0, 11, 11, 1, 13), Block.box(10, 0, 9, 13, 1, 11), Block.box(11, 0, 7, 12, 3, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of(Block.box(1, 7, 0, 15, 8, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 7, 15), Block.box(6, 7, 6, 10, 9, 10), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(0, 7, 0, 1, 8, 16), Block.box(15, 7, 0, 16, 8, 16), Block.box(1, 7, 15, 15, 8, 16), Block.box(5, 7, 5, 6, 9, 6), Block.box(5, 7, 10, 6, 9, 11), Block.box(10, 7, 10, 11, 9, 11), Block.box(10, 7, 5, 11, 9, 6)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape BATBOX_SHAPE = Block.box(0,0,0, 16, 8, 16);
static final VoxelShape EMPOWERER_SHAPE = Stream.of(Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 6, 15), Block.box(1, 6, 1, 15, 7, 15), Block.box(0, 7, 0, 16, 8, 1), Block.box(0, 7, 15, 16, 8, 16), Block.box(0, 7, 1, 1, 8, 15), Block.box(15, 7, 1, 16, 8, 15), Block.box(4, 7, 4, 12, 9, 12), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(3, 7, 4, 4, 8, 5), Block.box(3, 7, 11, 4, 8, 12), Block.box(4, 7, 12, 5, 8, 13), Block.box(11, 7, 12, 12, 8, 13), Block.box(12, 7, 11, 13, 8, 12), Block.box(12, 7, 4, 13, 8, 5), Block.box(11, 7, 3, 12, 8, 4), Block.box(4, 7, 3, 5, 8, 4)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape ENERGIZER_SHAPE = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(9, 3, 0, 13, 4, 1), Block.box(3, 3, 15, 7, 4, 16), Block.box(9, 12, 0, 13, 13, 1), Block.box(3, 12, 15, 7, 13, 16), Block.box(10, 4, 0, 12, 12, 1), Block.box(4, 4, 15, 6, 12, 16), Block.box(0, 3, 3, 1, 4, 7), Block.box(15, 3, 9, 16, 4, 13), Block.box(0, 12, 3, 1, 13, 7), Block.box(15, 12, 9, 16, 13, 13), Block.box(0, 4, 4, 1, 12, 6), Block.box(15, 4, 10, 16, 12, 12)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();
static final VoxelShape BARREL_SHAPE = Stream.of(Block.box(0, 12, 0, 16, 14, 1), Block.box(1, 0.5, 1, 15, 15, 15), Block.box(0, 2, 15, 16, 4, 16), Block.box(0, 7, 15, 16, 9, 16), Block.box(0, 12, 15, 16, 14, 16), Block.box(0, 2, 0, 16, 4, 1), Block.box(0, 7, 0, 16, 9, 1), Block.box(0, 2, 1, 1, 4, 15), Block.box(0, 7, 1, 1, 9, 15), Block.box(0, 12, 1, 1, 14, 15), Block.box(15, 12, 1, 16, 14, 15), Block.box(15, 7, 1, 16, 9, 15), Block.box(15, 2, 1, 16, 4, 15), Block.box(7, 0, 0.5, 9, 16, 1.5), Block.box(0.5, 0, 7, 1.5, 16, 9), Block.box(7, 0, 14.5, 9, 16, 15.5), Block.box(14.5, 0, 7, 15.5, 16, 9), Block.box(2, 0, 0.5, 5, 16, 1.5), Block.box(0.5, 0, 11, 1.5, 16, 14), Block.box(2, 0, 14.5, 5, 16, 15.5), Block.box(14.5, 0, 11, 15.5, 16, 14), Block.box(11, 0, 0.5, 14, 16, 1.5), Block.box(0.5, 0, 2, 1.5, 16, 5), Block.box(11, 0, 14.5, 14, 16, 15.5), Block.box(14.5, 0, 2, 15.5, 16, 5), Block.box(4, 15, 7, 6, 15.3, 9), Block.box(2, 15, 4, 3, 15.3, 12), Block.box(4, 15, 13, 12, 15.3, 14), Block.box(4, 15, 2, 12, 15.3, 3), Block.box(13, 15, 4, 14, 15.3, 12), Block.box(3, 15, 3, 4, 15.3, 4), Block.box(3, 15, 12, 4, 15.3, 13), Block.box(12, 15, 3, 13, 15.3, 4), Block.box(12, 15, 12, 13, 15.3, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get();

View file

@ -14,7 +14,6 @@ import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.items.ItemBattery;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.Lang;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
@ -37,6 +36,7 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
super(rendererDispatcherIn);
}
// TODO: [port] migrate to matric (see cleanstart) (done partly)
@Override
public void render(TileEntityBatteryBox tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
ItemStack stack = tile.inv.getStackInSlot(0);
@ -65,6 +65,22 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
matrices.translate(-60F, 0F, 60F);
matrices.mulPose(Vector3f.YP.rotationDegrees(90));
}
// TODO: Remove if the above works
// NumberFormat format = NumberFormat.getInstance();
// FontRenderer font = Minecraft.getInstance().fontRenderer;
//
// String s = format.format(cap.getEnergyStored()) + "/" + format.format(cap.getMaxEnergyStored());
// float lengthS = -font.getStringWidth(s) / 2F;
// String s2 = I18n.format("actuallyadditions.cflong");
// float lengthS2 = -font.getStringWidth(s2) / 2F;
//
// for (int i = 0; i < 4; i++) {
// font.drawString(matrices, s, lengthS, 10F, 0xFFFFFF);
// font.drawString(matrices, s2, lengthS2, 20F, 0xFFFFFF);
//
// RenderSystem.translatef(-50F, 0F, 50F);
// RenderSystem.rotatef(90F, 0F, 1F, 0F);
// }
});
matrices.popPose(); // text rotation
@ -81,7 +97,9 @@ public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
matrices.scale(scale, scale, scale);
try {
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
Minecraft.getInstance().getItemRenderer().renderStatic(
stack, ItemCameraTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer
);
} catch (Exception e) {
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a battery box! The item is " + stack.getItem().getRegistryName() + "!", e);
}

View file

@ -25,7 +25,6 @@ import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import javax.annotation.Nonnull;
import java.util.Set;
import java.util.function.Supplier;
@ -59,12 +58,7 @@ public final class ActuallyItems {
public static final RegistryObject<Item> BATS_WING = ITEMS.register("bats_wing", ItemBase::new);
public static final RegistryObject<Item> DRILL_CORE = ITEMS.register("drill_core", ItemBase::new);
public static final RegistryObject<Item> LENS = ITEMS.register("lens", ItemBase::new);
public static final RegistryObject<Item> ENDER_STAR = ITEMS.register("ender_star", () -> new ItemBase() {
@Override
public boolean isFoil(@Nonnull ItemStack pStack) {
return true;
}
});
public static final RegistryObject<Item> ENDER_STAR = ITEMS.register("ender_star", ItemBase::new);
public static final RegistryObject<Item> CRYSTALLIZED_CANOLA_SEED = ITEMS.register("crystallized_canola_seed", () -> new CanolaSeed(false));
public static final RegistryObject<Item> EMPOWERED_CANOLA_SEED = ITEMS.register("empowered_canola_seed", () -> new CanolaSeed(true));
@ -162,11 +156,12 @@ public final class ActuallyItems {
public static final RegistryObject<Item> LEAF_BLOWER = ITEMS.register("leaf_blower", () -> new ItemLeafBlower(false));
public static final RegistryObject<Item> ADVANCED_LEAF_BLOWER = ITEMS.register("advanced_leaf_blower", () -> new ItemLeafBlower(true));
public static final RegistryObject<Item> COFFEE_BEANS = ITEMS.register("coffee_beans", () -> new AABlockItem.AASeedItem(ActuallyBlocks.COFFEE.get(), ActuallyItems.defaultProps()));
public static final RegistryObject<Item> COFFEE_BEANS = ITEMS.register("coffee_beans", ItemCoffeeBean::new);
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> WOODEN_AIOT = ITEMS.register("wooden_aiot", () -> new AllInOneTool(ItemTier.WOOD));
@ -202,7 +197,7 @@ public final class ActuallyItems {
CRUSHED_QUARTZ, CRUSHED_COAL, CRUSHED_BLACK_QUARTZ, */
SOLIDIFIED_EXPERIENCE, LEAF_BLOWER, ADVANCED_LEAF_BLOWER,
RING_OF_GROWTH, RING_OF_MAGNETIZING,
COFFEE_BEANS, RICE_SEEDS, CANOLA_SEEDS, FLAX_SEEDS
COFFEE_BEANS, RICE_SEEDS, CANOLA_SEEDS, FLAX_SEEDS, COFFEE_SEEDS
);
private static Supplier<Item> basicItem() {

View file

@ -37,7 +37,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh
@Override
public LazyOptional<IEnergyStorage> getEnergyStorage(Direction facing) {
ItemStack stack = this.inv.getStackInSlot(0);
if (stack.getItem() instanceof ItemBattery) {
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBattery) {
return stack.getCapability(CapabilityEnergy.ENERGY, null);
}
return LazyOptional.empty();
@ -51,7 +51,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh
LazyOptional<IEnergyStorage> cap = this.getEnergyStorage(null);
int currStorage = cap.map(storage -> {
ItemStack stack = this.inv.getStackInSlot(0);
if (!stack.isEmpty() && ItemUtil.isEnabled(stack)) {
if (StackUtil.isValid(stack) && ItemUtil.isEnabled(stack)) {
if (storage.getEnergyStored() > 0) {
List<TileEntityBatteryBox> tiles = new ArrayList<>();
this.energyPushOffLoop(this, tiles);
@ -67,7 +67,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh
for (TileEntityBatteryBox tile : tiles) {
ItemStack battery = tile.inv.getStackInSlot(0);
if (!battery.isEmpty() && !ItemUtil.isEnabled(battery)) {
if (StackUtil.isValid(battery) && !ItemUtil.isEnabled(battery)) {
int received = tile.getCapability(CapabilityEnergy.ENERGY, null).map(e -> e.receiveEnergy(maxPer, false)).orElse(0);
storage.extractEnergy(received, false);
@ -108,7 +108,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh
@Override
public void activateOnPulse() {
ItemStack stack = this.inv.getStackInSlot(0);
if (!stack.isEmpty()) {
if (StackUtil.isValid(stack)) {
ItemUtil.changeEnabled(stack);
this.setChanged();
}

View file

@ -218,7 +218,7 @@
"block.actuallyadditions.distributor_item": "Item Distributor (wip)",
"block.actuallyadditions.bio_reactor": "Bio Reactor (wip)",
"block.actuallyadditions.farmer": "Farmer",
"block.actuallyadditions.battery_box": "Battery Box",
"block.actuallyadditions.battery_box": "Battery Box (wip)",
"block.actuallyadditions.restonia_crystal_cluster": "Red Crystal Cluster",
"block.actuallyadditions.palis_crystal_cluster": "Blue Crystal Cluster",
"block.actuallyadditions.diamatine_crystal_cluster": "Light Blue Crystal Cluster",