mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
chore: renders ported, blocks now ActuallyBlocks, removed requested blocks
This commit is contained in:
parent
d25e2fdea3
commit
d39cdb5de8
56 changed files with 1702 additions and 1316 deletions
|
@ -11,7 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.data.WorldData;
|
||||
|
@ -87,7 +87,7 @@ public class ActuallyAdditions {
|
|||
public ActuallyAdditions() {
|
||||
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
|
||||
InitBlocks.BLOCKS.register(eventBus);
|
||||
ActuallyBlocks.BLOCKS.register(eventBus);
|
||||
ActuallyTiles.TILES.register(eventBus);
|
||||
ActuallyContainers.CONTAINERS.register(eventBus);
|
||||
|
||||
|
|
|
@ -12,23 +12,20 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
public final class InitBlocks {
|
||||
public final class ActuallyBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID);
|
||||
|
||||
public static final RegistryObject<Block> blockCompost = BLOCKS.register("block_compost", BlockCompost::new);
|
||||
public static final RegistryObject<Block> blockMisc = BLOCKS.register("block_misc", BlockMisc::new);
|
||||
public static final RegistryObject<Block> blockLavaCasing = BLOCKS.register("block_misc", BlockMisc::new);
|
||||
public static final RegistryObject<Block> blockWildPlant = BLOCKS.register("block_wild", BlockWildPlant::new);
|
||||
public static final RegistryObject<Block> blockFeeder = BLOCKS.register("block_feeder", BlockFeeder::new);
|
||||
// public static final RegistryObject<Block> blockGiantChest = BLOCKS.register("", );
|
||||
// public static final RegistryObject<Block> blockGiantChestMedium = BLOCKS.register("", );
|
||||
// public static final RegistryObject<Block> blockGiantChestLarge = BLOCKS.register("", );
|
||||
public static final RegistryObject<Block> blockGrinder = BLOCKS.register("block_grinder", () -> new BlockGrinder(false));
|
||||
public static final RegistryObject<Block> blockGrinderDouble = BLOCKS.register("block_grinder_double", () -> new BlockGrinder(true));
|
||||
|
||||
|
@ -53,7 +50,6 @@ public final class InitBlocks {
|
|||
public static final RegistryObject<Block> blockAtomicReconstructor = BLOCKS.register("block_atomic_reconstructor", BlockAtomicReconstructor::new);
|
||||
public static final RegistryObject<Block> blockCrystal = BLOCKS.register("block_crystal", () -> new BlockCrystal(false));
|
||||
public static final RegistryObject<Block> blockCrystalEmpowered = BLOCKS.register("block_crystal_empowered", () -> new BlockCrystal(true));
|
||||
public static final RegistryObject<Block> blockBlackLotus = BLOCKS.register("block_black_lotus", BlockBlackLotus::new);
|
||||
public static final RegistryObject<Block> blockLaserRelay = BLOCKS.register("block_laser_relay", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_BASIC));
|
||||
public static final RegistryObject<Block> blockLaserRelayAdvanced = BLOCKS.register("block_laser_relay_advanced", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_ADVANCED));
|
||||
public static final RegistryObject<Block> blockLaserRelayExtreme = BLOCKS.register("block_laser_relay_extreme", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_EXTREME));
|
||||
|
@ -90,17 +86,15 @@ public final class InitBlocks {
|
|||
public static final RegistryObject<Block> blockCoalGenerator = BLOCKS.register("block_coal_generator", BlockCoalGenerator::new);
|
||||
public static final RegistryObject<Block> blockOilGenerator = BLOCKS.register("block_oil_generator", BlockOilGenerator::new);
|
||||
public static final RegistryObject<Block> blockFermentingBarrel = BLOCKS.register("block_fermenting_barrel", BlockFermentingBarrel::new);
|
||||
public static final RegistryObject<Block> blockRice = BLOCKS.register("block_rice", () -> new BlockPlant(1, 2));
|
||||
public static final RegistryObject<Block> blockCanola = BLOCKS.register("block_canola", () -> new BlockPlant(2, 3));
|
||||
public static final RegistryObject<Block> blockFlax = BLOCKS.register("block_flax", () -> new BlockPlant(2, 4));
|
||||
public static final RegistryObject<Block> blockCoffee = BLOCKS.register("block_coffee", () -> new BlockPlant(2, 2));
|
||||
public static final RegistryObject<Block> blockRice = BLOCKS.register("block_rice", () -> new BlockPlant(InitItems.itemRiceSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(1, 2));
|
||||
public static final RegistryObject<Block> blockCanola = BLOCKS.register("block_canola", () -> new BlockPlant(InitItems.itemCanolaSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(2, 3));
|
||||
public static final RegistryObject<Block> blockFlax = BLOCKS.register("block_flax", () -> new BlockPlant(InitItems.itemFlaxSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(2, 4));
|
||||
public static final RegistryObject<Block> blockCoffee = BLOCKS.register("block_coffee", () -> new BlockPlant(InitItems.itemCoffeeSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(2, 2));
|
||||
public static final RegistryObject<Block> blockFurnaceDouble = BLOCKS.register("block_furnace_double", BlockFurnaceDouble::new);
|
||||
public static final RegistryObject<Block> blockInputter = BLOCKS.register("block_inputter", () -> new BlockInputter(false));
|
||||
public static final RegistryObject<Block> blockInputterAdvanced = BLOCKS.register("block_inputter_advanced", () -> new BlockInputter(true));
|
||||
public static final RegistryObject<Block> blockFishingNet = BLOCKS.register("block_fishing_net", BlockFishingNet::new);
|
||||
public static final RegistryObject<Block> blockFurnaceSolar = BLOCKS.register("block_furnace_solar", BlockFurnaceSolar::new);
|
||||
public static final RegistryObject<Block> blockHeatCollector = BLOCKS.register("block_heat_collector", BlockHeatCollector::new);
|
||||
public static final RegistryObject<Block> blockItemRepairer = BLOCKS.register("block_item_repairer", BlockItemRepairer::new);
|
||||
public static final RegistryObject<Block> blockGreenhouseGlass = BLOCKS.register("block_greenhouse_glass", BlockGreenhouseGlass::new);
|
||||
public static final RegistryObject<Block> blockBreaker = BLOCKS.register("block_breaker", () -> new BlockBreaker(false));
|
||||
public static final RegistryObject<Block> blockPlacer = BLOCKS.register("block_placer", () -> new BlockBreaker(true));
|
||||
|
@ -118,9 +112,4 @@ public final class InitBlocks {
|
|||
public static final RegistryObject<Block> blockQuartzSlab = BLOCKS.register("block_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get())));
|
||||
public static final RegistryObject<Block> blockChiseledQuartzSlab = BLOCKS.register("block_chiseled_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get())));
|
||||
public static final RegistryObject<Block> blockPillarQuartzSlab = BLOCKS.register("block_pillar_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get())));
|
||||
|
||||
public static void init() {
|
||||
ActuallyAdditions.LOGGER.info("Initializing Blocks...");
|
||||
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Help;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Lang;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -122,13 +122,13 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
|
|||
if (!(rayCast instanceof BlockRayTraceResult) || minecraft.world == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
|
||||
if (tile instanceof TileEntityAtomicReconstructor) {
|
||||
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
|
||||
ITextComponent strg;
|
||||
if (!StackUtil.isValid(slot)) {
|
||||
strg = Help.Trans("info", "nolens");
|
||||
strg = Lang.trans("info", "nolens");
|
||||
} else {
|
||||
strg = slot.getItem().getDisplayName(slot);
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.SoundType;
|
||||
|
@ -45,10 +43,9 @@ public class BlockBioReactor extends BlockContainerBase {
|
|||
if (!world.isRemote) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity instanceof TileEntityBioReactor) {
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, tileEntity, pos);
|
||||
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BIO_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
NetworkHooks.openGui((ServerPlayerEntity) player, (TileEntityBioReactor) tileEntity, pos);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* This file ("BlockBlackLotus.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase;
|
||||
|
||||
public class BlockBlackLotus extends BlockBushBase {
|
||||
|
||||
public BlockBlackLotus() {
|
||||
super(this.name);
|
||||
}
|
||||
|
||||
}
|
|
@ -54,7 +54,7 @@ public class BlockColoredLamp extends BlockBase {
|
|||
|
||||
@Override
|
||||
public Item getItemDropped(BlockState state, Random rand, int par3) {
|
||||
return Item.getItemFromBlock(InitBlocks.blockColoredLamp);
|
||||
return Item.getItemFromBlock(ActuallyBlocks.blockColoredLamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,8 +68,8 @@ public class BlockColoredLamp extends BlockBase {
|
|||
//Turning On
|
||||
if (hand == Hand.MAIN_HAND && stack.isEmpty()) {
|
||||
world.setBlockState(pos, (this.isOn
|
||||
? InitBlocks.blockColoredLamp
|
||||
: InitBlocks.blockColoredLampOn).getDefaultState().withProperty(TYPE, state.getValue(TYPE)), 2);
|
||||
? ActuallyBlocks.blockColoredLamp
|
||||
: ActuallyBlocks.blockColoredLampOn).getDefaultState().withProperty(TYPE, state.getValue(TYPE)), 2);
|
||||
world.notifyLightSet(pos);
|
||||
return true;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class BlockColoredLamp extends BlockBase {
|
|||
|
||||
@Override
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return InitBlocks.blockColoredLamp.getTranslationKey() + "_" + ALL_LAMP_TYPES[stack.getItemDamage()].regName;
|
||||
return ActuallyBlocks.blockColoredLamp.getTranslationKey() + "_" + ALL_LAMP_TYPES[stack.getItemDamage()].regName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,222 +0,0 @@
|
|||
/*
|
||||
* This file ("BlockCompost.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.client.MainWindow;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCompost extends BlockContainerBase implements IHudDisplay {
|
||||
|
||||
protected static final AxisAlignedBB AABB_LEGS = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.3125D, 1.0D);
|
||||
protected static final AxisAlignedBB AABB_WALL_NORTH = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D);
|
||||
protected static final AxisAlignedBB AABB_WALL_SOUTH = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 1.0D, 1.0D);
|
||||
protected static final AxisAlignedBB AABB_WALL_EAST = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
|
||||
protected static final AxisAlignedBB AABB_WALL_WEST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D);
|
||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 11 * 0.0625, 1 - 0.0625);
|
||||
|
||||
public BlockCompost() {
|
||||
super(Material.WOOD);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(5.0F);
|
||||
this.setSoundType(SoundType.WOOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
||||
return AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void addCollisionBoxToList(BlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean someBool) {
|
||||
this.addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS);
|
||||
this.addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_WEST);
|
||||
this.addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_NORTH);
|
||||
this.addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_EAST);
|
||||
this.addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_SOUTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(BlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(BlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction f6, float f7, float f8, float f9) {
|
||||
ItemStack stackPlayer = player.getHeldItem(hand);
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityCompost) {
|
||||
TileEntityCompost compost = (TileEntityCompost) tile;
|
||||
ItemStack slot = compost.inv.getStackInSlot(0);
|
||||
CompostRecipe recipeIn = TileEntityCompost.getRecipeForInput(slot);
|
||||
if (!StackUtil.isValid(slot) || recipeIn != null) {
|
||||
if (StackUtil.isValid(stackPlayer)) {
|
||||
CompostRecipe recipeHand = TileEntityCompost.getRecipeForInput(stackPlayer);
|
||||
if (recipeHand != null && (recipeIn == null || recipeIn == recipeHand)) {
|
||||
int maxAdd = stackPlayer.getCount();
|
||||
|
||||
if (!StackUtil.isValid(slot)) {
|
||||
ItemStack stackToAdd = stackPlayer.copy();
|
||||
stackToAdd.setCount(maxAdd);
|
||||
compost.inv.setStackInSlot(0, stackToAdd);
|
||||
player.inventory.decrStackSize(player.inventory.currentItem, maxAdd);
|
||||
return true;
|
||||
} else {
|
||||
ItemStack stackIn = slot.copy();
|
||||
if (stackIn.getCount() < slot.getMaxStackSize()) {
|
||||
int sizeAdded = Math.min(maxAdd, slot.getMaxStackSize() - stackIn.getCount());
|
||||
stackIn.grow(sizeAdded);
|
||||
compost.inv.setStackInSlot(0, stackIn);
|
||||
player.inventory.decrStackSize(player.inventory.currentItem, sizeAdded);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!StackUtil.isValid(stackPlayer)) {
|
||||
player.setHeldItem(hand, slot.copy());
|
||||
compost.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
return true;
|
||||
} else if (ItemUtil.canBeStacked(stackPlayer, slot)) {
|
||||
int addedStackSize = Math.min(slot.getCount(), stackPlayer.getMaxStackSize() - stackPlayer.getCount());
|
||||
ItemStack stackToAdd = stackPlayer.copy();
|
||||
stackToAdd.grow(addedStackSize);
|
||||
player.setHeldItem(hand, stackToAdd);
|
||||
compost.inv.getStackInSlot(0).shrink(addedStackSize);
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
tile.markDirty();
|
||||
world.notifyBlockUpdate(pos, this.getDefaultState(), this.getDefaultState(), 3);
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityCompost();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.UNCOMMON;
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
|
||||
TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
|
||||
if (tile instanceof TileEntityCompost) {
|
||||
ItemStack slot = ((TileEntityCompost) tile).inv.getStackInSlot(0);
|
||||
String strg;
|
||||
if (!StackUtil.isValid(slot)) {
|
||||
strg = "Empty";
|
||||
} else {
|
||||
strg = slot.getDisplayName();
|
||||
|
||||
AssetUtil.renderStackToGui(slot, resolution.getScaledWidth() / 2 + 15, resolution.getScaledHeight() / 2 - 29, 1F);
|
||||
}
|
||||
minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW + "" + TextFormatting.ITALIC + strg, resolution.getScaledWidth() / 2 + 35, resolution.getScaledHeight() / 2 - 25, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[]{COMPOST_PROP});
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getExtendedState(BlockState state, IBlockAccess world, BlockPos pos) {
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te instanceof TileEntityCompost && state instanceof IExtendedBlockState) {
|
||||
TileEntityCompost compost = (TileEntityCompost) te;
|
||||
return ((IExtendedBlockState) state).withProperty(COMPOST_PROP, Pair.of(compost.getCurrentDisplay(), compost.getHeight()));
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
public static CompostProperty COMPOST_PROP = new CompostProperty();
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static class CompostProperty implements IUnlistedProperty<Pair> {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "compost";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Pair value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Pair> getType() {
|
||||
return Pair.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String valueToString(Pair value) {
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFishingNet;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
|||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
|
|
@ -72,11 +72,11 @@ public class BlockLampPowerer extends BlockBase {
|
|||
boolean isOn = ((BlockColoredLamp) block).isOn;
|
||||
if (powered) {
|
||||
if (!isOn) {
|
||||
world.setBlockState(pos, InitBlocks.blockColoredLampOn.getDefaultState().withProperty(BlockColoredLamp.TYPE, state.getValue(BlockColoredLamp.TYPE)), 2);
|
||||
world.setBlockState(pos, ActuallyBlocks.blockColoredLampOn.getDefaultState().withProperty(BlockColoredLamp.TYPE, state.getValue(BlockColoredLamp.TYPE)), 2);
|
||||
}
|
||||
} else {
|
||||
if (isOn) {
|
||||
world.setBlockState(pos, InitBlocks.blockColoredLamp.getDefaultState().withProperty(BlockColoredLamp.TYPE, state.getValue(BlockColoredLamp.TYPE)), 2);
|
||||
world.setBlockState(pos, ActuallyBlocks.blockColoredLamp.getDefaultState().withProperty(BlockColoredLamp.TYPE, state.getValue(BlockColoredLamp.TYPE)), 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,29 +10,11 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks.base;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.block.BushBlock;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class BlockBushBase extends BushBlock {
|
||||
|
||||
private final String name;
|
||||
|
||||
public BlockBushBase(Properties properties, String name) {
|
||||
public BlockBushBase(Properties properties) {
|
||||
super(properties.sound(SoundType.PLANT));
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
protected String getBaseName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected ItemBlockBase getItemBlock() {
|
||||
return new ItemBlockBase(this, new Item.Properties().group(ActuallyAdditions.GROUP));
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,134 +10,112 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks.base;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.CropsBlock;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.IItemProvider;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.common.PlantType;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockPlant extends CropsBlock implements ItemBlockBase.ICustomRarity, IHasModel {
|
||||
|
||||
private final String name;
|
||||
private final int minDropAmount;
|
||||
private final int addDropAmount;
|
||||
// CROP BLOCK DEFAULTS TO 7 YEARS OF AGE.
|
||||
public class BlockPlant extends CropsBlock {
|
||||
public Item seedItem;
|
||||
private Item returnItem;
|
||||
private int returnMeta;
|
||||
|
||||
public BlockPlant(int minDropAmount, int addDropAmount) {
|
||||
this.name = this.name;
|
||||
this.minDropAmount = minDropAmount;
|
||||
this.addDropAmount = addDropAmount;
|
||||
this.register();
|
||||
// Stolen from potato for now
|
||||
// PotatoBlock(AbstractBlock.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP)));
|
||||
public BlockPlant(Item seedItem) {
|
||||
super(Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP));
|
||||
this.seedItem = seedItem;
|
||||
}
|
||||
|
||||
// Remove
|
||||
@Deprecated
|
||||
public void doStuff(Item seedItem, Item returnItem, int returnMeta) {
|
||||
this.seedItem = seedItem;
|
||||
this.returnItem = returnItem;
|
||||
this.returnMeta = returnMeta;
|
||||
}
|
||||
|
||||
private void register() {
|
||||
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
|
||||
}
|
||||
|
||||
protected String getBaseName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected ItemBlockBase getItemBlock() {
|
||||
return new ItemBlockBase(this);
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative() {
|
||||
return false;
|
||||
// this.returnItem = returnItem;
|
||||
// this.returnMeta = returnMeta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRendering() {
|
||||
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
public PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
return PlantType.CROP;
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
// public int damageDropped(BlockState state) {
|
||||
// return this.getMetaFromState(state) >= 7
|
||||
// ? this.returnMeta
|
||||
// : 0;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.RARE;
|
||||
}
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||
if (this.getAge(state) < 7) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) {
|
||||
return EnumPlantType.Crop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(BlockState state) {
|
||||
return this.getMetaFromState(state) >= 7
|
||||
? this.returnMeta
|
||||
: 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction facing, float hitX, float hitY, float hitZ) {
|
||||
if (this.getMetaFromState(state) >= 7) {
|
||||
if (!world.isRemote) {
|
||||
|
||||
NonNullList<ItemStack> drops = NonNullList.create();
|
||||
this.getDrops(drops, world, pos, state, 0);
|
||||
boolean deductedSeedSize = false;
|
||||
for (ItemStack drop : drops) {
|
||||
if (!world.isRemote) {
|
||||
List<ItemStack> drops = Block.getDrops(state, (ServerWorld) world, pos, null);
|
||||
boolean deductedSeedSize = false;
|
||||
for (ItemStack drop : drops) {
|
||||
if (StackUtil.isValid(drop)) {
|
||||
if (drop.getItem() == this.seedItem && !deductedSeedSize) {
|
||||
drop.shrink(1);
|
||||
deductedSeedSize = true;
|
||||
}
|
||||
if (StackUtil.isValid(drop)) {
|
||||
if (drop.getItem() == this.seedItem && !deductedSeedSize) {
|
||||
drop.shrink(1);
|
||||
deductedSeedSize = true;
|
||||
}
|
||||
if (StackUtil.isValid(drop)) {
|
||||
ItemHandlerHelper.giveItemToPlayer(player, drop);
|
||||
}
|
||||
ItemHandlerHelper.giveItemToPlayer(player, drop);
|
||||
}
|
||||
}
|
||||
|
||||
world.setBlockState(pos, this.getStateFromMeta(0));
|
||||
}
|
||||
return true;
|
||||
|
||||
world.setBlockState(pos, this.getDefaultState().with(AGE, 0));
|
||||
}
|
||||
return false;
|
||||
|
||||
return super.onBlockActivated(state, world, pos, player, handIn, hit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getSeed() {
|
||||
protected IItemProvider getSeedsItem() {
|
||||
return this.seedItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(BlockState state, int fortune, Random random) {
|
||||
return this.getMetaFromState(state) >= 7
|
||||
? random.nextInt(this.addDropAmount) + this.minDropAmount
|
||||
: super.quantityDropped(state, fortune, random);
|
||||
}
|
||||
// @Override
|
||||
// public int quantityDropped(BlockState state, int fortune, Random random) {
|
||||
// return this.getMetaFromState(state) >= 7
|
||||
// ? random.nextInt(this.addDropAmount) + this.minDropAmount
|
||||
// : super.quantityDropped(state, fortune, random);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public Item getCrop() {
|
||||
return this.returnItem;
|
||||
}
|
||||
// TODO: [port] move to data table
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(BlockState state, Random rand, int par3) {
|
||||
return this.getMetaFromState(state) >= 7
|
||||
? this.getCrop()
|
||||
: this.getSeed();
|
||||
}
|
||||
// @Override
|
||||
// public Item getCrop() {
|
||||
// return this.returnItem;
|
||||
// }
|
||||
|
||||
// TODO: [port] move to data table
|
||||
|
||||
// @Override
|
||||
// public Item getItemDropped(BlockState state, Random rand, int par3) {
|
||||
// return this.getMetaFromState(state) >= 7
|
||||
// ? this.getCrop()
|
||||
// : this.getSeed();
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
* This file ("BlockStair.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks.base;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockStair extends BlockStairs implements ItemBlockBase.ICustomRarity, IHasModel {
|
||||
|
||||
private final String name;
|
||||
|
||||
public BlockStair(Block block) {
|
||||
this(block.getDefaultState(), this.name);
|
||||
}
|
||||
|
||||
public BlockStair(BlockState state, String name) {
|
||||
super(state);
|
||||
this.name = name;
|
||||
this.setLightOpacity(0);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register() {
|
||||
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
|
||||
}
|
||||
|
||||
protected String getBaseName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected ItemBlockBase getItemBlock() {
|
||||
return new ItemBlockBase(this);
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRendering() {
|
||||
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.COMMON;
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists;
|
|||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
@Deprecated
|
||||
public enum TheColoredLampColors implements IStringSerializable {
|
||||
|
||||
WHITE("White", "white"),
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists;
|
|||
import net.minecraft.item.Rarity;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
@Deprecated
|
||||
public enum TheMiscBlocks implements IStringSerializable {
|
||||
|
||||
QUARTZ_PILLAR("black_quartz_pillar", Rarity.RARE),
|
||||
|
|
|
@ -11,17 +11,18 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.metalists;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Rarity;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
@Deprecated
|
||||
public enum TheWildPlants implements IStringSerializable {
|
||||
|
||||
CANOLA("canola", Rarity.RARE, InitBlocks.blockCanola),
|
||||
FLAX("flax", Rarity.RARE, InitBlocks.blockFlax),
|
||||
RICE("rice", Rarity.RARE, InitBlocks.blockRice),
|
||||
COFFEE("coffee", Rarity.RARE, InitBlocks.blockCoffee);
|
||||
CANOLA("canola", Rarity.RARE, ActuallyBlocks.blockCanola),
|
||||
FLAX("flax", Rarity.RARE, ActuallyBlocks.blockFlax),
|
||||
RICE("rice", Rarity.RARE, ActuallyBlocks.blockRice),
|
||||
COFFEE("coffee", Rarity.RARE, ActuallyBlocks.blockCoffee);
|
||||
|
||||
final String name;
|
||||
final Rarity rarity;
|
||||
|
|
|
@ -11,82 +11,98 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
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.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Lang;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class RenderBatteryBox extends TileEntityRenderer<TileEntityBatteryBox> {
|
||||
public RenderBatteryBox(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
// TODO: [port] migrate to matric (see cleanstart)
|
||||
// TODO: [port] migrate to matric (see cleanstart) (done partly)
|
||||
@Override
|
||||
public void render(TileEntityBatteryBox tile, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
public void render(TileEntityBatteryBox tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBattery) {
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.translatef(0.5F, 1F, 0.5F);
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
|
||||
RenderSystem.scalef(0.0075F, 0.0075F, 0.0075F);
|
||||
RenderSystem.rotatef(180F, 1F, 0F, 0F);
|
||||
RenderSystem.translatef(0F, 0F, -50F);
|
||||
|
||||
stack.getCapability(CapabilityEnergy.ENERGY).ifPresent(cap -> {
|
||||
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(matrixStackIn, s, lengthS, 10F, 0xFFFFFF);
|
||||
font.drawString(matrixStackIn, s2, lengthS2, 20F, 0xFFFFFF);
|
||||
|
||||
RenderSystem.translatef(-50F, 0F, 50F);
|
||||
RenderSystem.rotatef(90F, 0F, 1F, 0F);
|
||||
}
|
||||
});
|
||||
|
||||
RenderSystem.popMatrix();
|
||||
|
||||
double boop = Util.milliTime();
|
||||
RenderSystem.translated(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
|
||||
RenderSystem.rotatef((float) (boop * 40D % 360), 0, 1, 0);
|
||||
|
||||
float scale = stack.getItem() instanceof BlockItem
|
||||
? 0.85F
|
||||
: 0.65F;
|
||||
RenderSystem.scalef(scale, scale, scale);
|
||||
try {
|
||||
AssetUtil.renderItemInWorld(stack);
|
||||
} 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);
|
||||
}
|
||||
|
||||
RenderSystem.popMatrix();
|
||||
if (stack.isEmpty() || !(stack.getItem() instanceof ItemBattery)) {
|
||||
return;
|
||||
}
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(.5f, .35f, .5f);
|
||||
matrices.rotate(Vector3f.ZP.rotationDegrees(180));
|
||||
|
||||
matrices.push();
|
||||
matrices.scale(0.0075F, 0.0075F, 0.0075F);
|
||||
matrices.translate(0F, 0F, -60F);
|
||||
|
||||
stack.getCapability(CapabilityEnergy.ENERGY).ifPresent(cap -> {
|
||||
FontRenderer font = Minecraft.getInstance().fontRenderer;
|
||||
|
||||
String energyTotal = Lang.cleanEnergyValues(cap, false);
|
||||
String energyName = Lang.transI18n("misc", "power_name_long");
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
font.drawString(matrices, energyTotal, -font.getStringWidth(energyTotal) / 2F, 10F, 0xFFFFFF);
|
||||
font.drawString(matrices, energyName, -font.getStringWidth(energyName) / 2F, 20F, 0xFFFFFF);
|
||||
|
||||
matrices.translate(-60F, 0F, 60F);
|
||||
matrices.rotate(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.pop(); // text rotation
|
||||
matrices.pop(); // rotation + centering
|
||||
|
||||
double boop = Util.milliTime() / 800D;
|
||||
float scale = stack.getItem() instanceof BlockItem
|
||||
? 0.85F
|
||||
: 0.65F;
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(.5f, 1f + Math.sin(boop % (2 * Math.PI)) * 0.065, .5f);
|
||||
matrices.rotate(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360)));
|
||||
matrices.scale(scale, scale, scale);
|
||||
|
||||
try {
|
||||
Minecraft.getInstance().getItemRenderer().renderItem(
|
||||
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);
|
||||
}
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,54 +11,47 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.vector.Quaternion;
|
||||
|
||||
public class RenderDisplayStand extends TileEntityRenderer<TileEntityDisplayStand> {
|
||||
|
||||
public RenderDisplayStand(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityDisplayStand tile, double x, double y, double z, float par5, int par6, float f) {
|
||||
if (!(tile instanceof TileEntityDisplayStand)) {
|
||||
public void render(TileEntityDisplayStand tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) {
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
if (!StackUtil.isValid(stack)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(stack)) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float) x + 0.5F, (float) y + 1F, (float) z + 0.5F);
|
||||
matrices.push();
|
||||
matrices.translate(0.5F, 1F, 0.5F);
|
||||
|
||||
double boop = Minecraft.getSystemTime() / 800D;
|
||||
GlStateManager.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
|
||||
GlStateManager.rotate((float) (boop * 40D % 360), 0, 1, 0);
|
||||
double boop = Util.milliTime() / 800D;
|
||||
matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
|
||||
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0));
|
||||
|
||||
float scale = stack.getItem() instanceof ItemBlock
|
||||
? 0.85F
|
||||
: 0.65F;
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
try {
|
||||
AssetUtil.renderItemInWorld(stack);
|
||||
} catch (Exception e) {
|
||||
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a display stand! The item is " + stack.getItem().getRegistryName() + "!", e);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
float scale = stack.getItem() instanceof BlockItem
|
||||
? 0.85F
|
||||
: 0.65F;
|
||||
matrices.scale(scale, scale, scale);
|
||||
try {
|
||||
AssetUtil.renderItemInWorld(stack, combinedLightIn, combinedOverlayIn, matrices, buffer);
|
||||
} catch (Exception e) {
|
||||
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a display stand! The item is " + stack.getItem().getRegistryName() + "!", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityDisplayStand tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,57 +11,58 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.vector.Quaternion;
|
||||
|
||||
public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
|
||||
public RenderEmpowerer(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityEmpowerer tile, double x, double y, double z, float par5, int par6, float f) {
|
||||
if (!(tile instanceof TileEntityEmpowerer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
public void render(TileEntityEmpowerer tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(stack)) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float) x + 0.5F, (float) y + 1F, (float) z + 0.5F);
|
||||
// TODO: [port][refactor] migrate this logic into a single method, most renders use it
|
||||
matrices.push();
|
||||
matrices.translate(0.5F, 1F, 0.5F);
|
||||
|
||||
double boop = Minecraft.getSystemTime() / 800D;
|
||||
GlStateManager.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
|
||||
GlStateManager.rotate((float) (boop * 40D % 360), 0, 1, 0);
|
||||
double boop = Util.milliTime() / 800D;
|
||||
matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D);
|
||||
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port] might not work
|
||||
|
||||
float scale = stack.getItem() instanceof ItemBlock
|
||||
float scale = stack.getItem() instanceof BlockItem
|
||||
? 0.85F
|
||||
: 0.65F;
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
matrices.scale(scale, scale, scale);
|
||||
try {
|
||||
AssetUtil.renderItemInWorld(stack);
|
||||
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
|
||||
} catch (Exception e) {
|
||||
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + stack.getItem().getRegistryName() + ":" + stack.getMetadata() + "!", e);
|
||||
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + stack.getItem().getRegistryName() + "!", e);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
matrices.pop();
|
||||
}
|
||||
|
||||
int index = tile.recipeForRenderIndex;
|
||||
if (index >= 0 && ActuallyAdditionsAPI.EMPOWERER_RECIPES.size() > index) {
|
||||
EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index);
|
||||
if (recipe != null) {
|
||||
for (int i = 0; i < Direction.HORIZONTALS.length; i++) {
|
||||
Direction facing = Direction.HORIZONTALS[i];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Direction facing = Direction.byHorizontalIndex(i); // TODO: [port][test] validate this works
|
||||
BlockPos offset = tile.getPos().offset(facing, 3);
|
||||
|
||||
AssetUtil.renderLaser(tile.getPos().getX() + 0.5, tile.getPos().getY() + 0.5, tile.getPos().getZ() + 0.5, offset.getX() + 0.5, offset.getY() + 0.95, offset.getZ() + 0.5, 80, 1F, 0.1F, recipe.getParticleColors());
|
||||
|
@ -69,13 +70,4 @@ public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public RenderEmpowerer(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityEmpowerer tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.laser.IConnectionPair;
|
||||
import de.ellpeck.actuallyadditions.api.laser.LaserType;
|
||||
|
@ -30,7 +29,9 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.vector.Quaternion;
|
||||
|
||||
public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
|
||||
|
||||
|
@ -39,65 +40,65 @@ public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
|
|||
private static final float[] COLOR_FLUIDS = new float[]{0F, 97F / 255F, 198F / 255F};
|
||||
private static final float[] COLOR_INFRARED = new float[]{209F / 255F, 179F / 255F, 239F / 255F};
|
||||
|
||||
public RenderLaserRelay(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityLaserRelay tile, double x, double y, double z, float par5, int par6, float f) {
|
||||
if (tile instanceof TileEntityLaserRelay) {
|
||||
TileEntityLaserRelay relay = tile;
|
||||
boolean hasInvis = false;
|
||||
public void render(TileEntityLaserRelay tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
|
||||
TileEntityLaserRelay relay = tile;
|
||||
boolean hasInvis = false;
|
||||
|
||||
PlayerEntity player = Minecraft.getInstance().player;
|
||||
boolean hasGoggles = ItemEngineerGoggles.isWearing(player);
|
||||
PlayerEntity player = Minecraft.getInstance().player;
|
||||
boolean hasGoggles = ItemEngineerGoggles.isWearing(player);
|
||||
|
||||
ItemStack upgrade = relay.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(upgrade)) {
|
||||
if (upgrade.getItem() == InitItems.itemLaserUpgradeInvisibility.get()) {
|
||||
hasInvis = true;
|
||||
}
|
||||
|
||||
ItemStack hand = player.getHeldItemMainhand();
|
||||
if (hasGoggles || StackUtil.isValid(hand) && (hand.getItem() == ConfigValues.itemCompassConfigurator || hand.getItem() instanceof ItemLaserWrench) || "themattabase".equals(player.getName())) {
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
float yTrans = tile.getBlockMetadata() == 0
|
||||
? 0.2F
|
||||
: 0.8F;
|
||||
GlStateManager.translate((float) x + 0.5F, (float) y + yTrans, (float) z + 0.5F);
|
||||
GlStateManager.scale(0.2F, 0.2F, 0.2F);
|
||||
|
||||
double boop = Minecraft.getSystemTime() / 800D;
|
||||
GlStateManager.rotate((float) (boop * 40D % 360), 0, 1, 0);
|
||||
|
||||
AssetUtil.renderItemInWorld(upgrade);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
ItemStack upgrade = relay.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(upgrade)) {
|
||||
if (upgrade.getItem() == InitItems.itemLaserUpgradeInvisibility.get()) {
|
||||
hasInvis = true;
|
||||
}
|
||||
|
||||
ConcurrentSet<IConnectionPair> connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(tile.getPos(), tile.getWorld());
|
||||
if (connections != null && !connections.isEmpty()) {
|
||||
for (IConnectionPair pair : connections) {
|
||||
if (!pair.doesSuppressRender() && tile.getPos().equals(pair.getPositions()[0])) {
|
||||
BlockPos first = tile.getPos();
|
||||
BlockPos second = pair.getPositions()[1];
|
||||
ItemStack hand = player.getHeldItemMainhand();
|
||||
if (hasGoggles || StackUtil.isValid(hand) && (hand.getItem() == ConfigValues.itemCompassConfigurator || hand.getItem() instanceof ItemLaserWrench) || "themattabase".equals(player.getName().getString())) {
|
||||
matrices.push();
|
||||
|
||||
TileEntity secondTile = tile.getWorld().getTileEntity(second);
|
||||
if (secondTile instanceof TileEntityLaserRelay) {
|
||||
ItemStack secondUpgrade = ((TileEntityLaserRelay) secondTile).inv.getStackInSlot(0);
|
||||
boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == InitItems.itemLaserUpgradeInvisibility.get();
|
||||
float yTrans = 0.2f; //tile.getBlockMetadata() == 0 ? 0.2F : 0.8F; // TODO: [port][fix] no clue what this is
|
||||
matrices.translate(0.5F, yTrans, 0.5F);
|
||||
matrices.scale(0.2F, 0.2F, 0.2F);
|
||||
|
||||
if (hasGoggles || !hasInvis || !otherInvis) {
|
||||
float[] color = hasInvis && otherInvis
|
||||
? COLOR_INFRARED
|
||||
: relay.type == LaserType.ITEM
|
||||
? COLOR_ITEM
|
||||
: relay.type == LaserType.FLUID
|
||||
? COLOR_FLUIDS
|
||||
: COLOR;
|
||||
double boop = Util.milliTime() / 800D;
|
||||
matrices.rotate(new Quaternion((float) (boop * 40D % 360), 0, 1, 0)); // TODO: [port][test] this might not work
|
||||
|
||||
AssetUtil.renderLaser(first.getX() + 0.5, first.getY() + 0.5, first.getZ() + 0.5, second.getX() + 0.5, second.getY() + 0.5, second.getZ() + 0.5, 120, hasInvis && otherInvis
|
||||
? 0.1F
|
||||
: 0.35F, 0.05, color);
|
||||
}
|
||||
AssetUtil.renderItemInWorld(upgrade, combinedLight, combinedOverlay, matrices, buffer);
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
||||
ConcurrentSet<IConnectionPair> connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(tile.getPos(), tile.getWorld());
|
||||
if (connections != null && !connections.isEmpty()) {
|
||||
for (IConnectionPair pair : connections) {
|
||||
if (!pair.doesSuppressRender() && tile.getPos().equals(pair.getPositions()[0])) {
|
||||
BlockPos first = tile.getPos();
|
||||
BlockPos second = pair.getPositions()[1];
|
||||
|
||||
TileEntity secondTile = tile.getWorld().getTileEntity(second);
|
||||
if (secondTile instanceof TileEntityLaserRelay) {
|
||||
ItemStack secondUpgrade = ((TileEntityLaserRelay) secondTile).inv.getStackInSlot(0);
|
||||
boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == InitItems.itemLaserUpgradeInvisibility.get();
|
||||
|
||||
if (hasGoggles || !hasInvis || !otherInvis) {
|
||||
float[] color = hasInvis && otherInvis
|
||||
? COLOR_INFRARED
|
||||
: relay.type == LaserType.ITEM
|
||||
? COLOR_ITEM
|
||||
: relay.type == LaserType.FLUID
|
||||
? COLOR_FLUIDS
|
||||
: COLOR;
|
||||
|
||||
AssetUtil.renderLaser(first.getX() + 0.5, first.getY() + 0.5, first.getZ() + 0.5, second.getX() + 0.5, second.getY() + 0.5, second.getZ() + 0.5, 120, hasInvis && otherInvis
|
||||
? 0.1F
|
||||
: 0.35F, 0.05, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,15 +106,6 @@ public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
|
|||
}
|
||||
}
|
||||
|
||||
public RenderLaserRelay(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityLaserRelay tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGlobalRenderer(TileEntityLaserRelay tile) {
|
||||
return true;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import de.ellpeck.actuallyadditions.api.lens.ILensItem;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
|
@ -21,6 +20,7 @@ import net.minecraft.client.renderer.IRenderTypeBuffer;
|
|||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.vector.Quaternion;
|
||||
|
||||
public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomicReconstructor> {
|
||||
|
||||
|
@ -29,56 +29,49 @@ public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomic
|
|||
}
|
||||
|
||||
@Override
|
||||
public void render(TileEntityAtomicReconstructor tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
|
||||
}
|
||||
public void render(TileEntityAtomicReconstructor tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) {
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
|
||||
@Override
|
||||
public void render(TileEntityAtomicReconstructor tile, double x, double y, double z, float par5, int par6, float f) {
|
||||
if (tile == null) {
|
||||
if (!StackUtil.isValid(stack) || !(stack.getItem() instanceof ILensItem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack stack = tile.inv.getStackInSlot(0);
|
||||
matrices.push();
|
||||
matrices.translate(0.5F, 0.5F, 0.5F);
|
||||
matrices.rotate(new Quaternion(180F, 0.0F, 0.0F, 1.0F));
|
||||
|
||||
if (StackUtil.isValid(stack) && stack.getItem() instanceof ILensItem) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float) x + 0.5F, (float) y - 0.5F, (float) z + 0.5F);
|
||||
GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
BlockState state = tile.getWorld().getBlockState(tile.getPos());
|
||||
int meta = state.getBlock().getMetaFromState(state);
|
||||
if (meta == 0) {
|
||||
GlStateManager.translate(0F, -0.5F, 0F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
}
|
||||
if (meta == 1) {
|
||||
GlStateManager.translate(0F, -1.5F - 0.5F / 16F, 0F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
}
|
||||
if (meta == 2) {
|
||||
GlStateManager.translate(0F, -1F, 0F);
|
||||
GlStateManager.translate(0F, 0F, -0.5F);
|
||||
}
|
||||
if (meta == 3) {
|
||||
GlStateManager.translate(0F, -1F, 0F);
|
||||
GlStateManager.translate(0F, 0F, 0.5F + 0.5F / 16F);
|
||||
}
|
||||
if (meta == 4) {
|
||||
GlStateManager.translate(0F, -1F, 0F);
|
||||
GlStateManager.translate(0.5F + 0.5F / 16F, 0F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
}
|
||||
if (meta == 5) {
|
||||
GlStateManager.translate(0F, -1F, 0F);
|
||||
GlStateManager.translate(-0.5F, 0F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
}
|
||||
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
AssetUtil.renderItemInWorld(stack);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
BlockState state = tile.getWorld().getBlockState(tile.getPos());
|
||||
int meta = 0; //state.getBlock().getMetaFromState(state); // TODO: [port][fix] this needs to be checking direction not meta
|
||||
if (meta == 0) {
|
||||
matrices.translate(0F, -0.5F, 0F);
|
||||
matrices.rotate(new Quaternion(90F, 1F, 0F, 0F));
|
||||
}
|
||||
if (meta == 1) {
|
||||
matrices.translate(0F, -1.5F - 0.5F / 16F, 0F);
|
||||
matrices.rotate(new Quaternion(90F, 1F, 0F, 0F));
|
||||
}
|
||||
if (meta == 2) {
|
||||
matrices.translate(0F, -1F, 0F);
|
||||
matrices.translate(0F, 0F, -0.5F);
|
||||
}
|
||||
if (meta == 3) {
|
||||
matrices.translate(0F, -1F, 0F);
|
||||
matrices.translate(0F, 0F, 0.5F + 0.5F / 16F);
|
||||
}
|
||||
if (meta == 4) {
|
||||
matrices.translate(0F, -1F, 0F);
|
||||
matrices.translate(0.5F + 0.5F / 16F, 0F, 0F);
|
||||
matrices.rotate(new Quaternion(90F, 0F, 1F, 0F));
|
||||
}
|
||||
if (meta == 5) {
|
||||
matrices.translate(0F, -1F, 0F);
|
||||
matrices.translate(-0.5F, 0F, 0F);
|
||||
matrices.rotate(new Quaternion(90F, 0F, 1F, 0F));
|
||||
}
|
||||
|
||||
matrices.scale(0.5F, 0.5F, 0.5F);
|
||||
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter;
|
||||
|
@ -137,8 +137,8 @@ public final class InitBooklet {
|
|||
crystalPages.add(new PageCrafting(crystalPages.size() + 1, MiscCrafting.RECIPES_CRYSTALS).setNoText());
|
||||
crystalPages.add(new PageCrafting(crystalPages.size() + 1, MiscCrafting.RECIPES_CRYSTAL_BLOCKS).setNoText());
|
||||
chaptersIntroduction[2] = new BookletChapter("engineerHouse", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.EMERALD), new PageTextOnly(1), new PagePicture(2, "page_engineer_house", 145));
|
||||
chaptersIntroduction[6] = new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor.get()), crystalPages.toArray(new BookletPage[crystalPages.size()])).setSpecial();
|
||||
chaptersIntroduction[5] = new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator.get()), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.COAL_GENERATOR_CF_PRODUCTION.getValue()), new PageCrafting(2, BlockCrafting.recipeCoalGen).setWildcard().setNoText());
|
||||
chaptersIntroduction[6] = new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(ActuallyBlocks.blockAtomicReconstructor.get()), crystalPages.toArray(new BookletPage[crystalPages.size()])).setSpecial();
|
||||
chaptersIntroduction[5] = new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(ActuallyBlocks.blockCoalGenerator.get()), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.COAL_GENERATOR_CF_PRODUCTION.getValue()), new PageCrafting(2, BlockCrafting.recipeCoalGen).setWildcard().setNoText());
|
||||
ArrayList<BookletPage> empowererPages = new ArrayList<>();
|
||||
empowererPages.addAll(Arrays.asList(new PageTextOnly(1), new PagePicture(2, "page_empowerer", 137), new PageCrafting(3, BlockCrafting.recipeEmpowerer), new PageCrafting(4, BlockCrafting.recipeDisplayStand)));
|
||||
for (int i = 0; i < EmpowererHandler.MAIN_PAGE_RECIPES.size(); i++) {
|
||||
|
@ -146,18 +146,18 @@ public final class InitBooklet {
|
|||
}
|
||||
empowererPages.add(new PageCrafting(empowererPages.size() + 1, MiscCrafting.RECIPES_EMPOWERED_CRYSTALS).setNoText());
|
||||
empowererPages.add(new PageCrafting(empowererPages.size() + 1, MiscCrafting.RECIPES_EMPOWERED_CRYSTAL_BLOCKS).setNoText());
|
||||
new BookletChapter("empowerer", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockEmpowerer.get()), empowererPages.toArray(new BookletPage[empowererPages.size()])).setSpecial();
|
||||
new BookletChapter("empowerer", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(ActuallyBlocks.blockEmpowerer.get()), empowererPages.toArray(new BookletPage[empowererPages.size()])).setSpecial();
|
||||
new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText(), new PageCrafting(14, ItemCrafting.recipeLens).setNoText());
|
||||
chaptersIntroduction[4] = new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.REDSTONE), new PageTextOnly(1), new PageTextOnly(2)).setImportant();
|
||||
|
||||
//Miscellaneous
|
||||
new BookletChapter("worms", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWorm.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemWorm.get())), new PagePicture(2, "page_worms", 145)).setImportant();
|
||||
new BookletChapter("lushCaves", ActuallyAdditionsAPI.entryMisc, new ItemStack(Blocks.STONE), new PageTextOnly(1), new PagePicture(2, "page_lush_caves", 0).setNoText());
|
||||
new BookletChapter("crystalClusters", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockCrystalClusterEmerald), new PageTextOnly(1).addItemsToPage(WorldGenLushCaves.CRYSTAL_CLUSTERS), new PageCrafting(2, MiscCrafting.RECIPES_CRYSTAL_SHARDS).setNoText(), new PageCrafting(3, MiscCrafting.RECIPES_CRYSTAL_SHARDS_BACK).setNoText()).setSpecial();
|
||||
new BookletChapter("crystalClusters", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockCrystalClusterEmerald), new PageTextOnly(1).addItemsToPage(WorldGenLushCaves.CRYSTAL_CLUSTERS), new PageCrafting(2, MiscCrafting.RECIPES_CRYSTAL_SHARDS).setNoText(), new PageCrafting(3, MiscCrafting.RECIPES_CRYSTAL_SHARDS_BACK).setNoText()).setSpecial();
|
||||
new BookletChapter("banners", ActuallyAdditionsAPI.entryMisc, new ItemStack(Items.BLUE_BANNER, 1), new PageTextOnly(1));
|
||||
new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText());
|
||||
chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
||||
new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial();
|
||||
new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText());
|
||||
chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(ActuallyBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
||||
new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial();
|
||||
new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText());
|
||||
ArrayList<BookletPage> lampPages = new ArrayList<>();
|
||||
lampPages.add(new PageTextOnly(lampPages.size() + 1));
|
||||
|
@ -166,14 +166,14 @@ public final class InitBooklet {
|
|||
for (IRecipe recipe : BlockCrafting.RECIPES_LAMPS) {
|
||||
lampPages.add(new PageCrafting(lampPages.size() + 1, recipe).setNoText());
|
||||
}
|
||||
new BookletChapter("lamps", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockColoredLampOn.get(), 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()]));
|
||||
new BookletChapter("lamps", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockColoredLampOn.get(), 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()]));
|
||||
new BookletChapter("enderStar", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.ENDER_STAR.ordinal()), new PageCrafting(1, ItemCrafting.recipeEnderStar));
|
||||
new BookletChapter("spawnerShard", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.SPAWNER_SHARD.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.SPAWNER_SHARD.ordinal())));
|
||||
// new BookletChapter("treasureChest", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTreasureChest.get()), new PagePicture(1, "page_treasure_chest", 150).addItemsToPage(new ItemStack(InitBlocks.blockTreasureChest.get())), new PageTextOnly(2)).setSpecial();
|
||||
new BookletChapter("hairBalls", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemHairyBall.get()), new PagePicture(1, "page_fur_balls", 110).addItemsToPage(new ItemStack(InitItems.itemHairyBall.get())), new PageTextOnly(2)).setSpecial();
|
||||
new BookletChapter("blackLotus", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBlackLotus.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockBlackLotus.get())), new PageCrafting(2, ItemCrafting.recipeBlackDye));
|
||||
// new BookletChapter("blackLotus", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBlackLotus.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockBlackLotus.get())), new PageCrafting(2, ItemCrafting.recipeBlackDye));
|
||||
new BookletChapter("waterBowl", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWaterBowl.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemWaterBowl.get())));
|
||||
new BookletChapter("tinyTorch", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTinyTorch.get()), new PageCrafting(1, BlockCrafting.recipesTinyTorch).setWildcard()).setSpecial();
|
||||
new BookletChapter("tinyTorch", ActuallyAdditionsAPI.entryMisc, new ItemStack(ActuallyBlocks.blockTinyTorch.get()), new PageCrafting(1, BlockCrafting.recipesTinyTorch).setWildcard()).setSpecial();
|
||||
|
||||
//Reconstruction
|
||||
chaptersIntroduction[7] = new BookletChapter("reconstructorLenses", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1)).setImportant();
|
||||
|
@ -188,36 +188,36 @@ public final class InitBooklet {
|
|||
|
||||
//Laser Relays
|
||||
chaptersIntroduction[8] = new BookletChapter("laserIntro", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserWrench.get()), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE), new PageCrafting(3, ItemCrafting.recipeLaserWrench)).setImportant();
|
||||
new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelay.get()), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<cap1>", TileEntityLaserRelayEnergy.CAP).addTextReplacement("<cap2>", TileEntityLaserRelayEnergyAdvanced.CAP).addTextReplacement("<cap3>", TileEntityLaserRelayEnergyExtreme.CAP), new PagePicture(3, "page_laser_relay", 0).setNoText(), new PageCrafting(4, BlockCrafting.recipeLaserRelay).setWildcard().setNoText(), new PageCrafting(5, BlockCrafting.recipeLaserRelayAdvanced).setWildcard().setNoText(), new PageCrafting(6, BlockCrafting.recipeLaserRelayExtreme).setWildcard().setNoText());
|
||||
new BookletChapter("fluidLaser", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayFluids.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeFluidLaser).setWildcard().setNoText());
|
||||
new BookletChapter("itemRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItem.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeItemLaser).setWildcard().setNoText()).setSpecial();
|
||||
new BookletChapter("itemInterfaces", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockItemViewer.get()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeItemInterface).setNoText());
|
||||
new BookletChapter("itemRelaysAdvanced", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeLaserRelayItemWhitelist).setWildcard());
|
||||
new BookletChapter("itemInterfacesHopping", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockItemViewerHopping.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeItemInterfaceHopping).setWildcard().setNoText());
|
||||
new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(ActuallyBlocks.blockLaserRelay.get()), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<cap1>", TileEntityLaserRelayEnergy.CAP).addTextReplacement("<cap2>", TileEntityLaserRelayEnergyAdvanced.CAP).addTextReplacement("<cap3>", TileEntityLaserRelayEnergyExtreme.CAP), new PagePicture(3, "page_laser_relay", 0).setNoText(), new PageCrafting(4, BlockCrafting.recipeLaserRelay).setWildcard().setNoText(), new PageCrafting(5, BlockCrafting.recipeLaserRelayAdvanced).setWildcard().setNoText(), new PageCrafting(6, BlockCrafting.recipeLaserRelayExtreme).setWildcard().setNoText());
|
||||
new BookletChapter("fluidLaser", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(ActuallyBlocks.blockLaserRelayFluids.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeFluidLaser).setWildcard().setNoText());
|
||||
new BookletChapter("itemRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(ActuallyBlocks.blockLaserRelayItem.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeItemLaser).setWildcard().setNoText()).setSpecial();
|
||||
new BookletChapter("itemInterfaces", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(ActuallyBlocks.blockItemViewer.get()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeItemInterface).setNoText());
|
||||
new BookletChapter("itemRelaysAdvanced", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(ActuallyBlocks.blockLaserRelayItemWhitelist.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeLaserRelayItemWhitelist).setWildcard());
|
||||
new BookletChapter("itemInterfacesHopping", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(ActuallyBlocks.blockItemViewerHopping.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeItemInterfaceHopping).setWildcard().setNoText());
|
||||
new BookletChapter("laserUpgradeInvisibility", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserUpgradeInvisibility.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLaserUpgradeInvisibility).setNoText()).setImportant();
|
||||
new BookletChapter("laserUpgradeRange", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserUpgradeRange.get()), new PageTextOnly(1).addTextReplacement("<def>", TileEntityLaserRelay.MAX_DISTANCE).addTextReplacement("<upgraded>", TileEntityLaserRelay.MAX_DISTANCE_RANGED), new PageCrafting(2, ItemCrafting.recipeLaserUpgradeRange).setNoText()).setImportant();
|
||||
|
||||
//No RF Using Blocks
|
||||
new BookletChapter("breaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockBreaker.get()), new PageCrafting(1, BlockCrafting.recipeBreaker).setWildcard(), new PageCrafting(2, BlockCrafting.recipePlacer).setWildcard(), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer).setWildcard(), new PageCrafting(4, BlockCrafting.recipeLiquidCollector).setWildcard());
|
||||
new BookletChapter("dropper", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockDropper.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeDropper).setNoText());
|
||||
new BookletChapter("phantomfaces", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomface.RANGE), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipePhantomface), new PageCrafting(4, BlockCrafting.recipeLiquiface), new PageCrafting(5, BlockCrafting.recipeEnergyface), new PageCrafting(6, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(7, BlockCrafting.recipePhantomBooster)).setImportant();
|
||||
new BookletChapter("phantomRedstoneface", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomRedstoneface.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipePhantomRedstoneface).setNoText());
|
||||
new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText());
|
||||
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
|
||||
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemSolidifiedExperience.get())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setImportant();
|
||||
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
|
||||
new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
|
||||
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
|
||||
new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemFertilizer.get())), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageTextOnly(3).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.MASHED_FOOD.ordinal())));
|
||||
new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest.get()), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, BlockCrafting.recipeCrateMedium).setNoText(), new PageCrafting(3, BlockCrafting.recipeCrateLarge).setNoText(), new PageCrafting(4, ItemCrafting.recipeCrateKeeper), new PageCrafting(5, ItemCrafting.recipeChestToCrateUpgrade), new PageCrafting(6, ItemCrafting.recipeSmallToMediumCrateUpgrade), new PageCrafting(7, ItemCrafting.recipeMediumToLargeCrateUpgrade));
|
||||
new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
|
||||
new BookletChapter("breaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockBreaker.get()), new PageCrafting(1, BlockCrafting.recipeBreaker).setWildcard(), new PageCrafting(2, BlockCrafting.recipePlacer).setWildcard(), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer).setWildcard(), new PageCrafting(4, BlockCrafting.recipeLiquidCollector).setWildcard());
|
||||
new BookletChapter("dropper", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockDropper.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeDropper).setNoText());
|
||||
new BookletChapter("phantomfaces", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockPhantomLiquiface.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomface.RANGE), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipePhantomface), new PageCrafting(4, BlockCrafting.recipeLiquiface), new PageCrafting(5, BlockCrafting.recipeEnergyface), new PageCrafting(6, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(7, BlockCrafting.recipePhantomBooster)).setImportant();
|
||||
new BookletChapter("phantomRedstoneface", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockPhantomRedstoneface.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipePhantomRedstoneface).setNoText());
|
||||
new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockPhantomBreaker.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText());
|
||||
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockInputterAdvanced.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
|
||||
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockXPSolidifier.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemSolidifiedExperience.get())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setImportant();
|
||||
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockGreenhouseGlass.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
|
||||
// new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
|
||||
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockFeeder.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
|
||||
// new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemFertilizer.get())), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageTextOnly(3).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.MASHED_FOOD.ordinal())));
|
||||
new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockGiantChest.get()), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, BlockCrafting.recipeCrateMedium).setNoText(), new PageCrafting(3, BlockCrafting.recipeCrateLarge).setNoText(), new PageCrafting(4, ItemCrafting.recipeCrateKeeper), new PageCrafting(5, ItemCrafting.recipeChestToCrateUpgrade), new PageCrafting(6, ItemCrafting.recipeSmallToMediumCrateUpgrade), new PageCrafting(7, ItemCrafting.recipeMediumToLargeCrateUpgrade));
|
||||
new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(ActuallyBlocks.blockRangedCollector.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
|
||||
|
||||
//RF Using Blocks
|
||||
new BookletChapter("fireworkBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFireworkBox.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFireworkBox.USE_PER_SHOT), new PageCrafting(2, BlockCrafting.recipeFireworkBox)).setSpecial();
|
||||
new BookletChapter("batteryBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockBatteryBox.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBatteryBox).setNoText()).setSpecial();
|
||||
new BookletChapter("farmer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFarmer.get()), new PageTextOnly(1), new PagePicture(2, "page_farmer_crops", 95).addItemsToPage(new ItemStack(Items.WHEAT_SEEDS)).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())), new PagePicture(3, "page_farmer_cactus", 105).addItemsToPage(new ItemStack(Blocks.CACTUS)), new PagePicture(4, "page_farmer_wart", 95).addItemsToPage(new ItemStack(Items.NETHER_WART)), new PagePicture(5, "page_farmer_reeds", 105).addItemsToPage(new ItemStack(Items.REEDS)), new PagePicture(6, "page_farmer_melons", 105).addItemsToPage(new ItemStack(Items.MELON), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.MELON_BLOCK)), new PagePicture(7, "page_farmer_enderlilly", 105), new PagePicture(8, "page_farmer_redorchid", 105), new PageCrafting(4, BlockCrafting.recipeFarmer).setWildcard().setNoText()).setImportant();
|
||||
new BookletChapter("miner", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockMiner.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityMiner.ENERGY_USE_PER_BLOCK).addTextReplacement("<range>", TileEntityMiner.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipeMiner)).setSpecial();
|
||||
new BookletChapterCoffee("coffeeMachine", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemCoffeeBean.get())).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemCoffee.get())), new PagePicture(3, "page_coffee_machine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setWildcard().setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
|
||||
new BookletChapter("fireworkBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockFireworkBox.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFireworkBox.USE_PER_SHOT), new PageCrafting(2, BlockCrafting.recipeFireworkBox)).setSpecial();
|
||||
new BookletChapter("batteryBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockBatteryBox.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBatteryBox).setNoText()).setSpecial();
|
||||
new BookletChapter("farmer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockFarmer.get()), new PageTextOnly(1), new PagePicture(2, "page_farmer_crops", 95).addItemsToPage(new ItemStack(Items.WHEAT_SEEDS)).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())), new PagePicture(3, "page_farmer_cactus", 105).addItemsToPage(new ItemStack(Blocks.CACTUS)), new PagePicture(4, "page_farmer_wart", 95).addItemsToPage(new ItemStack(Items.NETHER_WART)), new PagePicture(5, "page_farmer_reeds", 105).addItemsToPage(new ItemStack(Items.REEDS)), new PagePicture(6, "page_farmer_melons", 105).addItemsToPage(new ItemStack(Items.MELON), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.MELON_BLOCK)), new PagePicture(7, "page_farmer_enderlilly", 105), new PagePicture(8, "page_farmer_redorchid", 105), new PageCrafting(4, BlockCrafting.recipeFarmer).setWildcard().setNoText()).setImportant();
|
||||
new BookletChapter("miner", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockMiner.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityMiner.ENERGY_USE_PER_BLOCK).addTextReplacement("<range>", TileEntityMiner.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipeMiner)).setSpecial();
|
||||
new BookletChapterCoffee("coffeeMachine", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockCoffeeMachine.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemCoffeeBean.get())).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemCoffee.get())), new PagePicture(3, "page_coffee_machine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setWildcard().setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
|
||||
|
||||
List<IBookletPage> list = new ArrayList<>();
|
||||
list.add(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityGrinder.ENERGY_USE));
|
||||
|
@ -233,22 +233,22 @@ public final class InitBooklet {
|
|||
list.add(new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
|
||||
}
|
||||
|
||||
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble.get()), list.toArray(new IBookletPage[0]));
|
||||
new BookletChapter("furnaceDouble", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble.get()), new PageCrafting(1, BlockCrafting.recipeFurnace).setWildcard().addTextReplacement("<rf>", TileEntityFurnaceDouble.ENERGY_USE));
|
||||
new BookletChapter("lavaFactory", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "page_lava_factory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
|
||||
new BookletChapter("energizer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer.get()), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
|
||||
new BookletChapter("repairer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer.get()), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("<rf>", TileEntityItemRepairer.ENERGY_USE));
|
||||
new BookletChapter("longRangeBreaker", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockDirectionalBreaker.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityDirectionalBreaker.ENERGY_USE).addTextReplacement("<range>", TileEntityDirectionalBreaker.RANGE), new PageCrafting(2, BlockCrafting.recipeDirectionalBreaker).setWildcard());
|
||||
new BookletChapter("playerInterface", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockPlayerInterface.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPlayerInterface.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipePlayerInterface).setNoText()).setSpecial();
|
||||
new BookletChapter("displayStand", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockDisplayStand.get()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeDisplayStand).setNoText()).setSpecial();
|
||||
new BookletChapter("shockSuppressor", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockShockSuppressor.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityShockSuppressor.RANGE).addTextReplacement("<rf>", TileEntityShockSuppressor.USE_PER), new PageCrafting(2, BlockCrafting.recipeShockSuppressor));
|
||||
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockGrinderDouble.get()), list.toArray(new IBookletPage[0]));
|
||||
new BookletChapter("furnaceDouble", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockFurnaceDouble.get()), new PageCrafting(1, BlockCrafting.recipeFurnace).setWildcard().addTextReplacement("<rf>", TileEntityFurnaceDouble.ENERGY_USE));
|
||||
new BookletChapter("lavaFactory", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockLavaFactoryController.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "page_lava_factory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
|
||||
new BookletChapter("energizer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockEnergizer.get()), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
|
||||
// new BookletChapter("repairer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer.get()), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("<rf>", TileEntityItemRepairer.ENERGY_USE));
|
||||
new BookletChapter("longRangeBreaker", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockDirectionalBreaker.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityDirectionalBreaker.ENERGY_USE).addTextReplacement("<range>", TileEntityDirectionalBreaker.RANGE), new PageCrafting(2, BlockCrafting.recipeDirectionalBreaker).setWildcard());
|
||||
new BookletChapter("playerInterface", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockPlayerInterface.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPlayerInterface.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipePlayerInterface).setNoText()).setSpecial();
|
||||
new BookletChapter("displayStand", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockDisplayStand.get()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeDisplayStand).setNoText()).setSpecial();
|
||||
new BookletChapter("shockSuppressor", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(ActuallyBlocks.blockShockSuppressor.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityShockSuppressor.RANGE).addTextReplacement("<rf>", TileEntityShockSuppressor.USE_PER), new PageCrafting(2, BlockCrafting.recipeShockSuppressor));
|
||||
|
||||
//RF Generating Blocks
|
||||
new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
|
||||
new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("<min>", TileEntityHeatCollector.BLOCKS_NEEDED), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText());
|
||||
new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.CANOLA.ordinal())).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidRefinedCanolaOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText());
|
||||
new BookletChapter("leafGen", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockLeafGenerator.get()), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue()).addTextReplacement("<range>", ConfigIntValues.LEAF_GENERATOR_AREA.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant();
|
||||
new BookletChapter("bioReactor", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockBioReactor.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBioReactor).setNoText()).setSpecial();
|
||||
new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
|
||||
new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockHeatCollector.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("<min>", TileEntityHeatCollector.BLOCKS_NEEDED), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText());
|
||||
new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockFermentingBarrel.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.CANOLA.ordinal())).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidRefinedCanolaOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText());
|
||||
new BookletChapter("leafGen", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockLeafGenerator.get()), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue()).addTextReplacement("<range>", ConfigIntValues.LEAF_GENERATOR_AREA.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant();
|
||||
new BookletChapter("bioReactor", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(ActuallyBlocks.blockBioReactor.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBioReactor).setNoText()).setSpecial();
|
||||
|
||||
//No RF Using Items
|
||||
chaptersIntroduction[9] = new BookletChapter("goggles", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemEngineerGoggles.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeGoggles).setNoText(), new PageCrafting(3, ItemCrafting.recipeGogglesAdvanced).setNoText()).setImportant();
|
||||
|
@ -298,6 +298,6 @@ public final class InitBooklet {
|
|||
new BookletChapterTrials("autoDisenchanter", new ItemStack(InitItems.itemDisenchantingLens.get()), false);
|
||||
new BookletChapterTrials("empoweredOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidEmpoweredOil, Fluid.BUCKET_VOLUME)), false);
|
||||
new BookletChapterTrials("mobFarm", new ItemStack(Items.ROTTEN_FLESH), false);
|
||||
new BookletChapterTrials("empowererAutomation", new ItemStack(InitBlocks.blockEmpowerer.get()), false);
|
||||
new BookletChapterTrials("empowererAutomation", new ItemStack(ActuallyBlocks.blockEmpowerer.get()), false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,7 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
// TODO: [port] MOVE TO DATA_GENERATOR
|
||||
|
@ -35,8 +30,8 @@ public final class InitCrafting {
|
|||
// FoodCrafting.init();
|
||||
// ToolCrafting.init();
|
||||
|
||||
ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal())), Blocks.LEAVES.getDefaultState(), new ItemStack(InitItems.itemFertilizer), Blocks.DIRT.getDefaultState());
|
||||
ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), Blocks.DIRT.getDefaultState(), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND.getDefaultState());
|
||||
// ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal())), Blocks.LEAVES.getDefaultState(), new ItemStack(InitItems.itemFertilizer), Blocks.DIRT.getDefaultState());
|
||||
// ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), Blocks.DIRT.getDefaultState(), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND.getDefaultState());
|
||||
|
||||
int[] power = ConfigIntListValues.OIL_POWER.getValue();
|
||||
int[] time = ConfigIntListValues.OIL_TIME.getValue();
|
||||
|
|
|
@ -50,7 +50,7 @@ public class RenderWorm extends Render<EntityWorm> {
|
|||
GlStateManager.translate(0, 0, 0.4);
|
||||
|
||||
stack.setStackDisplayName(entity.getName());
|
||||
AssetUtil.renderItemInWorld(stack);
|
||||
AssetUtil.renderItemInWorld(stack, combinedLightIn, combinedOverlayIn, matrices, buffer);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
package de.ellpeck.actuallyadditions.mod.gen;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockMisc;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockWildPlant;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheWildPlants;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
||||
|
@ -22,6 +22,7 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
|||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.pattern.BlockMatcher;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -73,7 +74,7 @@ public class AAWorldGen implements IWorldGenerator {
|
|||
|
||||
private void generateDefault(World world, Random random, int x, int z) {
|
||||
if (ConfigBoolValues.GENERATE_QUARTZ.isEnabled()) {
|
||||
this.addOreSpawn(InitBlocks.blockMisc.getDefaultState().withProperty(BlockMisc.TYPE, TheMiscBlocks.ORE_QUARTZ), Blocks.STONE, world, random, x * 16, z * 16, MathHelper.getInt(random, 5, 8), 10, QUARTZ_MIN, QUARTZ_MAX);
|
||||
this.addOreSpawn(ActuallyBlocks.blockMisc.getDefaultState().withProperty(BlockMisc.TYPE, TheMiscBlocks.ORE_QUARTZ), Blocks.STONE, world, random, x * 16, z * 16, MathHelper.getInt(random, 5, 8), 10, QUARTZ_MIN, QUARTZ_MAX);
|
||||
}
|
||||
|
||||
if (ConfigBoolValues.GEN_LUSH_CAVES.isEnabled()) {
|
||||
|
@ -106,11 +107,11 @@ public class AAWorldGen implements IWorldGenerator {
|
|||
if (event.getType() == EventType.FLOWERS) {
|
||||
if (!ArrayUtils.contains(ConfigIntListValues.PLANT_DIMENSION_BLACKLIST.getValue(), event.getWorld().provider.getDimension())) {
|
||||
this.generateRice(event);
|
||||
BlockState plantDefault = InitBlocks.blockWildPlant.getDefaultState();
|
||||
BlockState plantDefault = ActuallyBlocks.blockWildPlant.getDefaultState();
|
||||
this.genPlantNormally(plantDefault.withProperty(BlockWildPlant.TYPE, TheWildPlants.CANOLA), ConfigIntValues.CANOLA_AMOUNT.getValue(), ConfigBoolValues.DO_CANOLA_GEN.isEnabled(), Material.GRASS, event);
|
||||
this.genPlantNormally(plantDefault.withProperty(BlockWildPlant.TYPE, TheWildPlants.FLAX), ConfigIntValues.FLAX_AMOUNT.getValue(), ConfigBoolValues.DO_FLAX_GEN.isEnabled(), Material.GRASS, event);
|
||||
this.genPlantNormally(plantDefault.withProperty(BlockWildPlant.TYPE, TheWildPlants.COFFEE), ConfigIntValues.COFFEE_AMOUNT.getValue(), ConfigBoolValues.DO_COFFEE_GEN.isEnabled(), Material.GRASS, event);
|
||||
this.genPlantNormally(InitBlocks.blockBlackLotus.getDefaultState(), ConfigIntValues.BLACK_LOTUS_AMOUNT.getValue(), ConfigBoolValues.DO_LOTUS_GEN.isEnabled(), Material.GRASS, event);
|
||||
// this.genPlantNormally(InitBlocks.blockBlackLotus.getDefaultState(), ConfigIntValues.BLACK_LOTUS_AMOUNT.getValue(), ConfigBoolValues.DO_LOTUS_GEN.isEnabled(), Material.GRASS, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +126,7 @@ public class AAWorldGen implements IWorldGenerator {
|
|||
if (randomPos.getY() >= 25 && randomPos.getY() <= 45) {
|
||||
if (event.getWorld().getBlockState(randomPos).getMaterial() == Material.WATER) {
|
||||
if (event.getWorld().getBlockState(randomPos.down()).getMaterial().isSolid()) {
|
||||
event.getWorld().setBlockState(randomPos, InitBlocks.blockTreasureChest.getDefaultState().withProperty(BlockHorizontal.FACING, Direction.byHorizontalIndex(event.getRand().nextInt(4))), 2);
|
||||
event.getWorld().setBlockState(randomPos, ActuallyBlocks.blockTreasureChest.getDefaultState().withProperty(BlockHorizontal.FACING, Direction.byHorizontalIndex(event.getRand().nextInt(4))), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +149,7 @@ public class AAWorldGen implements IWorldGenerator {
|
|||
ArrayList<Material> blocksAroundTop = WorldUtil.getMaterialsAround(event.getWorld(), posToGenAt);
|
||||
if (blocksAroundBottom.contains(Material.GRASS) || blocksAroundBottom.contains(Material.GROUND) || blocksAroundBottom.contains(Material.ROCK) || blocksAroundBottom.contains(Material.SAND)) {
|
||||
if (!blocksAroundTop.contains(Material.WATER) && event.getWorld().getBlockState(posToGenAt).getMaterial() == Material.AIR) {
|
||||
event.getWorld().setBlockState(posToGenAt, InitBlocks.blockWildPlant.getDefaultState().withProperty(BlockWildPlant.TYPE, TheWildPlants.RICE), 2);
|
||||
event.getWorld().setBlockState(posToGenAt, ActuallyBlocks.blockWildPlant.getDefaultState().withProperty(BlockWildPlant.TYPE, TheWildPlants.RICE), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
|
@ -36,7 +36,7 @@ import java.util.Random;
|
|||
|
||||
public class WorldGenLushCaves {
|
||||
|
||||
public static final Block[] CRYSTAL_CLUSTERS = new Block[]{InitBlocks.blockCrystalClusterRedstone, InitBlocks.blockCrystalClusterLapis, InitBlocks.blockCrystalClusterDiamond, InitBlocks.blockCrystalClusterCoal, InitBlocks.blockCrystalClusterEmerald, InitBlocks.blockCrystalClusterIron};
|
||||
public static final Block[] CRYSTAL_CLUSTERS = new Block[]{ActuallyBlocks.blockCrystalClusterRedstone, ActuallyBlocks.blockCrystalClusterLapis, ActuallyBlocks.blockCrystalClusterDiamond, ActuallyBlocks.blockCrystalClusterCoal, ActuallyBlocks.blockCrystalClusterEmerald, ActuallyBlocks.blockCrystalClusterIron};
|
||||
|
||||
public boolean generate(World world, Random rand, BlockPos position, StructureBoundingBox blockRegion) {
|
||||
this.generateCave(world, position, rand, blockRegion);
|
||||
|
@ -119,7 +119,7 @@ public class WorldGenLushCaves {
|
|||
|
||||
BlockState state = world.getBlockState(cratePos);
|
||||
if (state != null && state.getBlock().isLeaves(state, world, cratePos)) {
|
||||
world.setBlockState(cratePos, InitBlocks.blockGiantChest.getDefaultState(), 2);
|
||||
world.setBlockState(cratePos, ActuallyBlocks.blockGiantChest.getDefaultState(), 2);
|
||||
|
||||
TileEntity tile = world.getTileEntity(cratePos);
|
||||
if (tile instanceof TileEntityGiantChest) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen.village.component;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -104,13 +104,13 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
|
|||
int randomMeta = MathHelper.getInt(rand, 1, 7);
|
||||
switch (rand.nextInt(4)) {
|
||||
case 0:
|
||||
return InitBlocks.blockFlax.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
return ActuallyBlocks.blockFlax.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 1:
|
||||
return InitBlocks.blockCoffee.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
return ActuallyBlocks.blockCoffee.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
case 2:
|
||||
return InitBlocks.blockRice.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
return ActuallyBlocks.blockRice.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
default:
|
||||
return InitBlocks.blockCanola.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
return ActuallyBlocks.blockCanola.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,14 +10,11 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen.village.component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.laser.LaserType;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockColoredLamp;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
||||
|
@ -26,14 +23,7 @@ import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
|
|||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
|
@ -56,6 +46,9 @@ import net.minecraftforge.fluids.FluidRegistry;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class VillageComponentEngineerHouse extends StructureVillagePieces.House1 {
|
||||
|
||||
private static final ResourceLocation STRUCTURE_RES_LOC = new ResourceLocation(ActuallyAdditions.MODID, "andrew_period_house");
|
||||
|
@ -77,14 +70,18 @@ public class VillageComponentEngineerHouse extends StructureVillagePieces.House1
|
|||
|
||||
public static VillageComponentEngineerHouse buildComponent(List<StructureComponent> pieces, int p1, int p2, int p3, Direction p4) {
|
||||
StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, X_SIZE, Y_SIZE, Z_SIZE, p4);
|
||||
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentEngineerHouse(boundingBox, p4) : null;
|
||||
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null
|
||||
? new VillageComponentEngineerHouse(boundingBox, p4)
|
||||
: null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox sbb) {
|
||||
if (this.averageGroundLevel < 0) {
|
||||
this.averageGroundLevel = this.getAverageGroundLevel(world, sbb);
|
||||
if (this.averageGroundLevel < 0) { return true; }
|
||||
if (this.averageGroundLevel < 0) {
|
||||
return true;
|
||||
}
|
||||
this.boundingBox.offset(0, this.averageGroundLevel - this.boundingBox.maxY + Y_SIZE - 2, 0);
|
||||
}
|
||||
|
||||
|
@ -149,7 +146,7 @@ public class VillageComponentEngineerHouse extends StructureVillagePieces.House1
|
|||
tile.stopFromDropping = true;
|
||||
tile.storage.setEnergyStored(world.rand.nextInt(tile.storage.getMaxEnergyStored() / 2));
|
||||
if (world.rand.nextFloat() >= 0.25F) {
|
||||
tile.inv.setStackInSlot(TileEntityGrinder.SLOT_INPUT_1, new ItemStack(InitBlocks.blockMisc, world.rand.nextInt(10) + 1, TheMiscBlocks.ORE_QUARTZ.ordinal()));
|
||||
tile.inv.setStackInSlot(TileEntityGrinder.SLOT_INPUT_1, new ItemStack(ActuallyBlocks.blockMisc, world.rand.nextInt(10) + 1, TheMiscBlocks.ORE_QUARTZ.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +174,7 @@ public class VillageComponentEngineerHouse extends StructureVillagePieces.House1
|
|||
}
|
||||
|
||||
int meta = world.rand.nextInt(TheColoredLampColors.values().length);
|
||||
this.setBlockState(world, InitBlocks.blockColoredLampOn.getDefaultState().withProperty(BlockColoredLamp.TYPE, BlockColoredLamp.ALL_LAMP_TYPES[meta]), 8, 1, 6, sbb);
|
||||
this.setBlockState(world, ActuallyBlocks.blockColoredLampOn.getDefaultState().withProperty(BlockColoredLamp.TYPE, BlockColoredLamp.ALL_LAMP_TYPES[meta]), 8, 1, 6, sbb);
|
||||
}
|
||||
|
||||
private void spawnActualHouse(World world, StructureBoundingBox sbb) {
|
||||
|
|
|
@ -10,13 +10,14 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.gen.village.component;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -58,7 +59,7 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1 {
|
|||
BlockPos pos = new BlockPos(x, y, z);
|
||||
|
||||
if (box.isVecInside(pos)) {
|
||||
world.setBlockState(pos, InitBlocks.blockGiantChest.getDefaultState(), 2);
|
||||
world.setBlockState(pos, ActuallyBlocks.blockGiantChest.getDefaultState(), 2);
|
||||
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityGiantChest) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.inventory;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
|
||||
|
@ -101,7 +101,7 @@ public class ContainerDropper extends Container {
|
|||
public void onContainerClosed(PlayerEntity playerIn) {
|
||||
super.onContainerClosed(playerIn);
|
||||
if (!this.player.isSpectator()) {
|
||||
this.dropper.getWorld().notifyNeighborsOfStateChange(this.dropper.getPos(), InitBlocks.blockDropper, false);
|
||||
this.dropper.getWorld().notifyNeighborsOfStateChange(this.dropper.getPos(), ActuallyBlocks.blockDropper, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.inventory;
|
|||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.ContainerRepairer;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
|
|
@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.*;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
|
||||
|
@ -120,10 +120,10 @@ public final class InitItems {
|
|||
public static final RegistryObject<Item> itemPotionRingAdvanced = ITEMS.register("", new ItemPotionRing(true, "item_potion_ring_advanced"));
|
||||
public static final RegistryObject<Item> itemHairyBall = ITEMS.register("item_hairy_ball", ItemHairyBall::new);
|
||||
public static final RegistryObject<Item> itemCoffeeBean = ITEMS.register("item_coffee_beans", ItemCoffeeBean::new);
|
||||
public static final RegistryObject<Item> itemRiceSeed = ITEMS.register("", new ItemSeed("item_rice_seed", "seedRice", InitBlocks.blockRice, itemFoods, TheFoods.RICE.ordinal()));
|
||||
public static final RegistryObject<Item> itemCanolaSeed = ITEMS.register("", new ItemFoodSeed("item_canola_seed", "seedCanola", InitBlocks.blockCanola, itemMisc, TheMiscItems.CANOLA.ordinal(), 1, 0.01F, 10).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 0), 0.2F));
|
||||
public static final RegistryObject<Item> itemFlaxSeed = ITEMS.register("", new ItemSeed("item_flax_seed", "seedFlax", InitBlocks.blockFlax, Items.STRING, 0));
|
||||
public static final RegistryObject<Item> itemCoffeeSeed = ITEMS.register("", new ItemSeed("item_coffee_seed", "seedCoffeeBeans", InitBlocks.blockCoffee, itemCoffeeBean, 0));
|
||||
public static final RegistryObject<Item> itemRiceSeed = ITEMS.register("", new ItemSeed("item_rice_seed", "seedRice", ActuallyBlocks.blockRice, itemFoods, TheFoods.RICE.ordinal()));
|
||||
public static final RegistryObject<Item> itemCanolaSeed = ITEMS.register("", new ItemFoodSeed("item_canola_seed", "seedCanola", ActuallyBlocks.blockCanola, itemMisc, TheMiscItems.CANOLA.ordinal(), 1, 0.01F, 10).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 0), 0.2F));
|
||||
public static final RegistryObject<Item> itemFlaxSeed = ITEMS.register("", new ItemSeed("item_flax_seed", "seedFlax", ActuallyBlocks.blockFlax, Items.STRING, 0));
|
||||
public static final RegistryObject<Item> itemCoffeeSeed = ITEMS.register("", new ItemSeed("item_coffee_seed", "seedCoffeeBeans", ActuallyBlocks.blockCoffee, itemCoffeeBean, 0));
|
||||
|
||||
// TOOLS & ARMOR
|
||||
public static final RegistryObject<Item> itemHelmQuartz = ITEMS.register("item_helm_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 0));
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.items;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Help;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Lang;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -224,9 +224,9 @@ public class ItemFillingWand extends ItemEnergy {
|
|||
|
||||
IFormattableTextComponent display = loadData(stack)
|
||||
.map(state -> state.getBlock().getTranslatedName())
|
||||
.orElse(Help.Trans("tooltip", "item_filling_wand.selectedBlock.none"));
|
||||
.orElse(Lang.trans("tooltip", "item_filling_wand.selectedBlock.none"));
|
||||
|
||||
tooltip.add(Help.Trans("tooltip", "item_filling_wand.selectedBlock", display.getString()));
|
||||
tooltip.add(Lang.trans("tooltip", "item_filling_wand.selectedBlock", display.getString()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
|||
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Help;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Lang;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
|
@ -67,7 +67,7 @@ public abstract class ItemEnergy extends ItemBase {
|
|||
super.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
stack.getCapability(CapabilityEnergy.ENERGY, null).ifPresent(storage -> {
|
||||
NumberFormat format = NumberFormat.getInstance();
|
||||
tooltip.add(Help.Trans("misc", "power_long", format.format(storage.getEnergyStored()), format.format(storage.getMaxEnergyStored())));
|
||||
tooltip.add(Lang.trans("misc", "power_long", format.format(storage.getEnergyStored()), format.format(storage.getMaxEnergyStored())));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,11 @@ package de.ellpeck.actuallyadditions.mod.jei;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.*;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiGrinder;
|
||||
|
@ -23,8 +26,6 @@ import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeCategory;
|
|||
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeWrapper;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeCategory;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeWrapper;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.compost.CompostRecipeCategory;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.compost.CompostRecipeWrapper;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeCategory;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeWrapper;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.empowerer.EmpowererRecipeCategory;
|
||||
|
@ -71,22 +72,22 @@ public class JEIActuallyAdditionsPlugin implements IModPlugin {
|
|||
registry.addRecipeClickArea(GuiFurnaceDouble.class, 51, 40, 74, 22, VanillaRecipeCategoryUid.SMELTING);
|
||||
|
||||
IIngredientBlacklist blacklist = helpers.getIngredientBlacklist();
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitBlocks.blockRice.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitBlocks.blockCanola.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitBlocks.blockFlax.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitBlocks.blockCoffee.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitBlocks.blockWildPlant.get(), 1, Util.WILDCARD));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitBlocks.blockColoredLampOn.get(), 1, Util.WILDCARD));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockRice.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockCanola.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockFlax.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockCoffee.get()));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockWildPlant.get(), 1, Util.WILDCARD));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockColoredLampOn.get(), 1, Util.WILDCARD));
|
||||
blacklist.addIngredientToBlacklist(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.YOUTUBE_ICON.ordinal()));
|
||||
|
||||
registry.addRecipeCatalyst(new ItemStack(InitItems.itemCrafterOnAStick.get()), VanillaRecipeCategoryUid.CRAFTING);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockFurnaceDouble.get()), VanillaRecipeCategoryUid.SMELTING);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockGrinder.get()), CrusherRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockGrinderDouble.get()), CrusherRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockCoffeeMachine.get()), CoffeeMachineRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockAtomicReconstructor.get()), ReconstructorRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockEmpowerer.get()), EmpowererRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockFurnaceDouble.get()), VanillaRecipeCategoryUid.SMELTING);
|
||||
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockGrinder.get()), CrusherRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockGrinderDouble.get()), CrusherRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockCoffeeMachine.get()), CoffeeMachineRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockAtomicReconstructor.get()), ReconstructorRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockEmpowerer.get()), EmpowererRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitItems.itemBooklet.get()), BookletRecipeCategory.NAME);
|
||||
registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockCompost.get()), CompostRecipeCategory.NAME);
|
||||
// registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockCompost.get()), CompostRecipeCategory.NAME);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,16 +10,12 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.jei.coffee;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
|
@ -31,6 +27,9 @@ import mezz.jei.api.ingredients.VanillaTypes;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton {
|
||||
|
||||
public final CoffeeIngredient ingredient;
|
||||
|
@ -47,11 +46,13 @@ public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton {
|
|||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
List<ItemStack> list = new ArrayList<>();
|
||||
for (ItemStack s : this.ingredient.getInput().getMatchingStacks())
|
||||
for (ItemStack s : this.ingredient.getInput().getMatchingStacks()) {
|
||||
list.add(s);
|
||||
}
|
||||
list.add(this.cup);
|
||||
for (ItemStack s : TileEntityCoffeeMachine.COFFEE.getMatchingStacks())
|
||||
for (ItemStack s : TileEntityCoffeeMachine.COFFEE.getMatchingStacks()) {
|
||||
list.add(s);
|
||||
}
|
||||
ingredients.setInputs(VanillaTypes.ITEM, list);
|
||||
|
||||
ingredients.setOutput(VanillaTypes.ITEM, this.theOutput);
|
||||
|
@ -83,6 +84,6 @@ public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton {
|
|||
|
||||
@Override
|
||||
public IBookletPage getPage() {
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockCoffeeMachine));
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(ActuallyBlocks.blockCoffeeMachine));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* This file ("CompostRecipeCategory.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.jei.compost;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
|
||||
public class CompostRecipeCategory implements IRecipeCategory<CompostRecipeWrapper> {
|
||||
|
||||
public static final String NAME = "actuallyadditions.compost";
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
public CompostRecipeCategory(IGuiHelper helper) {
|
||||
this.background = helper.createDrawable(AssetUtil.getGuiLocation("gui_nei_simple"), 0, 0, 96, 60);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUid() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return StringUtil.localize("container.nei." + NAME + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModName() {
|
||||
return ActuallyAdditions.NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return this.background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, CompostRecipeWrapper wrapper, IIngredients ingredients) {
|
||||
recipeLayout.getItemStacks().init(0, true, 4, 18);
|
||||
recipeLayout.getItemStacks().set(0, Arrays.asList(wrapper.recipe.getInput().getMatchingStacks()));
|
||||
|
||||
recipeLayout.getItemStacks().init(1, false, 66, 18);
|
||||
recipeLayout.getItemStacks().set(1, wrapper.recipe.getOutput());
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
* This file ("CompostRecipeWrapper.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.jei.compost;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class CompostRecipeWrapper extends RecipeWrapperWithButton {
|
||||
|
||||
public final CompostRecipe recipe;
|
||||
|
||||
public CompostRecipeWrapper(CompostRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInputs(VanillaTypes.ITEM, Arrays.asList(this.recipe.getInput().getMatchingStacks()));
|
||||
ingredients.setOutput(VanillaTypes.ITEM, this.recipe.getOutput());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
|
||||
int bake_time = TileEntityCompost.COMPOST_TIME_TICKS / 20;
|
||||
minecraft.fontRenderer.drawString(bake_time + "s", 28, 3, 0xFFFFFF, true);
|
||||
//super.drawInfo(minecraft, recipeWidth, recipeHeight, mouseX, mouseY); Not sure the button needs to be here.
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getButtonX() {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getButtonY() {
|
||||
return 35;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBookletPage getPage() {
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockCompost));
|
||||
}
|
||||
}
|
|
@ -10,13 +10,9 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.jei.crusher;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
|
@ -26,6 +22,10 @@ import mezz.jei.api.ingredients.VanillaTypes;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class CrusherRecipeWrapper extends RecipeWrapperWithButton {
|
||||
|
||||
public final CrusherRecipe theRecipe;
|
||||
|
@ -67,6 +67,6 @@ public class CrusherRecipeWrapper extends RecipeWrapperWithButton {
|
|||
|
||||
@Override
|
||||
public IBookletPage getPage() {
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockGrinder));
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(ActuallyBlocks.blockGrinder));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,18 +10,18 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.jei.empowerer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EmpowererRecipeWrapper extends RecipeWrapperWithButton {
|
||||
|
||||
public final EmpowererRecipe theRecipe;
|
||||
|
@ -33,16 +33,21 @@ public class EmpowererRecipeWrapper extends RecipeWrapperWithButton {
|
|||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
List<ItemStack> inputs = new ArrayList<>();
|
||||
for (ItemStack s : this.theRecipe.getInput().getMatchingStacks())
|
||||
for (ItemStack s : this.theRecipe.getInput().getMatchingStacks()) {
|
||||
inputs.add(s);
|
||||
for (ItemStack s : this.theRecipe.getStandOne().getMatchingStacks())
|
||||
}
|
||||
for (ItemStack s : this.theRecipe.getStandOne().getMatchingStacks()) {
|
||||
inputs.add(s);
|
||||
for (ItemStack s : this.theRecipe.getStandTwo().getMatchingStacks())
|
||||
}
|
||||
for (ItemStack s : this.theRecipe.getStandTwo().getMatchingStacks()) {
|
||||
inputs.add(s);
|
||||
for (ItemStack s : this.theRecipe.getStandThree().getMatchingStacks())
|
||||
}
|
||||
for (ItemStack s : this.theRecipe.getStandThree().getMatchingStacks()) {
|
||||
inputs.add(s);
|
||||
for (ItemStack s : this.theRecipe.getStandFour().getMatchingStacks())
|
||||
}
|
||||
for (ItemStack s : this.theRecipe.getStandFour().getMatchingStacks()) {
|
||||
inputs.add(s);
|
||||
}
|
||||
|
||||
ingredients.setInputs(VanillaTypes.ITEM, inputs);
|
||||
ingredients.setOutput(VanillaTypes.ITEM, this.theRecipe.getOutput());
|
||||
|
@ -60,6 +65,6 @@ public class EmpowererRecipeWrapper extends RecipeWrapperWithButton {
|
|||
|
||||
@Override
|
||||
public IBookletPage getPage() {
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockEmpowerer));
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(ActuallyBlocks.blockEmpowerer));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.jei.reconstructor;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
|
@ -27,7 +27,7 @@ public class ReconstructorRecipeCategory implements IRecipeCategory<Reconstructo
|
|||
|
||||
public static final String NAME = "actuallyadditions.reconstructor";
|
||||
|
||||
private static final ItemStack RECONSTRUCTOR = new ItemStack(InitBlocks.blockAtomicReconstructor);
|
||||
private static final ItemStack RECONSTRUCTOR = new ItemStack(ActuallyBlocks.blockAtomicReconstructor);
|
||||
private final IDrawable background;
|
||||
|
||||
public ReconstructorRecipeCategory(IGuiHelper helper) {
|
||||
|
|
|
@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.jei.reconstructor;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton;
|
||||
import de.ellpeck.actuallyadditions.mod.recipe.EnchBookConversion;
|
||||
|
@ -68,7 +68,7 @@ public class ReconstructorRecipeWrapper extends RecipeWrapperWithButton {
|
|||
|
||||
@Override
|
||||
public IBookletPage getPage() {
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockAtomicReconstructor));
|
||||
return BookletUtils.findFirstPageForStack(new ItemStack(ActuallyBlocks.blockAtomicReconstructor));
|
||||
}
|
||||
|
||||
public static class EnchBookWrapper extends ReconstructorRecipeWrapper {
|
||||
|
|
|
@ -72,7 +72,7 @@ public class RenderSpecial {
|
|||
GlStateManager.translate(0D, 0.5D, 0D);
|
||||
}
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
AssetUtil.renderItemInWorld(this.theThingToRender);
|
||||
AssetUtil.renderItemInWorld(this.theThingToRender, combinedLightIn, combinedOverlayIn, matrices, buffer);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GlStateManager.enableLighting();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.ore;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts;
|
||||
|
@ -41,7 +41,7 @@ public final class InitOreDict {
|
|||
addOre(InitItems.itemDust, TheDusts.QUARTZ.ordinal(), "dustNetherQuartz");
|
||||
addOre(InitItems.itemDust, TheDusts.COAL.ordinal(), "dustCoal");
|
||||
addOre(InitItems.itemDust, TheDusts.QUARTZ_BLACK.ordinal(), "dustQuartzBlack");
|
||||
addOre(InitBlocks.blockMisc, TheMiscBlocks.ORE_QUARTZ.ordinal(), "oreQuartzBlack");
|
||||
addOre(ActuallyBlocks.blockMisc, TheMiscBlocks.ORE_QUARTZ.ordinal(), "oreQuartzBlack");
|
||||
addOre(InitItems.itemMisc, TheMiscItems.QUARTZ.ordinal(), "gemQuartzBlack");
|
||||
|
||||
//For Thermal Expansion Machine that "grows crops"
|
||||
|
@ -56,8 +56,8 @@ public final class InitOreDict {
|
|||
|
||||
//For Crafting
|
||||
addOre(InitItems.itemMisc, TheMiscItems.RICE_SLIME.ordinal(), "slimeball");
|
||||
addOre(InitBlocks.blockMisc, TheMiscBlocks.CHARCOAL_BLOCK.ordinal(), "blockCharcoal");
|
||||
addOre(InitBlocks.blockMisc, TheMiscBlocks.QUARTZ.ordinal(), "blockQuartzBlack");
|
||||
addOre(ActuallyBlocks.blockMisc, TheMiscBlocks.CHARCOAL_BLOCK.ordinal(), "blockCharcoal");
|
||||
addOre(ActuallyBlocks.blockMisc, TheMiscBlocks.QUARTZ.ordinal(), "blockQuartzBlack");
|
||||
addOre(InitItems.itemMisc, TheMiscItems.BLACK_DYE.ordinal(), "dyeBlack");
|
||||
addOre(InitItems.itemMisc, TheMiscItems.BLACK_DYE.ordinal(), "dye");
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class ParticleLaserItem extends Particle {
|
|||
RenderSystem.translated(this.posX - cam.getX(), this.posY - cam.getY(), this.posZ - cam.getZ());
|
||||
RenderSystem.scalef(0.3F, 0.3F, 0.3F);
|
||||
|
||||
double boop = Util.milliTime();
|
||||
double boop = Util.milliTime() / 600D;
|
||||
RenderSystem.rotatef((float) (boop * 40D % 360), 0, 1, 0);
|
||||
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
|
@ -11,60 +11,58 @@ public class ActuallyTiles {
|
|||
public static final DeferredRegister<TileEntityType<?>> TILES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, ActuallyAdditions.MODID);
|
||||
|
||||
// public static final RegistryObject<,<?>> COMPOST_TILE = TILES.register("compost", () -> TileEntityType.Builder.create(TileEntityCompost::new, InitBlocks.blockCompost.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFeeder>> FEEDER_TILE = TILES.register("feeder", () -> TileEntityType.Builder.create(TileEntityFeeder::new, InitBlocks.blockFeeder.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFeeder>> FEEDER_TILE = TILES.register("feeder", () -> TileEntityType.Builder.create(TileEntityFeeder::new, ActuallyBlocks.blockFeeder.get()).build(null));
|
||||
// public static final RegistryObject<build<?>> GIANTCHEST_TILE = TILES.register("", () -> TileEntityType.Builder.create(TileEntityGiantChest::new, ).build(null));
|
||||
// public static final RegistryObject<build<?>> GIANTCHESTMEDIUM_TILE = TILES.register("", () -> TileEntityType.Builder.create(TileEntityGiantChestMedium::new, ).build(null));
|
||||
// public static final RegistryObject<build<?>> GIANTCHESTLARGE_TILE = TILES.register("", () -> TileEntityType.Builder.create(TileEntityGiantChestLarge::new, ).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityGrinder>> GRINDER_TILE = TILES.register("grinder", () -> TileEntityType.Builder.create(TileEntityGrinder::new, InitBlocks.blockGrinder.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFurnaceDouble>> FURNACE_DOUBLE_TILE = TILES.register("furnaceDouble", () -> TileEntityType.Builder.create(TileEntityFurnaceDouble::new, InitBlocks.blockFurnaceDouble.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityInputter>> INPUTTER_TILE = TILES.register("inputter", () -> TileEntityType.Builder.create(TileEntityInputter::new, InitBlocks.blockInputter.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFishingNet>> FISHINGNET_TILE = TILES.register("fishingNet", () -> TileEntityType.Builder.create(TileEntityFishingNet::new, InitBlocks.blockFishingNet.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFurnaceSolar>> SOLAR_TILE = TILES.register("solarPanel", () -> TileEntityType.Builder.create(TileEntityFurnaceSolar::new, InitBlocks.blockFurnaceSolar.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityHeatCollector>> HEATCOLLECTOR_TILE = TILES.register("heatCollector", () -> TileEntityType.Builder.create(TileEntityHeatCollector::new, InitBlocks.blockHeatCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityItemRepairer>> ITEMREPAIRER_TILE = TILES.register("repairer", () -> TileEntityType.Builder.create(TileEntityItemRepairer::new, InitBlocks.blockItemRepairer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBreaker>> BREAKER_TILE = TILES.register("breaker", () -> TileEntityType.Builder.create(TileEntityBreaker::new, InitBlocks.blockBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDropper>> DROPPER_TILE = TILES.register("dropper", () -> TileEntityType.Builder.create(TileEntityDropper::new, InitBlocks.blockDropper.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityInputterAdvanced>> INPUTTERADVANCED_TILE = TILES.register("inputterAdvanced", () -> TileEntityType.Builder.create(TileEntityInputterAdvanced::new, InitBlocks.blockInputterAdvanced.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPlacer>> PLACER_TILE = TILES.register("placer", () -> TileEntityType.Builder.create(TileEntityPlacer::new, InitBlocks.blockPlacer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityGrinderDouble>> GRINDER_DOUBLE_TILE = TILES.register("grinderDouble", () -> TileEntityType.Builder.create(TileEntityGrinderDouble::new, InitBlocks.blockGrinderDouble.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityCanolaPress>> CANOLAPRESS_TILE = TILES.register("canolaPress", () -> TileEntityType.Builder.create(TileEntityCanolaPress::new, InitBlocks.blockCanolaPress.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFermentingBarrel>> FERMENTINGBARREL_TILE = TILES.register("fermentingBarrel", () -> TileEntityType.Builder.create(TileEntityFermentingBarrel::new, InitBlocks.blockFermentingBarrel.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityOilGenerator>> OILGENERATOR_TILE = TILES.register("oilGenerator", () -> TileEntityType.Builder.create(TileEntityOilGenerator::new, InitBlocks.blockOilGenerator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityCoalGenerator>> COALGENERATOR_TILE = TILES.register("coalGenerator", () -> TileEntityType.Builder.create(TileEntityCoalGenerator::new, InitBlocks.blockCoalGenerator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomItemface>> PHANTOMITEMFACE_TILE = TILES.register("phantomface", () -> TileEntityType.Builder.create(TileEntityPhantomItemface::new, InitBlocks.blockPhantomface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomLiquiface>> PHANTOMLIQUIFACE_TILE = TILES.register("liquiface", () -> TileEntityType.Builder.create(TileEntityPhantomLiquiface::new, InitBlocks.blockPhantomLiquiface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomEnergyface>> PHANTOMENERGYFACE_TILE = TILES.register("energyface", () -> TileEntityType.Builder.create(TileEntityPhantomEnergyface::new, InitBlocks.blockPhantomEnergyface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPlayerInterface>> PLAYERINTERFACE_TILE = TILES.register("playerInterface", () -> TileEntityType.Builder.create(TileEntityPlayerInterface::new, InitBlocks.blockPlayerInterface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomPlacer>> PHANTOMPLACER_TILE = TILES.register("phantomPlacer", () -> TileEntityType.Builder.create(TileEntityPhantomPlacer::new, InitBlocks.blockPhantomPlacer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomBreaker>> PHANTOMBREAKER_TILE = TILES.register("phantomBreaker", () -> TileEntityType.Builder.create(TileEntityPhantomBreaker::new, InitBlocks.blockPhantomBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFluidCollector>> FLUIDCOLLECTOR_TILE = TILES.register("fluidCollector", () -> TileEntityType.Builder.create(TileEntityFluidCollector::new, InitBlocks.blockFluidCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFluidPlacer>> FLUIDPLACER_TILE = TILES.register("fluidPlacer", () -> TileEntityType.Builder.create(TileEntityFluidPlacer::new, InitBlocks.blockFluidPlacer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLavaFactoryController>> LAVAFACTORYCONTROLLER_TILE = TILES.register("lavaFactory", () -> TileEntityType.Builder.create(TileEntityLavaFactoryController::new, InitBlocks.blockLavaFactoryController.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityCoffeeMachine>> COFFEEMACHINE_TILE = TILES.register("coffeeMachine", () -> TileEntityType.Builder.create(TileEntityCoffeeMachine::new, InitBlocks.blockCoffeeMachine.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomBooster>> PHANTOM_BOOSTER_TILE = TILES.register("phantomBooster", () -> TileEntityType.Builder.create(TileEntityPhantomBooster::new, InitBlocks.blockPhantomBooster.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityEnergizer>> ENERGIZER_TILE = TILES.register("energizer", () -> TileEntityType.Builder.create(TileEntityEnergizer::new, InitBlocks.blockEnergizer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityEnervator>> ENERVATOR_TILE = TILES.register("enervator", () -> TileEntityType.Builder.create(TileEntityEnervator::new, InitBlocks.blockEnervator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityXPSolidifier>> XPSOLIDIFIER_TILE = TILES.register("xpSolidifier", () -> TileEntityType.Builder.create(TileEntityXPSolidifier::new, InitBlocks.blockXPSolidifier.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityGrinder>> GRINDER_TILE = TILES.register("grinder", () -> TileEntityType.Builder.create(TileEntityGrinder::new, ActuallyBlocks.blockGrinder.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFurnaceDouble>> FURNACE_DOUBLE_TILE = TILES.register("furnaceDouble", () -> TileEntityType.Builder.create(TileEntityFurnaceDouble::new, ActuallyBlocks.blockFurnaceDouble.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityInputter>> INPUTTER_TILE = TILES.register("inputter", () -> TileEntityType.Builder.create(TileEntityInputter::new, ActuallyBlocks.blockInputter.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFurnaceSolar>> SOLAR_TILE = TILES.register("solarPanel", () -> TileEntityType.Builder.create(TileEntityFurnaceSolar::new, ActuallyBlocks.blockFurnaceSolar.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityHeatCollector>> HEATCOLLECTOR_TILE = TILES.register("heatCollector", () -> TileEntityType.Builder.create(TileEntityHeatCollector::new, ActuallyBlocks.blockHeatCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBreaker>> BREAKER_TILE = TILES.register("breaker", () -> TileEntityType.Builder.create(TileEntityBreaker::new, ActuallyBlocks.blockBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDropper>> DROPPER_TILE = TILES.register("dropper", () -> TileEntityType.Builder.create(TileEntityDropper::new, ActuallyBlocks.blockDropper.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityInputterAdvanced>> INPUTTERADVANCED_TILE = TILES.register("inputterAdvanced", () -> TileEntityType.Builder.create(TileEntityInputterAdvanced::new, ActuallyBlocks.blockInputterAdvanced.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPlacer>> PLACER_TILE = TILES.register("placer", () -> TileEntityType.Builder.create(TileEntityPlacer::new, ActuallyBlocks.blockPlacer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityGrinderDouble>> GRINDER_DOUBLE_TILE = TILES.register("grinderDouble", () -> TileEntityType.Builder.create(TileEntityGrinderDouble::new, ActuallyBlocks.blockGrinderDouble.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityCanolaPress>> CANOLAPRESS_TILE = TILES.register("canolaPress", () -> TileEntityType.Builder.create(TileEntityCanolaPress::new, ActuallyBlocks.blockCanolaPress.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFermentingBarrel>> FERMENTINGBARREL_TILE = TILES.register("fermentingBarrel", () -> TileEntityType.Builder.create(TileEntityFermentingBarrel::new, ActuallyBlocks.blockFermentingBarrel.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityOilGenerator>> OILGENERATOR_TILE = TILES.register("oilGenerator", () -> TileEntityType.Builder.create(TileEntityOilGenerator::new, ActuallyBlocks.blockOilGenerator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityCoalGenerator>> COALGENERATOR_TILE = TILES.register("coalGenerator", () -> TileEntityType.Builder.create(TileEntityCoalGenerator::new, ActuallyBlocks.blockCoalGenerator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomItemface>> PHANTOMITEMFACE_TILE = TILES.register("phantomface", () -> TileEntityType.Builder.create(TileEntityPhantomItemface::new, ActuallyBlocks.blockPhantomface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomLiquiface>> PHANTOMLIQUIFACE_TILE = TILES.register("liquiface", () -> TileEntityType.Builder.create(TileEntityPhantomLiquiface::new, ActuallyBlocks.blockPhantomLiquiface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomEnergyface>> PHANTOMENERGYFACE_TILE = TILES.register("energyface", () -> TileEntityType.Builder.create(TileEntityPhantomEnergyface::new, ActuallyBlocks.blockPhantomEnergyface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPlayerInterface>> PLAYERINTERFACE_TILE = TILES.register("playerInterface", () -> TileEntityType.Builder.create(TileEntityPlayerInterface::new, ActuallyBlocks.blockPlayerInterface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomPlacer>> PHANTOMPLACER_TILE = TILES.register("phantomPlacer", () -> TileEntityType.Builder.create(TileEntityPhantomPlacer::new, ActuallyBlocks.blockPhantomPlacer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomBreaker>> PHANTOMBREAKER_TILE = TILES.register("phantomBreaker", () -> TileEntityType.Builder.create(TileEntityPhantomBreaker::new, ActuallyBlocks.blockPhantomBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFluidCollector>> FLUIDCOLLECTOR_TILE = TILES.register("fluidCollector", () -> TileEntityType.Builder.create(TileEntityFluidCollector::new, ActuallyBlocks.blockFluidCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFluidPlacer>> FLUIDPLACER_TILE = TILES.register("fluidPlacer", () -> TileEntityType.Builder.create(TileEntityFluidPlacer::new, ActuallyBlocks.blockFluidPlacer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLavaFactoryController>> LAVAFACTORYCONTROLLER_TILE = TILES.register("lavaFactory", () -> TileEntityType.Builder.create(TileEntityLavaFactoryController::new, ActuallyBlocks.blockLavaFactoryController.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityCoffeeMachine>> COFFEEMACHINE_TILE = TILES.register("coffeeMachine", () -> TileEntityType.Builder.create(TileEntityCoffeeMachine::new, ActuallyBlocks.blockCoffeeMachine.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomBooster>> PHANTOM_BOOSTER_TILE = TILES.register("phantomBooster", () -> TileEntityType.Builder.create(TileEntityPhantomBooster::new, ActuallyBlocks.blockPhantomBooster.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityEnergizer>> ENERGIZER_TILE = TILES.register("energizer", () -> TileEntityType.Builder.create(TileEntityEnergizer::new, ActuallyBlocks.blockEnergizer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityEnervator>> ENERVATOR_TILE = TILES.register("enervator", () -> TileEntityType.Builder.create(TileEntityEnervator::new, ActuallyBlocks.blockEnervator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityXPSolidifier>> XPSOLIDIFIER_TILE = TILES.register("xpSolidifier", () -> TileEntityType.Builder.create(TileEntityXPSolidifier::new, ActuallyBlocks.blockXPSolidifier.get()).build(null));
|
||||
// public static final RegistryObject<.<?>> SMILEYCLOUD_TILE = TILES.register("", () -> TileEntityType.Builder.create(TileEntitySmileyCloud::new, InitBlocks.blockSmileyCloud.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLeafGenerator>> LEAFGENERATOR_TILE = TILES.register("leafGenerator", () -> TileEntityType.Builder.create(TileEntityLeafGenerator::new, InitBlocks.blockLeafGenerator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDirectionalBreaker>> DIRECTIONALBREAKER_TILE = TILES.register("directionalBreaker", () -> TileEntityType.Builder.create(TileEntityDirectionalBreaker::new, InitBlocks.blockDirectionalBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityRangedCollector>> RANGEDCOLLECTOR_TILE = TILES.register("rangedCollector", () -> TileEntityType.Builder.create(TileEntityRangedCollector::new, InitBlocks.blockRangedCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityAtomicReconstructor>> ATOMICRECONSTRUCTOR_TILE = TILES.register("reconstructor", () -> TileEntityType.Builder.create(TileEntityAtomicReconstructor::new, InitBlocks.blockAtomicReconstructor.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityMiner>> MINER_TILE = TILES.register("miner", () -> TileEntityType.Builder.create(TileEntityMiner::new, InitBlocks.blockMiner.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFireworkBox>> FIREWORKBOX_TILE = TILES.register("fireworkBox", () -> TileEntityType.Builder.create(TileEntityFireworkBox::new, InitBlocks.blockFireworkBox.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomRedstoneface>> PHANTOMREDSTONEFACE_TILE = TILES.register("redstoneface", () -> TileEntityType.Builder.create(TileEntityPhantomRedstoneface::new, InitBlocks.blockPhantomRedstoneface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayItem>> LASERRELAYITEM_TILE = TILES.register("laserRelayItem", () -> TileEntityType.Builder.create(TileEntityLaserRelayItem::new, InitBlocks.blockLaserRelayItem.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayEnergy>> LASERRELAYENERGY_TILE = TILES.register("laserRelay", () -> TileEntityType.Builder.create(TileEntityLaserRelayEnergy::new, InitBlocks.blockLaserRelay.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayEnergyAdvanced>> LASERRELAYENERGYADVANCED_TILE = TILES.register("laserRelayAdvanced", () -> TileEntityType.Builder.create(TileEntityLaserRelayEnergyAdvanced::new, InitBlocks.blockLaserRelayAdvanced.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayEnergyExtreme>> LASERRELAYENERGYEXTREME_TILE = TILES.register("laserRelayExtreme", () -> TileEntityType.Builder.create(TileEntityLaserRelayEnergyExtreme::new, InitBlocks.blockLaserRelayExtreme.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayItemWhitelist>> LASERRELAYITEMWHITELIST_TILE = TILES.register("laserRelayItemWhitelist", () -> TileEntityType.Builder.create(TileEntityLaserRelayItemWhitelist::new, InitBlocks.blockLaserRelayItemWhitelist.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityItemViewer>> ITEMVIEWER_TILE = TILES.register("itemViewer", () -> TileEntityType.Builder.create(TileEntityItemViewer::new, InitBlocks.blockItemViewer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDisplayStand>> DISPLAYSTAND_TILE = TILES.register("displayStand", () -> TileEntityType.Builder.create(TileEntityDisplayStand::new, InitBlocks.blockDisplayStand.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityShockSuppressor>> SHOCKSUPPRESSOR_TILE = TILES.register("shockSuppressor", () -> TileEntityType.Builder.create(TileEntityShockSuppressor::new, InitBlocks.blockShockSuppressor.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityEmpowerer>> EMPOWERER_TILE = TILES.register("empowerer", () -> TileEntityType.Builder.create(TileEntityEmpowerer::new, InitBlocks.blockEmpowerer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayFluids>> LASERRELAYFLUIDS_TILE = TILES.register("laserRelayFluids", () -> TileEntityType.Builder.create(TileEntityLaserRelayFluids::new, InitBlocks.blockLaserRelayFluids.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBioReactor>> BIOREACTOR_TILE = TILES.register("bioReactor", () -> TileEntityType.Builder.create(TileEntityBioReactor::new, InitBlocks.blockBioReactor.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFarmer>> FARMER_TILE = TILES.register("farmer", () -> TileEntityType.Builder.create(TileEntityFarmer::new, InitBlocks.blockFarmer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityItemViewerHopping>> ITEMVIEWERHOPPING_TILE = TILES.register("itemViewerHopping", () -> TileEntityType.Builder.create(TileEntityItemViewerHopping::new, InitBlocks.blockItemViewer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBatteryBox>> BATTERYBOX_TILE = TILES.register("batteryBox", () -> TileEntityType.Builder.create(TileEntityBatteryBox::new, InitBlocks.blockBatteryBox.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLeafGenerator>> LEAFGENERATOR_TILE = TILES.register("leafGenerator", () -> TileEntityType.Builder.create(TileEntityLeafGenerator::new, ActuallyBlocks.blockLeafGenerator.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDirectionalBreaker>> DIRECTIONALBREAKER_TILE = TILES.register("directionalBreaker", () -> TileEntityType.Builder.create(TileEntityDirectionalBreaker::new, ActuallyBlocks.blockDirectionalBreaker.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityRangedCollector>> RANGEDCOLLECTOR_TILE = TILES.register("rangedCollector", () -> TileEntityType.Builder.create(TileEntityRangedCollector::new, ActuallyBlocks.blockRangedCollector.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityAtomicReconstructor>> ATOMICRECONSTRUCTOR_TILE = TILES.register("reconstructor", () -> TileEntityType.Builder.create(TileEntityAtomicReconstructor::new, ActuallyBlocks.blockAtomicReconstructor.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityMiner>> MINER_TILE = TILES.register("miner", () -> TileEntityType.Builder.create(TileEntityMiner::new, ActuallyBlocks.blockMiner.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFireworkBox>> FIREWORKBOX_TILE = TILES.register("fireworkBox", () -> TileEntityType.Builder.create(TileEntityFireworkBox::new, ActuallyBlocks.blockFireworkBox.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityPhantomRedstoneface>> PHANTOMREDSTONEFACE_TILE = TILES.register("redstoneface", () -> TileEntityType.Builder.create(TileEntityPhantomRedstoneface::new, ActuallyBlocks.blockPhantomRedstoneface.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayItem>> LASERRELAYITEM_TILE = TILES.register("laserRelayItem", () -> TileEntityType.Builder.create(TileEntityLaserRelayItem::new, ActuallyBlocks.blockLaserRelayItem.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayEnergy>> LASERRELAYENERGY_TILE = TILES.register("laserRelay", () -> TileEntityType.Builder.create(TileEntityLaserRelayEnergy::new, ActuallyBlocks.blockLaserRelay.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayEnergyAdvanced>> LASERRELAYENERGYADVANCED_TILE = TILES.register("laserRelayAdvanced", () -> TileEntityType.Builder.create(TileEntityLaserRelayEnergyAdvanced::new, ActuallyBlocks.blockLaserRelayAdvanced.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayEnergyExtreme>> LASERRELAYENERGYEXTREME_TILE = TILES.register("laserRelayExtreme", () -> TileEntityType.Builder.create(TileEntityLaserRelayEnergyExtreme::new, ActuallyBlocks.blockLaserRelayExtreme.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayItemWhitelist>> LASERRELAYITEMWHITELIST_TILE = TILES.register("laserRelayItemWhitelist", () -> TileEntityType.Builder.create(TileEntityLaserRelayItemWhitelist::new, ActuallyBlocks.blockLaserRelayItemWhitelist.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityItemViewer>> ITEMVIEWER_TILE = TILES.register("itemViewer", () -> TileEntityType.Builder.create(TileEntityItemViewer::new, ActuallyBlocks.blockItemViewer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityDisplayStand>> DISPLAYSTAND_TILE = TILES.register("displayStand", () -> TileEntityType.Builder.create(TileEntityDisplayStand::new, ActuallyBlocks.blockDisplayStand.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityShockSuppressor>> SHOCKSUPPRESSOR_TILE = TILES.register("shockSuppressor", () -> TileEntityType.Builder.create(TileEntityShockSuppressor::new, ActuallyBlocks.blockShockSuppressor.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityEmpowerer>> EMPOWERER_TILE = TILES.register("empowerer", () -> TileEntityType.Builder.create(TileEntityEmpowerer::new, ActuallyBlocks.blockEmpowerer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityLaserRelayFluids>> LASERRELAYFLUIDS_TILE = TILES.register("laserRelayFluids", () -> TileEntityType.Builder.create(TileEntityLaserRelayFluids::new, ActuallyBlocks.blockLaserRelayFluids.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBioReactor>> BIOREACTOR_TILE = TILES.register("bioReactor", () -> TileEntityType.Builder.create(TileEntityBioReactor::new, ActuallyBlocks.blockBioReactor.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityFarmer>> FARMER_TILE = TILES.register("farmer", () -> TileEntityType.Builder.create(TileEntityFarmer::new, ActuallyBlocks.blockFarmer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityItemViewerHopping>> ITEMVIEWERHOPPING_TILE = TILES.register("itemViewerHopping", () -> TileEntityType.Builder.create(TileEntityItemViewerHopping::new, ActuallyBlocks.blockItemViewer.get()).build(null));
|
||||
public static final RegistryObject<TileEntityType<TileEntityBatteryBox>> BATTERYBOX_TILE = TILES.register("batteryBox", () -> TileEntityType.Builder.create(TileEntityBatteryBox::new, ActuallyBlocks.blockBatteryBox.get()).build(null));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.ILensItem;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
|
@ -96,7 +96,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
|||
|
||||
if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) {
|
||||
this.oldEnergy = this.storage.getEnergyStored();
|
||||
this.world.updateComparatorOutputLevel(this.pos, InitBlocks.blockAtomicReconstructor.get());
|
||||
this.world.updateComparatorOutputLevel(this.pos, ActuallyBlocks.blockAtomicReconstructor.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
/*
|
||||
* This file ("TileEntityFishingNet.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.LootContext;
|
||||
import net.minecraft.loot.LootParameterSets;
|
||||
import net.minecraft.loot.LootTables;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TileEntityFishingNet extends TileEntityBase {
|
||||
|
||||
public int timeUntilNextDrop;
|
||||
|
||||
public TileEntityFishingNet() {
|
||||
super(ActuallyTiles.FISHINGNET_TILE.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncableNBT(CompoundNBT compound, NBTType type) {
|
||||
super.writeSyncableNBT(compound, type);
|
||||
if (type != NBTType.SAVE_BLOCK) {
|
||||
compound.putInt("TimeUntilNextDrop", this.timeUntilNextDrop);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSyncableNBT(CompoundNBT compound, NBTType type) {
|
||||
super.readSyncableNBT(compound, type);
|
||||
if (type != NBTType.SAVE_BLOCK) {
|
||||
this.timeUntilNextDrop = compound.getInt("TimeUntilNextDrop");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if (!this.world.isRemote) {
|
||||
if (!this.isRedstonePowered) {
|
||||
if (this.world.getBlockState(this.pos.down()).getMaterial() == Material.WATER) {
|
||||
if (this.timeUntilNextDrop > 0) {
|
||||
this.timeUntilNextDrop--;
|
||||
if (this.timeUntilNextDrop <= 0) {
|
||||
// TODO: [port] come back to this as the loot table may be wrong
|
||||
LootContext.Builder builder = new LootContext.Builder((ServerWorld) this.world);
|
||||
List<ItemStack> fishables = this.world.getServer().getLootTableManager().getLootTableFromLocation(LootTables.GAMEPLAY_FISHING).generate(builder.build(LootParameterSets.FISHING));
|
||||
for (ItemStack fishable : fishables) {
|
||||
ItemStack leftover = this.storeInContainer(fishable);
|
||||
if (StackUtil.isValid(leftover)) {
|
||||
ItemEntity item = new ItemEntity(this.world, this.pos.getX() + 0.5, this.pos.getY() + 0.5, this.pos.getZ() + 0.5, leftover.copy());
|
||||
item.lifespan = 2000;
|
||||
this.world.addEntity(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int time = 15000;
|
||||
this.timeUntilNextDrop = time + this.world.rand.nextInt(time / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ItemStack storeInContainer(ItemStack stack) {
|
||||
for (Direction side : Direction.values()) {
|
||||
TileEntity tile = this.tilesAround[side.ordinal()];
|
||||
if (tile != null) {
|
||||
// TODO: [port] come back and make sure this works
|
||||
ItemStack copyStack = stack.copy();
|
||||
stack = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side.getOpposite()).map(cap -> {
|
||||
ItemStack localStack = ItemStack.EMPTY;
|
||||
for (int i = 0; i < cap.getSlots(); i++) {
|
||||
localStack = cap.insertItem(i, copyStack, false);
|
||||
|
||||
if (!StackUtil.isValid(localStack)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
return localStack;
|
||||
}).orElse(ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSaveDataOnChangeOrWorldStart() {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
/*
|
||||
* This file ("TileEntityItemRepairer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TileEntityItemRepairer extends TileEntityInventoryBase {
|
||||
|
||||
public static final int SLOT_INPUT = 0;
|
||||
public static final int SLOT_OUTPUT = 1;
|
||||
public static final int ENERGY_USE = 2500;
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(300000, 6000, 0);
|
||||
public final LazyOptional<IEnergyStorage> lazyEnergy = LazyOptional.of(() -> this.storage);
|
||||
|
||||
public int nextRepairTick;
|
||||
private int lastEnergy;
|
||||
|
||||
public TileEntityItemRepairer() {
|
||||
super(ActuallyTiles.ITEMREPAIRER_TILE.get(), 2);
|
||||
}
|
||||
|
||||
public static boolean canBeRepaired(ItemStack stack) {
|
||||
if (StackUtil.isValid(stack)) {
|
||||
Item item = stack.getItem();
|
||||
if (item != null) {
|
||||
if (item.isRepairable(stack) && item.getMaxDamage(stack) > 0) {
|
||||
return true;
|
||||
} else {
|
||||
String reg = item.getRegistryName().toString();
|
||||
if (reg != null) {
|
||||
for (String strg : ConfigStringListValues.REPAIRER_EXTRA_WHITELIST.getValue()) {
|
||||
if (reg.equals(strg)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncableNBT(CompoundNBT compound, NBTType type) {
|
||||
if (type != NBTType.SAVE_BLOCK) {
|
||||
compound.putInt("NextRepairTick", this.nextRepairTick);
|
||||
}
|
||||
super.writeSyncableNBT(compound, type);
|
||||
this.storage.writeToNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSyncableNBT(CompoundNBT compound, NBTType type) {
|
||||
if (type != NBTType.SAVE_BLOCK) {
|
||||
this.nextRepairTick = compound.getInt("NextRepairTick");
|
||||
}
|
||||
super.readSyncableNBT(compound, type);
|
||||
this.storage.readFromNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
if (!this.world.isRemote) {
|
||||
ItemStack input = this.inv.getStackInSlot(SLOT_INPUT);
|
||||
if (!StackUtil.isValid(this.inv.getStackInSlot(SLOT_OUTPUT)) && canBeRepaired(input)) {
|
||||
if (input.getDamage() <= 0) {
|
||||
this.inv.setStackInSlot(SLOT_OUTPUT, input.copy());
|
||||
this.inv.setStackInSlot(SLOT_INPUT, StackUtil.getEmpty());
|
||||
this.nextRepairTick = 0;
|
||||
} else {
|
||||
if (this.storage.getEnergyStored() >= ENERGY_USE) {
|
||||
this.nextRepairTick++;
|
||||
this.storage.extractEnergyInternal(ENERGY_USE, false);
|
||||
if (this.nextRepairTick >= 4) {
|
||||
this.nextRepairTick = 0;
|
||||
input.setDamage(input.getDamage() - 1);
|
||||
|
||||
// TODO: [port] validate this is still needed
|
||||
if (input.hasTag()) {
|
||||
//TiCon un-break tools
|
||||
if ("tconstruct".equalsIgnoreCase(input.getItem().getRegistryName().getNamespace())) {
|
||||
CompoundNBT stats = input.getOrCreateTag().getCompound("Stats");
|
||||
stats.remove("Broken");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.nextRepairTick = 0;
|
||||
}
|
||||
|
||||
if (this.lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) {
|
||||
this.lastEnergy = this.storage.getEnergyStored();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getEnergyScaled(int i) {
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
public int getItemDamageToScale(int i) {
|
||||
if (StackUtil.isValid(this.inv.getStackInSlot(SLOT_INPUT))) {
|
||||
return (this.inv.getStackInSlot(SLOT_INPUT).getMaxDamage() - this.inv.getStackInSlot(SLOT_INPUT).getDamage()) * i / this.inv.getStackInSlot(SLOT_INPUT).getMaxDamage();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LazyOptional<IEnergyStorage> getEnergyStorage(Direction facing) {
|
||||
return this.lazyEnergy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAcceptor getAcceptor() {
|
||||
return (slot, stack, automation) -> !isBlacklisted(stack) && (!automation || slot == SLOT_INPUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRemover getRemover() {
|
||||
return (slot, automation) -> !automation || slot == SLOT_OUTPUT;
|
||||
}
|
||||
|
||||
private static final List<Pair<Item, Integer>> BLACKLIST = new ArrayList<>();
|
||||
|
||||
private static boolean runOnce = false;
|
||||
|
||||
// TODO: [port] fix this.
|
||||
public static boolean isBlacklisted(ItemStack stack) {
|
||||
if (!runOnce) {
|
||||
runOnce = true;
|
||||
for (String s : ConfigStringListValues.REPAIR_BLACKLIST.getValue()) {
|
||||
String[] split = s.split("@");
|
||||
Item item = ForgeRegistries.ITEMS.getValue(new ResourceLocation(split[0]));
|
||||
if (item == null) {
|
||||
ActuallyAdditions.LOGGER.error("Invalid item in repair blacklist: " + s);
|
||||
continue;
|
||||
}
|
||||
if (split.length == 1) {
|
||||
BLACKLIST.add(Pair.of(item, 0));
|
||||
} else if (split.length == 2) {
|
||||
BLACKLIST.add(Pair.of(item, Integer.parseInt(split[1])));
|
||||
}
|
||||
}
|
||||
}
|
||||
return false; //BLACKLIST.contains(stack.getItem());
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -80,7 +80,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
|
|||
BlockPos thisPos = this.pos;
|
||||
BlockPos[] positions = new BlockPos[]{thisPos.add(1, 1, 0), thisPos.add(-1, 1, 0), thisPos.add(0, 1, 1), thisPos.add(0, 1, -1)};
|
||||
|
||||
if (this.world != null && WorldUtil.hasBlocksInPlacesGiven(positions, InitBlocks.blockLavaCasing.get(), this.world)) {
|
||||
if (this.world != null && WorldUtil.hasBlocksInPlacesGiven(positions, ActuallyBlocks.blockLavaCasing.get(), this.world)) {
|
||||
BlockPos pos = thisPos.up();
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
@ -49,7 +49,7 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl
|
|||
int newRange = defaultRange;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Block block = world.getBlockState(pos.up(1 + i)).getBlock();
|
||||
if (block == InitBlocks.blockPhantomBooster.get()) {
|
||||
if (block == ActuallyBlocks.blockPhantomBooster.get()) {
|
||||
newRange = newRange * 2;
|
||||
} else {
|
||||
break;
|
||||
|
|
|
@ -10,22 +10,27 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.util;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient;
|
||||
import de.ellpeck.actuallyadditions.mod.particle.ParticleBeam;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GlStateManager.DestFactor;
|
||||
import net.minecraft.client.renderer.GlStateManager.SourceFactor;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
@ -37,6 +42,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
@ -69,21 +75,15 @@ public final class AssetUtil {
|
|||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static void renderBlockInWorld(Block block, int meta) {
|
||||
renderItemInWorld(new ItemStack(block, 1, meta));
|
||||
renderItemInWorld(new ItemStack(block, 1, meta), combinedLightIn, combinedOverlayIn, matrices, buffer);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static void renderItemInWorld(ItemStack stack) {
|
||||
public static void renderItemInWorld(ItemStack stack, int combinedLight, int combinedOverlay, MatrixStack matrices, IRenderTypeBuffer buffer) {
|
||||
if (StackUtil.isValid(stack)) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.pushAttrib();
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
Minecraft.getInstance().getRenderItem().renderItem(stack, TransformType.FIXED);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GlStateManager.popAttrib();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.popMatrix();
|
||||
Minecraft.getInstance().getItemRenderer().renderItem(
|
||||
stack, ItemCameraTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
package de.ellpeck.actuallyadditions.mod.util;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraftforge.fml.ForgeI18n;
|
||||
|
||||
public class Help {
|
||||
public static TranslationTextComponent Trans(String prefix, String suffix, Object... args) {
|
||||
return new TranslationTextComponent(String.format("%s.%s.%s", prefix, ActuallyAdditions.MODID, suffix));
|
||||
}
|
||||
|
||||
public static String TransI18n(String prefix, String suffix, Object... args) {
|
||||
return ForgeI18n.parseFormat(String.format("%s.%s.%s", prefix, ActuallyAdditions.MODID, suffix), args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package de.ellpeck.actuallyadditions.mod.util;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import net.minecraftforge.fml.ForgeI18n;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
|
||||
public class Lang {
|
||||
public static TranslationTextComponent trans(String prefix, String suffix, Object... args) {
|
||||
return new TranslationTextComponent(String.format("%s.%s.%s", prefix, ActuallyAdditions.MODID, suffix));
|
||||
}
|
||||
|
||||
public static String transI18n(String prefix, String suffix, Object... args) {
|
||||
return ForgeI18n.parseFormat(String.format("%s.%s.%s", prefix, ActuallyAdditions.MODID, suffix), args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up any values into either a short variant {1M / 1M} or a long variant
|
||||
* like {1,000,000 / 1,000,000}
|
||||
*
|
||||
* @return a cleaned and formatting version of any energy values.
|
||||
*/
|
||||
public static String cleanEnergyValues(int energy, int maxEnergy, boolean small) {
|
||||
String cleanEnergy, cleanMaxEnergy;
|
||||
|
||||
if (small) {
|
||||
cleanEnergy = humanReadableValue(energy);
|
||||
cleanMaxEnergy = humanReadableValue(maxEnergy);
|
||||
} else {
|
||||
NumberFormat format = NumberFormat.getInstance();
|
||||
cleanEnergy = format.format(energy);
|
||||
cleanMaxEnergy = format.format(maxEnergy);
|
||||
}
|
||||
|
||||
return String.format("%s / %s", cleanEnergy, cleanMaxEnergy);
|
||||
}
|
||||
|
||||
public static String cleanEnergyValues(IEnergyStorage energy, boolean small) {
|
||||
return cleanEnergyValues(energy.getEnergyStored(), energy.getMaxEnergyStored(), small);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pretty values, turns numbers like 100000000 into 100M
|
||||
*
|
||||
* @param value value you need prettified
|
||||
*
|
||||
* @return a pretty string
|
||||
*/
|
||||
public static String humanReadableValue(int value) {
|
||||
if (value < 1000) {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
int exp = (int) (Math.log(value) / Math.log(1000));
|
||||
return String.format(
|
||||
"%,d%c",
|
||||
(int) (value / Math.pow(1000, exp)),
|
||||
"KMGTPE_____".charAt(exp - 1)
|
||||
);
|
||||
}
|
||||
}
|
1116
src/main/resources/assets/actuallyadditions/lang/en_us.json
Normal file
1116
src/main/resources/assets/actuallyadditions/lang/en_us.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue