diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 26b623ba7..d4bb8d942 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -15,7 +15,10 @@ import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; -import de.ellpeck.actuallyadditions.mod.util.*; +import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.BlockPistonBase; import net.minecraft.block.SoundType; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java index a2f76b152..c7633dc74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java @@ -58,9 +58,12 @@ public class BlockGiantChest extends BlockContainerBase{ @Override public TileEntity createNewTileEntity(World world, int par2){ switch(this.type){ - case 1: return new TileEntityGiantChestMedium(); - case 2: return new TileEntityGiantChestLarge(); - default: return new TileEntityGiantChest(); + case 1: + return new TileEntityGiantChestMedium(); + case 2: + return new TileEntityGiantChestLarge(); + default: + return new TileEntityGiantChest(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 775934de5..248f39a8c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -13,10 +13,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.TileEntityLaserRelay; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemWhitelist; +import de.ellpeck.actuallyadditions.mod.tile.*; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -135,13 +132,19 @@ public class BlockLaserRelay extends BlockContainerBase{ return new TileEntityLaserRelayItem(); case ITEM_WHITELIST: return new TileEntityLaserRelayItemWhitelist(); + case ENERGY_ADVANCED: + return new TileEntityLaserRelayEnergyAdvanced(); + case ENERGY_EXTREME: + return new TileEntityLaserRelayEnergyExtreme(); default: return new TileEntityLaserRelayEnergy(); } } public enum Type{ - ENERGY, + ENERGY_BASIC, + ENERGY_ADVANCED, + ENERGY_EXTREME, ITEM, ITEM_WHITELIST } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java index 2985b692c..a40b9613e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java @@ -10,19 +10,33 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.profiler.Profiler; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; -public class BlockPlayerInterface extends BlockContainerBase{ +public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay{ public BlockPlayerInterface(String name){ super(Material.ROCK, name); @@ -49,10 +63,26 @@ public class BlockPlayerInterface extends BlockContainerBase{ TileEntityPlayerInterface face = (TileEntityPlayerInterface)tile; if(face.connectedPlayer == null){ face.connectedPlayer = player.getUniqueID(); + face.playerName = player.getName(); face.markDirty(); + face.sendUpdate(); } } super.onBlockPlacedBy(world, pos, state, player, stack); } + + @Override + @SideOnly(Side.CLIENT) + public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, RayTraceResult posHit, Profiler profiler, ScaledResolution resolution){ + TileEntity tile = minecraft.theWorld.getTileEntity(posHit.getBlockPos()); + if(tile != null){ + if(tile instanceof TileEntityPlayerInterface){ + TileEntityPlayerInterface face = (TileEntityPlayerInterface)tile; + String name = face.playerName == null ? "Unknown" : face.playerName; + minecraft.fontRendererObj.drawStringWithShadow("Bound to: "+TextFormatting.RED+name, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, StringUtil.DECIMAL_COLOR_WHITE); + minecraft.fontRendererObj.drawStringWithShadow("UUID: "+TextFormatting.DARK_GREEN+face.connectedPlayer, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+15, StringUtil.DECIMAL_COLOR_WHITE); + } + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java index ced0857cb..518cc57e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java @@ -12,10 +12,8 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor; -import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java new file mode 100644 index 000000000..e1814226c --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java @@ -0,0 +1,272 @@ +/* + * This file ("BlockTinyTorch.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-2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.blocks; + +import com.google.common.base.Predicate; +import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; +import net.minecraft.block.Block; +import net.minecraft.block.BlockTorch; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nullable; +import java.util.Random; + +//Copied from BlockTorch. +//I have no idea what all of this means. +public class BlockTinyTorch extends BlockBase{ + + //Thanks to xdjackiexd for these. + //Man, I hate numbers. + private static final AxisAlignedBB STANDING_AABB = new AxisAlignedBB(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.3125D, 0.5625D); + private static final AxisAlignedBB TORCH_NORTH_AABB = new AxisAlignedBB(0.4375D, 0.25D, 0.8125D, 0.5625D, 0.5625D, 1.0D); + private static final AxisAlignedBB TORCH_SOUTH_AABB = new AxisAlignedBB(0.4375D, 0.25D, 0.0D, 0.5625D, 0.5625D, 0.1875D); + private static final AxisAlignedBB TORCH_WEST_AABB = new AxisAlignedBB(0.8125D, 0.25D, 0.4375D, 1.0D, 0.5625D, 0.5625D); + private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); + + public BlockTinyTorch(String name){ + super(Material.CIRCUITS, name); + this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, EnumFacing.UP)); + this.setTickRandomly(true); + this.setCreativeTab(CreativeTabs.DECORATIONS); + + this.setHardness(0.0F); + this.setLightLevel(0.67F); + this.setSoundType(SoundType.WOOD); + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ + switch(state.getValue(BlockTorch.FACING)){ + case EAST: + return TORCH_EAST_AABB; + case WEST: + return TORCH_WEST_AABB; + case SOUTH: + return TORCH_SOUTH_AABB; + case NORTH: + return TORCH_NORTH_AABB; + default: + return STANDING_AABB; + } + } + + @Override + @Nullable + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos){ + return NULL_AABB; + } + + @Override + public boolean isOpaqueCube(IBlockState state){ + return false; + } + + @Override + public boolean isFullCube(IBlockState state){ + return false; + } + + private boolean canPlaceOn(World worldIn, BlockPos pos){ + IBlockState state = worldIn.getBlockState(pos); + return state.isSideSolid(worldIn, pos, EnumFacing.UP) || state.getBlock().canPlaceTorchOnTop(state, worldIn, pos); + } + + @Override + public boolean canPlaceBlockAt(World worldIn, BlockPos pos){ + for(EnumFacing enumfacing : BlockTorch.FACING.getAllowedValues()){ + if(this.canPlaceAt(worldIn, pos, enumfacing)){ + return true; + } + } + + return false; + } + + private boolean canPlaceAt(World worldIn, BlockPos pos, EnumFacing facing){ + BlockPos blockpos = pos.offset(facing.getOpposite()); + boolean flag = facing.getAxis().isHorizontal(); + return flag && worldIn.isSideSolid(blockpos, facing, true) || facing.equals(EnumFacing.UP) && this.canPlaceOn(worldIn, blockpos); + } + + @Override + public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer){ + if(this.canPlaceAt(worldIn, pos, facing)){ + return this.getDefaultState().withProperty(BlockTorch.FACING, facing); + } + else{ + for(EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL){ + if(worldIn.isSideSolid(pos.offset(enumfacing.getOpposite()), enumfacing, true)){ + return this.getDefaultState().withProperty(BlockTorch.FACING, enumfacing); + } + } + + return this.getDefaultState(); + } + } + + @Override + public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state){ + this.checkForDrop(worldIn, pos, state); + } + + @Override + public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){ + this.onNeighborChangeInternal(worldIn, pos, state); + } + + protected boolean onNeighborChangeInternal(World worldIn, BlockPos pos, IBlockState state){ + if(!this.checkForDrop(worldIn, pos, state)){ + return true; + } + else{ + EnumFacing enumfacing = state.getValue(BlockTorch.FACING); + EnumFacing.Axis axis = enumfacing.getAxis(); + EnumFacing enumfacing1 = enumfacing.getOpposite(); + boolean flag = false; + + if(axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing, true)){ + flag = true; + } + else if(axis.isVertical() && !this.canPlaceOn(worldIn, pos.offset(enumfacing1))){ + flag = true; + } + + if(flag){ + this.dropBlockAsItem(worldIn, pos, state, 0); + worldIn.setBlockToAir(pos); + return true; + } + else{ + return false; + } + } + } + + protected boolean checkForDrop(World worldIn, BlockPos pos, IBlockState state){ + if(state.getBlock() == this && this.canPlaceAt(worldIn, pos, state.getValue(BlockTorch.FACING))){ + return true; + } + else{ + if(worldIn.getBlockState(pos).getBlock() == this){ + this.dropBlockAsItem(worldIn, pos, state, 0); + worldIn.setBlockToAir(pos); + } + + return false; + } + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand){ + if(rand.nextBoolean()){ + EnumFacing enumfacing = stateIn.getValue(BlockTorch.FACING); + double d0 = (double)pos.getX()+0.5D; + double d1 = (double)pos.getY()+0.4D; + double d2 = (double)pos.getZ()+0.5D; + + if(enumfacing.getAxis().isHorizontal()){ + EnumFacing enumfacing1 = enumfacing.getOpposite(); + worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0+0.35D*(double)enumfacing1.getFrontOffsetX(), d1+0.22D, d2+0.35D*(double)enumfacing1.getFrontOffsetZ(), 0.0D, 0.0D, 0.0D, new int[0]); + worldIn.spawnParticle(EnumParticleTypes.FLAME, d0+0.35D*(double)enumfacing1.getFrontOffsetX(), d1+0.22D, d2+0.35D*(double)enumfacing1.getFrontOffsetZ(), 0.0D, 0.0D, 0.0D, new int[0]); + } + else{ + worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); + worldIn.spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public IBlockState getStateFromMeta(int meta){ + IBlockState iblockstate = this.getDefaultState(); + + switch(meta){ + case 1: + iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.EAST); + break; + case 2: + iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.WEST); + break; + case 3: + iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.SOUTH); + break; + case 4: + iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.NORTH); + break; + case 5: + default: + iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.UP); + } + + return iblockstate; + } + + @Override + @SideOnly(Side.CLIENT) + public BlockRenderLayer getBlockLayer(){ + return BlockRenderLayer.CUTOUT; + } + + @Override + public int getMetaFromState(IBlockState state){ + int i = 0; + + switch(state.getValue(BlockTorch.FACING)){ + case EAST: + i = i | 1; + break; + case WEST: + i = i | 2; + break; + case SOUTH: + i = i | 3; + break; + case NORTH: + i = i | 4; + break; + case DOWN: + case UP: + default: + i = i | 5; + } + + return i; + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot){ + return state.withProperty(BlockTorch.FACING, rot.rotate(state.getValue(BlockTorch.FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirrorIn){ + return state.withRotation(mirrorIn.toRotation(state.getValue(BlockTorch.FACING))); + } + + @Override + protected BlockStateContainer createBlockState(){ + return new BlockStateContainer(this, BlockTorch.FACING); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java index f8661ff8a..3eb07618c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/InitBlocks.java @@ -10,6 +10,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; +import de.ellpeck.actuallyadditions.mod.blocks.BlockLaserRelay.Type; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockStair; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; @@ -95,6 +96,8 @@ public final class InitBlocks{ public static Block blockRangedCollector; public static Block blockLaserRelay; + public static Block blockLaserRelayAdvanced; + public static Block blockLaserRelayExtreme; public static Block blockLaserRelayItem; public static Block blockLaserRelayItemWhitelist; public static Block blockItemViewer; @@ -121,9 +124,12 @@ public final class InitBlocks{ public static Block blockDisplayStand; public static Block blockShockSuppressor; + public static Block blockTinyTorch; + public static void init(){ ModUtil.LOGGER.info("Initializing Blocks..."); + blockTinyTorch = new BlockTinyTorch("blockTinyTorch"); blockShockSuppressor = new BlockShockSuppressor("blockShockSuppressor"); blockDisplayStand = new BlockDisplayStand("blockDisplayStand"); blockPlayerInterface = new BlockPlayerInterface("blockPlayerInterface"); @@ -134,9 +140,11 @@ public final class InitBlocks{ blockAtomicReconstructor = new BlockAtomicReconstructor("blockAtomicReconstructor"); blockCrystal = new BlockCrystal("blockCrystal"); blockBlackLotus = new BlockBlackLotus("blockBlackLotus"); - blockLaserRelay = new BlockLaserRelay("blockLaserRelay", BlockLaserRelay.Type.ENERGY); - blockLaserRelayItem = new BlockLaserRelay("blockLaserRelayItem", BlockLaserRelay.Type.ITEM); - blockLaserRelayItemWhitelist = new BlockLaserRelay("blockLaserRelayItemWhitelist", BlockLaserRelay.Type.ITEM_WHITELIST); + blockLaserRelay = new BlockLaserRelay("blockLaserRelay", Type.ENERGY_BASIC); + blockLaserRelayAdvanced = new BlockLaserRelay("blockLaserRelayAdvanced", Type.ENERGY_ADVANCED); + blockLaserRelayExtreme = new BlockLaserRelay("blockLaserRelayExtreme", Type.ENERGY_EXTREME); + blockLaserRelayItem = new BlockLaserRelay("blockLaserRelayItem", Type.ITEM); + blockLaserRelayItemWhitelist = new BlockLaserRelay("blockLaserRelayItemWhitelist", Type.ITEM_WHITELIST); blockRangedCollector = new BlockRangedCollector("blockRangedCollector"); blockDirectionalBreaker = new BlockDirectionalBreaker("blockDirectionalBreaker"); blockLeafGenerator = new BlockLeafGenerator("blockLeafGenerator"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index 12d081624..1b57798fc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -229,12 +229,20 @@ public final class BookletUtils{ } private static boolean getChapterStacksContainString(String text, IBookletChapter chapter){ + Minecraft mc = Minecraft.getMinecraft(); for(BookletPage page : chapter.getPages()){ ItemStack[] pageStacks = page.getItemStacksForPage(); if(pageStacks != null){ for(ItemStack stack : pageStacks){ - if(stack != null && stack.getDisplayName().toLowerCase(Locale.ROOT).contains(text)){ - return true; + if(stack != null && stack.getItem() != null){ + List list = stack.getTooltip(mc.thePlayer, mc.gameSettings.advancedItemTooltips); + for(String s : list){ + if(s != null && !s.isEmpty()){ + if(s.toLowerCase(Locale.ROOT).contains(text)){ + return true; + } + } + } } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 9a04aae48..41055f70f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -91,10 +91,10 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ public GuiButton buttonViewOnline; public GuiTextField searchField; public boolean shouldSaveDataNextClose; + public String bookletName; private int ticksElapsed; private boolean mousePressed; private int hisNameIsAt; - public String bookletName; public GuiBooklet(GuiScreen parentScreen, boolean tryOpenMainPage, boolean saveOnClose){ this.xSize = 146; @@ -405,15 +405,17 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{ BookletUtils.openLastBookPage(this, data.theCompound.getCompoundTag("BookletData")); } } + this.shouldSaveDataNextClose = false; } else{ //Open forced entry BookletUtils.openIndexEntry(this, ItemBooklet.forcedEntry.entry, ItemBooklet.forcedEntry.pageInIndex, true); BookletUtils.openChapter(this, ItemBooklet.forcedEntry.chapter, ItemBooklet.forcedEntry.page); ItemBooklet.forcedEntry = null; + + this.shouldSaveDataNextClose = true; } - this.shouldSaveDataNextClose = false; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java index c5513f546..4750162a9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBookletStand.java @@ -24,9 +24,8 @@ import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiBookletStand extends GuiBooklet{ - private GuiButton buttonSetPage; - private final TileEntityBookletStand theStand; + private GuiButton buttonSetPage; public GuiBookletStand(TileEntityBase theStand){ super(null, false, false); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 60bc5274f..604405ffa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -88,6 +88,7 @@ public final class InitBooklet{ new BookletChapter("hairBalls", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemHairyBall), new PagePicture(1, "pageFurBalls", 110).setStacks(new ItemStack(InitItems.itemHairyBall)), new PageTextOnly(2)).setSpecial(); new BookletChapter("blackLotus", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBlackLotus), new PageTextOnly(1).setStacks(new ItemStack(InitBlocks.blockBlackLotus)), new PageCrafting(2, ItemCrafting.recipeBlackDye)); new BookletChapter("waterBowl", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWaterBowl), new PageTextOnly(1).setStacks(new ItemStack(InitItems.itemWaterBowl))); + new BookletChapter("tinyTorch", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTinyTorch), new PageCrafting(1, BlockCrafting.recipesTinyTorch).setPageStacksWildcard()).setSpecial(); //No RF Using Blocks new BookletChapter("itemStorage", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeLaserRelayItem).setNoText().setPageStacksWildcard(), new PageCrafting(4, BlockCrafting.recipeLaserRelayItemWhitelist).setNoText().setPageStacksWildcard(), new PageCrafting(5, BlockCrafting.recipeItemInterface).setNoText()).setImportant(); @@ -107,7 +108,7 @@ public final class InitBooklet{ //RF Using Blocks new BookletChapter("fireworkBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFireworkBox), new PageTextOnly(1).addTextReplacement("", TileEntityFireworkBox.USE_PER_SHOT), new PageCrafting(2, BlockCrafting.recipeFireworkBox)).setSpecial(); - new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("", TileEntityLaserRelay.MAX_DISTANCE).addTextReplacement("", ConfigIntValues.LASER_RELAY_LOSS.getValue()), new PagePicture(2, "pageLaserRelay", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLaserRelay).setNoText().setPageStacksWildcard(), new PageCrafting(4, ItemCrafting.recipeLaserWrench)).setImportant(); + new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("", TileEntityLaserRelay.MAX_DISTANCE), new PageTextOnly(2).addTextReplacement("", TileEntityLaserRelayEnergy.CAP).addTextReplacement("", TileEntityLaserRelayEnergyAdvanced.CAP).addTextReplacement("", TileEntityLaserRelayEnergyExtreme.CAP), new PagePicture(3, "pageLaserRelay", 0).setNoText(), new PageCrafting(4, BlockCrafting.recipeLaserRelay).setNoText().setPageStacksWildcard(), new PageCrafting(5, BlockCrafting.recipeLaserRelayAdvanced).setNoText().setPageStacksWildcard(), new PageCrafting(6, BlockCrafting.recipeLaserRelayExtreme).setNoText().setPageStacksWildcard(), new PageCrafting(7, ItemCrafting.recipeLaserWrench)).setImportant(); new BookletChapter("miner", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockMiner), new PageTextOnly(1).addTextReplacement("", TileEntityMiner.ENERGY_USE_PER_BLOCK).addTextReplacement("", TileEntityMiner.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipeMiner)).setSpecial(); new BookletChapterCoffee("coffeeMachine", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStacks(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).setStacks(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "pageCoffeeMachine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setNoText().setPageStacksWildcard(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant(); new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("", TileEntityGrinder.ENERGY_USE), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText().setPageStacksWildcard(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText().setPageStacksWildcard(), new PageCrusherRecipe(4, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText()); @@ -128,8 +129,9 @@ public final class InitBooklet{ //No RF Using Items new BookletChapter("wings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings).setNoText()).setSpecial(); - new BookletChapter("foods", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipeBacon), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText(), new PageCrafting(1, FoodCrafting.recipePizza).setNoText()); + new BookletChapter("foods", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipeBacon).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText(), new PageCrafting(1, FoodCrafting.recipePizza).setNoText()); new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant(); + new BookletChapter("playerProbe", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPlayerProbe), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial(); ArrayList aiotPages = new ArrayList(); aiotPages.add(new PageTextOnly(aiotPages.size()+1)); for(IRecipe recipe : ToolCrafting.RECIPES_PAXELS){ @@ -149,7 +151,7 @@ public final class InitBooklet{ new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitItems.itemFilter), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant(); //RF Using Items - new BookletChapter("drill", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.RECIPES_DRILL_COLORING), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial(); + new BookletChapter("drill", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeDrill).setNoText().setPageStacksWildcard(), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial(); new BookletChapter("staff", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant(); new BookletChapter("magnetRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing)); new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java index 2a7ee7047..553a5362c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigurationHandler.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.config; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.client.event.ConfigChangedEvent; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java index f0f2f6798..884fe2754 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java @@ -37,6 +37,7 @@ public enum ConfigBoolValues{ DO_SPIDER_DROPS("Spider Cobweb Drop", ConfigCategories.MOB_DROPS, true, "If Cobwebs should sometimes drop from Spiders"), DO_BAT_DROPS("Bat Wing Drop", ConfigCategories.MOB_DROPS, true, "If Wings should sometimes drop from Bats"), + DO_XP_DROPS("Solidified XP Drop", ConfigCategories.MOB_DROPS, true, "If Mobs should randomly drop solidified XP occasionally"), CTRL_EXTRA_INFO("Advanced Info", ConfigCategories.OTHER, true, "Show Advanced Item Info when holding Control on every Item"), CTRL_INFO_FOR_EXTRA_INFO("Advanced Info Tooltips", ConfigCategories.OTHER, true, "Show the 'Press Control for more Info'-Text on Item Tooltips"), @@ -55,7 +56,9 @@ public enum ConfigBoolValues{ LESS_SOUND("Less Sound", ConfigCategories.PERFORMANCE, false, "If blocks in Actually Additions should have less sounds"), LESS_PARTICLES("Less Particles", ConfigCategories.PERFORMANCE, false, "If blocks in Actually Additions should have less particles"), - LESS_BLOCK_BREAKING_EFFECTS("Less Block Breaking Effects", ConfigCategories.PERFORMANCE, false, "If there should not be a sound effect and particles when a block is being destroyed by a breaker or similar"); + LESS_BLOCK_BREAKING_EFFECTS("Less Block Breaking Effects", ConfigCategories.PERFORMANCE, false, "If there should not be a sound effect and particles when a block is being destroyed by a breaker or similar"), + + LASER_RELAY_LOSS("Laser Relay Energy Loss", ConfigCategories.MACHINE_VALUES, true, "If Energy Laser Relays should have energy loss"); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java index 610eeb5cc..747f4b384 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigCrafting.java @@ -98,6 +98,7 @@ public enum ConfigCrafting{ PHANTOMFACE("Phantomface", ConfigCategories.BLOCKS_CRAFTING), PHANTOM_CONNECTOR("Phantom Connector", ConfigCategories.ITEMS_CRAFTING), PLAYER_INTERFACE("Player Interface", ConfigCategories.BLOCKS_CRAFTING), + PLAYER_PROBE("Player Probe", ConfigCategories.ITEMS_CRAFTING), PHANTOM_ENERGYFACE("Phantom Energyface", ConfigCategories.BLOCKS_CRAFTING), PHANTOM_REDSTONEFACE("Phantom Redstoneface", ConfigCategories.BLOCKS_CRAFTING), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java index bcf79233a..41eb4f576 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java @@ -23,9 +23,6 @@ public enum ConfigIntValues{ BLACK_LOTUS_AMOUNT("Black Lotus: Amount", ConfigCategories.WORLD_GEN, 14, 1, 50, "The Amount of Black Lotus generating"), LUSH_CAVE_CHANCE("Lush Caves: Chance", ConfigCategories.WORLD_GEN, 20, 1, 100, "The chance for lush caves to generate. The lower the number, the likelier."), - LASER_RELAY_LOSS("Laser Relay: Loss", ConfigCategories.MACHINE_VALUES, 5, 0, 80, "The Energy Loss of the Laser Relay per Transfer in Percent"), - LASER_RELAY_MAX_TRANSFER("Laser Relay: Max Transfer", ConfigCategories.MACHINE_VALUES, 10000, 100, 1000000, "The max amount of RF a Laser Relay can receive and try to transfer (if it's given 100 RF and can only transfer 50, it will only accept 50, it won't waste any power!)"), - TILE_ENTITY_UPDATE_INTERVAL("Tile Entities: Update Interval", ConfigCategories.OTHER, 5, 1, 100, "The amount of ticks waited before a TileEntity sends an additional Update to the Client"); public final String name; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java index 74fc57ea8..1f6296361 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java @@ -20,7 +20,7 @@ public enum ConfigStringListValues{ DRILL_EXTRA_MINING_WHITELIST("Drill Extra Whitelist", ConfigCategories.TOOL_VALUES, new String[]{"TConstruct:GravelOre"}, "By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command."), MINER_EXTRA_WHITELIST("Vertical Digger Extra Whitelist", ConfigCategories.MACHINE_VALUES, new String[0], "By default, the Vertical Digger mines everything that starts with 'ore' in the OreDictionary. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command. This Config Option only applies if the miner is in Ores Only Mode."), MINER_BLACKLIST("Vertical Digger Blacklist", ConfigCategories.MACHINE_VALUES, new String[0], "By default, the Vertical Digger mines everything that starts with 'ore' in the OreDictionary. If there is one that it can mine, but shouldn't be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command. This Config Option will apply in both modes."), - REPAIRER_EXTRA_WHITELIST("Item Repairer Extra Whitelist", ConfigCategories.MACHINE_VALUES, new String[]{"tconstruct:pickaxe", "tconstruct:shovel", "tconstruct:hatchet", "tconstruct:mattock", "tconstruct:broadsword", "tconstruct:longsword", "tconstruct:frypan", "tconstruct:battlesign", "tconstruct:hammer", "tconstruct:excavator", "tconstruct:lumberaxe", "tconstruct:cleaver"}, "By default, the Item Repairer only repairs items which are repairable in an anvil. Add an item's REGISTRY NAME here if you want it to be repairable."), + REPAIRER_EXTRA_WHITELIST("Item Repairer Extra Whitelist", ConfigCategories.MACHINE_VALUES, new String[]{"tconstruct:pickaxe", "tconstruct:shovel", "tconstruct:hatchet", "tconstruct:mattock", "tconstruct:broadsword", "tconstruct:longsword", "tconstruct:frypan", "tconstruct:battlesign", "tconstruct:hammer", "tconstruct:excavator", "tconstruct:lumberaxe", "tconstruct:cleaver", "tconstruct:rapier"}, "By default, the Item Repairer only repairs items which are repairable in an anvil. Add an item's REGISTRY NAME here if you want it to be repairable."), SPAWNER_CHANGER_BLACKLIST("Spawner Changer Blacklist", ConfigCategories.OTHER, new String[]{"VillagerGolem"}, "By default, the Spawner Changer allows every living entity to be put into a spawner. If there is one that shouldn't be able to, put its MAPPING NAME here."); public final String name; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java index 5b7da4b1e..b60ac6224 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/BlockCrafting.java @@ -80,6 +80,8 @@ public final class BlockCrafting{ public static IRecipe recipeDropper; public static IRecipe recipeRangedCollector; public static IRecipe recipeLaserRelay; + public static IRecipe recipeLaserRelayAdvanced; + public static IRecipe recipeLaserRelayExtreme; public static IRecipe recipeAtomicReconstructor; public static IRecipe recipeMiner; public static IRecipe recipeFireworkBox; @@ -90,9 +92,24 @@ public final class BlockCrafting{ public static IRecipe recipePlayerInterface; public static IRecipe recipeDisplayStand; public static IRecipe recipeShockSuppressor; + public static IRecipe[] recipesTinyTorch = new IRecipe[2]; public static void init(){ + //Tiny Torch + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), + "C", + "W", + 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), + 'W', "stickWood")); + recipesTinyTorch[0] = RecipeUtil.lastIRecipe(); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), + "C", + "W", + 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()), + 'W', "stickWood")); + recipesTinyTorch[1] = RecipeUtil.lastIRecipe(); + //Firework Box if(ConfigCrafting.FIREWORK_BOX.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFireworkBox), @@ -207,6 +224,20 @@ public final class BlockCrafting{ 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); recipeLaserRelay = RecipeUtil.lastIRecipe(); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced), + " I ", "XRX", " I ", + 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), + 'R', new ItemStack(InitBlocks.blockLaserRelay), + 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); + recipeLaserRelayAdvanced = RecipeUtil.lastIRecipe(); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme), + " I ", "XRX", " I ", + 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), + 'R', new ItemStack(InitBlocks.blockLaserRelayAdvanced), + 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); + recipeLaserRelayExtreme = RecipeUtil.lastIRecipe(); } //Item Laser Relay diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java index 557820a78..4af7432bb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java @@ -11,11 +11,15 @@ package de.ellpeck.actuallyadditions.mod.crafting; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.RecipeSorter; public final class InitCrafting{ @@ -30,6 +34,9 @@ public final class InitCrafting{ ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(InitItems.itemMisc, 10, TheMiscItems.MASHED_FOOD.ordinal()), Blocks.LEAVES, new ItemStack(InitItems.itemFertilizer, 10), Blocks.DIRT); ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(InitItems.itemCanolaSeed, 20), Blocks.DIRT, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND); + + RecipeSorter.register(ModUtil.MOD_ID+":drillColoring", RecipeDrillColor.class, RecipeSorter.Category.SHAPELESS, ""); + GameRegistry.addRecipe(new RecipeDrillColor()); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java index 2ad63e56a..57a0c6103 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ItemCrafting.java @@ -37,7 +37,6 @@ import java.util.ArrayList; public final class ItemCrafting{ public static final ArrayList RECIPES_MASHED_FOOD = new ArrayList(); - public static final ArrayList RECIPES_DRILL_COLORING = new ArrayList(); public static final ArrayList RECIPES_POTION_RINGS = new ArrayList(); public static IRecipe recipePhantomConnector; public static IRecipe recipeCoil; @@ -83,6 +82,7 @@ public final class ItemCrafting{ public static IRecipe recipeEnderStar; public static IRecipe recipeSpawnerChanger; public static IRecipe recipeFilter; + public static IRecipe recipePlayerProbe; public static void init(){ @@ -181,21 +181,13 @@ public final class ItemCrafting{ //Drill if(ConfigCrafting.DRILL.isEnabled()){ - ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()); - GameRegistry.addRecipe(new ShapedOreRecipe(lightBlueDrill.copy(), + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), "DDD", "CRC", "III", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()))); recipeDrill = RecipeUtil.lastIRecipe(); - - for(int i = 0; i < 16; i++){ - if(i != TheColoredLampColors.LIGHT_BLUE.ordinal()){ - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemDrill, 1, i), lightBlueDrill.copy(), "dye"+TheColoredLampColors.values()[i].name)); - RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe()); - } - } } //Drill Core @@ -450,6 +442,17 @@ public final class ItemCrafting{ recipePhantomConnector = RecipeUtil.lastIRecipe(); } + //Player Probe + if(ConfigCrafting.PLAYER_PROBE.isEnabled()){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPlayerProbe), + "A A", "AIA", "RHR", + 'A', new ItemStack(Blocks.IRON_BARS), + 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), + 'H', new ItemStack(Items.SKULL, 1, 1), + 'I', new ItemStack(Items.IRON_HELMET))); + recipePlayerProbe = RecipeUtil.lastIRecipe(); + } + //Quartz GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeDrillColor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeDrillColor.java new file mode 100644 index 000000000..94595068a --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeDrillColor.java @@ -0,0 +1,121 @@ +/* + * This file ("RecipeDrillColor.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-2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.crafting; + +import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; +import de.ellpeck.actuallyadditions.mod.items.ItemDrill; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.oredict.OreDictionary; + +import javax.annotation.Nullable; + +public class RecipeDrillColor implements IRecipe{ + + @Override + public boolean matches(InventoryCrafting inv, World worldIn){ + boolean hasDrill = false; + boolean hasColor = false; + + for(int i = 0; i < inv.getSizeInventory(); i++){ + ItemStack stack = inv.getStackInSlot(i); + if(stack != null && stack.getItem() != null){ + if(stack.getItem() instanceof ItemDrill){ + if(!hasDrill){ + hasDrill = true; + } + else{ + return false; + } + } + else{ + int[] ids = OreDictionary.getOreIDs(stack); + if(ids != null){ + for(int id : ids){ + String name = OreDictionary.getOreName(id); + if(name != null){ + TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name); + if(color != null){ + if(!hasColor){ + hasColor = true; + } + else{ + return false; + } + } + } + } + } + } + } + } + + return hasDrill && hasColor; + } + + @Nullable + @Override + public ItemStack getCraftingResult(InventoryCrafting inv){ + ItemStack drillStack = null; + ItemStack colorStack = null; + + for(int i = 0; i < inv.getSizeInventory(); i++){ + ItemStack stack = inv.getStackInSlot(i); + if(stack != null && stack.getItem() != null){ + if(stack.getItem() instanceof ItemDrill){ + drillStack = stack.copy(); + } + else{ + colorStack = stack.copy(); + } + } + } + + if(drillStack != null && colorStack != null){ + int[] ids = OreDictionary.getOreIDs(colorStack); + if(ids != null){ + for(int id : ids){ + String name = OreDictionary.getOreName(id); + if(name != null){ + TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name); + if(color != null){ + if(color.ordinal() != drillStack.getItemDamage()){ + drillStack.setItemDamage(color.ordinal()); + return drillStack; + } + } + } + } + } + } + + return null; + } + + @Override + public int getRecipeSize(){ + return 2; + } + + @Nullable + @Override + public ItemStack getRecipeOutput(){ + return null; + } + + @Override + public ItemStack[] getRemainingItems(InventoryCrafting inv){ + return ForgeHooks.defaultRecipeGetRemainingItems(inv); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java index accdf5025..cbad6eb77 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/creative/CreativeTab.java @@ -55,6 +55,8 @@ public class CreativeTab extends CreativeTabs{ this.add(InitBlocks.blockFireworkBox); this.add(InitBlocks.blockLaserRelay); + this.add(InitBlocks.blockLaserRelayAdvanced); + this.add(InitBlocks.blockLaserRelayExtreme); this.add(InitBlocks.blockLaserRelayItem); this.add(InitBlocks.blockLaserRelayItemWhitelist); this.add(InitBlocks.blockItemViewer); @@ -136,6 +138,7 @@ public class CreativeTab extends CreativeTabs{ this.add(InitBlocks.blockBlackLotus); this.add(InitBlocks.blockBookletStand); + this.add(InitItems.itemPlayerProbe); this.add(InitItems.itemColorLens); this.add(InitItems.itemExplosionLens); this.add(InitItems.itemDamageLens); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java index 2c4f5b8d7..e3631917f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java @@ -18,28 +18,32 @@ import java.util.UUID; public final class PlayerData{ - public static PlayerSave getDataFromPlayer(EntityPlayer player){ + public static PlayerSave getDataFromPlayer(UUID id){ ArrayList data = WorldData.PLAYER_SAVE_DATA; //Get Data from existing data for(PlayerSave save : data){ - if(save.thePlayerUUID.equals(player.getUniqueID())){ + if(save.theId != null && save.theId.equals(id)){ return save; } } //Add Data if none is existant - PlayerSave aSave = new PlayerSave(player.getUniqueID(), new NBTTagCompound()); + PlayerSave aSave = new PlayerSave(id, new NBTTagCompound()); data.add(aSave); return aSave; } + public static PlayerSave getDataFromPlayer(EntityPlayer player){ + return getDataFromPlayer(player.getUniqueID()); + } + public static class PlayerSave{ - public final UUID thePlayerUUID; + public final UUID theId; public NBTTagCompound theCompound; - public PlayerSave(UUID theUUID, NBTTagCompound theCompound){ - this.thePlayerUUID = theUUID; + public PlayerSave(UUID theId, NBTTagCompound theCompound){ + this.theId = theId; this.theCompound = theCompound; } @@ -51,8 +55,8 @@ public final class PlayerData{ public NBTTagCompound toNBT(){ NBTTagCompound compound = new NBTTagCompound(); - compound.setLong("LeastSignificant", this.thePlayerUUID.getLeastSignificantBits()); - compound.setLong("MostSignificant", this.thePlayerUUID.getMostSignificantBits()); + compound.setLong("LeastSignificant", this.theId.getLeastSignificantBits()); + compound.setLong("MostSignificant", this.theId.getMostSignificantBits()); compound.setTag("Tag", this.theCompound); @@ -60,4 +64,5 @@ public final class PlayerData{ } } + } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java index 603ffe403..67c1951d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java @@ -44,6 +44,18 @@ public class CommonEvents{ MinecraftForge.EVENT_BUS.register(this); } + public static void checkAchievements(ItemStack gotten, EntityPlayer player, InitAchievements.Type type){ + for(TheAchievements ach : TheAchievements.values()){ + if(ach.type == type){ + if(gotten != null && ach.chieve.theItemStack != null && gotten.getItem() == ach.chieve.theItemStack.getItem()){ + if(gotten.getItemDamage() == ach.chieve.theItemStack.getItemDamage()){ + player.addStat(ach.chieve, 1); + } + } + } + } + } + @SubscribeEvent public void livingDeathEvent(LivingDeathEvent event){ if(event.getEntityLiving().worldObj != null && !event.getEntityLiving().worldObj.isRemote && event.getEntityLiving() instanceof EntityPlayer){ @@ -80,24 +92,20 @@ public class CommonEvents{ } @SubscribeEvent - public void onLogInEvent(EntityJoinWorldEvent event){ - if(!event.getEntity().worldObj.isRemote && event.getEntity() instanceof EntityPlayerMP){ - EntityPlayerMP player = (EntityPlayerMP)event.getEntity(); + public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event){ + if(!event.player.worldObj.isRemote && event.player instanceof EntityPlayerMP){ + EntityPlayerMP player = (EntityPlayerMP)event.player; PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); if(!data.theCompound.hasNoTags()){ - PacketHandler.theNetwork.sendTo(new PacketServerToClient(data.theCompound, PacketHandler.PLAYER_DATA_TO_CLIENT_HANDLER), player); + NBTTagCompound compound = new NBTTagCompound(); + compound.setUniqueId("UUID", player.getUniqueID()); + compound.setTag("Data", data.theCompound); + compound.setBoolean("Log", true); + PacketHandler.theNetwork.sendTo(new PacketServerToClient(compound, PacketHandler.PLAYER_DATA_TO_CLIENT_HANDLER), player); + ModUtil.LOGGER.info("Sending Player Data to player "+player.getName()+" with UUID "+player.getUniqueID()+" with info "+data.theCompound+"."); } - } - } - - public static void checkAchievements(ItemStack gotten, EntityPlayer player, InitAchievements.Type type){ - for(TheAchievements ach : TheAchievements.values()){ - if(ach.type == type){ - if(gotten != null && ach.chieve.theItemStack != null && gotten.getItem() == ach.chieve.theItemStack.getItem()){ - if(gotten.getItemDamage() == ach.chieve.theItemStack.getItemDamage()){ - player.addStat(ach.chieve, 1); - } - } + else{ + ModUtil.LOGGER.info("Not sending Player Data to player "+player.getName()+" with UUID "+player.getUniqueID()+" because he doesn't have any."); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java index 4b1dba16c..644eab14b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java @@ -12,10 +12,6 @@ package de.ellpeck.actuallyadditions.mod.gen; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.EnumDyeColor; -import net.minecraft.item.ItemDye; -import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.*; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java index b097bf05f..bba2473cf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCrafter.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCrafter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; @@ -34,7 +35,7 @@ public class GuiCrafter extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, "container."+ModUtil.MOD_ID+".crafting"); + AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".crafting.name")); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java index 24cdb2e1c..4957a1f40 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; @@ -33,7 +34,7 @@ public class GuiDrill extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, "container."+ModUtil.MOD_ID+".drill"); + AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".drill.name")); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java index 398971903..25e86dce1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; @@ -33,7 +34,7 @@ public class GuiFilter extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, "container."+ModUtil.MOD_ID+".filter"); + AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".filter.name")); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java index 769a80037..e556a286b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java @@ -62,14 +62,16 @@ public class GuiGiantChest extends GuiContainer{ @Override protected void actionPerformed(GuiButton button) throws IOException{ - NBTTagCompound compound = new NBTTagCompound(); - compound.setInteger("X", this.chest.getPos().getX()); - compound.setInteger("Y", this.chest.getPos().getY()); - compound.setInteger("Z", this.chest.getPos().getZ()); - compound.setInteger("PlayerID", Minecraft.getMinecraft().thePlayer.getEntityId()); - compound.setInteger("WorldID", this.chest.getWorld().provider.getDimension()); - compound.setInteger("ButtonID", button.id); - PacketHandler.theNetwork.sendToServer(new PacketClientToServer(compound, PacketHandler.GUI_BUTTON_TO_TILE_HANDLER)); + if(button.id >= 0 && button.id < 3){ + NBTTagCompound compound = new NBTTagCompound(); + compound.setInteger("X", this.chest.getPos().getX()); + compound.setInteger("Y", this.chest.getPos().getY()); + compound.setInteger("Z", this.chest.getPos().getZ()); + compound.setInteger("PlayerID", Minecraft.getMinecraft().thePlayer.getEntityId()); + compound.setInteger("WorldID", this.chest.getWorld().provider.getDimension()); + compound.setInteger("ButtonID", button.id); + PacketHandler.theNetwork.sendToServer(new PacketClientToServer(compound, PacketHandler.GUI_BUTTON_TO_TILE_HANDLER)); + } } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java index 6ed36ad59..d3fa4570c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java @@ -207,10 +207,12 @@ public final class InitItems{ public static Item itemWaterBowl; public static Item itemFilter; + public static Item itemPlayerProbe; public static void init(){ ModUtil.LOGGER.info("Initializing Items..."); + itemPlayerProbe = new ItemPlayerProbe("itemPlayerProbe"); itemFilter = new ItemFilter("itemFilter"); itemWaterBowl = new ItemWaterBowl("itemWaterBowl"); itemSpawnerChanger = new ItemSpawnerChanger("itemSpawnerChanger"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java index 0c31cf28a..c728e1d76 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java @@ -20,6 +20,7 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import java.util.Collections; import java.util.Set; public class ItemAxeAA extends ItemToolAA{ @@ -39,4 +40,9 @@ public class ItemAxeAA extends ItemToolAA{ Material material = state.getMaterial(); return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; } + + @Override + public Set getToolClasses(ItemStack stack){ + return Collections.singleton("axe"); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index 9f7ad587e..6b2f70f4f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -98,7 +98,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{ @Override public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, RayTraceResult posHit, Profiler profiler, ScaledResolution resolution){ - if(posHit != null){ + if(posHit != null && posHit.getBlockPos() != null){ IBlockState state = minecraft.theWorld.getBlockState(posHit.getBlockPos()); Block block = state.getBlock(); if(block != null && !block.isAir(minecraft.theWorld.getBlockState(posHit.getBlockPos()), minecraft.theWorld, posHit.getBlockPos())){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index cbd84c59b..857d0b4d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -54,8 +54,8 @@ import java.util.Set; public class ItemDrill extends ItemEnergy{ - private static final int ENERGY_USE = 100; public static final int HARVEST_LEVEL = 4; + private static final int ENERGY_USE = 100; public ItemDrill(String name){ super(500000, 5000, name); @@ -268,9 +268,8 @@ public class ItemDrill extends ItemEnergy{ @Override public boolean canHarvestBlock(IBlockState state, ItemStack stack){ - int harvestLevel = this.getHarvestLevel(stack, ""); Block block = state.getBlock(); - return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || block.getMaterial(state).isToolNotRequired() || (block == Blocks.SNOW_LAYER || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? harvestLevel >= 3 : (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE ? (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK ? (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE ? (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE ? (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE ? (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE ? (block.getMaterial(state) == Material.ROCK || (block.getMaterial(state) == Material.IRON || block.getMaterial(state) == Material.ANVIL)) : harvestLevel >= 2) : harvestLevel >= 1) : harvestLevel >= 1) : harvestLevel >= 2) : harvestLevel >= 2) : harvestLevel >= 2)))); + return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || block.getMaterial(state).isToolNotRequired() || (block == Blocks.SNOW_LAYER || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? HARVEST_LEVEL >= 3 : (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE ? (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK ? (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE ? (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE ? (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE ? (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE ? (block.getMaterial(state) == Material.ROCK || (block.getMaterial(state) == Material.IRON || block.getMaterial(state) == Material.ANVIL)) : HARVEST_LEVEL >= 2) : HARVEST_LEVEL >= 1) : HARVEST_LEVEL >= 1) : HARVEST_LEVEL >= 2) : HARVEST_LEVEL >= 2) : HARVEST_LEVEL >= 2)))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index a2318f1d7..3e51a7ec5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -23,6 +23,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; @@ -93,7 +94,10 @@ public class ItemLaserWrench extends ItemBase{ save.theCompound.setInteger("LaserWrenchMode", currMode); if(player instanceof EntityPlayerMP){ - PacketHandler.theNetwork.sendTo(new PacketServerToClient(save.theCompound, PacketHandler.PLAYER_DATA_TO_CLIENT_HANDLER), (EntityPlayerMP)player); + NBTTagCompound compound = new NBTTagCompound(); + compound.setUniqueId("UUID", player.getUniqueID()); + compound.setTag("Data", save.theCompound); + PacketHandler.theNetwork.sendTo(new PacketServerToClient(compound, PacketHandler.PLAYER_DATA_TO_CLIENT_HANDLER), (EntityPlayerMP)player); } player.addChatComponentMessage(new TextComponentString("Mode changed to "+WrenchMode.values()[currMode].name+"!")); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java index 79019a955..7f7e7d85d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java @@ -20,6 +20,7 @@ import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import java.util.Collections; import java.util.Set; public class ItemPickaxeAA extends ItemToolAA{ @@ -80,4 +81,9 @@ public class ItemPickaxeAA extends ItemToolAA{ Material material = state.getMaterial(); return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; } + + @Override + public Set getToolClasses(ItemStack stack){ + return Collections.singleton("pickaxe"); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java new file mode 100644 index 000000000..78f6ce2ef --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java @@ -0,0 +1,124 @@ +/* + * This file ("ItemPlayerProbe.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-2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.items; + +import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.util.text.TextComponentTranslation; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import java.util.List; +import java.util.UUID; + +public class ItemPlayerProbe extends ItemBase{ + + public ItemPlayerProbe(String name){ + super(name); + this.setMaxStackSize(1); + } + + @Override + public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected){ + if(!world.isRemote){ + if(stack.hasTagCompound()){ + NBTTagCompound compound = stack.getTagCompound(); + if(compound.hasKey("UUIDMost")){ + UUID id = compound.getUniqueId("UUID"); + EntityPlayer player = world.getPlayerEntityByUUID(id); + if(player != null){ + if(player.isSneaking()){ + stack.setTagCompound(new NBTTagCompound()); + entity.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.disconnect.1")); + player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.notice")); + } + } + else{ + stack.setTagCompound(new NBTTagCompound()); + entity.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.disconnect.2")); + } + } + } + } + } + + @Override + public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ + TileEntity tile = world.getTileEntity(pos); + if(tile instanceof TileEntityPlayerInterface){ + if(stack.hasTagCompound()){ + NBTTagCompound compound = stack.getTagCompound(); + if(compound.hasKey("UUIDMost")){ + if(!world.isRemote){ + TileEntityPlayerInterface face = (TileEntityPlayerInterface)tile; + face.connectedPlayer = compound.getUniqueId("UUID"); + face.playerName = compound.getString("Name"); + face.markDirty(); + face.sendUpdate(); + + stack.setTagCompound(new NBTTagCompound()); + } + return EnumActionResult.SUCCESS; + } + } + } + return EnumActionResult.FAIL; + } + + @Override + public boolean itemInteractionForEntity(ItemStack aStack, EntityPlayer player, EntityLivingBase entity, EnumHand hand){ + if(!player.worldObj.isRemote){ + ItemStack stack = player.getHeldItemMainhand(); + if(stack != null && stack.getItem() == this){ + if(entity instanceof EntityPlayer){ + EntityPlayer playerHit = (EntityPlayer)entity; + + if(!playerHit.isSneaking()){ + if(!stack.hasTagCompound()){ + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound compound = stack.getTagCompound(); + compound.setString("Name", playerHit.getName()); + compound.setUniqueId("UUID", playerHit.getUniqueID()); + return true; + } + } + } + } + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ + if(stack.hasTagCompound()){ + String name = stack.getTagCompound().getString("Name"); + if(name != null){ + list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".playerProbe.probing")+": "+name); + } + } + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java index cfaa63932..4fca08cb9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java @@ -26,6 +26,7 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import java.util.Collections; import java.util.Set; public class ItemShovelAA extends ItemToolAA{ @@ -51,4 +52,9 @@ public class ItemShovelAA extends ItemToolAA{ public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ return Items.IRON_SHOVEL.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ); } + + @Override + public Set getToolClasses(ItemStack stack){ + return Collections.singleton("shovel"); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java index 05afa683f..a118c5a0d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java @@ -15,9 +15,7 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.ActionResult; @@ -40,11 +38,13 @@ public class ItemSolidifiedExperience extends ItemBase{ @SubscribeEvent public void onEntityDropEvent(LivingDropsEvent event){ - if(event.getEntityLiving().worldObj != null && !event.getEntityLiving().worldObj.isRemote && event.getSource().getEntity() instanceof EntityPlayer){ - //Drop Solidified XP - if(event.getEntityLiving() instanceof EntityCreature){ - if(Util.RANDOM.nextInt(10) <= event.getLootingLevel()*2){ - event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemSolidifiedExperience, Util.RANDOM.nextInt(2+event.getLootingLevel())+1), 0); + if(ConfigBoolValues.DO_XP_DROPS.isEnabled()){ + if(event.getEntityLiving().worldObj != null && !event.getEntityLiving().worldObj.isRemote && event.getSource().getEntity() instanceof EntityPlayer){ + //Drop Solidified XP + if(event.getEntityLiving() instanceof EntityCreature){ + if(Util.RANDOM.nextInt(10) <= event.getLootingLevel()*2){ + event.getEntityLiving().entityDropItem(new ItemStack(InitItems.itemSolidifiedExperience, Util.RANDOM.nextInt(2+event.getLootingLevel())+1), 0); + } } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java index 79f56ebb3..b1d0c7b4b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java @@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; @@ -31,6 +30,7 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextFormatting; +import net.minecraft.world.BossInfo; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.BlockEvent; @@ -107,7 +107,7 @@ public class ItemSpawnerChanger extends ItemBase{ stack.setTagCompound(new NBTTagCompound()); } - if(!(entity instanceof EntityPlayer)){ + if(!(entity instanceof EntityPlayer) && entity.isNonBoss()){ String entityName = EntityList.getEntityString(entity); if(entityName != null && !entityName.isEmpty()){ for(String name : ConfigStringListValues.SPAWNER_CHANGER_BLACKLIST.getValue()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java index 0fb8f9c4c..2dbf74d2b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java @@ -14,17 +14,13 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.passive.EntityBat; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; @@ -51,6 +47,57 @@ public class ItemWingsOfTheBats extends ItemBase{ MinecraftForge.EVENT_BUS.register(this); } + /** + * Checks if the Player is winged + * + * @param player The Player + * @return Winged? + */ + public static boolean isPlayerWinged(EntityPlayer player){ + return WINGED_PLAYERS.contains(player.getUniqueID()+(player.worldObj.isRemote ? "-Remote" : "")); + } + + /** + * Same as above, but Remote Checking is done automatically + */ + public static void removeWingsFromPlayer(EntityPlayer player){ + removeWingsFromPlayer(player, player.worldObj.isRemote); + } + + /** + * Removes the Player from the List of Players that have Wings + * + * @param player The Player + * @param worldRemote If the World the Player is in is remote + */ + public static void removeWingsFromPlayer(EntityPlayer player, boolean worldRemote){ + WINGED_PLAYERS.remove(player.getUniqueID()+(worldRemote ? "-Remote" : "")); + } + + /** + * Adds the Player to the List of Players that have Wings + * + * @param player The Player + */ + public static void addWingsToPlayer(EntityPlayer player){ + WINGED_PLAYERS.add(player.getUniqueID()+(player.worldObj.isRemote ? "-Remote" : "")); + } + + /** + * Checks if the Player has Wings in its Inventory + * + * @param player The Player + * @return The Wings + */ + public static ItemStack getWingItem(EntityPlayer player){ + for(int i = 0; i < player.inventory.getSizeInventory(); i++){ + if(player.inventory.getStackInSlot(i) != null && player.inventory.getStackInSlot(i).getItem() instanceof ItemWingsOfTheBats){ + return player.inventory.getStackInSlot(i); + } + } + return null; + } + @SubscribeEvent public void onLogOutEvent(PlayerEvent.PlayerLoggedOutEvent event){ //Remove Player from Wings' Fly Permission List @@ -104,58 +151,6 @@ public class ItemWingsOfTheBats extends ItemBase{ } } - /** - * Checks if the Player is winged - * - * @param player The Player - * @return Winged? - */ - public static boolean isPlayerWinged(EntityPlayer player){ - return WINGED_PLAYERS.contains(player.getUniqueID()+(player.worldObj.isRemote ? "-Remote" : "")); - } - - /** - * Same as above, but Remote Checking is done automatically - */ - public static void removeWingsFromPlayer(EntityPlayer player){ - removeWingsFromPlayer(player, player.worldObj.isRemote); - } - - /** - * Removes the Player from the List of Players that have Wings - * - * @param player The Player - * @param worldRemote If the World the Player is in is remote - */ - public static void removeWingsFromPlayer(EntityPlayer player, boolean worldRemote){ - WINGED_PLAYERS.remove(player.getUniqueID()+(worldRemote ? "-Remote" : "")); - } - - /** - * Adds the Player to the List of Players that have Wings - * - * @param player The Player - */ - public static void addWingsToPlayer(EntityPlayer player){ - WINGED_PLAYERS.add(player.getUniqueID()+(player.worldObj.isRemote ? "-Remote" : "")); - } - - /** - * Checks if the Player has Wings in its Inventory - * - * @param player The Player - * @return The Wings - */ - public static ItemStack getWingItem(EntityPlayer player){ - for(int i = 0; i < player.inventory.getSizeInventory(); i++){ - if(player.inventory.getStackInSlot(i) != null && player.inventory.getStackInSlot(i).getItem() instanceof ItemWingsOfTheBats){ - return player.inventory.getStackInSlot(i); - } - } - return null; - } - - @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.EPIC; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java index f6a279443..60b528830 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java @@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; @@ -23,7 +22,6 @@ import net.minecraft.item.ItemSeedFood; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class ItemFoodSeed extends ItemSeedFood{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java index b98f212e4..a3ee4e3c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java @@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -37,9 +38,9 @@ public class LensDisruption extends Lens{ ItemStack stack = item.getEntityItem(); if(!item.isDead && stack != null){ if(!stack.hasTagCompound() || !stack.getTagCompound().getBoolean(ModUtil.MOD_ID+"DisruptedAlready")){ - ItemStack newStack = null; - while(newStack == null || newStack.getItem() == null){ + ItemStack newStack; + do{ if(Util.RANDOM.nextBoolean()){ newStack = new ItemStack(Item.REGISTRY.getRandomObject(Util.RANDOM)); } @@ -47,6 +48,8 @@ public class LensDisruption extends Lens{ newStack = new ItemStack(Block.REGISTRY.getRandomObject(Util.RANDOM)); } } + while(newStack == null || newStack.getItem() == null); + newStack.stackSize = stack.stackSize; if(!newStack.hasTagCompound()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeHandler.java index 3d1b3032c..aa32e0fdf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeHandler.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.jei.crusher; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; -import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 810f44ab9..f04ca929d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.misc.special; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java index 360c5db25..a2e5de46e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java @@ -34,6 +34,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; +import java.util.UUID; public final class PacketHandler{ @@ -98,9 +99,11 @@ public final class PacketHandler{ @Override @SideOnly(Side.CLIENT) public void handleData(NBTTagCompound compound){ - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - if(player != null){ - PlayerData.getDataFromPlayer(player).theCompound = compound; + NBTTagCompound data = compound.getCompoundTag("Data"); + UUID id = compound.getUniqueId("UUID"); + PlayerData.getDataFromPlayer(id).theCompound = data; + if(compound.getBoolean("Log")){ + ModUtil.LOGGER.info("Receiving Player Data for current player with UUID "+id+" with info "+data+"."); } } }; @@ -133,7 +136,10 @@ public final class PacketHandler{ PlayerData.PlayerSave playerData = PlayerData.getDataFromPlayer(player); playerData.theCompound.merge(data); if(player instanceof EntityPlayerMP){ - PacketHandler.theNetwork.sendTo(new PacketServerToClient(playerData.theCompound, PLAYER_DATA_TO_CLIENT_HANDLER), (EntityPlayerMP)player); + NBTTagCompound tag = new NBTTagCompound(); + tag.setUniqueId("UUID", player.getUniqueID()); + tag.setTag("Data", playerData.theCompound); + PacketHandler.theNetwork.sendTo(new PacketServerToClient(tag, PLAYER_DATA_TO_CLIENT_HANDLER), (EntityPlayerMP)player); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index f75992a1c..33a7a75a0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.util.ModUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil; import net.minecraft.block.state.IBlockState; @@ -41,10 +40,10 @@ import net.minecraftforge.fml.common.registry.GameRegistry; public abstract class TileEntityBase extends TileEntity implements ITickable{ public static boolean teslaLoaded; + public final String name; public boolean isRedstonePowered; public boolean isPulseMode; protected int ticksElapsed; - public final String name; public TileEntityBase(String name){ this.name = name; @@ -99,6 +98,8 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{ register(TileEntityPhantomRedstoneface.class, "PhantomRedstoneface"); register(TileEntityLaserRelayItem.class, "LaserRelayItem"); register(TileEntityLaserRelayEnergy.class, "LaserRelay"); + register(TileEntityLaserRelayEnergyAdvanced.class); + register(TileEntityLaserRelayEnergyExtreme.class); register(TileEntityLaserRelayItemWhitelist.class, "LaserRelayItemWhitelist"); register(TileEntityItemViewer.class, "ItemViewer"); register(TileEntityBookletStand.class, "BookletStand"); @@ -118,14 +119,24 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{ try{ //This is hacky and dirty but it works so whatever String name = ModUtil.MOD_ID+":"+tileClass.newInstance().name; - String oldName = ModUtil.MOD_ID+":tileEntity"+legacyName; - GameRegistry.registerTileEntityWithAlternatives(tileClass, name, oldName); + + if(legacyName != null && !legacyName.isEmpty()){ + String oldName = ModUtil.MOD_ID+":tileEntity"+legacyName; + GameRegistry.registerTileEntityWithAlternatives(tileClass, name, oldName); + } + else{ + GameRegistry.registerTileEntity(tileClass, name); + } } catch(Exception e){ ModUtil.LOGGER.fatal("Registering a TileEntity failed!", e); } } + private static void register(Class tileClass){ + register(tileClass, null); + } + @Override public void readFromNBT(NBTTagCompound compound){ super.readFromNBT(compound); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java index 53b876796..d04b0fe74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFishingNet.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index 7a5c5f80e..cd3ad9e2f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -27,6 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityFluidCollector extends TileEntityBase implements net.minecraftforge.fluids.IFluidHandler{ + public boolean isPlacer; public final FluidTank tank = new FluidTank(8*Util.BUCKET){ @Override public boolean canFill(){ @@ -38,7 +39,6 @@ public class TileEntityFluidCollector extends TileEntityBase implements net.mine return !TileEntityFluidCollector.this.isPlacer; } }; - public boolean isPlacer; private int lastTankAmount; private int currentTime; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index a47733d38..10cdaaa3c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -16,8 +16,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.EnumFacing; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponentTranslation; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.wrapper.SidedInvWrapper; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java index 4b9c8fb5c..496af3794 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemRepairer.java @@ -77,9 +77,10 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I public void updateEntity(){ super.updateEntity(); if(!this.worldObj.isRemote){ - if(this.slots[SLOT_OUTPUT] == null && canBeRepaired(this.slots[SLOT_INPUT])){ - if(this.slots[SLOT_INPUT].getItemDamage() <= 0){ - this.slots[SLOT_OUTPUT] = this.slots[SLOT_INPUT].copy(); + ItemStack input = this.slots[SLOT_INPUT]; + if(this.slots[SLOT_OUTPUT] == null && canBeRepaired(input)){ + if(input.getItemDamage() <= 0){ + this.slots[SLOT_OUTPUT] = input.copy(); this.slots[SLOT_INPUT] = null; this.nextRepairTick = 0; } @@ -89,7 +90,15 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I this.storage.extractEnergy(ENERGY_USE, false); if(this.nextRepairTick >= 2){ this.nextRepairTick = 0; - this.slots[SLOT_INPUT].setItemDamage(this.slots[SLOT_INPUT].getItemDamage()-1); + input.setItemDamage(input.getItemDamage()-1); + + if(input.hasTagCompound()){ + //TiCon un-break tools + if("tconstruct".equalsIgnoreCase(input.getItem().getRegistryName().getResourceDomain())){ + NBTTagCompound stats = input.getTagCompound().getCompoundTag("Stats"); + stats.removeTag("Broken"); + } + } } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index 76faac6cf..db27c4fc6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.IEnergyReceiver; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler; -import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; @@ -27,8 +27,14 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements public final Map receiversAround = new HashMap(); + public static final int CAP = 1000; + + public TileEntityLaserRelayEnergy(String name){ + super(name, false); + } + public TileEntityLaserRelayEnergy(){ - super("laserRelay", false); + this("laserRelay"); } @Override @@ -51,7 +57,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements if(maxTransmit > 0){ LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getNetworkFor(this.pos, this.worldObj); if(network != null){ - transmitted = this.transferEnergyToReceiverInNeed(from, network, Math.min(ConfigIntValues.LASER_RELAY_MAX_TRANSFER.getValue(), maxTransmit), simulate); + transmitted = this.transferEnergyToReceiverInNeed(from, network, maxTransmit, simulate); } } return transmitted; @@ -86,14 +92,17 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements alreadyChecked.add(relay); TileEntity relayTile = this.worldObj.getTileEntity(relay); if(relayTile instanceof TileEntityLaserRelayEnergy){ - for(Map.Entry receiver : ((TileEntityLaserRelayEnergy)relayTile).receiversAround.entrySet()){ + TileEntityLaserRelayEnergy theRelay = (TileEntityLaserRelayEnergy)relayTile; + double highestLoss = Math.max(theRelay.getLossPercentage(), this.getLossPercentage()); + int lowestCap = Math.min(theRelay.getEnergyCap(), this.getEnergyCap()); + for(Map.Entry receiver : theRelay.receiversAround.entrySet()){ if(receiver != null && receiver.getKey() != null && receiver.getValue() != null){ if(receiver.getKey() != from){ if(receiver.getValue().canConnectEnergy(receiver.getKey().getOpposite())){ //Transfer the energy (with the energy loss!) - int theoreticalReceived = receiver.getValue().receiveEnergy(receiver.getKey().getOpposite(), maxTransfer-transmitted, true); + int theoreticalReceived = receiver.getValue().receiveEnergy(receiver.getKey().getOpposite(), Math.min(maxTransfer, lowestCap)-transmitted, true); //The amount of energy lost during a transfer - int deduct = (int)(theoreticalReceived*((double)ConfigIntValues.LASER_RELAY_LOSS.getValue()/100)); + int deduct = ConfigBoolValues.LASER_RELAY_LOSS.isEnabled() ? (int)(theoreticalReceived*(highestLoss/100)) : 0; transmitted += receiver.getValue().receiveEnergy(receiver.getKey().getOpposite(), theoreticalReceived-deduct, simulate); transmitted += deduct; @@ -112,4 +121,12 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements } return transmitted; } + + public int getEnergyCap(){ + return CAP; + } + + public double getLossPercentage(){ + return 5; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java new file mode 100644 index 000000000..f65c3dd45 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java @@ -0,0 +1,30 @@ +/* + * This file ("TileEntityLaserRelayEnergyAdvanced.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-2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.tile; + +public class TileEntityLaserRelayEnergyAdvanced extends TileEntityLaserRelayEnergy{ + + public static final int CAP = 10000; + + public TileEntityLaserRelayEnergyAdvanced(){ + super("laserRelayAdvanced"); + } + + @Override + public int getEnergyCap(){ + return CAP; + } + + @Override + public double getLossPercentage(){ + return 8; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java new file mode 100644 index 000000000..ce9253b5c --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java @@ -0,0 +1,30 @@ +/* + * This file ("TileEntityLaserRelayEnergyExtreme.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-2016 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.tile; + +public class TileEntityLaserRelayEnergyExtreme extends TileEntityLaserRelayEnergy{ + + public static final int CAP = 100000; + + public TileEntityLaserRelayEnergyExtreme(){ + super("laserRelayExtreme"); + } + + @Override + public int getEnergyCap(){ + return CAP; + } + + @Override + public double getLossPercentage(){ + return 10; + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index 350161067..88fd6c1b6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -36,8 +36,8 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements public int currentTime; public int range; public boolean isBreaker; - private int oldRange; public int side; + private int oldRange; public TileEntityPhantomPlacer(int slots, String name){ super(slots, name); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java index f69d5b734..df88393cc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java @@ -23,8 +23,9 @@ import java.util.UUID; public class TileEntityPlayerInterface extends TileEntityInventoryBase implements IEnergyReceiver, IEnergyDisplay{ public static final int DEFAULT_RANGE = 32; - public UUID connectedPlayer; private final EnergyStorage storage = new EnergyStorage(30000); + public UUID connectedPlayer; + public String playerName; private int oldEnergy; private int range; @@ -85,6 +86,7 @@ public class TileEntityPlayerInterface extends TileEntityInventoryBase implement this.storage.writeToNBT(compound); if(this.connectedPlayer != null && type != NBTType.SAVE_BLOCK){ compound.setUniqueId("Player", this.connectedPlayer); + compound.setString("PlayerName", this.playerName); } } @@ -93,6 +95,7 @@ public class TileEntityPlayerInterface extends TileEntityInventoryBase implement this.storage.readFromNBT(compound); if(compound.hasKey("PlayerLeast") && type != NBTType.SAVE_BLOCK){ this.connectedPlayer = compound.getUniqueId("Player"); + this.playerName = compound.getString("PlayerName"); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java index 39e04a976..b3ee9d920 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Util.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.util; import net.minecraft.item.EnumRarity; import net.minecraft.util.text.TextFormatting; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 974f81422..68e0bbad4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -341,6 +341,7 @@ public final class WorldUtil{ //Cobbled together from Tinkers' Construct (with permission, thanks!) and PlayerInteractionManager code. //Breaking blocks is a hideous pain so yea. + //This doesn't do any additional harvestability checks that the blocks itself don't do! public static boolean playerHarvestBlock(ItemStack stack, World world, EntityPlayer player, BlockPos pos){ if(world.isAirBlock(pos)){ return false; @@ -349,17 +350,6 @@ public final class WorldUtil{ IBlockState state = world.getBlockState(pos); Block block = state.getBlock(); - boolean effective = false; - for(String type : stack.getItem().getToolClasses(stack)){ - if(block.isToolEffective(type, state)){ - effective = true; - } - } - - if(!effective || !ForgeHooks.canHarvestBlock(block, player, world, pos)){ - return false; - } - if(player.capabilities.isCreativeMode){ block.onBlockHarvested(world, pos, state, player); if(block.removedByPlayer(state, world, pos, player, false)){ @@ -367,7 +357,7 @@ public final class WorldUtil{ } if(!world.isRemote){ - world.playEvent(2001, pos, Block.getStateId(state)); + world.playEvent(player, 2001, pos, Block.getStateId(state)); if(player instanceof EntityPlayerMP){ ((EntityPlayerMP)player).connection.sendPacket(new SPacketBlockChange(world, pos)); @@ -395,7 +385,7 @@ public final class WorldUtil{ block.dropXpOnBlockBreak(world, pos, xp); } - world.playEvent(2001, pos, Block.getStateId(state)); + world.playEvent(player, 2001, pos, Block.getStateId(state)); playerMp.connection.sendPacket(new SPacketBlockChange(world, pos)); return true; } @@ -406,6 +396,7 @@ public final class WorldUtil{ } stack.onBlockDestroyed(world, state, pos, player); + world.playEvent(2001, pos, Block.getStateId(state)); if(stack.stackSize <= 0 && stack == player.getHeldItemMainhand()){ ForgeEventFactory.onPlayerDestroyItem(player, stack, EnumHand.MAIN_HAND); diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelayAdvanced.json b/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelayAdvanced.json new file mode 100644 index 000000000..0234f4ce8 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelayAdvanced.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "actuallyadditions:blockLaserRelayAdvanced", + "transform": "forge:default-block" + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "meta": { + "0": { "x": 180 }, + "1": {}, + "2": { "x": 90 }, + "3": { "x": 270 }, + "4": { "x": 90, "y": 270 }, + "5": { "x": 270, "y": 270 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelayExtreme.json b/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelayExtreme.json new file mode 100644 index 000000000..477178697 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockLaserRelayExtreme.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "actuallyadditions:blockLaserRelayExtreme", + "transform": "forge:default-block" + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "meta": { + "0": { "x": 180 }, + "1": {}, + "2": { "x": 90 }, + "3": { "x": 270 }, + "4": { "x": 90, "y": 270 }, + "5": { "x": 270, "y": 270 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/blockstates/blockTinyTorch.json b/src/main/resources/assets/actuallyadditions/blockstates/blockTinyTorch.json new file mode 100644 index 000000000..9d048ab3a --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/blockstates/blockTinyTorch.json @@ -0,0 +1,9 @@ +{ + "variants": { + "facing=up": { "model": "actuallyadditions:blockTinyTorch" }, + "facing=east": { "model": "actuallyadditions:blockTinyTorchWall" }, + "facing=south": { "model": "actuallyadditions:blockTinyTorchWall", "y": 90 }, + "facing=west": { "model": "actuallyadditions:blockTinyTorchWall", "y": 180 }, + "facing=north": { "model": "actuallyadditions:blockTinyTorchWall", "y": 270 } + } +} diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 5dc0d2cce..eca2988ca 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -84,7 +84,7 @@ container.nei.actuallyadditions.compost.name=Compost container.nei.actuallyadditions.furnaceDouble.name=Double Furnace container.nei.actuallyadditions.treasureChest.name=Treasure Chest container.nei.actuallyadditions.treasureChest.info=Items at -container.nei.actuallyadditions.coffee.name=Coffee Machine +container.nei.actuallyadditions.coffee.name=Coffee Maker container.nei.actuallyadditions.coffee.special=Special Feature container.nei.actuallyadditions.coffee.maxAmount=Max Amount container.nei.actuallyadditions.coffee.extra.milk=+01:00, -1 Level @@ -178,13 +178,15 @@ tile.actuallyadditions.blockPlacer.name=Auto-Placer tile.actuallyadditions.blockDropper.name=Automatic Precision Dropper tile.actuallyadditions.blockMiscEnderCasing.name=Ender Casing tile.actuallyadditions.blockFlax.name=Flax Plant -tile.actuallyadditions.blockCoffeeMachine.name=Coffee Machine +tile.actuallyadditions.blockCoffeeMachine.name=Coffee Maker tile.actuallyadditions.blockXPSolidifier.name=Experience Solidifier tile.actuallyadditions.blockSmileyCloud.name=Smiley Cloud tile.actuallyadditions.blockLeafGenerator.name=Leaf-Eating Generator tile.actuallyadditions.blockDirectionalBreaker.name=Long-Range Breaker tile.actuallyadditions.blockRangedCollector.name=Ranged Collector -tile.actuallyadditions.blockLaserRelay.name=Laser Relay +tile.actuallyadditions.blockLaserRelay.name=Energy Laser Relay +tile.actuallyadditions.blockLaserRelayAdvanced.name=Advanced Energy Laser Relay +tile.actuallyadditions.blockLaserRelayExtreme.name=Extreme Energy Laser Relay tile.actuallyadditions.blockMiscIronCasing.name=Iron Casing tile.actuallyadditions.blockBlackLotus.name=Black Lotus tile.actuallyadditions.blockTestifiBucksWhiteFence.name=Ethetic Quartz Wall @@ -213,6 +215,7 @@ tile.actuallyadditions.blockImpureIron.name=Impure Iron tile.actuallyadditions.blockBookletStand.name=Wall-Mount Manual tile.actuallyadditions.blockDisplayStand.name=Display Stand tile.actuallyadditions.blockShockSuppressor.name=Shock Absorber +tile.actuallyadditions.blockTinyTorch.name=Tiny Torch #ESD tile.actuallyadditions.blockInputter.name=ESD @@ -331,7 +334,7 @@ item.actuallyadditions.itemDrillUpgradeFortuneII.name=Drill Fortune Augment II ( item.actuallyadditions.itemDrillUpgradeBlockPlacing.name=Drill Block Placing Augment item.actuallyadditions.itemDrillUpgradeThreeByThree.name=Drill Mining Augment I item.actuallyadditions.itemDrillUpgradeFiveByFive.name=Drill Mining Augment II -item.actuallyadditions.itemMiscMashedFood.name=Mashed Food +item.actuallyadditions.itemMiscMashedFood.name=Bio-Mash item.actuallyadditions.itemFertilizer.name=Fertilizer item.actuallyadditions.itemMiscDough.name=Dough item.actuallyadditions.itemMiscPaperCone.name=Paper Cone @@ -496,6 +499,7 @@ item.actuallyadditions.itemWaterBowl.name=Bowl of Water item.actuallyadditions.itemFilter.name=Item Filter item.actuallyadditions.itemMiscBiomass.name=Biomass item.actuallyadditions.itemMiscBiocoal.name=Bio Coal +item.actuallyadditions.itemPlayerProbe.name=Player Probe #Tooltips tooltip.actuallyadditions.onSuffix.desc=On @@ -526,6 +530,10 @@ tooltip.actuallyadditions.laser.stored.desc= tooltip.actuallyadditions.laser.connected.desc= tooltip.actuallyadditions.laser.cantConnect.desc=Can't connect: The relays are either part of the same network, the stored relay isn't the same type or doesn't exist anymore or it is too far away! tooltip.actuallyadditions.itemBooklet.desc=Or "Booklet", if you will +tooltip.actuallyadditions.playerProbe.disconnect.1=The player you were probing has broken the connection before you could strap him to the Player Interface! Data will be cleared! +tooltip.actuallyadditions.playerProbe.disconnect.2=The player you were probing has disconnected before you could strap him to the Player Interface! Data will be cleared! +tooltip.actuallyadditions.playerProbe.probing=Probing +tooltip.actuallyadditions.playerProbe.notice=Look out! Someone tried to probe you and strap you to a Player Interface, but they failed! #Gui Information info.actuallyadditions.gui.animals=Animals @@ -590,7 +598,7 @@ container.actuallyadditions.liquiface.name=Liquiface container.actuallyadditions.energyface.name=Energyface container.actuallyadditions.fluidPlacer.name=Fluid Placer container.actuallyadditions.fluidCollector.name=Fluid Collector -container.actuallyadditions.coffeeMachine.name=Coffee Machine +container.actuallyadditions.coffeeMachine.name=Coffee Maker container.actuallyadditions.drill.name=Drill container.actuallyadditions.energizer.name=Energizer container.actuallyadditions.enervator.name=Enervator @@ -647,7 +655,7 @@ achievement.actuallyadditions.pickUpCoffee=Makes you addicted achievement.actuallyadditions.pickUpCoffee.desc=Harvest some coffee achievement.actuallyadditions.craftCoffeeMachine=Addiction in cups -achievement.actuallyadditions.craftCoffeeMachine.desc=Craft a Coffee Machine +achievement.actuallyadditions.craftCoffeeMachine.desc=Craft a Coffee Maker achievement.actuallyadditions.obscured=§ksome chieve name achievement.actuallyadditions.obscured.desc=§klolwut y u actually look over meow @@ -739,16 +747,16 @@ booklet.actuallyadditions.chapter.feeder.name=Feeder booklet.actuallyadditions.chapter.feeder.text.1=The Feeder is a good alternative to a manual animal farm. Place it in the middle of an animal pen and supply it with some wheat, seeds or carrots, depending on the animal you want to feed, and just wait. It will automatically feed the animals and if there is enough animals near it, it will shut off on its own to prevent lag or animal overflow. Greenpeace approves booklet.actuallyadditions.chapter.compost.name=Compost and Fertilizer -booklet.actuallyadditions.chapter.compost.text.1=The Compost is used to make Fertilizier from Mashed Food. Fertilizer acts just like Bone Meal, but can be crafted in a much simpler manner just by crafting Mashed Food and then putting 10 of those inside of a Compost and waiting for a bit. When the mashed food is composted, just take it out by right-clicking again. This, however, also works for some other items, which will be explained when needed. -booklet.actuallyadditions.chapter.compost.text.3=Mashed Food can be crafted from any type of food or plantable item. +booklet.actuallyadditions.chapter.compost.text.1=The Compost is used to make Fertilizier from Bio-Mash. Fertilizer acts just like Bone Meal, but can be crafted in a much simpler manner just by crafting Bio-Mash and then putting 10 of those inside of a Compost and waiting for a bit. When the mash is composted, just take it out by right-clicking again. This, however, also works for some other items, which will be explained when needed. +booklet.actuallyadditions.chapter.compost.text.3=Bio-Mash can be crafted from any type of food or plantable item. booklet.actuallyadditions.chapter.crate.name=Storage Crates booklet.actuallyadditions.chapter.crate.text.1=Storage Crates are big. Really big. They hold tons of items, more than 4 chests worth of them. Not only that, but they can be upgraded in size! View the following pages to get information on that and some other items regarding crates! booklet.actuallyadditions.chapter.crate.text.4=Placing a Storage Crate Keeper inside the Storage Crate before breaking it will cause it to keep all of its items, however the Keeper will be destroyed upon placing the Crate back down. booklet.actuallyadditions.chapter.crate.text.5=The Chest To Storage Crate Upgrade allows you to convert any chest into a Storage Crate, retaining its items! Just shift-right-click onto the chest to apply it. -booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine -booklet.actuallyadditions.chapter.coffeeMachine.text.1=The Coffee Machine is a block used to make Coffee, a potion-like item that gives the user several buffs. To use the coffee machine, you need a Empty Cup, Coffee Beans, which can be found in the wild, harvested and planted on farmland again, RF/t and mB of Water per cup brewed. On the coffee machine recipe pages at the back, to see what the item does, just hover over the Cup of Coffee. +booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Maker +booklet.actuallyadditions.chapter.coffeeMachine.text.1=The Coffee Maker is a block used to make Coffee, a potion-like item that gives the user several buffs. To use the coffee maker, you need a Empty Cup, Coffee Beans, which can be found in the wild, harvested and planted on farmland again, RF/t and mB of Water per cup brewed. On the coffee maker recipe pages at the back, to see what the item does, just hover over the Cup of Coffee. booklet.actuallyadditions.chapter.coffeeMachine.text.2=To actually give your coffee some buffs, put some of the items shown on the later pages into the slots on the right. The more slots are filled up with one item, the higher the Amplifier of the effect will be. The Maximum Amplifier is the max amount of items to be put into one coffee. Order matters: When using, for example, Milk (to see what it does exactly, go to a later page), you are going to have to plan the items out inside the numbered slots in such a way that it brews the coffee you want. booklet.actuallyadditions.chapter.coffeeMachine.text.3=This is an example of a recipe making a coffee containing Fire Resistance 1 for 0:20 and Speed 1 for 2:30. booklet.actuallyadditions.chapter.coffeeMachine.text.6=Milk is an important item when brewing coffee: It adds 2 minutes to all effects of items in slots with lower numbers while removing 1 amplifier. When the amplifier of an effect is 1, however, it will remove the effect. @@ -787,7 +795,6 @@ booklet.actuallyadditions.chapter.wings.name=Wings Of The Bats booklet.actuallyadditions.chapter.wings.text.1=Sometimes, bats will drop Wings. These wings can't really be used to fly, but that's just because they're not powerful enough. To make them more powerful, you can craft Wings Of The Bats. When you have these in your inventory, they will allow you to fly like in creative mode. booklet.actuallyadditions.chapter.foods.name=Foodstuffs -booklet.actuallyadditions.chapter.foods.text.1=Yes, this is Bacon. Don't try naming it Ellspeck. Please, just don't. booklet.actuallyadditions.chapter.leafBlower.name=Leaf Blowers booklet.actuallyadditions.chapter.leafBlower.text.1=The Leaf Blower can blow away tall grass, flowers and other stuff around you when you hold right-click. There is an Advanced Leaf Blower, which works like the basic one, except that it operates much faster and also breaks Leaves. @@ -805,7 +812,7 @@ booklet.actuallyadditions.chapter.potionRings.text.1=The Potion Rings h booklet.actuallyadditions.chapter.drill.name=Drills booklet.actuallyadditions.chapter.drill.text.1=The Drill works like a Pickaxe and a Shovel. It uses RF per block. It can be charged in an Energizer and upgraded by right-clicking with it in your hand. There is a lot of upgrades, but here is an explanation of some of them: The Mining Uprgades enlarge the hole which the Drill digs. The Placement Upgrade, after you right-click it in any slot of your hotbar, will make the Drill able to place a block from that slot by right-clicking. You can also put a Battery inside the Drill to give it more charge. -booklet.actuallyadditions.chapter.drill.text.3=The Drill can also be dyed in Minecraft's 16 colors. It's only cosmetic and won't have any effect other than it looking different, however. +booklet.actuallyadditions.chapter.drill.text.2=It should be noted that, in fact, the Speed, Mining and Fortune Upgrades need their previous tiers to be installed for them to work. This means that, if you want Speed III in the Drill, it needs Speed II and Speed I inside it as well. Additionally, the Drill can also be dyed in Minecraft's 16 colors by crafting it together with one. It's only cosmetic and won't have any effect other than it looking different, however. booklet.actuallyadditions.chapter.staff.name=Staff booklet.actuallyadditions.chapter.staff.text.1=The Teleport Staff, when charged in an Energizer, can be right-clicked to teleport you to where you're looking. When you are looking at a block, it will teleport you there, however, when you aren't looking at a block, you can only be looking upwards up to 5 degrees, otherwise the teleport will fail. @@ -840,13 +847,14 @@ booklet.actuallyadditions.chapter.hairBalls.name=Ball of Fur-s booklet.actuallyadditions.chapter.hairBalls.text.1=Balls of Fur dropped by live cats. More information on the next page. booklet.actuallyadditions.chapter.hairBalls.text.2=Balls of Fur are an item rarely dropped by cats which have been tamed by the player. Cats are very mysterious creatures as they appear to get everything stuck in their fur. Balls of Fur may seem disgusting at first, but when removing all of the hair by right-clicking, they will reveal some valuable items. Or just some String. FUURRRRRR!! -booklet.actuallyadditions.chapter.laserRelays.name=Laser Relays -booklet.actuallyadditions.chapter.laserRelays.text.1=The Laser Relay is a block that can wirelessly transfer RF just by being connected with a Laser Wrench, generating a network. When placing a Power Generator or Receiver next to the relay, it can receive Power from any other relay in the network. Two relays can be at most blocks apart. During an energy transfer, they have an Energy Loss of %. -booklet.actuallyadditions.chapter.laserRelays.text.4=The Laser Wrench's mode can be switched by sneak-right-clicking it anywhere. Possible modes are to always show lasers, never show lasers or only show lasers when holding the wrench. +booklet.actuallyadditions.chapter.laserRelays.name=Energy Laser Relays +booklet.actuallyadditions.chapter.laserRelays.text.1=The Energy Laser Relay is a block that can wirelessly transfer RF (or Tesla) just by being connected with a Laser Wrench, generating a network. When placing a Power Generator or Receiver next to the relay, it can receive Power from any other relay in the network. This system always works in both directions simultaneously. Two relays can be at most blocks apart. During an energy transfer, they have a light Energy Loss, but nothing to worry about. +booklet.actuallyadditions.chapter.laserRelays.text.2=There are three tiers of Energy Laser Relay. They have different maximum amounts of energy to be transferred through them in one tick. The energy caps are, in order, , , and . Additionally, the energy loss is a bit higher every tier. Interconnecting different tiers is possible, however the lowest cap and highest loss of the two relays connected to the blocks involved in the transfer is considered. +booklet.actuallyadditions.chapter.laserRelays.text.7=The Laser Wrench's mode can be switched by sneak-right-clicking it anywhere. Possible modes are to always show lasers, never show lasers or only show lasers when holding the wrench. booklet.actuallyadditions.chapter.blackLotus.name=Black Lotus booklet.actuallyadditions.chapter.blackLotus.text.1=Think of this: You need to craft black wool, black clay or anything else that needs black dye but you are just guilty about killing so many innocent squids? Well, the Black Lotus is exactly the thing you need! Just look around in the wild a bit, and you will find one, then being able to craft some Black Dye that can be used instead of Ink Sacs so that you don't need to kill poor squids and L any longer. -booklet.actuallyadditions.chapter.blackLotus.text.2=No, not that one, Vaz +booklet.actuallyadditions.chapter.blackLotus.text.2=Do the lotus pose booklet.actuallyadditions.chapter.crystals.name=Crystals and Reconstructor booklet.actuallyadditions.chapter.crystals.text.1=The Atomic Reconstructor is used to craft Crystals, which are the main crafting ingredient in most items from Actually Additions. Upon being supplied with power, it shoots out a Laser. When the Laser hits a block, it will convert all surrounding items and blocks, provided they can be converted. When shooting a laser, it uses RF, but additional rates vary depending on the conversion. @@ -921,4 +929,10 @@ booklet.actuallyadditions.chapter.videoGuide.page.1.button=Watch Video booklet.actuallyadditions.chapter.shockSuppressor.name=Shock Absorber booklet.actuallyadditions.chapter.shockSuppressor.text.1=The Shock Absorber is a block that, when supplied with RF, it will protect an area of up to blocks around it from any type of Explosion, be it ghasts, TNT or creepers. Every block that is protected will result in a loss of RF. -booklet.actuallyadditions.chapter.shockSuppressor.text.2=Credit where credit is due: Or something like that. Anyways, this thing was thought up and suggested to me by praetoras. Thanks for that brilliant idea! What's a fourth wall..? \ No newline at end of file +booklet.actuallyadditions.chapter.shockSuppressor.text.2=Credit where credit is due: Or something like that. Anyways, this thing was thought up and suggested to me by praetoras. Thanks for that brilliant idea! What's a fourth wall..? + +booklet.actuallyadditions.chapter.tinyTorch.name=Tiny Torch +booklet.actuallyadditions.chapter.tinyTorch.text.1=Yea. + +booklet.actuallyadditions.chapter.playerProbe.name=Player Probe +booklet.actuallyadditions.chapter.playerProbe.text.1=The Player Probe can be used to change the player a Player Interface is connected to. If you don't know what the Player Interface does, look it up in here first! To use the Player Probe, simply right-click any player with it and then right-click the interface. But watch out! The Probe will notify the player and disconenct from him whenever he sneaks and will also do so when he leaves the server! Shenanigans \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/lang/zh_CN.lang b/src/main/resources/assets/actuallyadditions/lang/zh_CN.lang index 40d663d5a..18b038b20 100644 --- a/src/main/resources/assets/actuallyadditions/lang/zh_CN.lang +++ b/src/main/resources/assets/actuallyadditions/lang/zh_CN.lang @@ -546,7 +546,11 @@ info.actuallyadditions.gui.whitelist=白名单 info.actuallyadditions.gui.blacklist=黑名单 info.actuallyadditions.gui.coffee=咖啡 info.actuallyadditions.gui.ok=Ok +<<<<<<< HEAD info.actuallyadditions.gui.the=\ +======= +info.actuallyadditions.gui.the=\ +>>>>>>> master #info.actuallyadditions.gui.smart= #info.actuallyadditions.gui.smartInfo= #info.actuallyadditions.inputter.info.1=This is the first Slot in the connected Inventory to

at. @@ -921,4 +925,8 @@ booklet.actuallyadditions.chapter.videoGuide.page.1.button=立即浏览 booklet.actuallyadditions.chapter.shockSuppressor.name=震波吸收器 booklet.actuallyadditions.chapter.shockSuppressor.text.1=震波吸收器在供应RF能量后,能够保护周围至少个方块的区域免受各类爆炸的破坏,无论是恶魂,TNT还是爬行者发生的爆炸。保护一个方块需要消耗 RF。 +<<<<<<< HEAD #booklet.actuallyadditions.chapter.shockSuppressor.text.2=Credit where credit is due: Or something like that. Anyways, this thing was thought up and suggested to me by praetoras. Thanks for that brilliant idea! What's a fourth wall..? +======= +#booklet.actuallyadditions.chapter.shockSuppressor.text.2=Credit where credit is due: Or something like that. Anyways, this thing was thought up and suggested to me by praetoras. Thanks for that brilliant idea! What's a fourth wall..? +>>>>>>> master diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayAdvanced.json b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayAdvanced.json new file mode 100644 index 000000000..24a569026 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayAdvanced.json @@ -0,0 +1,880 @@ +{ + "__createdBy": "canitzp", + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/models/modelLaserRelayAdvanced", + "laserRelay": "actuallyadditions:blocks/models/modelLaserRelayAdvanced" + }, + "elements": [ + { + "from": [4,0,4], + "to": [12,1,12], + "faces": { + "up": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,3], + "to": [12,4,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,12], + "to": [12,4,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,12], + "to": [12,14,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,3], + "to": [12,14,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,2], + "to": [12,5,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,2], + "to": [12,11,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,13], + "to": [12,11,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,13], + "to": [12,5,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [5.5,1,5.5], + "to": [10.5,3,10.5], + "faces": { + "up": { + "uv": [13.5,13.5,16,16], + "texture": "#laserRelay" + }, + "down": { + "uv": [0.0,0.0,5.0,5.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [7,3,7], + "to": [9,14,9], + "faces": { + "up": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,14,4], + "to": [12,15,12], + "faces": { + "up": { + "uv": [1,12,5,15], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [6.5,6.5,6.5], + "to": [9.5,9.5,9.5], + "faces": { + "up": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "down": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "west": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,2], + "to": [5,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,2], + "to": [12,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,13], + "to": [12,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,13], + "to": [5,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,1,4], + "to": [4,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,1,4], + "to": [13,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,11,4], + "to": [13,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,11,4], + "to": [4,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,4,4], + "to": [3,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,10,4], + "to": [3,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,10,4], + "to": [14,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,4,4], + "to": [14,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,4], + "to": [3,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,11], + "to": [3,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,11], + "to": [14,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,4], + "to": [14,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayExtreme.json b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayExtreme.json new file mode 100644 index 000000000..756ae2b41 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockLaserRelayExtreme.json @@ -0,0 +1,880 @@ +{ + "__createdBy": "canitzp", + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/models/modelLaserRelayExtreme", + "laserRelay": "actuallyadditions:blocks/models/modelLaserRelayExtreme" + }, + "elements": [ + { + "from": [4,0,4], + "to": [12,1,12], + "faces": { + "up": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,3], + "to": [12,4,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,1,12], + "to": [12,4,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,12], + "to": [12,14,13], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,11,3], + "to": [12,14,4], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,2], + "to": [12,5,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,2], + "to": [12,11,3], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,10,13], + "to": [12,11,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,4,13], + "to": [12,5,14], + "faces": { + "up": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [5.5,1,5.5], + "to": [10.5,3,10.5], + "faces": { + "up": { + "uv": [13.5,13.5,16,16], + "texture": "#laserRelay" + }, + "down": { + "uv": [0.0,0.0,5.0,5.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,5,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [7,3,7], + "to": [9,14,9], + "faces": { + "up": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,2.0,2.0], + "texture": "missingtexture" + }, + "west": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,2,16,7.5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,14,4], + "to": [12,15,12], + "faces": { + "up": { + "uv": [1,12,5,15], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,8,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [6.5,6.5,6.5], + "to": [9.5,9.5,9.5], + "faces": { + "up": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "down": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "west": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "east": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "north": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + }, + "south": { + "uv": [14,0,16,2], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,2], + "to": [5,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,2], + "to": [12,10,3], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [11,5,13], + "to": [12,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [4,5,13], + "to": [5,10,14], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,1,4], + "to": [4,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,1,4], + "to": [13,4,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [12,11,4], + "to": [13,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [3,11,4], + "to": [4,14,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,3], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,3], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,4,4], + "to": [3,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,10,4], + "to": [3,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,10,4], + "to": [14,11,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,4,4], + "to": [14,5,12], + "faces": { + "up": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "down": { + "uv": [0,0,1,8], + "texture": "#laserRelay" + }, + "west": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,8,1], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,1], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,4], + "to": [3,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [2,5,11], + "to": [3,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,11], + "to": [14,10,12], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + }, + { + "from": [13,5,4], + "to": [14,10,5], + "faces": { + "up": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "down": { + "uv": [0.0,0.0,1.0,1.0], + "texture": "missingtexture" + }, + "west": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "east": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "north": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + }, + "south": { + "uv": [0,0,1,5], + "texture": "#laserRelay" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTinyTorch.json b/src/main/resources/assets/actuallyadditions/models/block/blockTinyTorch.json new file mode 100644 index 000000000..a12fd8055 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTinyTorch.json @@ -0,0 +1,33 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/blockTinyTorch", + "torch": "actuallyadditions:blocks/blockTinyTorch" + }, + "elements": [ + { "from": [ 7, 0, 7 ], + "to": [ 9, 5, 9 ], + "shade": false, + "faces": { + "down": { "uv": [ 7, 13, 9, 15 ], "texture": "#torch" }, + "up": { "uv": [ 7, 11, 9, 13 ], "texture": "#torch" } + } + }, + { "from": [ 7, 0, 0 ], + "to": [ 9, 16, 16 ], + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" } + } + }, + { "from": [ 0, 0, 7 ], + "to": [ 16, 16, 9 ], + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" } + } + } + ] +} diff --git a/src/main/resources/assets/actuallyadditions/models/block/blockTinyTorchWall.json b/src/main/resources/assets/actuallyadditions/models/block/blockTinyTorchWall.json new file mode 100644 index 000000000..08da03738 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/block/blockTinyTorchWall.json @@ -0,0 +1,36 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "actuallyadditions:blocks/blockTinyTorch", + "torch": "actuallyadditions:blocks/blockTinyTorch" + }, + "elements": [ + { "from": [ -1, 3.5, 7 ], + "to": [ 1, 8.5, 9 ], + "rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 }, + "shade": false, + "faces": { + "down": { "uv": [ 7, 13, 9, 15 ], "texture": "#torch" }, + "up": { "uv": [ 7, 11, 9, 13 ], "texture": "#torch" } + } + }, + { "from": [ -1, 3.5, 0 ], + "to": [ 1, 19.5, 16 ], + "rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" } + } + }, + { "from": [ -8, 3.5, 7 ], + "to": [ 8, 19.5, 9 ], + "rotation": { "origin": [ 0, 3.5, 8 ], "axis": "z", "angle": -22.5 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" } + } + } + ] +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/blockTinyTorch.json b/src/main/resources/assets/actuallyadditions/models/item/blockTinyTorch.json new file mode 100644 index 000000000..c7d979fb1 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/blockTinyTorch.json @@ -0,0 +1,6 @@ +{ + "parent": "actuallyadditions:item/standardItem", + "textures": { + "layer0": "actuallyadditions:blocks/blockTinyTorch" + } +} diff --git a/src/main/resources/assets/actuallyadditions/models/item/itemPlayerProbe.json b/src/main/resources/assets/actuallyadditions/models/item/itemPlayerProbe.json new file mode 100644 index 000000000..8a934a352 --- /dev/null +++ b/src/main/resources/assets/actuallyadditions/models/item/itemPlayerProbe.json @@ -0,0 +1,6 @@ +{ + "parent": "actuallyadditions:item/standardItem", + "textures": { + "layer0": "actuallyadditions:items/itemPlayerProbe" + } +} diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockTinyTorch.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockTinyTorch.png new file mode 100644 index 000000000..8cb48e1c9 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/blockTinyTorch.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelay.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelay.png index f6c3976c8..3e9140c00 100644 Binary files a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelay.png and b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelay.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelayAdvanced.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelayAdvanced.png new file mode 100644 index 000000000..d4388e8e0 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelayAdvanced.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelayExtreme.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelayExtreme.png new file mode 100644 index 000000000..079149cea Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelLaserRelayExtreme.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiocoal.png b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiocoal.png index e607c2514..336081bcd 100644 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiocoal.png and b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiocoal.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiomass.png b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiomass.png index e3519d428..74740b44c 100644 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiomass.png and b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBiomass.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemPlayerProbe.png b/src/main/resources/assets/actuallyadditions/textures/items/itemPlayerProbe.png new file mode 100644 index 000000000..60dfe1b79 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemPlayerProbe.png differ diff --git a/update/changelog.md b/update/changelog.md index a245eb03c..f8583aa39 100644 --- a/update/changelog.md +++ b/update/changelog.md @@ -1,3 +1,28 @@ +# 1.10.2-r51 +* Made TiCon Rapier be able to be repaired in the Item Repairer +* Added Player Probe +* Renamed Mashed Food to bio mash +* Made the booklet search bar search a whole item's tooltip and not just the name +* Added different Energy Laser Relays for different amounts of power transfer +* Added Tiny Torch +* Booklet now states that the drill needs previous tiers of upgrades +* Made drill coloring not use all of the nbt, meaning you can color a drill without the upgrades being gone +* Made ActAdd tools work in hopefully most automatic farms etc. + +# 1.10.2-r50 +* Changed the name of the coffee machine to coffee maker because that's apparently a more proper name +* Fixed the drill sometimes acting up on redstone and glowstone +* Fixed the particles of breaking with the drill being delayed making it look weird +* Fixed a crash with the InvTweaks sorting buttons in a storage crate +* TiCon tools now lose their broken tag when repairing them with the item repairer +* Added a config option for Solid XP dropping +* Fixed a bug with the game sometimes crashing when looking at an entity with the booklet in hand +* Fixed Drill, Crafter and Filter having an unlocalized name in the GUIs + +# 1.10.2-r49 +* Fixed a dube bug that caused the reconstructor to create about a thousand bajillion more items and blocks than it should. +* Yea. I'm pretty great. >_< + # 1.10.2-r48 * Added Shock Suppressor, a block that will cause explosions not to happen * Added Phantom Placer Siding rule button diff --git a/update/updateVersions.properties b/update/updateVersions.properties index 40abbbc11..78ea18ead 100644 --- a/update/updateVersions.properties +++ b/update/updateVersions.properties @@ -3,4 +3,4 @@ 1.9=33 1.9.4=45 1.10=46 -1.10.2=48 \ No newline at end of file +1.10.2=51 \ No newline at end of file