diff --git a/.gitignore b/.gitignore index c967a25..b8289a5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,6 @@ mods/ saves/ logs/ -/gradle.properties - CREDITS-fml.txt LICENSE-fml.txt MinecraftForge-Credits.txt diff --git a/build.gradle b/build.gradle index 0812d70..9f011a8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,45 +1,60 @@ buildscript { repositories { - jcenter() maven { name = "forge" - url = "http://files.minecraftforge.net/maven" + url = "https://files.minecraftforge.net/maven" } + jcenter() + mavenCentral() maven { name = "sponge" - url = "http://repo.spongepowered.org/maven" + url = "https://repo.spongepowered.org/maven" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' - classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT' + classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' + classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'org.spongepowered.mixin' -version = "dev.0.5" + getBuildNumber() +version = "dev.0.6" + getBuildNumber() group= "com.mcgoodtime.productionline" archivesBaseName = "ProductionLine" -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. minecraft { - version = "1.10.2-12.18.3.2221" + version = "1.12.2-14.23.5.2847" runDir = "run" - mappings = "stable_29" + + // the mappings can be changed at any time, and must be in the following format. + // snapshot_YYYYMMDD snapshot are built nightly. + // stable_# stables are built at the discretion of the MCP team. + // Use non-default mappings at your own risk. they may not always work. + // simply re-run your setup task after changing the mappings to update your workspace. + mappings = "snapshot_20171003" + // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } repositories { maven { name = "ic2" - url = "http://maven.ic2.player.to" + url = "https://maven.ic2.player.to" } maven { name = "sponge" url = "http://repo.spongepowered.org/maven" + } + maven { + name = "botania" + url = "https://maven.blamejared.com/" + } + maven { + name = "baubles" + url = "https://maven.thiakil.com" } maven { name = "jei" @@ -48,25 +63,12 @@ repositories { } dependencies { - compile ('org.spongepowered:mixin:0.6.+') { + compile 'net.industrial-craft:industrialcraft-2:2.8.209-ex112:dev' //adds ic2 to the dev env + deobfCompile "vazkii.botania:Botania:r1.10-363.148" + deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2" + compile ('org.spongepowered:mixin:0.8') { exclude module: 'launchwrapper' } - deobfCompile 'net.industrial-craft:industrialcraft-2:2.6.161-ex110' //adds ic2 to the dev env - compile 'mezz.jei:jei_1.10.2:3.14.4.404' -} - -jar { - manifest { - attributes ( - 'FMLCorePlugin': 'com.mcgoodtime.productionline.core.coremod.PLCore', - 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker', - 'TweakOrder': 0, - 'MixinConfigs': 'mixins.productionline.core.json', - 'FMLCorePluginContainsFMLMod': true, - 'FMLAT': 'productionline_at.cfg', - 'ForceLoadAsMod': true - ) - } } mixin { @@ -79,18 +81,21 @@ compileJava { options.encoding = 'UTF-8' } -idea.module.inheritOutputDirs = true - processResources { + // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version - - from (sourceSets.main.resources.srcDirs) { + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' - expand 'version' : project.version, 'mcversion' : project.minecraft.version + + // replace version and mcversion + expand 'version':project.version, 'mcversion':project.minecraft.version } - - from (sourceSets.main.resources.srcDirs) { + + // copy everything else except the mcmod.info + from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } @@ -98,5 +103,3 @@ processResources { static def getBuildNumber() { return "$System.env.BUILD_NUMBER" != "null" ? "." + Integer.parseInt("$System.env.BUILD_NUMBER") : "" } - -tasks.jar.dependsOn "check" diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..fdd743e --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G + \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d3b8398..30d399d 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3860365..e18cba7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Oct 04 20:07:23 PDT 2016 +#Mon Sep 14 12:28:28 PDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip diff --git a/gradlew b/gradlew index 27309d9..91a7e26 100644 --- a/gradlew +++ b/gradlew @@ -6,30 +6,12 @@ ## ############################################################################## -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -48,7 +30,6 @@ die ( ) { cygwin=false msys=false darwin=false -nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -59,11 +40,31 @@ case "`uname`" in MINGW* ) msys=true ;; - NONSTOP* ) - nonstop=true - ;; esac +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -89,7 +90,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -113,7 +114,6 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/gradlew.bat b/gradlew.bat index 832fdb6..8a0b282 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,7 +46,7 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windows variants +@rem Get command-line arguments, handling Windowz variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockContainerPL.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockContainerPL.java index 88b637a..b00a2bc 100644 --- a/src/main/java/com/mcgoodtime/productionline/blocks/BlockContainerPL.java +++ b/src/main/java/com/mcgoodtime/productionline/blocks/BlockContainerPL.java @@ -26,7 +26,6 @@ package com.mcgoodtime.productionline.blocks; import com.mcgoodtime.productionline.inventory.Inventories; -import com.mcgoodtime.productionline.tiles.TileFacing; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -46,7 +45,7 @@ public abstract class BlockContainerPL extends BlockPL implements ITileEntityPro public BlockContainerPL(Material material, String name) { super(material, name); - this.isBlockContainer = true; + //this.isBlockContainer = true; } @Override @@ -66,7 +65,7 @@ public boolean eventReceived(IBlockState state, World world, BlockPos pos, int i return tileentity != null && tileentity.receiveClientEvent(id, param); } - protected abstract Class getTileEntityClass(IBlockState state); + protected abstract Class getTileEntityClass(IBlockState state); @Override public TileEntity createTileEntity(World world, IBlockState state) { diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockGenerator.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockGenerator.java new file mode 100644 index 0000000..a64b061 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/blocks/BlockGenerator.java @@ -0,0 +1,147 @@ +/* + * This file is part of Production Line, licensed under MIT License (MIT). + * + * Copyright (c) 2020 GoodTime Studio + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.mcgoodtime.productionline.blocks; + +import com.mcgoodtime.productionline.core.GuiHandler; +import com.mcgoodtime.productionline.core.ProductionLine; +import com.mcgoodtime.productionline.init.PLItems; +import com.mcgoodtime.productionline.tiles.TileTefnutTear; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.GameRegistry; + +import javax.annotation.Nonnull; + +/** + * The energy generator block + * Created by NightOwl on 2020/7/17 + * + * @author NightOwl + * @since 0.6 + */ +public class BlockGenerator extends BlockContainerPL implements IMultiIDBlock> { + + public static final PropertyEnum PROPERTY_TYPE = PropertyEnum.create("type", BlockGenerator.Type.class); + + public enum Type implements IStringSerializable, IBlockType { + WATER_GENERATOR("tefnut_tear", TileTefnutTear.class, null); + + private final String name; + public final Class tileClass; + public final GuiHandler.EnumGui gui; + + Type(String name, Class tileClass, GuiHandler.EnumGui gui) { + this.name = name; + this.tileClass = tileClass; + this.gui = gui; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public String getTypeName() { + return this.name; + } + } + + public BlockGenerator() { + super(Material.IRON, "generator"); + this.setDefaultState(this.blockState.getBaseState().withProperty(PROPERTY_TYPE, Type.WATER_GENERATOR)); + for (BlockGenerator.Type t : BlockGenerator.Type.values()) { + GameRegistry.registerTileEntity(t.tileClass, new ResourceLocation(ProductionLine.MOD_ID, t.getTypeName())); + } + } + + @Override + protected Class getTileEntityClass(IBlockState state) { + return state.getValue(PROPERTY_TYPE).tileClass; + } + + @Override + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { + if (stack.getMetadata() < BlockMachine.Type.values().length) { + world.setBlockState(pos, state.withProperty(PROPERTY_TYPE, BlockGenerator.Type.values()[stack.getMetadata()]), 2); + } + } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, PROPERTY_TYPE); + } + + @Nonnull + @Override + public PropertyEnum getBlockTypeContainer() { + return PROPERTY_TYPE; + } + + /** + * Convert the BlockState into the correct metadata value + */ + @Override + public int getMetaFromState(IBlockState state) { + return state.getValue(PROPERTY_TYPE).ordinal(); + } + + /** + * Convert the given metadata into a BlockState for this Block + */ + @Override + public IBlockState getStateFromMeta(int meta) { + if (meta < BlockGenerator.Type.values().length) { + return this.getDefaultState().withProperty(PROPERTY_TYPE, BlockGenerator.Type.values()[meta]); + } + return null; + } + + //Open GUI when player rightClick with sheepCrook + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ + + if(worldIn.isRemote){ + if(playerIn.getHeldItemMainhand().getItem() == PLItems.sheepCrook){ + //TODO addGUI +// playerIn.openGui(); + } + } + return true; + } +} diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockMachine.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockMachine.java index 09ded17..e12019f 100644 --- a/src/main/java/com/mcgoodtime/productionline/blocks/BlockMachine.java +++ b/src/main/java/com/mcgoodtime/productionline/blocks/BlockMachine.java @@ -1,16 +1,10 @@ package com.mcgoodtime.productionline.blocks; import com.mcgoodtime.productionline.client.IBlockModelProvider; -import com.mcgoodtime.productionline.PLUtil; import com.mcgoodtime.productionline.core.GuiHandler; import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.init.PLBlocks; import com.mcgoodtime.productionline.items.ItemBlockPL; import com.mcgoodtime.productionline.tiles.*; -import com.mcgoodtime.productionline.tiles.eustorage.TileCSEU; -import com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage; -import com.mcgoodtime.productionline.tiles.eustorage.TileEVSU; -import com.mcgoodtime.productionline.tiles.eustorage.TileParallelSpaceSU; import ic2.api.item.IC2Items; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyBool; @@ -22,19 +16,18 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.world.ChunkCache; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.common.registry.GameRegistry; import java.util.Random; import javax.annotation.Nonnull; -import javax.annotation.Nullable; /** * Created by BestOwl on 2015.11.25.0025. @@ -47,20 +40,7 @@ public class BlockMachine extends BlockContainerPL implements IOrientableBlock, public static final PropertyEnum PROPERTY_TYPE = PropertyEnum.create("type", Type.class); public static final PropertyBool PROPERTY_ACTIVE = PropertyBool.create("active"); - public enum Type implements IStringSerializable, IBlockType { - CARBONIZE_FURNACE("carbonize_furnace", TileCarbonizeFurnace.class, GuiHandler.EnumGui.CarbonizeFurnace), - HEAT_DRYER("heat_dryer", TileHeatDryer.class, GuiHandler.EnumGui.HeatDryer), - EVSU("evsu",TileEVSU.class, GuiHandler.EnumGui.EVSU), - CSEU("cseu",TileCSEU.class, GuiHandler.EnumGui.CSEU), - PARALLEL_SPACE_SU("parallel_space_su",TileParallelSpaceSU.class, GuiHandler.EnumGui.ParallelSpaceSU), - ADV_SOLAR("adv_solar", TileAdvSolar.class, GuiHandler.EnumGui.AdvSolar), - FLUID_KINETIC_GENERATOR("fluid_kinetic_generator", TileFluidKineticGenerator.class, GuiHandler.EnumGui.FluidKineticGenerator), - PACKAGER("packager", TilePackager.class, GuiHandler.EnumGui.PACKAGER); -// CUTTER("cutter", TileCutter.class, GuiHandler.EnumGui.Cutter), -// LIQUIDEXTRACTOR("liquid_extractor", TileLiquidExtractor.class, GuiHandler.EnumGui.LiquidExtractor), -// Mixer("mixer", TileMixer.class, GuiHandler.EnumGui.Mixer); - - + public enum Type implements IStringSerializable, IBlockType {; private final String name; public final Class tileClass; @@ -92,15 +72,6 @@ public BlockMachine() { for (Type t : Type.values()) { GameRegistry.registerTileEntity(t.tileClass, t.getName()); } - - PLBlocks.carbonizeFurnace = new ItemStack(this); - PLBlocks.heatDryer = new ItemStack(this, 1, 1); - PLBlocks.evsu = new ItemStack(this, 1, 2); - PLBlocks.cseu = new ItemStack(this, 1, 3); - PLBlocks.parallelSpaceSU = new ItemStack(this, 1, 4); - PLBlocks.advSolar = new ItemStack(this, 1, 5); - PLBlocks.fluidKineticGenerator = new ItemStack(this, 1, 6); - PLBlocks.packager = new ItemStack(this, 1, 7); } @Override @@ -111,26 +82,7 @@ public ModelResourceLocation getModelResourceLocation(int meta) { @Override public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) { - TileEntity te = worldIn.getTileEntity(pos); - if (te instanceof TileCarbonizeFurnace) { - if (((TileCarbonizeFurnace) te).active) { - float xmod; - float ymod; - float zmod; - - float x = (float)pos.getX() + 1.0F; - float y = (float)pos.getY() + 1.0F; - float z = (float)pos.getZ() + 1.0F; - - for(int i = 0; i < 4; ++i) { - xmod = -0.2F - rand.nextFloat() * 0.6F; - ymod = -0.1F + rand.nextFloat() * 0.2F; - zmod = -0.2F - rand.nextFloat() * 0.6F; - worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(x + xmod), (double)(y + ymod), - (double)(z + zmod), 0.0D, 0.0D, 0.0D); - } - } - } + } @Nonnull @@ -143,10 +95,9 @@ public PropertyEnum getBlockTypeContainer() { * Called upon block activation (right click on the block.) */ @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, @Nullable ItemStack heldItem, - EnumFacing side, float hitX, float hitY, float hitZ) { - if (!world.isRemote) { - player.openGui(ProductionLine.getInstance(), state.getValue(PROPERTY_TYPE).gui.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { + if (!worldIn.isRemote) { + playerIn.openGui(ProductionLine.getInstance(), state.getValue(PROPERTY_TYPE).gui.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ()); } return true; } @@ -180,18 +131,8 @@ public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, Entity TileFacing tile = (TileFacing) world.getTileEntity(pos); if (tile != null) { - if (tile instanceof TileEUStorage) { - tile.setFacing(PLUtil.getFacingFromEntity(pos, placer)); - } - else { - tile.setFacing(placer.getHorizontalFacing().getOpposite()); - } - + tile.setFacing(placer.getHorizontalFacing().getOpposite()); } - -// TileEUStorage tile = (TileEUStorage) world.getTileEntity(pos); -// NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); -// tile.energy = nbt.getDouble("energy"); } /** @@ -234,7 +175,7 @@ public IBlockState getStateFromMeta(int meta) { @Override protected void registerItemBlock() { - GameRegistry.register(new ItemBlockPL(this), this.getRegistryName()); + ForgeRegistries.ITEMS.register(new ItemBlockPL(this)); } @Override diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockMisc.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockMisc.java index 3d34f0a..0cc6b7f 100644 --- a/src/main/java/com/mcgoodtime/productionline/blocks/BlockMisc.java +++ b/src/main/java/com/mcgoodtime/productionline/blocks/BlockMisc.java @@ -26,7 +26,6 @@ import com.mcgoodtime.productionline.client.IBlockModelProvider; import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.init.PLBlocks; import com.mcgoodtime.productionline.items.ItemBlockPL; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyEnum; @@ -34,13 +33,12 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IStringSerializable; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.common.registry.ForgeRegistries; import javax.annotation.Nonnull; @@ -53,10 +51,8 @@ public class BlockMisc extends BlockPL implements IMultiIDBlock PROPERTY_TYPE = PropertyEnum.create("type", Type.class); - public enum Type implements IStringSerializable, IBlockType { - COMPRESSED_WATER_HYACINTH("compressed_water_hyacinth"), - DEHYDRATED_WATER_HYACINTH_BLOCK("dehydrated_water_hyacinth_block"), - OPTICAL_GLASS("optical_glass"); + public enum Type implements IStringSerializable, IBlockType {; + //COMPRESSED_WATER_HYACINTH("compressed_water_hyacinth"); private final String name; @@ -79,9 +75,6 @@ public String getTypeName() { public BlockMisc() { super(Material.ROCK, "block_misc"); this.setHardness(1.0F); - PLBlocks.compressedWaterHyacinth = new ItemStack(this, 1, 0); - PLBlocks.dehydratedWaterHyacinthblock = new ItemStack(this, 1, 1); - PLBlocks.opticalGlass = new ItemStack(this, 1, 2); } @Override @@ -98,7 +91,7 @@ public PropertyEnum getBlockTypeContainer() { @Override protected void registerItemBlock() { - GameRegistry.register(new ItemBlockPL(this), this.getRegistryName()); + ForgeRegistries.ITEMS.register(new ItemBlockPL(this)); } /** diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockPL.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockPL.java index e0fc14c..5f40a3f 100644 --- a/src/main/java/com/mcgoodtime/productionline/blocks/BlockPL.java +++ b/src/main/java/com/mcgoodtime/productionline/blocks/BlockPL.java @@ -29,27 +29,17 @@ import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -//import net.minecraft.util.MovingObjectPositionsition; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IForgeRegistryEntry; import org.apache.logging.log4j.Level; -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Random; - import static com.mcgoodtime.productionline.core.ProductionLine.*; /** @@ -76,8 +66,8 @@ public BlockPL(Material material, String name) { this.setUnlocalizedName(MOD_ID + ".block." + name); this.setCreativeTab(creativeTabPL); this.internalName = name; - // TODO register after construction - GameRegistry.register(this, new ResourceLocation(MOD_ID, name)); + this.setRegistryName(new ResourceLocation(MOD_ID, this.internalName)); + ForgeRegistries.BLOCKS.register(this); this.registerItemBlock(); if (this instanceof IOrientableBlock) { this.setDefaultState(this.blockState.getBaseState().withProperty(PROPERTY_FACING, EnumFacing.NORTH)); @@ -85,69 +75,14 @@ public BlockPL(Material material, String name) { PLConfig.gtiLogger.log(Level.INFO, name + ":" + Integer.toString(Block.getIdFromBlock(this))); } - /** - * Called when a user uses the creative pick block button on this block - * - * @param target The full target the player is looking at - * @param player @return A ItemStack to add to the player's inventory, Null if nothing should be added. - */ - @Nonnull - @Override - public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, EntityPlayer player) { -// if (this instanceof IMultiMetaBlock) { -// Block block = world.getBlockState(pos).getBlock(); -// return new ItemStack(this, 1, block.getMetaFromState(world.getBlockState(pos))); -// } - return super.getPickBlock(state, target, world, pos, player); - } - - /** - * This returns a complete list of items dropped from this block. - * - * @param world The current world - * @param pos Block position in world - * @param state Current state - * @param fortune Breakers fortune level - * @return A ArrayList containing all items this block drops - */ - @Override - @Nonnull - public List getDrops(IBlockAccess world, BlockPos pos, @Nonnull IBlockState state, int fortune) { - return super.getDrops(world, pos, state, fortune); - } - - /** - * Get the Item that this Block should drop when harvested. - * - */ - @Override - public Item getItemDropped(IBlockState state, Random rand, int fortune) { - return super.getItemDropped(state, rand, fortune); - } - -// /** -// * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) -// */ -// @Override -// @SideOnly(Side.CLIENT) -// public void getSubBlocks(@Nonnull Item item, CreativeTabs creativeTabs, List list) { -// if (this instanceof IMultiMetaBlock) { -// for(int meta = 0; meta < ((IMultiMetaBlock) this).getMaxMeta(); ++meta) { -// ItemStack stack = new ItemStack(this, 1, meta); -// list.add(stack); -// } -// } else { -// super.getSubBlocks(item, creativeTabs, list); -// } -// } - /** * Register item block. * Forge recommend register item block separately. - * {@link GameRegistry#register(IForgeRegistryEntry, ResourceLocation)} - */ + */ protected void registerItemBlock() { - GameRegistry.register(new ItemBlock(this), new ResourceLocation(MOD_ID, this.internalName)); + ItemBlock item = new ItemBlock(this); + item.setRegistryName(new ResourceLocation(MOD_ID, this.internalName)); + ForgeRegistries.ITEMS.register(item); } @Override diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockWaterHyacinth.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockWaterHyacinth.java deleted file mode 100644 index eb8b15f..0000000 --- a/src/main/java/com/mcgoodtime/productionline/blocks/BlockWaterHyacinth.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.blocks; - -import net.minecraft.block.BlockBush; -import net.minecraft.block.BlockLiquid; -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.entity.item.EntityBoat; -import net.minecraft.init.Blocks; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.List; -import java.util.Random; - -import static com.mcgoodtime.productionline.core.ProductionLine.*; - -/** - * Yeah the water hyacinth block... For fun. - * - * @author liach - */ -public class BlockWaterHyacinth extends BlockBush { - - private final AxisAlignedBB box = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.09375D, 0.9375D); - - public BlockWaterHyacinth() { - super(Material.PLANTS); - this.setUnlocalizedName("productionline.block.WaterHyacinth"); - this.setCreativeTab(creativeTabPL); - //this.setBlockTextureName(ProductionLine.RESOURCE_DOMAIN + ":" + "BlockWaterHyacinth"); - this.setHardness(0.0F); - this.setResistance(0.0F); - this.setSoundType(SoundType.PLANT); - this.setTickRandomly(true); - } - - @Override - public void randomTick(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Random rand) { - int changedX = rand.nextInt(5) - 3 + pos.getX(); - int changedZ = rand.nextInt(5) - 3 + pos.getZ(); - BlockPos check = new BlockPos(changedX, pos.getY(), changedZ); - if ((world.isAirBlock(check)) && (this.canSustainBush(world.getBlockState(check.down())))) { - world.setBlockState(pos, getDefaultState()); - } - } - - public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) { - if (pos.getY() >= 0 && pos.getY() < 256) { - IBlockState iblockstate = worldIn.getBlockState(pos.down()); - Material material = iblockstate.getMaterial(); - return material == Material.WATER && iblockstate.getValue(BlockLiquid.LEVEL) == 0 || material == Material.ICE; - } else { - return false; - } - } - - @Override - protected boolean canSustainBush(IBlockState state) { - return state.getBlock() == Blocks.WATER || state.getMaterial() == Material.ICE; - } - - @Override - @SuppressWarnings("deprecation") - public void addCollisionBoxToList(IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull AxisAlignedBB entityBox, @Nonnull List collidingBoxes, @Nullable Entity entityIn) { - if (!(entityIn instanceof EntityBoat)) { - addCollisionBoxToList(pos, entityBox, collidingBoxes, box); - } - } - - /** - * Called When an Entity Collided with the Block - */ - @Override - public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { - super.onEntityCollidedWithBlock(worldIn, pos, state, entityIn); - - if (entityIn instanceof EntityBoat) { - worldIn.destroyBlock(new BlockPos(pos), true); - } - } - - @Nonnull - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { - return box; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/BlockWirelessMachine.java b/src/main/java/com/mcgoodtime/productionline/blocks/BlockWirelessMachine.java new file mode 100644 index 0000000..3d9c24c --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/blocks/BlockWirelessMachine.java @@ -0,0 +1,109 @@ +package com.mcgoodtime.productionline.blocks; + +import com.mcgoodtime.productionline.client.IBlockModelProvider; +import com.mcgoodtime.productionline.core.GuiHandler; +import com.mcgoodtime.productionline.core.ProductionLine; +import com.mcgoodtime.productionline.items.ItemBlockPL; +import com.mcgoodtime.productionline.tiles.TileFacing; + +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +import net.minecraftforge.fml.common.registry.ForgeRegistries; +import net.minecraftforge.fml.common.registry.GameRegistry; + +import javax.annotation.Nonnull; + +public class BlockWirelessMachine extends BlockContainerPL implements IOrientableBlock, IMultiIDBlock>, IBlockModelProvider { + + public static final PropertyEnum PROPERTY_TYPE = PropertyEnum.create("type", Type.class); + public static final PropertyBool PROPERTY_ACTIVE = PropertyBool.create("active"); + + public enum Type implements IStringSerializable, IBlockType {; + + private final String name; + public final Class tileClass; + public final GuiHandler.EnumGui gui; + + Type(String name, Class tileClass, GuiHandler.EnumGui gui) { + this.name = name; + this.tileClass = tileClass; + this.gui = gui; + } + + @Override + @Nonnull + public String getName() { + return name; + } + + @Override + public String getTypeName() { + return this.name; + } + } + + + public BlockWirelessMachine(Material material, String name) { + super(Material.IRON, "wireless_machine"); + this.setHardness(2.0F); + this.setLightLevel(10.0F); + this.setDefaultState(this.blockState.getBaseState().withProperty(PROPERTY_FACING, EnumFacing.NORTH).withProperty(PROPERTY_ACTIVE, false)); + for (BlockWirelessMachine.Type t : BlockWirelessMachine.Type.values()) { + GameRegistry.registerTileEntity(t.tileClass, t.getName()); + } + } + + @Override + public ModelResourceLocation getModelResourceLocation(int meta) { + ResourceLocation res = new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, BlockWirelessMachine.Type.values()[meta].getTypeName()); + return new ModelResourceLocation(res, "inventory"); + } + + @Override + protected Class getTileEntityClass(IBlockState state) { + return state.getValue(PROPERTY_TYPE).tileClass; + } + + @Nonnull + @Override + public PropertyEnum getBlockTypeContainer(){ + return PROPERTY_TYPE; + } + + @Override + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { + if (stack.getMetadata() < BlockMachine.Type.values().length) { + world.setBlockState(pos, state.withProperty(PROPERTY_TYPE, BlockWirelessMachine.Type.values()[stack.getMetadata()]), 2); + } + + TileFacing tile = (TileFacing) world.getTileEntity(pos); + if (tile != null) { + tile.setFacing(placer.getHorizontalFacing().getOpposite()); + } + } + + @Override + protected void registerItemBlock() { + ForgeRegistries.ITEMS.register(new ItemBlockPL(this)); + } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, PROPERTY_FACING, PROPERTY_TYPE, PROPERTY_ACTIVE); + } + + +} diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/fluid/BioFuel.java b/src/main/java/com/mcgoodtime/productionline/blocks/fluid/BioFuel.java deleted file mode 100644 index 32dab0e..0000000 --- a/src/main/java/com/mcgoodtime/productionline/blocks/fluid/BioFuel.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.mcgoodtime.productionline.blocks.fluid; - -import com.mcgoodtime.productionline.core.ProductionLine; - -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.Fluid; - -public class BioFuel extends Fluid{ - public static final ResourceLocation still = new ResourceLocation(ProductionLine.MOD_NAME+":"+"textures/blocks/fluids/Bio Fuel_Still"); - - - public BioFuel() { - super("bioFuel", still, still); - - this.setUnlocalizedName("BioFuel"); - this.setDensity(800); - this.setViscosity(2000); - this.setLuminosity(1); - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/fluid/FluidBlockGas.java b/src/main/java/com/mcgoodtime/productionline/blocks/fluid/FluidBlockGas.java deleted file mode 100644 index 4ae8b38..0000000 --- a/src/main/java/com/mcgoodtime/productionline/blocks/fluid/FluidBlockGas.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.BlockFluidFinite; -import net.minecraftforge.fluids.Fluid; - -public class FluidBlockGas extends BlockFluidFinite { - public FluidBlockGas(Fluid fluid, Material material) { - super(fluid, material); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/fluid/Gas.java b/src/main/java/com/mcgoodtime/productionline/blocks/fluid/Gas.java deleted file mode 100644 index 8e3308b..0000000 --- a/src/main/java/com/mcgoodtime/productionline/blocks/fluid/Gas.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of Production-Line, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.blocks.fluid; - -import static com.mcgoodtime.productionline.core.ProductionLine.loc; -import net.minecraftforge.fluids.Fluid; - -public class Gas extends Fluid { - public static Fluid gasNatural = new Gas("Natural Gas", - "blocks/fluids/Natural Gas_still", - "blocks/fluids/Natural Gas_still"); - - public Gas(String name, String locStill, String locFlow) { - super(name, loc(locStill), loc(locFlow)); - setGaseous(true); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/blocks/generator/BlockFluidKineticGenerator.java b/src/main/java/com/mcgoodtime/productionline/blocks/generator/BlockFluidKineticGenerator.java deleted file mode 100644 index 823942d..0000000 --- a/src/main/java/com/mcgoodtime/productionline/blocks/generator/BlockFluidKineticGenerator.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.blocks.generator; - -import com.mcgoodtime.productionline.blocks.BlockContainerPL; -import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.core.GuiHandler; -import com.mcgoodtime.productionline.tiles.TileFluidKineticGenerator; -import com.mcgoodtime.productionline.tiles.TileFacing; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import javax.annotation.Nullable; - -public class BlockFluidKineticGenerator extends BlockContainerPL { - - public BlockFluidKineticGenerator() { - super(Material.IRON, "fluid_kinetic_generator"); - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { - if (!world.isRemote) { - player.openGui(ProductionLine.getInstance(), GuiHandler.EnumGui.FluidKineticGenerator.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - } - return true; - } - - @Override - protected Class getTileEntityClass(IBlockState state) { - return TileFluidKineticGenerator.class; - } -} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/client/PLModelRegistry.java b/src/main/java/com/mcgoodtime/productionline/client/PLModelRegistry.java index 56bf9e4..5c9f5c4 100644 --- a/src/main/java/com/mcgoodtime/productionline/client/PLModelRegistry.java +++ b/src/main/java/com/mcgoodtime/productionline/client/PLModelRegistry.java @@ -25,18 +25,18 @@ package com.mcgoodtime.productionline.client; -import com.mcgoodtime.productionline.blocks.*; +import com.mcgoodtime.productionline.core.ProductionLine; import com.mcgoodtime.productionline.init.PLBlocks; import com.mcgoodtime.productionline.init.PLItems; import com.mcgoodtime.productionline.items.ItemMulti; import net.minecraft.block.Block; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.statemap.IStateMapper; -import net.minecraft.client.renderer.block.statemap.StateMap; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; +import vazkii.botania.api.BotaniaAPIClient; import static com.mcgoodtime.productionline.core.ProductionLine.RESOURCE_DOMAIN; @@ -49,34 +49,20 @@ public class PLModelRegistry { public static void loadBlockModels() { registerBlockModel(PLBlocks.oreIridium); - registerBlockModel(PLBlocks.airBrakeCasing); - registerBlockModel(PLBlocks.compressedWaterHyacinth); - registerBlockModel(PLBlocks.dehydratedWaterHyacinthblock); - - ModelLoader.setCustomStateMapper(PLBlocks.machine, new StateMap.Builder().withName(BlockMachine.PROPERTY_TYPE).build()); - registerBlockModel(PLBlocks.carbonizeFurnace); - registerBlockModel(PLBlocks.heatDryer); - registerBlockModel(PLBlocks.evsu); - registerBlockModel(PLBlocks.cseu); - registerBlockModel(PLBlocks.parallelSpaceSU); - registerBlockModel(PLBlocks.advSolar); - registerBlockModel(PLBlocks.fluidKineticGenerator); - registerBlockModel(PLBlocks.packager); + + if (ProductionLine.isBotaniaLoaded) + { + BotaniaAPIClient.registerSubtileModel(PLBlocks.flowerOfOsiris, new ModelResourceLocation( + new ResourceLocation(RESOURCE_DOMAIN, PLBlocks.flowerOfOsiris), "" + )); + } + + // ModelLoader.setCustomStateMapper(PLBlocks.machine, new StateMap.Builder().withName(BlockMachine.PROPERTY_TYPE).build()); } public static void loadItemModels() { registerItemModel(PLItems.diamondApple, 0); registerItemModel(PLItems.diamondApple, 1); - registerItemModel(PLItems.record_MusicSpring); - registerItemModel(PLItems.salt); - registerItemModel(PLItems.gravityRay); - registerItemModel(PLItems.packagedSalt); - registerItemModel(PLItems.saltWaterBucket); -// registerItemModel(PLItems.liquidExpBucket); -// registerItemModel(PLItems.enderPearlBucket); -// registerItemModel(PLItems.brineBucket); -// registerItemModel(PLItems.toadCoin); -// registerItemModel(PLItems.superTrashBag); if (PLItems.itemCrafting instanceof ItemMulti) { for (int i = 0; i < ((ItemMulti) PLItems.itemCrafting).getInternalNameSize(); i++) { @@ -89,6 +75,12 @@ public static void loadItemModels() { registerItemModel(PLItems.itemOre, i); } } + + if(PLItems.itemSeal instanceof ItemMulti){ + for(int i =0; i<((ItemMulti)PLItems.itemSeal).getInternalNameSize();i++){ + registerItemModel(PLItems.itemSeal, i); + } + } } private static ModelResourceLocation getItemModelResLoc(Item item, int meta) { @@ -132,7 +124,6 @@ private static ModelResourceLocation getItemModelResLoc(Item item, int meta) { // } ResourceLocation ret = new ResourceLocation(RESOURCE_DOMAIN, path + name); - ModelResourceLocation t = new ModelResourceLocation(ret, variant); return new ModelResourceLocation(ret, variant); } diff --git a/src/main/java/com/mcgoodtime/productionline/client/RenderEntityThrownItem.java b/src/main/java/com/mcgoodtime/productionline/client/RenderEntityThrownItem.java index 798501a..08c90b9 100644 --- a/src/main/java/com/mcgoodtime/productionline/client/RenderEntityThrownItem.java +++ b/src/main/java/com/mcgoodtime/productionline/client/RenderEntityThrownItem.java @@ -82,7 +82,8 @@ public void doRender(T entity, double x, double y, double z, float entityYaw, fl } protected ItemStack getStackToRender(T entity) { - return entity.getThrowItem().orNull(); + //return entity.getThrowItem().orNull(); + return null; } /** diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiAdvSolar.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiAdvSolar.java deleted file mode 100644 index 7ed7a06..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiAdvSolar.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.inventory.ContainerAdvSolar; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.ResourceLocation; - -import java.util.Collections; - -/** - * Created by BestOwl on 2015.12.5.0005. - * - * @author BestOwl - */ -public class GuiAdvSolar extends GuiPL { - - public GuiAdvSolar(ContainerAdvSolar container) { - super(container); - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, "textures/gui/GuiAdvSolar.png"); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - super.drawGuiContainerForegroundLayer(x, y); - - if (!this.container.tile.hasLens) { - String tooltip = I18n.format(ProductionLine.GUI_PREFIX + "AdvSolar.lens"); - drawTooltip(x - this.guiLeft, y - this.guiTop, Collections.singletonList(tooltip)); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - - if (this.container.tile.underSun && this.container.tile.hasLens) { - this.drawTexturedModalRect(this.x + 81, this.y + 45, 176, 0, 14, 14); - } - - if (!this.container.tile.hasLens) { - this.mc.renderEngine.bindTexture(new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, "textures/gui/misc.png")); - this.drawTexturedModalRect(this.x + 3, this.y + 3 + 10, 0, 246, 10, 10); - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiCarbonizeFurnace.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiCarbonizeFurnace.java deleted file mode 100644 index cc55157..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiCarbonizeFurnace.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.PLUtil; -import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.inventory.ContainerCarbonizeFurnace; -import com.mcgoodtime.productionline.tiles.TileCarbonizeFurnace; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class GuiCarbonizeFurnace extends GuiPL { - - public GuiCarbonizeFurnace(ContainerCarbonizeFurnace container) { - super(container); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - TileCarbonizeFurnace tile = this.container.getTileEntity(); - int i1 = PLUtil.getGuiScaled(14, (float) tile.energy, tile.maxEnergy); - this.drawTexturedModalRect(this.x + 56, this.y + 36 + 14 - i1, 176, 14 - i1, 14, i1 + 1); - i1 = PLUtil.getGuiScaled(24, tile.progress, (float) tile.requireEnergy); - this.drawTexturedModalRect(this.x + 79, this.y + 34, 176, 14, i1 + 1, 16); - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, "textures/gui/GuiCarbonizeFurnace.png"); - } -} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiEUStorage.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiEUStorage.java deleted file mode 100644 index 0a94fac..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiEUStorage.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.PLUtil; -import com.mcgoodtime.productionline.inventory.ContainerEUStorage; -import com.mcgoodtime.productionline.network.PLNetwork; -import com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage; -import ic2.core.GuiIconButton; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -import java.io.IOException; -import java.util.Collections; - -import static com.mcgoodtime.productionline.core.ProductionLine.*; -import static net.minecraft.client.resources.I18n.*; - -/** - * Created by BestOwl on 2015.11.28.0028. - * - * @author BestOwl - */ -public class GuiEUStorage extends GuiPL { - - public GuiEUStorage(ContainerEUStorage container) { - super(container); - this.ySize = 196; - } - - /** - * Adds the buttons (and other controls) to the screen in question. - */ - @SuppressWarnings("unchecked") - @Override - public void initGui() { - super.initGui(); - this.buttonList.add(new GuiIconButton(0, (this.width - this.xSize) / 2 + - 152, (this.height - this.ySize) / 2 + 4, 20, 20, new ItemStack(Items.REDSTONE), true)); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - super.drawGuiContainerForegroundLayer(x, y); - this.fontRendererObj.drawString(format("ic2.EUStorage.gui.info.armor"), 8, this.ySize - 126 + 3, 4210752); - this.fontRendererObj.drawString(format("ic2.EUStorage.gui.info.level"), 79, 25, 4210752); - this.fontRendererObj.drawString(" " + ((int) ((TileEUStorage) this.container.tile).energy), 110, 35, 4210752); - this.fontRendererObj.drawString("/" + ((TileEUStorage) this.container.tile).maxEnergy, 110, 45, 4210752); - this.fontRendererObj.drawString(format("ic2.EUStorage.gui.info.output", - ((TileEUStorage) this.container.tile).energyTick), 85, 60, 4210752); - drawTooltip(x - this.guiLeft, y - this.guiTop, Collections.singletonList(format("ic2.EUStorage.gui.mod.redstone" - + ((TileEUStorage) this.container.tile).redstoneMode.ordinal()))); - - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - if (((TileEUStorage) this.container.tile).energy > 0.0D) { - int i = PLUtil.getGuiScaled(24, (float) ((TileEUStorage) this.container.tile).energy, ((TileEUStorage) this.container.tile).maxEnergy); - this.drawTexturedModalRect(this.x + 79, this.y + 34, 176, 14, i + 1, 16); - } - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(RESOURCE_DOMAIN, "textures/gui/GuiEUStorage.png"); - } - - @Override - protected void actionPerformed(GuiButton button) throws IOException { - super.actionPerformed(button); - if (button.id == 0) { - PLNetwork.updateTileEUStorage((TileEUStorage) this.container.tile); - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiFluidKineticGenerator.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiFluidKineticGenerator.java deleted file mode 100644 index 5645a09..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiFluidKineticGenerator.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.PLUtil; -import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.inventory.ContainerFluidKineticGenerator; -import com.mcgoodtime.productionline.tiles.TileFluidKineticGenerator; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Collections; - -import static com.mcgoodtime.productionline.core.ProductionLine.*; - -/** - * The Gui. - * - * @author liach - * improve by BestOwl - */ -@SideOnly(Side.CLIENT) -public class GuiFluidKineticGenerator extends GuiPL { - - public GuiFluidKineticGenerator(ContainerFluidKineticGenerator container) { - super(container); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - TileFluidKineticGenerator tile = this.container.getTileEntity(); - - if (tile.active) { - this.mc.renderEngine.bindTexture(this.getResource()); - this.drawTexturedModalRect(this.x + 51, this.y + 55, 176, 0, 14, 14); - } - - if (tile.fluidTank.getFluidAmount() > 0) { - ResourceLocation fluidIconIdent = this.container.tile.fluidTank.getFluid().getFluid().getStill(); - TextureAtlasSprite icon = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(fluidIconIdent.toString()); - if (icon != null) { - this.mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - int fy = PLUtil.getGuiScaled(47, tile.fluidTank.getFluidAmount(), tile.fluidTank.getCapacity()); - this.drawTexturedModalRect(this.x + 74, this.y + 24 + 47 - fy, icon, 12, fy); - this.mc.renderEngine.bindTexture(this.getResource()); - this.drawTexturedModalRect(this.x + 74, this.y + 24, 176, 72, 12, 47); - } - } - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - super.drawGuiContainerForegroundLayer(x, y); - if (this.container.tile.fluidTank.getFluidAmount() > 0) { - String tooltip = this.container.tile.fluidTank.getFluid().getLocalizedName() + ": " + this.container.tile.fluidTank.getFluidAmount() + "mB"; - drawTooltip(x - this.guiLeft, y - this.guiTop, Collections.singletonList(tooltip)); - } - - String output = I18n.format(GUI_PREFIX + "FluidKineticGenerator.output", - this.container.getTileEntity().maxrequestkineticenergyTick( - this.container.getTileEntity().facing)); - this.drawString(this.fontRendererObj, output, 96, 33, 2157374); - - String max_output = I18n.format(GUI_PREFIX + "FluidKineticGenerator.max-output", - this.container.getTileEntity().kuOutput); - this.drawString(this.fontRendererObj, max_output, 96, 52, 2157374); - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, "textures/gui/GuiFluidKineticGenerator.png"); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiHeatDryer.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiHeatDryer.java deleted file mode 100644 index 3dcc24b..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiHeatDryer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.PLUtil; - import com.mcgoodtime.productionline.core.ProductionLine; - import com.mcgoodtime.productionline.inventory.ContainerHeatDryer; - import com.mcgoodtime.productionline.tiles.TileHeatDryer; -import net.minecraft.util.ResourceLocation; -/* - * Created by suhao on 2015.7.10. - */ -public class GuiHeatDryer extends GuiPL { - - public GuiHeatDryer(ContainerHeatDryer container) { - super(container); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - TileHeatDryer tile = this.container.getTileEntity(); - int i1 = PLUtil.getGuiScaled(14, (float) tile.energy, tile.maxEnergy); - this.drawTexturedModalRect(this.x + 56, this.y + 36 + 14 - i1, 176, 14 - i1, 14, i1 + 1); - i1 = PLUtil.getGuiScaled(24, tile.progress, (float) tile.requireEnergy); - this.drawTexturedModalRect(this.x + 79, this.y + 34, 176, 14, i1 + 1, 16); - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, "textures/gui/GuiHeatDryer.png"); - } -} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPL.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPL.java index 49b4fb3..5ca49d9 100644 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPL.java +++ b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPL.java @@ -26,11 +26,11 @@ import com.mcgoodtime.productionline.core.ProductionLine; import com.mcgoodtime.productionline.inventory.ContainerPL; +import ic2.api.upgrade.IUpgradableBlock; +import ic2.api.upgrade.IUpgradeItem; +import ic2.api.upgrade.UpgradableProperty; +import ic2.api.upgrade.UpgradeRegistry; import ic2.core.IC2; -import ic2.core.upgrade.IUpgradableBlock; -import ic2.core.upgrade.IUpgradeItem; -import ic2.core.upgrade.UpgradableProperty; -import ic2.core.upgrade.UpgradeRegistry; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.resources.I18n; @@ -70,7 +70,7 @@ public GuiPL(T container) { @Override protected void drawGuiContainerForegroundLayer(int x, int y) { String displayName = I18n.format(ProductionLine.GUI_PREFIX + this.name); - this.fontRendererObj.drawString(displayName, (this.xSize - this.fontRendererObj.getStringWidth(displayName)) / 2, 6, 4210752); + this.fontRenderer.drawString(displayName, (this.xSize - this.fontRenderer.getStringWidth(displayName)) / 2, 6, 4210752); if (this.container.tile instanceof IUpgradableBlock) { handleUpgradeTooltip(x, y); } diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPackager.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPackager.java deleted file mode 100644 index e09c176..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiPackager.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * - * This file is part of ProductionLine, licensed under MIT License (MIT). - * - * Copyright (c) 2017 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.PLUtil; -import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.inventory.ContainerPackager; -import com.mcgoodtime.productionline.tiles.TilePackager; -import net.minecraft.util.ResourceLocation; - -/** - * Created by BestOwl on 2017/3/26. - * - * @author BestOwl - */ -public class GuiPackager extends GuiPL { - - int i = 0; - - public GuiPackager(ContainerPackager container) { - super(container); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - super.drawGuiContainerForegroundLayer(x, y); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - TilePackager tile = this.container.tile; - - //energy bar - int i1 = PLUtil.getGuiScaled(14, (float) tile.energy, tile.maxEnergy); - this.drawTexturedModalRect(this.x + 56, this.y + 36 + 14 - i1, 176, 14 - i1, 14, i1 + 1); - - //progress bar - i1 = PLUtil.getGuiScaled(24, tile.progress, (float) tile.requireEnergy); - this.drawTexturedModalRect(this.x + 79, this.y + 40, 176, 15, i1 + 1, 4); - - if (tile.active) { - this.drawTexturedModalRect(this.x + 85, this.y + 45 + 12 - (i / 10), 176, 20 + 12 - (i / 10), 12, i / 10); - i++; - - if (i >= 120) { - i = 0; - } - } - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, "textures/gui/GuiPackager.png"); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiParallelSpaceSU.java b/src/main/java/com/mcgoodtime/productionline/client/gui/GuiParallelSpaceSU.java deleted file mode 100644 index e42f780..0000000 --- a/src/main/java/com/mcgoodtime/productionline/client/gui/GuiParallelSpaceSU.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.mcgoodtime.productionline.client.gui; - -import com.mcgoodtime.productionline.PLUtil; -import com.mcgoodtime.productionline.inventory.ContainerParallelSpaceSU; -import com.mcgoodtime.productionline.network.PLNetwork; -import ic2.core.GuiIconButton; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -import java.io.IOException; -import java.util.Collections; - -import static com.mcgoodtime.productionline.core.ProductionLine.*; -import static net.minecraft.client.resources.I18n.format; - -/** - * Created by BestOwl on 2015.11.29.0029. - * - * @author BestOwl - */ -public class GuiParallelSpaceSU extends GuiPL { - - public GuiParallelSpaceSU(ContainerParallelSpaceSU container) { - super(container); - } - - /** - * Adds the buttons (and other controls) to the screen in question. - */ - @SuppressWarnings("unchecked") - @Override - public void initGui() { - super.initGui(); - this.buttonList.add(new GuiIconButton(0, (this.width - this.xSize) / 2 + - 152, (this.height - this.ySize) / 2 + 4, 20, 20, new ItemStack(Items.REDSTONE), true)); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - super.drawGuiContainerForegroundLayer(x, y); - this.fontRendererObj.drawString("§l" + format("ic2.EUStorage.gui.info.level"), 60, 25, 0x9A00FF); - drawTooltip(x - this.guiLeft, y - this.guiTop, Collections.singletonList("§l§5" + ((int) this.container.tile.energy) - + "/" + this.container.tile.maxEnergy)); - this.fontRendererObj.drawString(format("ic2.EUStorage.gui.info.output", - this.container.tile.energyTick), 60, 51, 0x9A00FF); - drawTooltip(x - this.guiLeft, y - this.guiTop, Collections.singletonList(format("ic2.EUStorage.gui.mod.redstone" - + this.container.tile.redstoneMode.ordinal()))); - - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { - super.drawGuiContainerBackgroundLayer(f, x, y); - if (this.container.tile.energy > 0.0D) { - int i = PLUtil.getGuiScaled(58, (float) this.container.tile.energy, this.container.tile.maxEnergy); - this.drawTexturedModalRect(this.x + 60, this.y + 34, 176, 15, i + 1, 13); - } - } - - @Override - protected ResourceLocation getResource() { - return new ResourceLocation(RESOURCE_DOMAIN, "textures/gui/GuiParallelSpaceSU.png"); - } - - @Override - protected void actionPerformed(GuiButton button) throws IOException { - super.actionPerformed(button); - if (button.id == 0) { - PLNetwork.updateTileEUStorage(this.container.tile); - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/core/GuiHandler.java b/src/main/java/com/mcgoodtime/productionline/core/GuiHandler.java index 9a11d90..15bce5a 100644 --- a/src/main/java/com/mcgoodtime/productionline/core/GuiHandler.java +++ b/src/main/java/com/mcgoodtime/productionline/core/GuiHandler.java @@ -25,18 +25,6 @@ package com.mcgoodtime.productionline.core; -//import com.mcgoodtime.productionline.client.gui.*; -//import com.mcgoodtime.productionline.inventory.*; -//import com.mcgoodtime.productionline.tiles.*; -//import com.mcgoodtime.productionline.tiles.eustorage.TileCSEU; -//import com.mcgoodtime.productionline.tiles.eustorage.TileEVSU; -//import com.mcgoodtime.productionline.tiles.eustorage.TileParallelSpaceSU; -import com.mcgoodtime.productionline.client.gui.*; -import com.mcgoodtime.productionline.inventory.*; -import com.mcgoodtime.productionline.tiles.*; -import com.mcgoodtime.productionline.tiles.eustorage.TileCSEU; -import com.mcgoodtime.productionline.tiles.eustorage.TileEVSU; -import com.mcgoodtime.productionline.tiles.eustorage.TileParallelSpaceSU; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.common.network.IGuiHandler; import net.minecraft.entity.player.EntityPlayer; @@ -68,14 +56,6 @@ public Object getServerGuiElement(int id, EntityPlayer player, World world, int EnumGui gui = EnumGui.values()[id]; BlockPos pos = new BlockPos(x, y, z); switch (gui) { - case FluidKineticGenerator: return new ContainerFluidKineticGenerator(player, (TileFluidKineticGenerator)world.getTileEntity(pos)); - case CarbonizeFurnace: return new ContainerCarbonizeFurnace(player, (TileCarbonizeFurnace)world.getTileEntity(pos)); - case EVSU: return new ContainerEUStorage<>(player, (TileEVSU)world.getTileEntity(pos)); - case HeatDryer: return new ContainerHeatDryer(player, (TileHeatDryer) world.getTileEntity(pos)); - case CSEU: return new ContainerEUStorage<>(player, (TileCSEU) world.getTileEntity(pos)); - case ParallelSpaceSU: return new ContainerParallelSpaceSU(player, (TileParallelSpaceSU) world.getTileEntity(pos)); - case AdvSolar: return new ContainerAdvSolar(player, (TileAdvSolar) world.getTileEntity(pos)); - case PACKAGER: return new ContainerPackager(player, ((TilePackager) world.getTileEntity(pos))); default: return null; } } @@ -86,35 +66,10 @@ public Object getClientGuiElement(int id, EntityPlayer player, World world, int EnumGui gui = EnumGui.values()[id]; BlockPos pos = new BlockPos(x, y, z); switch (gui) { - case FluidKineticGenerator: - return new GuiFluidKineticGenerator(new ContainerFluidKineticGenerator(player, (TileFluidKineticGenerator)world.getTileEntity(pos))); - case CarbonizeFurnace: - return new GuiCarbonizeFurnace(new ContainerCarbonizeFurnace(player, (TileCarbonizeFurnace)world.getTileEntity(pos))); - case EVSU: - return new GuiEUStorage(new ContainerEUStorage<>(player, (TileEVSU) world.getTileEntity(pos))); - case HeatDryer: return new GuiHeatDryer(new ContainerHeatDryer(player, (TileHeatDryer) world.getTileEntity(pos))); - case CSEU: return new GuiEUStorage(new ContainerEUStorage<>(player, (TileCSEU) world.getTileEntity(pos))); - case ParallelSpaceSU: - return new GuiParallelSpaceSU(new ContainerParallelSpaceSU(player, (TileParallelSpaceSU) world.getTileEntity(pos))); - case AdvSolar: - return new GuiAdvSolar(new ContainerAdvSolar(player, (TileAdvSolar) world.getTileEntity(pos))); - case PACKAGER: - return new GuiPackager(new ContainerPackager(player, ((TilePackager) world.getTileEntity(pos)))); default: return null; } } public enum EnumGui { - FluidKineticGenerator, - CarbonizeFurnace, - EVSU, - HeatDryer, - CSEU, - ParallelSpaceSU, - AdvSolar, - PACKAGER, - Cutter, - LiquidExtractor, - Mixer } } diff --git a/src/main/java/com/mcgoodtime/productionline/core/ProductionLine.java b/src/main/java/com/mcgoodtime/productionline/core/ProductionLine.java index 1eeaa6c..bb016ea 100644 --- a/src/main/java/com/mcgoodtime/productionline/core/ProductionLine.java +++ b/src/main/java/com/mcgoodtime/productionline/core/ProductionLine.java @@ -1,7 +1,7 @@ /* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). + * This file is part of Production Line, licensed under MIT License (MIT). * - * Copyright (c) 2015 GoodTime Studio + * Copyright (c) 2020 GoodTime Studio * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -31,16 +31,20 @@ import com.mcgoodtime.productionline.entity.EntityThrownItem; import com.mcgoodtime.productionline.entity.PLEntity; import com.mcgoodtime.productionline.event.PLEvent; -import com.mcgoodtime.productionline.init.*; +import com.mcgoodtime.productionline.init.PLBlocks; +import com.mcgoodtime.productionline.init.PLItems; +import com.mcgoodtime.productionline.init.PLOreDictionary; +import com.mcgoodtime.productionline.init.PLRecipes; import com.mcgoodtime.productionline.potion.PLPotion; import com.mcgoodtime.productionline.worldgen.PLWorldGen; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.client.registry.RenderingRegistry; @@ -56,19 +60,17 @@ import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Arrays; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.annotation.Nonnull; +import java.util.Arrays; @Mod( modid = ProductionLine.MOD_ID, name = ProductionLine.MOD_NAME, version = ProductionLine.VERSION, - dependencies = "required-after:" - + "Forge@[12.17.0.1976,);" - + "after:" - + "IC2@[2.5.52,);", + dependencies = "required:forge@[14.23.5.2847,);", useMetadata = true ) public final class ProductionLine { @@ -77,12 +79,15 @@ public final class ProductionLine { public static final String VERSION = "${version}"; public static final String RESOURCE_DOMAIN = MOD_ID; public static final String GUI_PREFIX = "gui.ProductionLine."; + + public static final Logger LOGGER = LogManager.getLogger(MOD_ID); + public static final CreativeTabs creativeTabPL = new CreativeTabs(MOD_NAME) { @SideOnly(Side.CLIENT) @Override @Nonnull - public Item getTabIconItem() { - return PLItems.gravityRay; + public ItemStack getTabIconItem() { + return new ItemStack(PLItems.diamondApple); } }; /** @@ -93,6 +98,7 @@ public Item getTabIconItem() { private static final ProductionLine INSTANCE = new ProductionLine(); public static boolean isIC2Loaded; + public static boolean isBotaniaLoaded; @SidedProxy public static CommonProxy proxy; @@ -104,7 +110,8 @@ public void construct(FMLConstructionEvent event) { @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { - isIC2Loaded = Loader.isModLoaded("IndustrialCraft 2"); + isIC2Loaded = Loader.isModLoaded("ic2"); + isBotaniaLoaded = Loader.isModLoaded("botania"); setupMeta(); PLConfig.init(event.getSuggestedConfigurationFile()); PLEntity.init(); @@ -118,10 +125,17 @@ public void registerBlock(RegistryEvent event) { @SubscribeEvent public void registerItem(RegistryEvent event) { - PLSounds.loadRecord(); //register record sound event before register record item. + //PLSounds.loadRecord(); //register record sound event before register record item. PLItems.init(); } + @SubscribeEvent + public void registerModel(ModelRegistryEvent event) + { + PLModelRegistry.loadBlockModels(); + PLModelRegistry.loadItemModels(); + } + @SubscribeEvent public void registerPotion(RegistryEvent event) { PLPotion.init(); @@ -130,15 +144,10 @@ public void registerPotion(RegistryEvent event) { @Mod.EventHandler public void init(FMLInitializationEvent event) { PLOreDictionary.init(); - // register Recipes. 注册合成 -// PLRecipes.init(); + PLRecipes.init(); //register gui handler NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, GuiHandler.getInstance()); - //register achievement - PLAchievement.init(); - //register achievement page - AchievementPage.registerAchievementPage(PLAchievement.pagePL); - //register ore gen bus. 注册矿石生成总线 + //register ore gen bus. PLWorldGen.init(); proxy.init(); } @@ -159,11 +168,9 @@ private void setupMeta() { } public abstract static class CommonProxy { - void preInit() { - } + abstract void preInit(); - void init() { - } + abstract void init(); CommonProxy() { } @@ -186,8 +193,6 @@ void init() { public static class ClientProxy extends CommonProxy { @Override void preInit() { - PLModelRegistry.loadBlockModels(); - PLModelRegistry.loadItemModels(); } @Override diff --git a/src/main/java/com/mcgoodtime/productionline/core/coremod/PLSetup.java b/src/main/java/com/mcgoodtime/productionline/core/coremod/PLSetup.java index 0a8d94d..b9b177a 100644 --- a/src/main/java/com/mcgoodtime/productionline/core/coremod/PLSetup.java +++ b/src/main/java/com/mcgoodtime/productionline/core/coremod/PLSetup.java @@ -25,11 +25,14 @@ package com.mcgoodtime.productionline.core.coremod; import net.minecraftforge.fml.relauncher.IFMLCallHook; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.spongepowered.asm.launch.MixinBootstrap; import org.spongepowered.asm.mixin.Mixins; - import java.util.Map; +import static com.mcgoodtime.productionline.core.ProductionLine.MOD_NAME; + /** * Created by suhao on 2015.10.24.0024. * @@ -41,8 +44,11 @@ public void injectData(Map data) {} @Override public Void call() throws Exception { + Logger logger = LogManager.getLogger(MOD_NAME + " Core"); + logger.info("Initializing Mixins"); MixinBootstrap.init(); Mixins.addConfiguration("mixins.productionline.core.json"); + logger.info("Mixins config loaded"); return null; } } diff --git a/src/main/java/com/mcgoodtime/productionline/entity/EntityThrownItem.java b/src/main/java/com/mcgoodtime/productionline/entity/EntityThrownItem.java index f18d786..7f37f80 100644 --- a/src/main/java/com/mcgoodtime/productionline/entity/EntityThrownItem.java +++ b/src/main/java/com/mcgoodtime/productionline/entity/EntityThrownItem.java @@ -24,14 +24,11 @@ */ package com.mcgoodtime.productionline.entity; -import com.google.common.base.Optional; import com.mcgoodtime.productionline.event.EntityThrowableImpactEvent; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.datasync.DataParameter; -import net.minecraft.network.datasync.DataSerializers; -import net.minecraft.network.datasync.EntityDataManager; + import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -42,9 +39,9 @@ * @author BwstOwl */ public class EntityThrownItem extends net.minecraft.entity.projectile.EntityThrowable { - +/* public static final DataParameter> PARAMETER = EntityDataManager - .createKey(EntityThrownItem.class, DataSerializers.OPTIONAL_ITEM_STACK); + .createKey(EntityThrownItem.class, DataSerializers.OPTIONAL_ITEM_STACK);*/ public EntityThrownItem(World world) { super(world); @@ -56,13 +53,13 @@ public EntityThrownItem(World world, double x, double y, double z) { public EntityThrownItem(World world, EntityLivingBase entityLivingBase, ItemStack itemStack) { super(world, entityLivingBase); - this.setThrowItem(itemStack); + //this.setThrowItem(itemStack); } @Override protected void entityInit() { super.entityInit(); - this.dataManager.register(PARAMETER, Optional.absent()); + //this.dataManager.register(PARAMETER, Optional.absent()); } /** @@ -70,12 +67,11 @@ protected void entityInit() { */ @Override public void writeEntityToNBT(NBTTagCompound nbt) { - super.writeEntityToNBT(nbt); + super.writeEntityToNBT(nbt);/* Optional item = getThrowItem(); if (item.isPresent()) { nbt.setTag("throwItem", item.get().serializeNBT()); - } - + }*/ } /** @@ -84,9 +80,9 @@ public void writeEntityToNBT(NBTTagCompound nbt) { @Override public void readEntityFromNBT(NBTTagCompound nbt) { super.readEntityFromNBT(nbt); - this.setThrowItem(ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("throwItem"))); + //this.setThrowItem(ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("throwItem"))); } - +/* public Optional getThrowItem() { return this.dataManager.get(PARAMETER); } @@ -94,7 +90,7 @@ public Optional getThrowItem() { public void setThrowItem(ItemStack itemStack) { this.dataManager.set(PARAMETER, Optional.of(itemStack)); } - +*/ /** * Called when this EntityThrownItem hits a block or entity. */ diff --git a/src/main/java/com/mcgoodtime/productionline/entity/PLEntity.java b/src/main/java/com/mcgoodtime/productionline/entity/PLEntity.java index 8833f0f..bd62b71 100644 --- a/src/main/java/com/mcgoodtime/productionline/entity/PLEntity.java +++ b/src/main/java/com/mcgoodtime/productionline/entity/PLEntity.java @@ -25,6 +25,7 @@ package com.mcgoodtime.productionline.entity; import com.mcgoodtime.productionline.core.ProductionLine; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraft.entity.Entity; @@ -37,7 +38,8 @@ public class PLEntity { private static int id = 0; public static void registerEntities(Class entity, String name) { - EntityRegistry.registerModEntity(entity, name, id++, ProductionLine.getInstance(), 64, 1, true); + //EntityRegistry.registerModEntity(entity, name, id++, ProductionLine.getInstance(), 64, 1, true); + EntityRegistry.registerModEntity(new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, name), entity, name, id, ProductionLine.getInstance(), 64, 1, true); } public static void init() { diff --git a/src/main/java/com/mcgoodtime/productionline/event/PLEvent.java b/src/main/java/com/mcgoodtime/productionline/event/PLEvent.java index c7515fa..cd14788 100644 --- a/src/main/java/com/mcgoodtime/productionline/event/PLEvent.java +++ b/src/main/java/com/mcgoodtime/productionline/event/PLEvent.java @@ -24,32 +24,19 @@ */ package com.mcgoodtime.productionline.event; -import com.google.common.base.Optional; - -import com.mcgoodtime.productionline.entity.EntityThrownItem; -import com.mcgoodtime.productionline.init.PLAchievement; -import com.mcgoodtime.productionline.init.PLBlocks; -import com.mcgoodtime.productionline.init.PLItems; -import com.mcgoodtime.productionline.potion.PLPotion; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Biomes; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.biome.Biome; -import net.minecraftforge.event.entity.player.FillBucketEvent; +import com.mcgoodtime.productionline.tiles.tilewireless.TileTributary; +import com.mcgoodtime.productionline.tiles.tilewireless.TileWaterSource; +import com.mcgoodtime.productionline.tiles.tilewireless.TileWireless; +import gnu.trove.map.custom_hash.TObjectByteCustomHashMap; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.eventhandler.Event; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.PlayerEvent; -import ic2.api.item.IC2Items; -import ic2.core.IC2Potion; +import java.util.ArrayList; +import java.util.List; /** * Production Line event listener. @@ -57,77 +44,80 @@ * @author BestOwl, liach */ @Mod.EventBusSubscriber -public class PLEvent { +public class PLEvent {/* @SubscribeEvent public void onPlayerCrafting(PlayerEvent.ItemCraftedEvent event) { if (event.crafting.getItem().equals(PLBlocks.carbonizeFurnace.getItem())) { event.player.addStat(PLAchievement.getCarbonizeFurnace, 1); } } +*/ - @SubscribeEvent - public void onPlayerPickup(PlayerEvent.ItemPickupEvent event) { - if (event.pickedUp.getEntityItem().isItemEqual(new ItemStack(PLBlocks.oreIridium))) { - event.player.addStat(PLAchievement.getIrOre, 1); - } - } + List playerWaterSources = new ArrayList<>(); @SubscribeEvent - public void onBucketFill(FillBucketEvent event) { - if (event.getEntityPlayer() != null) { - Biome biome = event.getWorld().getBiomeForCoordsBody(event.getTarget().getBlockPos()); - if (biome == Biomes.OCEAN || biome == Biomes.DEEP_OCEAN || biome == Biomes.FROZEN_OCEAN) { - event.setResult(Event.Result.ALLOW); - event.setFilledBucket(new ItemStack(PLItems.saltWaterBucket)); + public void onBlockPlayerPlaced(BlockEvent.EntityPlaceEvent event) { + TileEntity currentPlacedBlock = event.getWorld().getTileEntity(event.getPos()); + + if (event.getPlacedBlock().getBlock() instanceof ITileEntityProvider && currentPlacedBlock instanceof TileWireless){ + TileWireless currentDevice = (TileWireless) currentPlacedBlock; + if(!(event.getWorld().isRemote) && event.getEntity()instanceof EntityPlayer){ + currentDevice.setOwner(event.getEntity()); } - } - } - @SubscribeEvent - public void onEntityThrowableImpact(EntityThrowableImpactEvent event) { - Optional optItemStack = event.entityThrownItem.getThrowItem(); - if (!optItemStack.isPresent()) { + if(currentDevice instanceof TileWaterSource){ + playerWaterSources.add((TileWaterSource) currentDevice); + } + if(currentDevice instanceof TileTributary){ + if(!playerWaterSources.isEmpty()){ + for (TileWaterSource waterSource : playerWaterSources){ + if(waterSource.sameOwner(currentDevice.getOwner()) && waterSource.inRange(currentDevice.getPos())){ + currentDevice.link(waterSource); + waterSource.link(currentDevice); + } + } + } + } + }else { return; } - ItemStack stack = optItemStack.get(); - if (stack.getItem().equals(PLItems.packagedSalt)) { - for (int i = 0; i < 8; ++i) { - float fmod = (float) (1.2 - (Math.random() * 2.4)); - float f1mod = (float) (0.5 - (Math.random() * 1.0)); - float f2mod = (float) (1.2 - (Math.random() * 2.4)); - event.entityThrownItem.world.spawnParticle(EnumParticleTypes.ITEM_CRACK, - event.entityThrownItem.posX + fmod, event.entityThrownItem.posY + f1mod, - event.entityThrownItem.posZ + f2mod, 0.1D, 0.1D, 0.1D, Item.getIdFromItem(PLItems.salt)); + } - if (!event.entityThrownItem.world.isRemote) { - EntityItem entityItem = new EntityItem(event.entityThrownItem.world, - event.entityThrownItem.posX + fmod, event.entityThrownItem.posY + f1mod, - event.entityThrownItem.posZ + f2mod, new ItemStack(PLItems.salt)); - event.entityThrownItem.world.spawnEntity(entityItem); + @SubscribeEvent + public void onPlayerBreaked(BlockEvent.BreakEvent event){ + TileEntity curretBreakedBlock = event.getWorld().getTileEntity(event.getPos()); + if(curretBreakedBlock != null && curretBreakedBlock.isInvalid()){ + if(event.getState().getBlock() instanceof ITileEntityProvider && curretBreakedBlock instanceof TileWireless){ + TileWireless curretDevice = (TileWireless) curretBreakedBlock; + if(curretBreakedBlock instanceof TileWaterSource){ + playerWaterSources.remove(curretDevice); + } + for(TileWireless deviceInOtherTiles : curretDevice.getLinkedWirelessDecives()){ + deviceInOtherTiles.unlink(curretDevice); } } - this.onImpact(event.entityThrownItem, event.movingObjectPosition, new PotionEffect(PLPotion.salty, 0, 3)); - } else if (stack.isItemEqual(IC2Items.getItem("Uran238"))) { - this.onImpact(event.entityThrownItem, event.movingObjectPosition, new PotionEffect(IC2Potion.radiation, 200, 0)); - } else { - this.onImpact(event.entityThrownItem, event.movingObjectPosition, null); + }else { + return; } } - private void onImpact(EntityThrownItem entity, RayTraceResult movingObjectPosition, PotionEffect potionEffect) { - if (movingObjectPosition.entityHit != null) { - movingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(entity, entity.getThrower()), 3F); - if (movingObjectPosition.entityHit instanceof EntityLivingBase && potionEffect != null) { - ((EntityLivingBase) movingObjectPosition.entityHit).addPotionEffect(potionEffect); - } + + /* + if (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) { + canLogistics = true; + }else if(te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null) && te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null)){ + canLogistics = true; + }else if(te.hasCapability(CapabilityEnergy.ENERGY,null)){ + canLogistics = true; + }else if(te instanceof TileTefnutTear){ + canLogistics = true; } - entity.world.spawnParticle(EnumParticleTypes.ITEM_CRACK, entity.posX, entity.posY, entity.posZ, 0.1D, 0.1D, - 0.1D, Item.getIdFromItem(entity.getThrowItem().get().getItem())); - if (!entity.world.isRemote) { - entity.setDead(); - entity.world.spawnEntity(new EntityItem(entity.world, entity.posX, entity.posY, entity.posZ, - entity.getThrowItem().get())); + else{ + canLogistics = false; } - } + if(canLogistics){ + this.pos=te.getPos(); + } +*/ } diff --git a/src/main/java/com/mcgoodtime/productionline/event/ThrowableUranium238Handler.java b/src/main/java/com/mcgoodtime/productionline/event/ThrowableUranium238Handler.java deleted file mode 100644 index 19e58cd..0000000 --- a/src/main/java/com/mcgoodtime/productionline/event/ThrowableUranium238Handler.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.mcgoodtime.productionline.event; - -import com.mcgoodtime.productionline.core.PLConfig; -import com.mcgoodtime.productionline.entity.EntityThrownItem; -import ic2.api.item.IC2Items; -import ic2.core.item.ItemMulti; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; - -import java.util.Random; - -/** - * Throwable uranium 238 right click handler - * Created by BestOwl on 2016-05-31. - * - * @author BestOwl - */ -public class ThrowableUranium238Handler implements ItemMulti.IItemRightClickHandler { - - public static void registerHandler() { - - } - - @Override - public ActionResult onRightClick(ItemStack itemStack, EntityPlayer entityPlayer, EnumHand hand) { - ItemStack target = IC2Items.getItem("nuclear", "uranium_238"); - if (itemStack.isItemEqual(target)) { - if (PLConfig.instance.throwableUran238) { - if (!entityPlayer.capabilities.isCreativeMode) { - --itemStack.stackSize; - } - - entityPlayer.world.playSound(entityPlayer, entityPlayer.getPosition(), - SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, - 0.5F, 0.4F / (new Random().nextFloat() * 0.4F + 0.8F)); - if (!entityPlayer.world.isRemote) { - entityPlayer.world.spawnEntity(new EntityThrownItem(entityPlayer.world, entityPlayer, itemStack)); - } - } - return ActionResult.newResult(EnumActionResult.SUCCESS, itemStack); - } - return ActionResult.newResult(EnumActionResult.PASS, itemStack); - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/init/PLAchievement.java b/src/main/java/com/mcgoodtime/productionline/init/PLAchievement.java deleted file mode 100644 index 2760701..0000000 --- a/src/main/java/com/mcgoodtime/productionline/init/PLAchievement.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.init; - -import com.mcgoodtime.productionline.core.ProductionLine; -import net.minecraft.stats.Achievement; -import net.minecraft.stats.AchievementList; -import net.minecraftforge.common.AchievementPage; - -/* - * Created by suhao on 2015/5/17. - */ - -public class PLAchievement { - /** Is the 'ir ore' achievement. */ - public static Achievement getIrOre = new Achievement("achievement.getIrOre", "getIrOre", 0, 0, - PLBlocks.oreIridium, AchievementList.ACQUIRE_IRON).registerStat(); - /** Just for fun, :) */ - public static Achievement yourHouseBombed = new Achievement("achievement.yourHouseBombed", "yourHouseBombed", 0, 3, - PLItems.yourHouseBombed, null).setSpecial().registerStat().initIndependentStat(); - - /** Is the 'getting CarbonizeFurnace' achievement. */ - public static Achievement getCarbonizeFurnace = new Achievement( - "achievement.getCarbonizeFurnace", - "getCarbonizeFurnace", 0, 1, PLBlocks.carbonizeFurnace, AchievementList.BUILD_FURNACE - ).registerStat(); - - /** Is the AchievementPage for ProductionLine */ - public static AchievementPage pagePL = new AchievementPage( - ProductionLine.MOD_NAME, - getIrOre, - getCarbonizeFurnace, - yourHouseBombed); - - /** - * A stub functions called to make the static initializer for this class run. - */ - public static void init() { - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/init/PLBlocks.java b/src/main/java/com/mcgoodtime/productionline/init/PLBlocks.java index f1ca919..d7889b0 100644 --- a/src/main/java/com/mcgoodtime/productionline/init/PLBlocks.java +++ b/src/main/java/com/mcgoodtime/productionline/init/PLBlocks.java @@ -26,13 +26,10 @@ import com.mcgoodtime.productionline.blocks.*; import com.mcgoodtime.productionline.core.ProductionLine; -//import com.mcgoodtime.productionline.blocks.generator.BlockAdvSolar; -//import com.mcgoodtime.productionline.blocks.generator.BlockFluidKineticGenerator; -//import com.mcgoodtime.productionline.items.ItemWaterHyacinth; -import net.minecraftforge.fml.common.registry.ForgeRegistries; +import com.mcgoodtime.productionline.tiles.SubTileFlowerOfOsiris; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.item.ItemStack; +import vazkii.botania.api.BotaniaAPI; /** * ProductionLine blocks. @@ -40,35 +37,29 @@ * @author liach */ public class PLBlocks { - public static ItemStack dehydratedWaterHyacinthblock; - public static ItemStack compressedWaterHyacinth; - public static ItemStack opticalGlass; - public static BlockPL machine; - public static ItemStack carbonizeFurnace; - public static ItemStack heatDryer; - public static ItemStack evsu; - public static ItemStack cseu; - public static ItemStack parallelSpaceSU; - public static ItemStack advSolar; - public static ItemStack fluidKineticGenerator; - public static ItemStack packager; public static BlockPL oreIridium; - public static BlockPL airBrakeCasing; - - - public static Block waterHyacinth; + public static Block generator; + + /** + * The internal name of the flower of osiris, used for registration + * This will be null if Botania is not loaded + * */ + public static String flowerOfOsiris; public static void init() { oreIridium = new BlockPL(Material.ROCK, "ore_iridium", 10, 20, "pickaxe", 3); - airBrakeCasing = new BlockOrientable(Material.IRON, "air_brake_casing"); - new BlockMisc(); - machine = new BlockMachine(); + generator = new BlockGenerator(); + + if (ProductionLine.isBotaniaLoaded) + { + flowerOfOsiris = "the_flower_of_osiris"; + BotaniaAPI.registerSubTile(flowerOfOsiris, SubTileFlowerOfOsiris.class); + BotaniaAPI.addSubTileToCreativeMenu(flowerOfOsiris); + } - // special registry TODO: Better registry system - waterHyacinth = new BlockWaterHyacinth(); - waterHyacinth.setRegistryName(ProductionLine.loc("waterHyacinth")); - ForgeRegistries.BLOCKS.register(waterHyacinth); + //new BlockMisc(); + //machine = new BlockMachine(); } } diff --git a/src/main/java/com/mcgoodtime/productionline/init/PLItems.java b/src/main/java/com/mcgoodtime/productionline/init/PLItems.java index 3dba74f..b1f5206 100644 --- a/src/main/java/com/mcgoodtime/productionline/init/PLItems.java +++ b/src/main/java/com/mcgoodtime/productionline/init/PLItems.java @@ -24,171 +24,50 @@ */ package com.mcgoodtime.productionline.init; -import com.mcgoodtime.productionline.core.PLConfig; -import com.mcgoodtime.productionline.core.ProductionLine; -import com.mcgoodtime.productionline.entity.EntityThrownItem; +import com.mcgoodtime.productionline.items.ItemSeal; import com.mcgoodtime.productionline.items.ItemCrafting; import com.mcgoodtime.productionline.items.ItemDiamondApple; import com.mcgoodtime.productionline.items.ItemOre; -import com.mcgoodtime.productionline.items.ItemPL; -import com.mcgoodtime.productionline.items.ItemPLFood; -import com.mcgoodtime.productionline.items.ItemPLRecord; -import com.mcgoodtime.productionline.items.tools.ItemGravityRay; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; -import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundCategory; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.IFuelHandler; -import net.minecraftforge.fml.common.registry.GameRegistry; - -import static com.mcgoodtime.productionline.core.ProductionLine.MOD_ID; -//import coreom.mcgoodtime.productionline.common.entity.EntityThrownItem; -//import com.mcgoodtime.productionline.items.tools.ItemGravityRay; -//import com.mcgoodtime.productionline.items.tools.ItemPLTreetap; -//import com.mcgoodtime.productionline.items.tools.ToolPL; /** - * The list of all those items in GoodTime-Industrial. + * The list of all those items in Production_Line. */ -public class PLItems implements IFuelHandler { +public class PLItems { public static Item diamondApple; - public static Item packagedSalt; - public static Item iridiumSword; - public static Item salt; - public static Item saltWaterBucket; - public static Item hammer; - - public static Item gravityRay; + //tool + public static Item sheepCrook; - public static Item record_MusicSpring; + //ore + public static Item itemOre; + public static ItemStack ingotIridium; + //crafting public static Item itemCrafting; - public static Item itemOre; - - //This is New Pans`s Item - public static Item liquidExpBucket; - public static Item enderPearlBucket; - public static Item brineBucket; - public static Item toadCoin; - public static Item superTrashBag; + public static ItemStack aquamarine; + public static ItemStack eyeOfTheDesert; - - //-------------------------------------- - public static ItemStack dustIridium; - public static ItemStack ingotIridium; - public static ItemStack yourHouseBombed; - public static ItemStack smallCompressedWaterHyacinth; - public static ItemStack redstoneModule; - public static ItemStack lazuliModule; - public static ItemStack advSolarLensUnit; - public static ItemStack advSolarLensGroup; - public static ItemStack advSolarLensCluster; - public static ItemStack opticalGlass; - public static ItemStack sawdust; - public static ItemStack rigidPaper; + //seal + public static Item itemSeal; - public static ItemStack heatInsulationMaterial; - public static ItemStack heatResistantBrick; - - //This is New Plans`s ItemStack - public static ItemStack enderPearlPowder; - public static ItemStack CPUmk1; - public static ItemStack CPUmk2; - public static ItemStack CPUmk3; - public static ItemStack fakeHead; - public static ItemStack lifeConverter; - public static ItemStack condensedImpurities; - public static ItemStack heartOfLava; - public static ItemStack heartOfPureWhite; - public static ItemStack heartOfEnder; + public static Item cconvertingSealBlackCat; + public static ItemStack enchantingSealSandStorm; + public static ItemStack enchantingSealSpring; + public static ItemStack enchantingSealOasis; + public static ItemStack enchantingSealAnotherWorld; public static void init() { diamondApple = new ItemDiamondApple(); - - record_MusicSpring = new ItemPLRecord("record_musicspring", PLSounds.recordMusicSpring); - salt = new ItemPLFood("salt", 0, 10F, true); - gravityRay = new ItemGravityRay(); - //MultiMetaItem registry itemOre = new ItemOre(); itemCrafting = new ItemCrafting(); - - - // special registry TODO: Better registry system - - packagedSalt = new ItemPL("packaged_salt") { - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - public ActionResult onItemRightClick(ItemStack itemStack, World world, EntityPlayer player, EnumHand hand) { - if (PLConfig.instance.throwablePackagedSalt) { - if (!player.capabilities.isCreativeMode) { - --itemStack.stackSize; - } - world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) { - world.spawnEntity(new EntityThrownItem(world, player, itemStack)); - } - } - - return new ActionResult<>(EnumActionResult.SUCCESS, itemStack); - } - - }; - - saltWaterBucket = new ItemBucket(Blocks.WATER); - saltWaterBucket.setCreativeTab(ProductionLine.creativeTabPL) - .setUnlocalizedName(MOD_ID + ".saltwater_bucket"); - -// iridiumPickaxe = ToolPL.registerPickaxe(PLToolMaterial.iridium, "iridium_pickaxe"); -// iridiumAxe = ToolPL.registerAxe(PLToolMaterial.iridium, "iridium_axe"); -// iridiumSpade = ToolPL.registerSpade(PLToolMaterial.iridium, "iridium_spade"); -// iridiumSword = ToolPL.registerSword(PLToolMaterial.iridium, "iridium_sword"); - - // TODO: Better registry system - GameRegistry.register(saltWaterBucket, new ResourceLocation(MOD_ID, "saltwater_bucket")); - GameRegistry.registerFuelHandler(new PLItems()); + itemSeal = new ItemSeal(); } - @Override - public int getBurnTime(ItemStack fuel) { - if (fuel.isItemEqual(sawdust)) { - return 50; - } - if (fuel.isItemEqual(smallCompressedWaterHyacinth)) { - return 400; - } - if (fuel.getItem().equals( - Item.getItemFromBlock(PLBlocks.waterHyacinth))) { - return 100; - } - if (fuel.isItemEqual(PLBlocks.compressedWaterHyacinth)) { - return 800; - } - if (fuel.isItemEqual(PLBlocks.dehydratedWaterHyacinthblock)) { - return 1000; - } - return 0; - } - - public static ItemStack getItems(ItemStack itemStack, int count) { - ItemStack ret = itemStack.copy(); - ret.stackSize = count; - return ret; - } } diff --git a/src/main/java/com/mcgoodtime/productionline/init/PLOreDictionary.java b/src/main/java/com/mcgoodtime/productionline/init/PLOreDictionary.java index ae5cdec..6751bf9 100644 --- a/src/main/java/com/mcgoodtime/productionline/init/PLOreDictionary.java +++ b/src/main/java/com/mcgoodtime/productionline/init/PLOreDictionary.java @@ -35,11 +35,6 @@ public class PLOreDictionary { public static void init() { - OreDictionary.registerOre("paper", Items.PAPER); - - OreDictionary.registerOre("advSolarLens", PLItems.advSolarLensUnit); - OreDictionary.registerOre("advSolarLens", PLItems.advSolarLensGroup); - OreDictionary.registerOre("advSolarLens", PLItems.advSolarLensCluster); } } diff --git a/src/main/java/com/mcgoodtime/productionline/init/PLRecipes.java b/src/main/java/com/mcgoodtime/productionline/init/PLRecipes.java index 4c6cf36..6544890 100644 --- a/src/main/java/com/mcgoodtime/productionline/init/PLRecipes.java +++ b/src/main/java/com/mcgoodtime/productionline/init/PLRecipes.java @@ -24,179 +24,49 @@ */ package com.mcgoodtime.productionline.init; -import com.mcgoodtime.productionline.items.ItemStacks; -import net.minecraft.init.Blocks; +import com.mcgoodtime.productionline.core.ProductionLine; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.fml.common.registry.GameRegistry; -import java.util.List; import java.util.Map; -import ic2.api.item.IC2Items; - -//import ic2.core.AdvRecipe; +import net.minecraftforge.oredict.OreDictionary; +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.api.recipe.RecipePetals; +import vazkii.botania.common.item.block.ItemBlockSpecialFlower; +import vazkii.botania.common.lib.LibOreDict; /** * The class for loading all the recipes of GoodTime-Industrial. Migrated from old loaders. * * @author liach */ + public class PLRecipes { private static final float XP = 2F; + static RecipePetals flowerOfOsirisRecipe; + /** - * Load recipes of GoodTime-Industrial. + * Load recipes of Production Line. */ public static void init() { - //disable recipes - //disable(); - - //vanilla recipe registry; - - GameRegistry.addRecipe( - ItemStacks.copyStack(PLBlocks.opticalGlass, 5), - "ABA", - "BAB", - "ABA", - 'A', Blocks.QUARTZ_BLOCK, - 'B', Blocks.GLASS - ); - GameRegistry.addRecipe( - PLItems.advSolarLensUnit, - "A A", - "A A", - " A ", - 'A', PLBlocks.opticalGlass - ); - GameRegistry.addRecipe( - PLItems.advSolarLensGroup, - "A A", - "ABA", - "CAC", - 'A', PLItems.advSolarLensUnit, - 'B', IC2Items.getItem("dust", "diamond"), - 'C', IC2Items.getItem("crafting", "carbon_plate") - ); - GameRegistry.addRecipe( - PLItems.advSolarLensCluster, - "ABA", - "ACA", - "DAD", - 'A', PLItems.advSolarLensGroup, - 'B', PLItems.dustIridium, - 'C', IC2Items.getItem("dust", "energium") - ); - GameRegistry.addRecipe( - PLItems.heatInsulationMaterial, - "AAA", - "AAA", - "BBB", - 'A', IC2Items.getItem("rubber"), - 'B', IC2Items.getItem("advIronIngot")); - - GameRegistry.addRecipe( - new ItemStack(PLItems.diamondApple, 1, 1), - "DDD", - "DAD", - "DDD", - 'D', PLItems.diamondApple, - 'A', Blocks.DIAMOND_BLOCK - ); - //smelting registry GameRegistry.addSmelting(PLBlocks.oreIridium, PLItems.ingotIridium, XP); - GameRegistry.addSmelting(PLItems.dustIridium, PLItems.ingotIridium, XP); - GameRegistry.addSmelting(IC2Items.getItem("iridiumOre"), PLItems.ingotIridium, XP); - - //ic2 recipe registry - /* - Recipes.compressor.addRecipe( - new RecipeInputItemStack(PLItems.getItems(PLItems.smallCompressedWaterHyacinth, 8)), - null, - PLBlocks.compressedWaterHyacinth - ); - Recipes.compressor.addRecipe( - new RecipeInputItemStack(new ItemStack(PLBlocks.waterHyacinth, 8)), - null, - PLItems.smallCompressedWaterHyacinth - ); - Recipes.metalformerRolling.addRecipe( - new RecipeInputItemStack(new ItemStack(Items.diamond)), - null, - PLItems.diamondPlate - ); - Recipes.metalformerRolling.addRecipe( - new RecipeInputItemStack(PLItems.heatInsulationMaterial), - null, - PLItems.heatInsulationPlate - ); - Recipes.compressor.addRecipe( - new RecipeInputItemStack(PLItems.getItems(PLItems.diamondPlate, 9)), - null, - PLItems.denseDiamondPlate - ); - Recipes.compressor.addRecipe( - new RecipeInputItemStack(PLItems.getItems(PLItems.smallDustIridium, 8)), - null, - PLItems.ingotIridium - ); - Recipes.macerator.addRecipe( - new RecipeInputItemStack(new ItemStack(PLBlocks.oreIridium)), - null, - PLItems.getItems(PLItems.crushedIridium, 2) - ); - Recipes.macerator.addRecipe( - new RecipeInputItemStack(PLItems.ingotIridium), - null, - PLItems.dustIridium - ); - Recipes.compressor.addRecipe( - new RecipeInputItemStack(IC2Items.getItem("diamondDust"), 3), - null, - PLItems.carbonCrystal - ); - Recipes.compressor.addRecipe( - new RecipeInputItemStack(IC2Items.getItem("denseplateobsidian"), 8), - null, - PLItems.obsidianPlateGravityField - ); - NBTTagCompound oreWash = new NBTTagCompound(); - oreWash.setInteger("amount", 1000); - Recipes.oreWashing.addRecipe( - new RecipeInputItemStack(PLItems.crushedIridium), - oreWash, - PLItems.cleanedCrushedIridium, - StackUtil.copyWithSize(Ic2Items.smallTinDust, 2) - ); - Recipes.centrifuge.addRecipe( - new RecipeInputItemStack(PLItems.cleanedCrushedIridium), - null, - PLItems.dustIridium, - PLItems.getItems(PLItems.smallDustIridium, 2) - ); - Recipes.cannerBottle.addRecipe( - new RecipeInputItemStack(PLItems.rigidPaperPack), - new RecipeInputItemStack(new ItemStack(PLItems.salt, 9)), - new ItemStack(PLItems.packagedSalt) - ); - AdvRecipe.addAndRegister( - PLBlocks.cseu, - "ABA", - "CCC", - "CCC", - 'A', IC2Items.getItem("insulatedGoldCableItem"), - 'B', IC2Items.getItem("advancedMachine"), - 'C', PLItems.ceu - );*/ + for(ItemStack oreIridium:OreDictionary.getOres("oreIridium")){ + GameRegistry.addSmelting(oreIridium, PLItems.ingotIridium, XP); + } + if(ProductionLine.isBotaniaLoaded) { + String GREEN = LibOreDict.PETAL[13], RUNESPRING = LibOreDict.RUNE[4], RUNEPRIDE = LibOreDict.RUNE[15]; + flowerOfOsirisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(PLBlocks.flowerOfOsiris), + GREEN, GREEN, GREEN, RUNESPRING, + RUNEPRIDE, PLItems.eyeOfTheDesert, PLItems.eyeOfTheDesert, PLItems.aquamarine, + PLItems.aquamarine, PLItems.aquamarine, PLItems.aquamarine, PLItems.aquamarine, + PLItems.aquamarine, PLItems.aquamarine ); + } } -/* - private static void disable() { - disableRecipes(Ic2Items.massFabricator); - disableRecipes(IC2Items.getItem("iridiumPlate")); - }*/ + /** * Disable recipes. @@ -205,14 +75,7 @@ private static void disable() { */ @SuppressWarnings("unchecked") public static void disableRecipes(ItemStack itemStack) { - List recipeList = CraftingManager.getInstance().getRecipeList(); - for (int i = 0; i < recipeList.size(); i++) { - IRecipe iRecipe = recipeList.get(i); - ItemStack recipesResult = iRecipe.getRecipeOutput(); - if (ItemStack.areItemStacksEqual(itemStack, recipesResult)) { - recipeList.remove(i--); - } - } + } @SuppressWarnings({"unchecked", "SuspiciousMethodCalls"}) diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerAdvSolar.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerAdvSolar.java deleted file mode 100644 index ad4480e..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerAdvSolar.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.tiles.TileAdvSolar; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraft.inventory.Slot; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -/** - * Created by BestOwl on 2015.12.5.0005. - * - * @author BestOwl - */ -public class ContainerAdvSolar extends ContainerPL { - - public boolean sunIsVisible; - public boolean hasLens; - - public ContainerAdvSolar(EntityPlayer player, TileAdvSolar tile) { - super(player, tile); - this.addSlotToContainer(new Slot(this.tile, 0, 61, 26)); - this.addSlotToContainer(new Slot(this.tile, 1, 99, 26)); - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 0, this.sunIsVisible ? 1 : 0); - listener.sendProgressBarUpdate(this, 1, this.hasLens ? 1 : 0); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener listener : this.listeners) { - if (this.sunIsVisible != this.tile.underSun) { - listener.sendProgressBarUpdate(this, 0, this.tile.underSun ? 1 : 0); - } - if (this.hasLens != this.tile.hasLens) { - listener.sendProgressBarUpdate(this, 1, this.tile.hasLens ? 1 : 0); - } - } - - this.sunIsVisible = this.tile.underSun; - this.hasLens = this.tile.hasLens; - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int id, int var) { - super.updateProgressBar(id, var); - - switch (id) { - case 0: { - switch (var) { - case 1: - this.tile.underSun = true; - break; - case 0: - this.tile.underSun = false; - } - break; - } - case 1: { - switch (var) { - case 1: - this.tile.hasLens = true; - break; - case 0: - this.tile.hasLens = false; - } - break; - } - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerCarbonizeFurnace.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerCarbonizeFurnace.java deleted file mode 100644 index 9f3e7a8..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerCarbonizeFurnace.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.inventory.slot.SlotInput; -import com.mcgoodtime.productionline.inventory.slot.SlotOutput; -import com.mcgoodtime.productionline.inventory.slot.SlotUpgrade; -import com.mcgoodtime.productionline.tiles.TileCarbonizeFurnace; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotInput; -import net.minecraft.inventory.IContainerListener; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import ic2.core.slot.SlotDischarge; -import net.minecraft.entity.player.EntityPlayer; - -/* - * Created by suhao on 2015.7.4. - */ -public class ContainerCarbonizeFurnace extends ContainerPL { - - private int lastProgress; - private int lastRequireEnergy; - private double lastEnergy; - - public ContainerCarbonizeFurnace(EntityPlayer player, TileCarbonizeFurnace tile) { - super(player, tile); - this.addSlotToContainer(new SlotInput((TileSlotInput) tile.tileSlots.get(0), tile, 0, 56, 16)); - this.addSlotToContainer(new SlotDischarge(tile, 1, 1, 56, 53)); - this.addSlotToContainer(new SlotOutput(player, tile, 2, 113, 35)); - this.addSlotToContainer(new SlotOutput(player, tile, 3, 131, 35)); - this.addSlotToContainer(new SlotUpgrade(tile, 4, 153, 26)); - this.addSlotToContainer(new SlotUpgrade(tile, 5, 153, 44)); - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 0, this.tile.progress); - listener.sendProgressBarUpdate(this, 1, (int) this.tile.requireEnergy); - listener.sendProgressBarUpdate(this, 2, (int) this.tile.energy); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener listener : this.listeners) { - if (this.lastProgress != this.tile.progress) { - listener.sendProgressBarUpdate(this, 0, this.tile.progress); - } - - if (this.lastRequireEnergy != this.tile.requireEnergy) { - listener.sendProgressBarUpdate(this, 1, (int) this.tile.requireEnergy); - } - - if (this.lastEnergy != this.tile.energy) { - listener.sendProgressBarUpdate(this, 2, (int) this.tile.energy); - } - } - - this.lastProgress = this.tile.progress; - this.lastRequireEnergy = (int) this.tile.requireEnergy; - this.lastEnergy = this.tile.energy; - } - - /** - * Sends two ints to the client-side Container. Used for furnace burning time, smelting progress, brewing progress, - * and enchanting level. Normally the first int identifies which variable to update, and the second contains the new - * value. Both are truncated to shorts in non-local SMP. - * @param i Identifies which variable to update - */ - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int i, int var) { - if (i == 0) { - this.tile.progress = var; - } - - if (i == 1) { - this.tile.requireEnergy = var; - } - - if (i == 2) { - this.tile.energy = var; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerEUStorage.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerEUStorage.java deleted file mode 100644 index f33cbe3..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerEUStorage.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage; -import ic2.core.slot.SlotArmor; -import ic2.core.slot.SlotDischarge; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.inventory.IContainerListener; -import net.minecraft.inventory.Slot; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -/** - * Created by BestOwl on 2015.11.28.0028. - * - * @author BestOwl - */ -public class ContainerEUStorage extends ContainerPL { - - public double lastEnergy; - public int lastMode; - - public ContainerEUStorage(EntityPlayer player, T tile) { - super(player, tile, 196); - this.addSlotToContainer(new SlotDischarge(this.tile, this.tile.tier, 0, 56, 53)); - this.addSlotToContainer(new Slot(this.tile, 1, 56, 17)); - for (int i = 0; i < 4; i++) { - this.addSlotToContainer(new SlotArmor(player.inventory, EntityEquipmentSlot.values()[i + 2], 8 + i * 18, 84)); - } - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 0, (int) this.tile.energy); - listener.sendProgressBarUpdate(this, 1, this.tile.redstoneMode.ordinal()); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener listener : this.listeners) { - if (this.lastEnergy != this.tile.energy) { - listener.sendProgressBarUpdate(this, 0, (int) this.tile.energy); - } - if (this.lastMode != this.tile.redstoneMode.ordinal()) { - listener.sendProgressBarUpdate(this, 1, this.tile.redstoneMode.ordinal()); - } - } - - this.lastEnergy = this.tile.energy; - this.lastMode = this.tile.redstoneMode.ordinal(); - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int id, int var) { - super.updateProgressBar(id, var); - switch (id) { - case 0: - this.tile.energy = var; - break; - case 1: - this.tile.redstoneMode = TileEUStorage.RedstoneMode.values()[var]; - break; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerFluidKineticGenerator.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerFluidKineticGenerator.java deleted file mode 100644 index fe2d791..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerFluidKineticGenerator.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.inventory.slot.SlotOutput; -import com.mcgoodtime.productionline.tiles.TileFluidKineticGenerator; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraft.inventory.Slot; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class ContainerFluidKineticGenerator extends ContainerPL { - - public int fluidAmount; - public Fluid fluid; - - public ContainerFluidKineticGenerator(EntityPlayer player, TileFluidKineticGenerator tile) { - super(player, tile); - - this.addSlotToContainer(new Slot(tile, 0, 27, 21)); - this.addSlotToContainer(new SlotOutput(player, tile, 1, 27, 54)); - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 0, this.tile.fluidTank.getFluidAmount()); - if (this.tile.fluidTank.getFluid() != null) { - // TODO Improve - listener.sendProgressBarUpdate(this, 1, FluidRegistry.getFluidID(this.tile.fluidTank.getFluid().getFluid())); - } - } - - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener listener : this.listeners) { - if (this.fluidAmount != this.tile.fluidTank.getFluidAmount()) { - listener.sendProgressBarUpdate(this, 0, this.tile.fluidTank.getFluidAmount()); - } - if (this.tile.fluidTank.getFluid() != null && this.fluid != this.tile.fluidTank.getFluid().getFluid()) { - listener.sendProgressBarUpdate(this, 1, FluidRegistry.getFluidID(this.tile.fluidTank.getFluid().getFluid())); - } - } - - this.fluidAmount = this.tile.fluidTank.getFluidAmount(); - if (this.tile.fluidTank.getFluid() != null) { - this.fluid = this.tile.fluidTank.getFluid().getFluid(); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int id, int var) { - super.updateProgressBar(id, var); - switch (id) { - case 0: - if (this.tile.fluidTank.getFluid() != null) { - this.tile.fluidTank.getFluid().amount = var; - } - case 1: - if (FluidRegistry.getFluid(var) != null) { - this.tile.fluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(var), this.tile.fluidTank.getFluidAmount())); - } - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerHeatDryer.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerHeatDryer.java deleted file mode 100644 index ace52a3..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerHeatDryer.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.inventory.slot.SlotInput; -import com.mcgoodtime.productionline.inventory.slot.SlotOutput; -import com.mcgoodtime.productionline.inventory.slot.SlotUpgrade; -import com.mcgoodtime.productionline.tiles.TileHeatDryer; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotInput; -import ic2.core.slot.SlotDischarge; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -/* - * Created by suhao on 2015.7.10. - */ -public class ContainerHeatDryer extends ContainerPL { - - private int lastProgress; - private double lastEnergy; - - public ContainerHeatDryer(EntityPlayer player, TileHeatDryer tile) { - super(player, tile); - - this.addSlotToContainer(new SlotInput((TileSlotInput) tile.tileSlots.get(0), tile, 0, 56, 16)); - this.addSlotToContainer(new SlotDischarge(tile, 1, 1, 56, 53)); - this.addSlotToContainer(new SlotOutput(player, tile, 2, 107, 35)); - this.addSlotToContainer(new SlotUpgrade(tile, 3, 153, 26)); - this.addSlotToContainer(new SlotUpgrade(tile, 4, 153, 44)); - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 1, lastProgress); - listener.sendProgressBarUpdate(this, 2, (int) lastEnergy); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener listener : this.listeners) { - if (this.lastProgress != this.tile.progress) { - listener.sendProgressBarUpdate(this, 1, this.tile.progress); - } - if (this.lastEnergy != this.tile.energy) { - listener.sendProgressBarUpdate(this, 2, (int) this.tile.energy); - } - } - - this.lastEnergy = this.tile.energy; - this.lastProgress = this.tile.progress; - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int id, int i) { - super.updateProgressBar(id, i); - switch (id) { - case 1: this.tile.progress = i; - case 2: this.tile.energy = i; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerPackager.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerPackager.java deleted file mode 100644 index d0796dc..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerPackager.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * - * This file is part of ProductionLine, licensed under MIT License (MIT). - * - * Copyright (c) 2017 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.inventory.slot.SlotInput; -import com.mcgoodtime.productionline.inventory.slot.SlotOutput; -import com.mcgoodtime.productionline.inventory.slot.SlotUpgrade; -import com.mcgoodtime.productionline.tiles.TilePackager; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotInput; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotPackage; -import ic2.core.slot.SlotDischarge; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -/** - * Created by BestOwl on 2017/3/25. - * - * @author BestOwl - */ -public class ContainerPackager extends ContainerPL { - - private int lastProgress; - private double lastEnergy; - - public ContainerPackager(EntityPlayer player, TilePackager tile) { - super(player, tile); - this.addSlotToContainer(new SlotInput((TileSlotInput) tile.tileSlots.get(0), tile, 0, 56, 16)); - this.addSlotToContainer(new SlotInput((TileSlotPackage) tile.tileSlots.get(1), tile, 1, 83, 21)); - this.addSlotToContainer(new SlotDischarge(tile, 1, 2, 56, 53)); - this.addSlotToContainer(new SlotOutput(player, tile, 3, 107, 35)); - this.addSlotToContainer(new SlotUpgrade(tile, 4, 153, 26)); - this.addSlotToContainer(new SlotUpgrade(tile, 5, 153, 44)); - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 1, lastProgress); - listener.sendProgressBarUpdate(this, 2, (int) lastEnergy); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener listener : this.listeners) { - if (this.lastProgress != this.tile.progress) { - listener.sendProgressBarUpdate(this, 1, this.tile.progress); - } - if (this.lastEnergy != this.tile.energy) { - listener.sendProgressBarUpdate(this, 2, (int) this.tile.energy); - } - } - - this.lastEnergy = this.tile.energy; - this.lastProgress = this.tile.progress; - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int id, int i) { - super.updateProgressBar(id, i); - switch (id) { - case 1: this.tile.progress = i; - case 2: this.tile.energy = i; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerParallelSpaceSU.java b/src/main/java/com/mcgoodtime/productionline/inventory/ContainerParallelSpaceSU.java deleted file mode 100644 index 981227d..0000000 --- a/src/main/java/com/mcgoodtime/productionline/inventory/ContainerParallelSpaceSU.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.mcgoodtime.productionline.inventory; - -import com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage; -import com.mcgoodtime.productionline.tiles.eustorage.TileParallelSpaceSU; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IContainerListener; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -/** - * Created by BestOwl on 2015.11.29.0029. - * - * @author BestOwl - */ -public class ContainerParallelSpaceSU extends ContainerPL { - - public double lastEnergy; - public int lastMode; - - public ContainerParallelSpaceSU(EntityPlayer player, TileParallelSpaceSU tile) { - super(player, tile); - } - - @Override - public void addListener(IContainerListener listener) { - super.addListener(listener); - listener.sendProgressBarUpdate(this, 0, (int) this.tile.energy); - listener.sendProgressBarUpdate(this, 1, this.tile.redstoneMode.ordinal()); - } - - /** - * Looks for changes made in the container, sends them to every listener. - */ - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - for (IContainerListener object : this.listeners) { - if (this.lastEnergy != this.tile.energy) { - object.sendProgressBarUpdate(this, 0, (int) this.tile.energy); - } - if (this.lastMode != this.tile.redstoneMode.ordinal()) { - object.sendProgressBarUpdate(this, 1, this.tile.redstoneMode.ordinal()); - } - } - - this.lastEnergy = this.tile.energy; - this.lastMode = this.tile.redstoneMode.ordinal(); - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int id, int var) { - super.updateProgressBar(id, var); - switch (id) { - case 0: - this.tile.energy = var; - break; - case 1: - this.tile.redstoneMode = TileEUStorage.RedstoneMode.values()[var]; - break; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/Inventories.java b/src/main/java/com/mcgoodtime/productionline/inventory/Inventories.java index 522e18e..1a048be 100644 --- a/src/main/java/com/mcgoodtime/productionline/inventory/Inventories.java +++ b/src/main/java/com/mcgoodtime/productionline/inventory/Inventories.java @@ -61,18 +61,18 @@ public static void spill(World world, double x, double y, double z, @Nullable It float f1 = RANDOM.nextFloat() * 0.8F + 0.1F; float f2 = RANDOM.nextFloat() * 0.8F + 0.1F; - while (stack.stackSize > 0) { + while (stack.getCount() > 0) { int j1 = RANDOM.nextInt(21) + 10; - if (j1 > stack.stackSize) { - j1 = stack.stackSize; + if (j1 > stack.getCount()) { + j1 = stack.getCount(); } - stack.stackSize -= j1; + stack.setCount(stack.getCount() - j1); EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(stack.getItem(), j1, stack.getItemDamage())); if (stack.hasTagCompound()) { - entityitem.getEntityItem().setTagCompound(stack.getTagCompound().copy()); + entityitem.getItem().setTagCompound(stack.getTagCompound().copy()); } float f3 = 0.05F; diff --git a/src/main/java/com/mcgoodtime/productionline/inventory/slot/SlotUpgrade.java b/src/main/java/com/mcgoodtime/productionline/inventory/slot/SlotUpgrade.java index 487226c..b7be4b0 100644 --- a/src/main/java/com/mcgoodtime/productionline/inventory/slot/SlotUpgrade.java +++ b/src/main/java/com/mcgoodtime/productionline/inventory/slot/SlotUpgrade.java @@ -24,8 +24,8 @@ */ package com.mcgoodtime.productionline.inventory.slot; -import ic2.core.upgrade.IUpgradableBlock; -import ic2.core.upgrade.IUpgradeItem; +import ic2.api.upgrade.IUpgradableBlock; +import ic2.api.upgrade.IUpgradeItem; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemBlockEUStorage.java b/src/main/java/com/mcgoodtime/productionline/items/ItemBlockEUStorage.java deleted file mode 100644 index f96f6e6..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemBlockEUStorage.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.mcgoodtime.productionline.items; - -import com.mcgoodtime.productionline.init.PLBlocks; -import ic2.core.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.client.resources.I18n; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import javax.annotation.Nonnull; -import java.util.List; - -/** - * Created by BestOwl on 2015.11.29.0029. - * - * @author BestOwl - */ -public class ItemBlockEUStorage extends ItemBlockPL { - - public ItemBlockEUStorage(Block block) { - super(block); - } - - /** - * allows items to add custom lines of information to the mouseover description - */ - @SideOnly(Side.CLIENT) - @Override - public void addInformation(@Nonnull ItemStack itemStack, @Nonnull EntityPlayer player, @Nonnull List list, boolean bool) { - super.addInformation(itemStack, player, list, bool); - int meta = itemStack.getItemDamage(); - String info = I18n.format("ic2.item.tooltip.Output") + " "; - switch (meta) { - case 0: - info += "8192EU/t"; - } - info += " " + I18n.format("ic2.item.tooltip.Capacity") + " "; - switch (meta) { - case 0: - info += "100m EU"; - } - list.add(info); - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemStack); - String internalEnergy = I18n.format("ic2.item.tooltip.Store") + " " + nbt.getInteger("energy") + " EU"; - list.add(internalEnergy); - } - - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - @SideOnly(Side.CLIENT) - @Override - public void getSubItems(@Nonnull Item item, @Nonnull CreativeTabs creativeTabs, @Nonnull List list) { - super.getSubItems(item, creativeTabs, list); - ItemStack itemStack; - NBTTagCompound nbt; - - itemStack = PLBlocks.evsu.copy(); - nbt = StackUtil.getOrCreateNbtData(itemStack); - nbt.setInteger("energy", (int) 1E8); - list.add(itemStack); - - itemStack = PLBlocks.cseu.copy(); - nbt = StackUtil.getOrCreateNbtData(itemStack); - nbt.setInteger("energy", (int) 720E3); - list.add(itemStack); - - itemStack = PLBlocks.parallelSpaceSU.copy(); - nbt = StackUtil.getOrCreateNbtData(itemStack); - nbt.setInteger("energy", (int) 2E8); - list.add(itemStack); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemBlockPL.java b/src/main/java/com/mcgoodtime/productionline/items/ItemBlockPL.java index df686f3..c37c2b6 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemBlockPL.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemBlockPL.java @@ -31,6 +31,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; import java.util.List; @@ -48,6 +49,7 @@ public ItemBlockPL(Block block) { super(block); this.setMaxDamage(0); this.hasSubtypes = true; + this.setRegistryName(block.getRegistryName()); } /** @@ -85,16 +87,12 @@ public int getMetadata(int meta) return meta; } - /** - * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) - */ @Override - public void getSubItems(Item itemIn, CreativeTabs tab, List list) { + public void getSubItems(CreativeTabs tab, NonNullList items) { if (this.block instanceof IMultiIDBlock) { for (int i = 0; i < ((IMultiIDBlock) this.block).getBlockTypeContainer().getAllowedValues().size(); i++) { - list.add(new ItemStack(this, 1, i)); + items.add(new ItemStack(this, 1, i)); } } } - } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemCEU.java b/src/main/java/com/mcgoodtime/productionline/items/ItemCEU.java deleted file mode 100644 index fe428d2..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemCEU.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.mcgoodtime.productionline.items; - -import com.mcgoodtime.productionline.client.IItemModelProvider; -import ic2.api.item.IBoxable; -import net.minecraft.item.ItemStack; - -/** - * Created by BestOwl on 2015.12.6.0006. - * - * @author BestOwl - */ -public class ItemCEU extends ItemElectricPL implements IBoxable, IItemModelProvider { - - public ItemCEU() { - super("ceu", 1, 20000); - } - - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return true; - } - - /** - * Determine whether an item can be stored in a toolbox or not. - * - * @param itemstack item to be stored - * @return Whether to store the item in the toolbox or not - */ - @Override - public boolean canBeStoredInToolbox(ItemStack itemstack) { - return true; - } - - @Override - public String getModelResourcePath() { - return "eustorage"; - } - - /** - * Get custom resource name. - * To use default resource name, return null. - */ - @Override - public String getModelResourceName(int meta) { - return null; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemCrafting.java b/src/main/java/com/mcgoodtime/productionline/items/ItemCrafting.java index 710e28f..ca3444e 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemCrafting.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemCrafting.java @@ -14,48 +14,17 @@ public class ItemCrafting extends ItemMulti { public ItemCrafting() { super("crafting"); - PLItems.heatInsulationMaterial = this.next(); - PLItems.smallCompressedWaterHyacinth = this.next(); - PLItems.redstoneModule = this.next(); - PLItems.lazuliModule = this.next(); - PLItems.advSolarLensGroup = this.next(); - PLItems.advSolarLensCluster = this.next(); - PLItems.opticalGlass = this.next(); - PLItems.enderPearlPowder = this.next(); - PLItems.heartOfEnder = this.next(); - PLItems.CPUmk1 = this.next(); - PLItems.CPUmk2 = this.next(); - PLItems.CPUmk3 = this.next(); - PLItems.lifeConverter = this.next(); - PLItems.condensedImpurities = this.next(); - PLItems.heartOfLava = this.next(); - PLItems. heartOfPureWhite= this.next(); + PLItems.eyeOfTheDesert = this.next(); + PLItems.aquamarine = this.next(); + + } @Override protected List getInternalNameList() { List list = new ArrayList<>(); - list.add("heat_insulation_material"); - list.add("small_compressed_water_hyacinth"); - list.add("redstone_module"); - list.add("lazuli_module"); - list.add("sawdust"); - list.add("adv_solar_lens_unit"); - list.add("adv_solar_lens_group"); - list.add("adv_solar_lens_cluster"); - list.add("optical_glass"); - list.add("rigid_paper"); - list.add("ender_pearl_powder"); - list.add("cpu_mk1"); - list.add("cpu_mk2"); - list.add("cpu_mk3"); - list.add("fake_head"); - list.add("life_converter"); - list.add("condensed_impurities"); - list.add("heart_of_lava"); - list.add("heart_of_pure_white"); - list.add("heart_of_ender"); - + list.add("eye_of_the_desert"); + list.add("aquamarine"); return list; } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemDiamondApple.java b/src/main/java/com/mcgoodtime/productionline/items/ItemDiamondApple.java index 797f92a..45e5f28 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemDiamondApple.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemDiamondApple.java @@ -3,6 +3,7 @@ import com.mcgoodtime.productionline.client.IItemModelProvider; import com.mcgoodtime.productionline.core.ProductionLine; import net.minecraft.client.resources.I18n; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.MobEffects; @@ -11,13 +12,16 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.List; /** @@ -25,7 +29,7 @@ * * @author BestOwl */ -public class ItemDiamondApple extends ItemFood implements IItemModelProvider { +public class ItemDiamondApple extends ItemFood { public ItemDiamondApple() { super(1000, 10F, false); @@ -33,7 +37,8 @@ public ItemDiamondApple() { this.setCreativeTab(ProductionLine.creativeTabPL); this.setHasSubtypes(true); this.setAlwaysEdible(); - GameRegistry.register(this, new ResourceLocation(ProductionLine.MOD_ID, "diamond_apple")); + this.setRegistryName(new ResourceLocation(ProductionLine.MOD_ID, "diamond_apple")); + ForgeRegistries.ITEMS.register(this); } @Override @@ -51,17 +56,23 @@ protected void onFoodEaten(ItemStack itemStack, World world, @Nonnull EntityPlay super.onFoodEaten(itemStack, world, player); } - @Override @SideOnly(Side.CLIENT) - public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean bool) { - list.add(I18n.format(this.getUnlocalizedName() + ".desc1")); + @Override + public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { + tooltip.add(I18n.format(this.getUnlocalizedName() + ".desc1")); } + /** + * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) + */ @SideOnly(Side.CLIENT) @Override - public void getSubItems(@Nonnull Item item, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < 2; i++) { - list.add(new ItemStack(this, 1, i)); + public void getSubItems(CreativeTabs tab, NonNullList items) { + if (tab == ProductionLine.creativeTabPL) + { + for (int i = 0; i < 2; i++) { + items.add(new ItemStack(this, 1, i)); + } } } @@ -78,18 +89,4 @@ public boolean hasEffect(ItemStack itemStack) { return itemStack.getItemDamage() >= 1; } - @Override - public String getModelResourcePath() { - return "food"; - } - - /** - * Get custom resource name. - * To use default resource name, return null. - * - */ - @Override - public String getModelResourceName(int meta) { - return null; - } } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemElectricPL.java b/src/main/java/com/mcgoodtime/productionline/items/ItemElectricPL.java deleted file mode 100644 index 6f2074e..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemElectricPL.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.mcgoodtime.productionline.items; - -import com.mcgoodtime.productionline.items.ItemPL; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -/** - * Created by BestOwl on 2015.12.8.0008. - * Electric item use ic2 energy. - * - * @author BestOwl - */ -public class ItemElectricPL extends ItemPL implements IElectricItem { - - protected int maxPowerTick; - protected int maxEnergy; - protected int tier; - - public ItemElectricPL(String name, int tier, int maxEnergy) { - super(name); - this.setMaxDamage(27); - this.setHasSubtypes(true); - this.setMaxStackSize(1); - this.tier = tier; - this.maxEnergy = maxEnergy; -// this.maxPowerTick = (int) EnergyNet.instance.getPowerFromTier(tier); - this.addPropertyOverrides(); - } - - protected void addPropertyOverrides() { - this.addPropertyOverride(new ResourceLocation("energy"), (stack, worldIn, entityIn) -> { - int meta = stack.getMetadata(); - if (meta > 24) { - return 1; - } - else if (meta > 17) { - return 2; - } - else if (meta > 10) { - return 3; - } - else if (meta > 3) { - return 4; - } - else { - return 0; - } - }); - } - - @SuppressWarnings({"NumericOverflow", "unchecked"}) - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - ElectricItem.manager.charge(itemStack, 0.0D, Integer.MAX_VALUE, true, false); - itemList.add(itemStack); - - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - - /** - * Determine if the item can be used in a machine or as an armor part to supply energy. - * - * @return Whether the item can supply energy - */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } - - /** - * Get the item's maximum charge energy in EU. - * - * @return Maximum charge energy - */ - @Override - public double getMaxCharge(ItemStack itemStack) { - return this.maxEnergy; - } - - /** - * Get the item's tier, lower tiers can't send energy to higher ones. - * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. - * - * @return Item's tier - */ - @Override - public int getTier(ItemStack itemStack) { - return this.tier; - } - - /** - * Get the item's transfer limit in EU per transfer operation. - * - * @return Transfer limit - */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return this.maxPowerTick; - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemMulti.java b/src/main/java/com/mcgoodtime/productionline/items/ItemMulti.java index d54e3b8..4d4bce8 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemMulti.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemMulti.java @@ -1,14 +1,17 @@ package com.mcgoodtime.productionline.items; import com.mcgoodtime.productionline.client.IItemModelProvider; +import com.mcgoodtime.productionline.core.ProductionLine; import net.minecraft.client.resources.I18n; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nullable; import java.util.List; import static com.mcgoodtime.productionline.core.ProductionLine.MOD_ID; @@ -39,7 +42,11 @@ protected ItemStack next() { */ @Override public String getUnlocalizedName(ItemStack itemStack) { - return "item." + MOD_ID + "." + this.getInternalName(itemStack.getItemDamage()); + if (internalNameList.size() > 0) { + return "item." + MOD_ID + "." + this.getInternalName(itemStack.getItemDamage()); + } else { + return super.getUnlocalizedName(itemStack); + } } public String getInternalName(int meta) { @@ -56,22 +63,24 @@ public int getInternalNameSize() { * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ @Override - @SuppressWarnings("unchecked") - public void getSubItems(Item item, CreativeTabs creativeTabs, List list) { - for(int meta = 0; meta < this.internalNameList.size(); ++meta) { - ItemStack stack = new ItemStack(this, 1, meta); - list.add(stack); + public void getSubItems(CreativeTabs tab, NonNullList items) { + if (tab == ProductionLine.creativeTabPL) + { + for(int meta = 0; meta < this.internalNameList.size(); ++meta) { + ItemStack stack = new ItemStack(this, 1, meta); + items.add(stack); + } } } - @Override @SideOnly(Side.CLIENT) - public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean bool) { + @Override + public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { int i = 1; - String unLocal = this.getUnlocalizedName(itemStack) + ".desc" + i; + String unLocal = this.getUnlocalizedName(stack) + ".desc" + i; while (I18n.hasKey(unLocal)) { - list.add(I18n.format(unLocal)); + tooltip.add(I18n.format(unLocal)); i++; unLocal = this.getUnlocalizedName() + ".desc" + i; } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemOre.java b/src/main/java/com/mcgoodtime/productionline/items/ItemOre.java index 63101c5..9fbb82a 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemOre.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemOre.java @@ -16,14 +16,12 @@ public ItemOre() { super("ore"); PLItems.ingotIridium = this.next(); - PLItems.dustIridium = this.next(); } @Override protected List getInternalNameList() { List list = new ArrayList(); list.add("ingot_iridium"); - list.add("dust_iridium"); return list; } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemPL.java b/src/main/java/com/mcgoodtime/productionline/items/ItemPL.java index 0b357b2..9594593 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemPL.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemPL.java @@ -25,14 +25,16 @@ package com.mcgoodtime.productionline.items; import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nullable; import java.util.List; import static com.mcgoodtime.productionline.core.ProductionLine.MOD_ID; @@ -51,17 +53,18 @@ public ItemPL(String name) { this.setUnlocalizedName(MOD_ID + "." + name); this.itemName = name; this.setCreativeTab(creativeTabPL); - GameRegistry.register(this, new ResourceLocation(MOD_ID, name)); + this.setRegistryName(new ResourceLocation(MOD_ID, name)); + ForgeRegistries.ITEMS.register(this); } - @Override @SideOnly(Side.CLIENT) - public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean bool) { + @Override + public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { int i = 1; String unLocal = this.getUnlocalizedName() + ".desc" + i; while (I18n.hasKey(unLocal)) { - list.add(I18n.format(unLocal)); + tooltip.add(I18n.format(unLocal)); i++; unLocal = this.getUnlocalizedName() + ".desc" + i; } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemPLFood.java b/src/main/java/com/mcgoodtime/productionline/items/ItemPLFood.java deleted file mode 100644 index 6272283..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemPLFood.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.items; - -import com.mcgoodtime.productionline.client.IItemModelProvider; -import com.mcgoodtime.productionline.init.PLItems; -import com.mcgoodtime.productionline.potion.PLPotion; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.Map; -import java.util.WeakHashMap; - -public class ItemPLFood extends ItemPL implements IItemModelProvider { - - private int timer; - private Map amountMap = new WeakHashMap<>(); - - /** - * The amount this food item heals the player. - */ - private int healAmount; - /** - * 饱食度 - */ - private final float saturationModifier; - /** - * If this field is true, the food can be consumed even if the player don't need to eat. - */ - private boolean alwaysEdible; - - public ItemPLFood(String name, int healAmount, float saturationModifier, boolean alwaysEdible) { - super(name); - this.healAmount = healAmount; - this.saturationModifier = saturationModifier; - this.alwaysEdible = alwaysEdible; - } - - @Nullable - @Override - public ItemStack onItemUseFinish(@Nonnull ItemStack stack, World worldIn, EntityLivingBase entityLiving) { - --stack.stackSize; - - if (entityLiving instanceof EntityPlayer) { - EntityPlayer entityplayer = (EntityPlayer) entityLiving; - entityplayer.getFoodStats().addStats(healAmount, saturationModifier); - worldIn.playSound(null, entityplayer.posX, entityplayer.posY, entityplayer.posZ, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, worldIn.rand.nextFloat() * 0.1F + 0.9F); - this.onEaten(stack, worldIn, entityplayer); - entityplayer.addStat(StatList.getObjectUseStats(this)); - } - - return stack; - } - - @Nonnull - public ActionResult onItemRightClick(@Nonnull ItemStack stack, World worldIn, EntityPlayer playerIn, EnumHand hand) { - if (playerIn.canEat(this.alwaysEdible)) { - playerIn.setActiveHand(hand); - return new ActionResult<>(EnumActionResult.SUCCESS, stack); - } else { - return new ActionResult<>(EnumActionResult.FAIL, stack); - } - } - - /** - * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and - * update it's contents. - */ - @Override - public void onUpdate(ItemStack itemStack, World world, Entity entity, int slotIndex, boolean isCurrentItem) { - if (!world.isRemote) { - if (entity instanceof EntityPlayer) - //1200 ticks = 1min - if (this.timer < 1200) { - ++this.timer; - } else if (this.timer == 1200) { - this.timer = 0; - amountMap.remove(entity); - } - } - } - - protected ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) { - if (!world.isRemote) { - if (this.equals(PLItems.salt)) { - if (amountMap.containsKey(player)) { - EatAmount amount = amountMap.get(player); - if (!stack.isItemEqual(amount.itemStack)) { - amountMap.remove(player); - } - //3 - 1 - else if (amount.amount == 2) { - amountMap.remove(player); - PLPotion.salty.applyPotion(player, 0, 1); - return stack; - } - - } else { - amountMap.put(player, new EatAmount(stack, 0)); - } - amountMap.get(player).amount++; - } - - } - return stack; - } - - /** - * How long it takes to use or consume an item - */ - @Override - public int getMaxItemUseDuration(ItemStack itemStack) { - return 32; - } - - /** - * returns the action that specifies what animation to play when the items is being used - */ - @Override - @Nonnull - public EnumAction getItemUseAction(ItemStack itemStack) { - return EnumAction.EAT; - } - - @Override - public String getModelResourcePath() { - return "food"; - } - - /** - * Get custom resource name. - * To use default resource name, return null. - * - */ - @Override - public String getModelResourceName(int meta) { - return null; - } - - static class EatAmount { - private ItemStack itemStack; - private int amount; - - private EatAmount(ItemStack itemStack, int amount) { - this.itemStack = itemStack; - this.amount = amount; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemPLRecord.java b/src/main/java/com/mcgoodtime/productionline/items/ItemPLRecord.java deleted file mode 100644 index 60e074e..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemPLRecord.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.items; - -import com.mcgoodtime.productionline.core.ProductionLine; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemRecord; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundEvent; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -import static com.mcgoodtime.productionline.core.ProductionLine.MOD_ID; - -/** - * Created by suhao on 2015.6.29. - * @author suhao - */ -public class ItemPLRecord extends ItemRecord { - - private String name; - - public ItemPLRecord(String name, SoundEvent soundEvent) { - super(name, soundEvent); - this.name = name; - this.setCreativeTab(ProductionLine.creativeTabPL); - this.setUnlocalizedName(MOD_ID + "." + name); - GameRegistry.register(this, new ResourceLocation(MOD_ID, name)); - } - - @Override - public String getRecordNameLocal() { - return net.minecraft.util.text.translation.I18n.translateToLocal(this.getUnlocalizedName() + ".desc"); - } - - /** - * Retrieves the resource location of the sound to play for this record. - * - * @param name The name of the record to play - * @return The resource location for the audio, null to use default. - */ - @Override - public ResourceLocation getRecordResource(String name) { - return new ResourceLocation(ProductionLine.RESOURCE_DOMAIN, this.name); - } - - @SideOnly(Side.CLIENT) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List tooltipList, boolean boo) { - tooltipList.add(I18n.format(this.getUnlocalizedName() + "." + "desc1")); - tooltipList.add(I18n.format(this.getUnlocalizedName() + "." + "desc2")); - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemSeal.java b/src/main/java/com/mcgoodtime/productionline/items/ItemSeal.java new file mode 100644 index 0000000..74f7e64 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemSeal.java @@ -0,0 +1,33 @@ +package com.mcgoodtime.productionline.items; + +import com.mcgoodtime.productionline.init.PLItems; + +import java.util.ArrayList; +import java.util.List; + +public class ItemSeal extends ItemMulti{ + + public ItemSeal() { + super("seal"); + PLItems.enchantingSealSandStorm = this.next(); + PLItems.enchantingSealAnotherWorld = this.next(); + PLItems.enchantingSealOasis = this.next(); + PLItems.enchantingSealSpring = this.next(); + + } + + @Override + protected List getInternalNameList() { + List list = new ArrayList<>(); + list.add("enchanting_seal_sand_storm"); + list.add("enchanting_seal_another_world"); + list.add("enchanting_seal_oasis"); + list.add("enchanting_seal_spring"); + return list; + } + + @Override + public String getModelResourcePath() { + return "seal"; + } +} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemSheepCrook.java b/src/main/java/com/mcgoodtime/productionline/items/ItemSheepCrook.java new file mode 100644 index 0000000..111a5a9 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemSheepCrook.java @@ -0,0 +1,8 @@ +package com.mcgoodtime.productionline.items; + +public class ItemSheepCrook extends ItemPL{ + + public ItemSheepCrook(){ + super("sheepcrook"); + } +} diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemStacks.java b/src/main/java/com/mcgoodtime/productionline/items/ItemStacks.java index cecbb1f..30baf5a 100644 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemStacks.java +++ b/src/main/java/com/mcgoodtime/productionline/items/ItemStacks.java @@ -18,7 +18,7 @@ public static ItemComparableItemStack typeOf(ItemStack stack) { public static ItemStack copyStack(ItemStack in, int amount) { ItemStack ret = in.copy(); - ret.stackSize = amount; + //ret.stackSize = amount; return ret; } diff --git a/src/main/java/com/mcgoodtime/productionline/items/ItemWaterHyacinth.java b/src/main/java/com/mcgoodtime/productionline/items/ItemWaterHyacinth.java deleted file mode 100644 index 0696eb3..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/ItemWaterHyacinth.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.items; - -import com.mcgoodtime.productionline.init.PLBlocks; -import net.minecraft.block.Block; -import net.minecraft.block.BlockLiquid; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.ItemColored; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; -import net.minecraft.util.ActionResult; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumHand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; - -/** - * The item of water hyacinth in GoodTime-Industrial. - * - * @author liach - */ -public class ItemWaterHyacinth extends ItemColored { - - public ItemWaterHyacinth(Block block) { - super(block, false); - } - - @Nonnull - public ActionResult onItemRightClick(@Nonnull ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { - RayTraceResult raytraceresult = this.rayTrace(worldIn, playerIn, true); - - if (raytraceresult == null) { - return new ActionResult<>(EnumActionResult.PASS, itemStackIn); - } else { - if (raytraceresult.typeOfHit == RayTraceResult.Type.BLOCK) { - BlockPos blockpos = raytraceresult.getBlockPos(); - - if (!worldIn.isBlockModifiable(playerIn, blockpos) || !playerIn.canPlayerEdit(blockpos.offset(raytraceresult.sideHit), raytraceresult.sideHit, itemStackIn)) { - return new ActionResult<>(EnumActionResult.FAIL, itemStackIn); - } - - BlockPos blockpos1 = blockpos.up(); - IBlockState iblockstate = worldIn.getBlockState(blockpos); - - if (iblockstate.getMaterial() == Material.WATER && iblockstate.getValue(BlockLiquid.LEVEL) == 0 && worldIn.isAirBlock(blockpos1)) { - // special case for handling block placement with water lilies - net.minecraftforge.common.util.BlockSnapshot blocksnapshot = net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(worldIn, blockpos1); - worldIn.setBlockState(blockpos1, PLBlocks.waterHyacinth.getDefaultState()); - if (net.minecraftforge.event.ForgeEventFactory.onPlayerBlockPlace(playerIn, blocksnapshot, net.minecraft.util.EnumFacing.UP).isCanceled()) { - blocksnapshot.restore(true, false); - return new ActionResult<>(EnumActionResult.FAIL, itemStackIn); - } - - worldIn.setBlockState(blockpos1, PLBlocks.waterHyacinth.getDefaultState(), 11); - - if (!playerIn.capabilities.isCreativeMode) { - --itemStackIn.stackSize; - } - - playerIn.addStat(StatList.getObjectUseStats(this)); - worldIn.playSound(playerIn, blockpos, SoundEvents.BLOCK_WATERLILY_PLACE, SoundCategory.BLOCKS, 1.0F, 1.0F); - return new ActionResult<>(EnumActionResult.SUCCESS, itemStackIn); - } - } - - return new ActionResult<>(EnumActionResult.FAIL, itemStackIn); - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/tools/ItemGravityRay.java b/src/main/java/com/mcgoodtime/productionline/items/tools/ItemGravityRay.java deleted file mode 100644 index b9f6738..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/tools/ItemGravityRay.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.mcgoodtime.productionline.items.tools; - -import com.mcgoodtime.productionline.client.IItemModelProvider; -import com.mcgoodtime.productionline.entity.EntityRay; -import com.mcgoodtime.productionline.init.PLItems; -import com.mcgoodtime.productionline.items.ItemElectricPL; -import ic2.api.item.ElectricItem; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; -import net.minecraft.util.*; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; - -/** - * Created by BestOwl on 2015.12.7.0007. - * - * @author BestOwl - */ -public class ItemGravityRay extends ItemElectricPL implements IItemModelProvider { - - public ItemGravityRay() { - super("gravity_ray", 3, (int) 11E6); - } - - @Override - protected void addPropertyOverrides() { - this.addPropertyOverride(new ResourceLocation("pull"), (stack, worldIn, entityIn) -> { - if (entityIn == null) - { - return 0.0F; - } - else - { - ItemStack itemstack = entityIn.getActiveItemStack(); - return itemstack != null && itemstack.getItem() == PLItems.gravityRay ? (float)(stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0F : 0.0F; - } - }); - this.addPropertyOverride(new ResourceLocation("pulling"), - (stack, worldIn, entityIn) -> entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F); - } - - /** - * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount - */ - @Override - public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityLivingBase player, int itemInUseCount) { - if (ElectricItem.manager.getCharge(itemStack) >= 100) { - int i = this.getMaxItemUseDuration(itemStack) - itemInUseCount; - - float damge = (float) i / 20.0F; - damge = (damge * damge + damge * 2.0F) / 3.0F; - if ((double)damge < 0.1D) { - return; - } - if (damge > 1.0F) { - damge = 1.0F; - } - - world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, - SoundCategory.PLAYERS, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + damge * 0.5F); - if (!(player instanceof EntityPlayer - && ((EntityPlayer) player).capabilities.isCreativeMode)) { - ElectricItem.manager.discharge(itemStack, 100, this.tier, false, true, false); - } - if (!world.isRemote) { - world.spawnEntity(new EntityRay(world, player, damge * 2.0F)); - } - } - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - @Nonnull - public ActionResult onItemRightClick(@Nonnull ItemStack stack, World world, EntityPlayer player, EnumHand hand) { - if (player.capabilities.isCreativeMode || ElectricItem.manager.getCharge(stack) >= 100) { - player.setActiveHand(hand); - return new ActionResult<>(EnumActionResult.SUCCESS, stack); - } - return new ActionResult<>(EnumActionResult.PASS, stack); - } - - /** - * returns the action that specifies what animation to play when the items is being used - */ - @Override - @Nonnull - public EnumAction getItemUseAction(ItemStack itemStack) { - return EnumAction.BOW; - } - - /** - * How long it takes to use or consume an item - */ - @Override - public int getMaxItemUseDuration(ItemStack itemStack) { - return 72000; - } - - @Override - public String getModelResourcePath() { - return "tool"; - } - - /** - * Get custom resource name. - * To use default resource name, return null. - * - */ - @Override - public String getModelResourceName(int meta) { - return null; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/tools/ItemPLTreetap.java b/src/main/java/com/mcgoodtime/productionline/items/tools/ItemPLTreetap.java deleted file mode 100644 index 295feac..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/tools/ItemPLTreetap.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.items.tools; - -import com.mcgoodtime.productionline.client.IItemModelProvider; -import com.mcgoodtime.productionline.items.ItemPL; -import ic2.api.item.IBoxable; -import ic2.core.IC2; -import ic2.core.audio.PositionSpec; -import ic2.core.block.BlockRubWood; -import ic2.core.item.type.MiscResourceType; -import ic2.core.ref.BlockName; -import ic2.core.ref.ItemName; -import ic2.core.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumActionResult; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import java.util.List; - -/* - * Created by suhao on 2015-6-4-0004. - */ -public class ItemPLTreetap extends ItemPL implements IBoxable, IItemModelProvider { - - public ItemPLTreetap(String name, int damage) { - super(name); - this.setMaxDamage(damage); - this.setMaxStackSize(1); - } - - @Override - public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float xOffset, float yOffset, float zOffset) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if (block == BlockName.rubber_wood.getInstance()) { - attemptExtract(player, world, pos, side, state, null); - if (!world.isRemote) { - stack.damageItem(1, player); - } - - return EnumActionResult.SUCCESS; - } else { - return EnumActionResult.PASS; - } - } - - public static boolean attemptExtract(EntityPlayer player, World world, BlockPos pos, EnumFacing side, IBlockState state, List stacks) { - BlockRubWood.RubberWoodState rwState = state.getValue(BlockRubWood.stateProperty); - if (!rwState.isPlain() && rwState.facing == side) { - if (rwState.wet) { - if (!world.isRemote) { - world.setBlockState(pos, state.withProperty(BlockRubWood.stateProperty, rwState.getDry())); - if (stacks != null) { - stacks.add(StackUtil.copyWithSize(ItemName.misc_resource.getItemStack(MiscResourceType.resin), world.rand.nextInt(3) + 1)); - } else { - ejectResin(world, pos, side, world.rand.nextInt(3) + 1); - } - - if (player != null) { - IC2.achievements.issueAchievement(player, "acquireResin"); - } - } - - if (world.isRemote && player != null) { - IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Treetap.ogg", true, IC2.audioManager.getDefaultVolume()); - } - - return true; - } else { - if (!world.isRemote && world.rand.nextInt(5) == 0) { - world.setBlockState(pos, state.withProperty(BlockRubWood.stateProperty, BlockRubWood.RubberWoodState.plain_y)); - } - - if (world.rand.nextInt(5) == 0) { - if (!world.isRemote) { - ejectResin(world, pos, side, 1); - if (stacks != null) { - stacks.add(ItemName.misc_resource.getItemStack(MiscResourceType.resin)); - } else { - ejectResin(world, pos, side, 1); - } - } - - if (world.isRemote && player != null) { - IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Treetap.ogg", true, IC2.audioManager.getDefaultVolume()); - } - - return true; - } else { - return false; - } - } - } else { - return false; - } - } - - private static void ejectResin(World world, BlockPos pos, EnumFacing side, int quantity) { - double ejectBias = 0.3D; - double ejectX = (double) pos.getX() + 0.5D + (double) side.getFrontOffsetX() * 0.3D; - double ejectY = (double) pos.getY() + 0.5D + (double) side.getFrontOffsetY() * 0.3D; - double ejectZ = (double) pos.getZ() + 0.5D + (double) side.getFrontOffsetZ() * 0.3D; - - for (int i = 0; i < quantity; ++i) { - EntityItem entityitem = new EntityItem(world, ejectX, ejectY, ejectZ, ItemName.misc_resource.getItemStack(MiscResourceType.resin)); - entityitem.setDefaultPickupDelay(); - world.spawnEntity(entityitem); - } - - } - - public boolean canBeStoredInToolbox(ItemStack itemstack) { - return true; - } - - @Override - public String getModelResourcePath() { - return "tool/treetap"; - } - - /** - * Get custom resource name. - * To use default resource name, return null. - * - */ - @Override - public String getModelResourceName(int meta) { - return null; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/tools/PLToolMaterial.java b/src/main/java/com/mcgoodtime/productionline/items/tools/PLToolMaterial.java deleted file mode 100644 index 1c298ea..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/tools/PLToolMaterial.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.items.tools; - -import net.minecraft.item.Item.ToolMaterial; -import net.minecraftforge.common.util.EnumHelper; - -/* - * Created by suhao on 2015-6-10-0010. - */ -public class PLToolMaterial { - public static ToolMaterial iridium = EnumHelper.addToolMaterial("Iridium", 4, 2000, 10.0F, 4.0F, 30); -} diff --git a/src/main/java/com/mcgoodtime/productionline/items/tools/ToolPL.java b/src/main/java/com/mcgoodtime/productionline/items/tools/ToolPL.java deleted file mode 100644 index 7583d2e..0000000 --- a/src/main/java/com/mcgoodtime/productionline/items/tools/ToolPL.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.items.tools; - - -import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemSword; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.GameRegistry; - -import static com.mcgoodtime.productionline.core.ProductionLine.*; - -/** - * Created by suhao on 2015.7.19. - * - * @author suhao - */ -public class ToolPL { - - public static Item registerPickaxe(ToolMaterial toolMaterial, String name) { - return new Pickaxe(toolMaterial, name); - } - - public static Item registerAxe(ToolMaterial toolMaterial, String name) { - return new Axe(toolMaterial, name); - } - - public static Item registerSpade(ToolMaterial toolMaterial, String name) { - return new Spade(toolMaterial, name); - } - - public static Item registerSword(ToolMaterial toolMaterial, String name) { - return new Sword(toolMaterial, name); - } - - private static void registerItem(String name, Item item) { - item.setUnlocalizedName(MOD_NAME + "." + name); -// item.setTextureName(RESOURCE_DOMAIN + ":" + "item" + name); - item.setCreativeTab(creativeTabPL); - GameRegistry.register(item, new ResourceLocation(MOD_ID, name)); - } - - private static class Pickaxe extends ItemPickaxe { - private Pickaxe(ToolMaterial toolMaterial, String name) { - super(toolMaterial); - registerItem(name, this); - } - - } - - private static class Axe extends ItemAxe { - private Axe(ToolMaterial toolMaterial, String name) { - super(toolMaterial); - registerItem(name, this); - } - } - - private static class Spade extends ItemSpade { - private Spade(ToolMaterial toolMaterial, String name) { - super(toolMaterial); - registerItem(name, this); - } - - } - - private static class Sword extends ItemSword { - private Sword(ToolMaterial toolMaterial, String name) { - super(toolMaterial); - registerItem(name, this); - } - } -} - - - diff --git a/src/main/java/com/mcgoodtime/productionline/mixin/ISubTileGenerating.java b/src/main/java/com/mcgoodtime/productionline/mixin/ISubTileGenerating.java new file mode 100644 index 0000000..842a2e3 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/mixin/ISubTileGenerating.java @@ -0,0 +1,7 @@ +package com.mcgoodtime.productionline.mixin; + +public interface ISubTileGenerating { + boolean canEnhance(); + void setGrowth(int growth); +} + diff --git a/src/main/java/com/mcgoodtime/productionline/mixin/MixinItemMulti.java b/src/main/java/com/mcgoodtime/productionline/mixin/MixinItemMulti.java deleted file mode 100644 index 7be20e2..0000000 --- a/src/main/java/com/mcgoodtime/productionline/mixin/MixinItemMulti.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.mcgoodtime.productionline.mixin; - -import com.mcgoodtime.productionline.event.ThrowableUranium238Handler; -import ic2.core.block.state.EnumProperty; -import ic2.core.block.state.IIdProvider; -import ic2.core.item.ItemIC2; -import ic2.core.item.ItemMulti; -import ic2.core.item.type.NuclearResourceType; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -/** - * ThrowableUranium238Handler registry. - * Created by BestOwl on 2016-06-01. - */ -@Mixin(ItemMulti.class) -public abstract class MixinItemMulti & IIdProvider> extends ItemIC2 { - - MixinItemMulti() { - super(null); - } - - @Shadow - private EnumProperty typeProperty; - - @Inject(method = "", at = @At("RETURN")) - @SuppressWarnings("unchecked") - private void onInstantiation(CallbackInfo callbackInfo) { - if (this.typeProperty.getValue("type") instanceof NuclearResourceType) { - this.setRightClickHandler((T) NuclearResourceType.uranium_238, new ThrowableUranium238Handler()); - } - } - - @Shadow - public abstract void setRightClickHandler(T type, ItemMulti.IItemRightClickHandler handler); -} diff --git a/src/main/java/com/mcgoodtime/productionline/mixin/MixinSubTileGenerating.java b/src/main/java/com/mcgoodtime/productionline/mixin/MixinSubTileGenerating.java new file mode 100644 index 0000000..bfa07db --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/mixin/MixinSubTileGenerating.java @@ -0,0 +1,59 @@ +package com.mcgoodtime.productionline.mixin; + +import net.minecraft.tileentity.TileEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import vazkii.botania.api.mana.IManaCollector; +import vazkii.botania.api.subtile.SubTileEntity; +import vazkii.botania.api.subtile.SubTileGenerating; + + + +@Mixin(SubTileGenerating.class) +public abstract class MixinSubTileGenerating extends SubTileEntity implements ISubTileGenerating{ + + @Shadow + protected TileEntity linkedCollector; + + @Shadow + protected int mana; + + private int growth; + private boolean canEnhance; + + @Shadow + public abstract boolean isValidBinding(); + + @Inject(method = "update",at=@At("HEAD")) + public void onUpdate() { + if(this.mana > 0) { + this.canEnhance = true; + } else { + this.canEnhance = false; + } + } + + public void emptyManaIntoCollector() { + if(linkedCollector != null && isValidBinding()) { + IManaCollector collector = (IManaCollector) linkedCollector; + if(!collector.isFull() && mana > 0) { + int manaval = Math.min(mana, collector.getMaxMana() - collector.getCurrentMana()); + mana -= manaval; + collector.recieveMana(manaval+growth); + } + } + } + + public boolean canEnhance(){ + return this.canEnhance; + } + + public void setGrowth(int growth){ + this.growth = growth; + } + + +} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/mixin/MixinTileEntityFurnace.java b/src/main/java/com/mcgoodtime/productionline/mixin/MixinTileEntityFurnace.java deleted file mode 100644 index 81d8283..0000000 --- a/src/main/java/com/mcgoodtime/productionline/mixin/MixinTileEntityFurnace.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.mcgoodtime.productionline.mixin; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Items; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemFirework; -import net.minecraft.item.ItemFireworkCharge; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityFurnace; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -/** - * Created by BestOwl on 2015.12.5.0005. - * - * @author BestOwl - */ -@Mixin(TileEntityFurnace.class) -public abstract class MixinTileEntityFurnace extends TileEntity { - - @Shadow - private ItemStack[] furnaceItemStacks; - - @Shadow - public abstract boolean isBurning(); - - @Inject(method = "update", at = @At("RETURN")) - private void onUpdate(CallbackInfo callbackInfo) { - if (!this.world.isRemote) { - if (this.isBurning()) { - ItemStack itemStack = this.furnaceItemStacks[0]; - if (itemStack != null) { - if (itemStack.getItem() instanceof ItemBlock) { - Block block = ((ItemBlock) itemStack.getItem()).block; - if (block.getMaterial(block.getStateFromMeta(itemStack.getMetadata())) == Material.TNT) { - this.doExplosion(); - } - } else if (itemStack.getItem() == Items.GUNPOWDER) { - this.doExplosion(); - } else if (itemStack.getItem() instanceof ItemFirework || itemStack.getItem() - instanceof ItemFireworkCharge) { - this.doExplosion(); - } - } - } - } - } - - private void doExplosion() { - this.world.createExplosion(null, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 4.0F, true); - this.world.destroyBlock(this.getPos(), true); - this.invalidate(); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/network/PLNetwork.java b/src/main/java/com/mcgoodtime/productionline/network/PLNetwork.java index 860e838..ec9c455 100644 --- a/src/main/java/com/mcgoodtime/productionline/network/PLNetwork.java +++ b/src/main/java/com/mcgoodtime/productionline/network/PLNetwork.java @@ -27,10 +27,8 @@ import com.mcgoodtime.productionline.core.ProductionLine; import com.mcgoodtime.productionline.network.message.MessageBase; import com.mcgoodtime.productionline.network.message.MessageBlockDisplayState; -import com.mcgoodtime.productionline.network.message.MessageEUStorage; import com.mcgoodtime.productionline.network.message.MessageHandlerBase; import com.mcgoodtime.productionline.tiles.TileFacing; -import com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.relauncher.Side; @@ -46,7 +44,6 @@ public class PLNetwork { static { registerMessage(MessageBlockDisplayState.class, Side.CLIENT); - registerMessage(MessageEUStorage.class, Side.SERVER); } @SuppressWarnings("unchecked") @@ -61,10 +58,6 @@ public static void updateBlockDisplayState(TileFacing tile) { tile.getPos().getX(), tile.getPos().getY(), tile.getPos().getZ(), 64)); } - public static void updateTileEUStorage(TileEUStorage tile) { - network.sendToServer(new MessageEUStorage(tile)); - } - public static SimpleNetworkWrapper getNetwork() { return network; } diff --git a/src/main/java/com/mcgoodtime/productionline/network/message/MessageEUStorage.java b/src/main/java/com/mcgoodtime/productionline/network/message/MessageEUStorage.java deleted file mode 100644 index 22ea18f..0000000 --- a/src/main/java/com/mcgoodtime/productionline/network/message/MessageEUStorage.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.mcgoodtime.productionline.network.message; - -import com.mcgoodtime.productionline.PLUtil; -import com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.translation.I18n; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; - -import static com.mcgoodtime.productionline.tiles.eustorage.TileEUStorage.RedstoneMode; - -/** - * Created by BestOwl on 2015.11.28.0028. - * - * @author BestOwl - */ -public class MessageEUStorage extends MessageBase { - - public MessageEUStorage() {} - - public MessageEUStorage(TileEUStorage tile) { - super(tile); - int i = tile.redstoneMode.ordinal(); - i++; - if (i >= RedstoneMode.values().length) { - i = 0; - } - this.nbt.setShort("redstoneMode", (short) i); - } - - @Override - protected IMessage handlerMessage(MessageBase message, MessageContext ctx) { - long pos = message.nbt.getLong("pos"); - short modeID = message.nbt.getShort("redstoneMode"); - RedstoneMode mode = RedstoneMode.values()[modeID]; - TileEUStorage tile = (TileEUStorage) ctx.getServerHandler().playerEntity.world.getTileEntity(BlockPos.fromLong(pos)); - tile.redstoneMode = mode; - PLUtil.messageToPlayer(ctx.getServerHandler().playerEntity, I18n.translateToLocal("ic2.EUStorage.gui.mod.redstone" + modeID)); - return null; - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/recipes/CarbonizeFurnaceRecipes.java b/src/main/java/com/mcgoodtime/productionline/recipes/CarbonizeFurnaceRecipes.java deleted file mode 100644 index 5563a84..0000000 --- a/src/main/java/com/mcgoodtime/productionline/recipes/CarbonizeFurnaceRecipes.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.recipes; - -import com.mcgoodtime.productionline.init.PLItems; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -/** - * List of CarbonizeFurnace's Recipes - * - * @author BestOwl - */ -public class CarbonizeFurnaceRecipes extends RecipeBase { - - public static final CarbonizeFurnaceRecipes instance = new CarbonizeFurnaceRecipes(); - - private CarbonizeFurnaceRecipes() { - register(new ItemStack(Blocks.LOG), new ItemStack(Items.COAL, 2, 1), 2000); - register(new ItemStack(Blocks.LOG2), new ItemStack(Items.COAL, 2, 1), 2000); - register(new ItemStack(Blocks.PLANKS, 2), new ItemStack(Items.COAL, 1, 1), 1500); - register(new ItemStack(PLItems.saltWaterBucket), new ItemStack(PLItems.salt), 1100); - } - - public void register(ItemStack input, ItemStack output, double requireEnergy) { - this.processList.add(new RecipePartCarbonizeFurnace(input, output, requireEnergy)); - } - - public class RecipePartCarbonizeFurnace extends RecipePart { - /** Value of EU consumption */ - public double requiresEnergy; - - private RecipePartCarbonizeFurnace(ItemStack input, ItemStack output, double requiresEnergy) { - super(input, output); - this.requiresEnergy = requiresEnergy; - } - } -} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/recipes/FluidKineticGeneratorRecipes.java b/src/main/java/com/mcgoodtime/productionline/recipes/FluidKineticGeneratorRecipes.java deleted file mode 100644 index 47277e9..0000000 --- a/src/main/java/com/mcgoodtime/productionline/recipes/FluidKineticGeneratorRecipes.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.recipes; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import java.util.List; - -/** - * Created by BestOwl on 2015.11.8.0008. - * - * @author BestOwl - */ -public class FluidKineticGeneratorRecipes extends RecipeBase { - public static final FluidKineticGeneratorRecipes instance = new FluidKineticGeneratorRecipes(); - - private FluidKineticGeneratorRecipes() { - this.register("lava", 10); - this.register("oil", 10); - this.register("fuel", 5); - this.register("biomass", 20); - this.register("bioethanol", 10); - this.register("ic2biogas", 10); - } - - public void register(String fluidName, int amount) { - if (FluidRegistry.getFluid(fluidName) != null) { - processList.add(new RecipePartFluidKineticGenerator(FluidRegistry.getFluidStack(fluidName, amount))); - } - } - - /** - * Returns the process result of an item. - * - */ - @Override - public ItemStack getProcessResult(ItemStack itemStack) { - return null; - } - - /** - * @return Whether this item can process - */ - @Override - public boolean canProcess(ItemStack itemStack) { - FluidStack fluidStack = FluidContainerRegistry.getFluidForFilledItem(itemStack); - if (fluidStack != null) { - for (RecipePart recipePart : this.processList) { - if (((RecipePartFluidKineticGenerator) recipePart).fluidStack.isFluidEqual(fluidStack)) { - return true; - } - } - } - - return false; - } - - /** - * Get required amount of process - * - * @param itemStack Input item - * @return Required amount of process - */ - @Override - public int getRequiredProcessAmount(ItemStack itemStack) { - return 1; - } - - @Override - public List getProcessRecipesList() { - return this.processList; - } - - /** - * @param itemStack Input item - */ - @Override - public RecipePart getRecipePart(ItemStack itemStack) { - return null; - } - - public class RecipePartFluidKineticGenerator extends RecipePart { - - public FluidStack fluidStack; - - public RecipePartFluidKineticGenerator(FluidStack fluidStack) { - this.fluidStack = fluidStack; - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/recipes/HeatDryerRecipes.java b/src/main/java/com/mcgoodtime/productionline/recipes/HeatDryerRecipes.java deleted file mode 100644 index 5543372..0000000 --- a/src/main/java/com/mcgoodtime/productionline/recipes/HeatDryerRecipes.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.recipes; - -import com.mcgoodtime.productionline.init.PLBlocks; -import net.minecraft.item.ItemStack; - -/** - * Created by JAVA0 on 2015/11/18. - * - */ -public class HeatDryerRecipes extends RecipeBase { - public static final HeatDryerRecipes instance = new HeatDryerRecipes(); - - private HeatDryerRecipes() { - this.register(new ItemStack(PLBlocks.waterHyacinth, 4), PLBlocks.dehydratedWaterHyacinthblock); - } - - public void register(ItemStack input, ItemStack output) { - processList.add(new RecipePart(input, output)); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/recipes/PackagerRecipes.java b/src/main/java/com/mcgoodtime/productionline/recipes/PackagerRecipes.java deleted file mode 100644 index 7dc457c..0000000 --- a/src/main/java/com/mcgoodtime/productionline/recipes/PackagerRecipes.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * This file is part of ProductionLine, licensed under MIT License (MIT). - * - * Copyright (c) 2017 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.recipes; - -import com.mcgoodtime.productionline.init.PLItems; -import net.minecraft.item.ItemStack; - -/** - * Created by BestOwl on 2017/3/25. - * List of Packager's Recipes - * - * @author BestOwl - */ -public class PackagerRecipes extends RecipeBase { - - public static final PackagerRecipes instance = new PackagerRecipes(); - - private PackagerRecipes() { - register(new ItemStack(PLItems.salt, 9), new ItemStack(PLItems.packagedSalt)); - } - - public void register(ItemStack input, ItemStack output) { - processList.add(new RecipePart(input, output)); - } - } diff --git a/src/main/java/com/mcgoodtime/productionline/recipes/RecipeBase.java b/src/main/java/com/mcgoodtime/productionline/recipes/RecipeBase.java index e471a93..3a7412e 100644 --- a/src/main/java/com/mcgoodtime/productionline/recipes/RecipeBase.java +++ b/src/main/java/com/mcgoodtime/productionline/recipes/RecipeBase.java @@ -24,9 +24,7 @@ */ package com.mcgoodtime.productionline.recipes; -import ic2.api.recipe.IMachineRecipeManager; -import ic2.api.recipe.IRecipeInput; -import ic2.api.recipe.RecipeOutput; +import ic2.api.recipe.*; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -79,7 +77,7 @@ public boolean canProcess(ItemStack itemStack) { public int getRequiredProcessAmount(ItemStack itemStack) { for (RecipePart recipes : this.processList) { if (recipes.input.isItemEqual(itemStack)) { - return recipes.input.stackSize; + return recipes.input.getMaxStackSize(); } } return 1; @@ -104,19 +102,18 @@ public RecipePart getRecipePart(ItemStack itemStack) { } @Override - public boolean addRecipe(IRecipeInput iRecipeInput, NBTTagCompound nbtTagCompound, boolean b, ItemStack... itemStacks) { - processList.add(new RecipePart(iRecipeInput.getInputs().get(0), itemStacks[0])); //TODO Implement this - return true; + public boolean addRecipe(Object o, Object o2, NBTTagCompound nbtTagCompound, boolean b) { + return false; } @Override - public RecipeOutput getOutputFor(ItemStack itemStack, boolean b) { - return new RecipeOutput(new NBTTagCompound(), getRecipePart(itemStack).output); + public MachineRecipeResult apply(Object o, boolean b) { + return null; } @Override - public Iterable getRecipes() { - throw new UnsupportedOperationException("not supported"); + public Iterable getRecipes() { + return null; } @Override diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/SubTileFlowerOfOsiris.java b/src/main/java/com/mcgoodtime/productionline/tiles/SubTileFlowerOfOsiris.java new file mode 100644 index 0000000..17da9ef --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/tiles/SubTileFlowerOfOsiris.java @@ -0,0 +1,93 @@ +package com.mcgoodtime.productionline.tiles; + + + +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import vazkii.botania.api.subtile.SubTileEntity; +import vazkii.botania.api.subtile.SubTileFunctional; +import vazkii.botania.api.subtile.SubTileGenerating; +import vazkii.botania.common.block.BlockSpecialFlower; +import vazkii.botania.common.block.tile.TileSpecialFlower; + + /* + Consume the energy in the network to accelerate the surrounding flowers + Energy consume unfinished + */ + +public class SubTileFlowerOfOsiris extends SubTileFunctional{ + + private int consume; + + private int accelerateLevel = 10; + + private int range = 3; + + @Override + public void onUpdate() { + if(!supertile.getWorld().isRemote){ + return; + } + for(BlockPos pos:BlockPos.getAllInBox(getPos().add(-range,0,-range),getPos().add(range,0,range))){ + SubTileGenerating tile = getManaGenerator(pos); + if(tile!=null) { + if(!hasMultiOsiris(tile)){ + accelerate(tile); + } + } + } + } + + private SubTileGenerating getManaGenerator(BlockPos pos) { + if(supertile.getWorld().getBlockState(pos).getBlock() instanceof BlockSpecialFlower){ + TileEntity tile = supertile.getWorld().getTileEntity(pos); + SubTileEntity subTile= ((TileSpecialFlower) tile).getSubTile(); + if(subTile instanceof SubTileGenerating){ + return (SubTileGenerating)subTile; + } + } + return null; + } + + private void accelerate(SubTileGenerating stg){ + calculateConsume(accelerateLevel); + for(int i=0;i<=Math.min(accelerateLevel,getMaxAccelerateLevel());i++){ + stg.onUpdate(); + } + } + + private boolean hasMultiOsiris(SubTileGenerating GeneratingTile){ + int count=1; + for(BlockPos pos:BlockPos.getAllInBox(getPos().add(-range*2,0,-range*2),getPos().add(range*2,0,range*2))){ + if(!pos.equals(this.getPos())){ + TileEntity tile=supertile.getWorld().getTileEntity(pos); + if(tile != null){ + SubTileEntity subTile=((TileSpecialFlower) tile).getSubTile(); + if(subTile instanceof SubTileFlowerOfOsiris){ + count++; + } + } + } + } + if(count >=2){ + GeneratingTile.getWorld().setBlockState(GeneratingTile.getPos(),Blocks.DEADBUSH.getDefaultState(),3); + return true; + }else + return false; + } + + private void calculateConsume(int growthLevel){ + this.consume = (int)Math.ceil(64*(((Math.log(growthLevel)/Math.log(5))+((1/3*Math.pow(growthLevel,2))+2))*(1+(0.1*range)))); + } + + private int getMaxAccelerateLevel(){ + return 10; + } + + + @Override + public int getMaxMana() { + return 0; + } +} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileAdvSolar.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileAdvSolar.java deleted file mode 100644 index e049755..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileAdvSolar.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.mcgoodtime.productionline.tiles; - -import com.mcgoodtime.productionline.init.PLItems; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlot; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotCharge; -import ic2.api.energy.tile.IEnergyAcceptor; -import ic2.api.tile.IWrenchable; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.Collections; -import java.util.List; - -/** - * Created by BestOwl on 2015.12.5.0005. - * - * @author BestOwl - */ -public class TileAdvSolar extends TileElectricGenerator implements IWrenchable { - - private int timer; - public boolean underSun = false; - public boolean hasLens = false; - - public TileAdvSolar() { - super(2, 200); - this.powerTick = 0; - this.tileSlots.add(new TileSlot(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotCharge(this, TileSlot.SlotMode.NULL)); - } - - @Override - public void update() { - super.update(); - if (!this.world.isRemote) { - boolean needUpdate = false; - - this.updateLensStatus(); - ItemStack stack = this.getStackInSlot(0); - if (stack != null) { - if (stack.isItemEqual(PLItems.advSolarLensUnit)) { - this.powerTick = 3; - } - else if (stack.isItemEqual(PLItems.advSolarLensGroup)) { - this.powerTick = 9; - } - else if (stack.isItemEqual(PLItems.advSolarLensCluster)) { - this.powerTick = 81; - } - else { - this.powerTick = 0; - } - } else { - this.powerTick = 0; - } - - this.timer++; - if ((this.timer % 120) == 0) { - this.timer = 0; - this.updateSunVisible(); - } - - if (this.hasLens && this.underSun) { - this.energy += this.powerTick; - } - if (this.energy > this.maxEnergy) { - this.energy = this.maxEnergy; - } - - if (this.energy > 0) { - double amount = ((TileSlotCharge) this.tileSlots.get(1)).charge(this.energy); - this.energy -= amount; - if (amount > 0) { - needUpdate = true; - } - } - - if (needUpdate) { - this.markDirty(); - } - } - } - - public void updateSunVisible() { - int skylight = this.world.getBlockLightOpacity(new BlockPos(pos.getX(), 255, pos.getZ())); - boolean hasSky = !this.world.provider.hasNoSky(); - boolean canSeeSky = this.world.canSeeSky(pos.up()); - boolean dry = !this.world.getBiomeForCoordsBody(pos).canRain(); - this.underSun = skylight > 4 && hasSky && canSeeSky && (dry || !this.world.isRaining() && !this.world.isThundering()); - } - - public void updateLensStatus() { - this.hasLens = false; - if (this.getStackInSlot(0) != null) { - for (ItemStack stack : OreDictionary.getOres("advSolarLens")) { - if (stack.isItemEqual(this.getStackInSlot(0))) { - this.hasLens = true; - break; - } - } - } - } - - /** - * Determine if this emitter can emit energy to an adjacent receiver. - *

- * The TileEntity in the receiver parameter is what was originally added to the energy net, - * which may be normal in-world TileEntity, a delegate or an IMetaDelegate. - * - * @param receiver receiver, may also be null or an IMetaDelegate - * @param direction direction the receiver is from the emitter - * @return Whether energy should be emitted - */ - @Override - public boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing direction) { - return direction != EnumFacing.UP; - } - - @Override - public String getName() { - return "AdvSolar"; - } - - @Override - public EnumFacing getFacing(World world, BlockPos blockPos) { - return this.facing; - } - - @Override - public boolean setFacing(World world, BlockPos blockPos, EnumFacing enumFacing, EntityPlayer entityPlayer) { - setFacing(enumFacing); - return true; - } - - @Override - public boolean wrenchCanRemove(World world, BlockPos blockPos, EntityPlayer entityPlayer) { - return true; - } - - @Override - public List getWrenchDrops(World world, BlockPos blockPos, IBlockState iBlockState, TileEntity tileEntity, EntityPlayer entityPlayer, int i) { - return Collections.singletonList(new ItemStack(iBlockState.getBlock(), 1, iBlockState.getBlock().getMetaFromState(iBlockState))); - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileCarbonizeFurnace.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileCarbonizeFurnace.java deleted file mode 100644 index f44e635..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileCarbonizeFurnace.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.tiles; - -import com.mcgoodtime.productionline.recipes.CarbonizeFurnaceRecipes; -import com.mcgoodtime.productionline.recipes.RecipePart; -import com.mcgoodtime.productionline.tiles.tileslots.*; -import ic2.api.energy.tile.IEnergyEmitter; -import ic2.core.upgrade.IUpgradeItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; - -/** - * CarbonizeFurnace TileEntity - * - * @author BestOwl - */ -public class TileCarbonizeFurnace extends TileMachine { - - /** The number of ticks that the furnace will keep burning */ - public double requireEnergy; - /** The number of ticks that the current item has been process for */ - public int progress; - public int requireAmount; - - public TileCarbonizeFurnace() { - super(3, 300, 1); - this.tileSlots.add(new TileSlotInput(this, CarbonizeFurnaceRecipes.instance)); - this.tileSlots.add(new TileSlotDischarge(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotOutput(this, TileSlot.SlotMode.OUTPUT)); - this.tileSlots.add(new TileSlotOutput(this, TileSlot.SlotMode.OUTPUT)); - this.tileSlots.add(new TileSlotUpgrade(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotUpgrade(this, TileSlot.SlotMode.NULL)); - } - - @Override - public String getName() { - return "CarbonizeFurnace"; - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - super.readFromNBT(nbt); - this.requireEnergy = nbt.getShort("requireEnergy"); - this.progress = nbt.getShort("Progress"); - } - - @Override - public NBTTagCompound writeToNBT(NBTTagCompound nbt) { - nbt = super.writeToNBT(nbt); - nbt.setShort("requireEnergy", (short) requireEnergy); - nbt.setShort("Progress", (short) progress); - return nbt; - } - - @Override - public void update() { - super.update(); - if (!this.world.isRemote) { - boolean needUpdate = false; - - if (canProcess() && this.energy >= this.energyTick) { - RecipePart recipePart = CarbonizeFurnaceRecipes.instance.getRecipePart(this.getStackInSlot(0)); - this.requireEnergy = ((CarbonizeFurnaceRecipes.RecipePartCarbonizeFurnace) recipePart).requiresEnergy; - this.setActive(true); - this.energy -= this.energyTick; - this.progress += this.energyTick; - - if (this.progress >= this.requireEnergy) { - this.requireEnergy = 0; - this.progress = 0; - this.processItem(); - needUpdate = true; - } - } else { - this.setActive(false); - this.requireEnergy = 0; - this.progress = 0; - } - - for(int i = 4; i < 6; i++) { - ItemStack stack = this.getStackInSlot(i); - if(stack != null && stack.getItem() instanceof IUpgradeItem && ((IUpgradeItem)stack.getItem()).onTick(stack, this)) { - needUpdate = true; - } - } - - if (needUpdate) { - this.markDirty(); - } - } - } - - /** - * @return Whether this Item can process - */ - private boolean canProcess() { - if (this.getStackInSlot(0) == null) { - return false; - } else { - ItemStack stack = this.getStackInSlot(0); - ItemStack outputItemStack = CarbonizeFurnaceRecipes.instance.getProcessResult(stack); - if (outputItemStack != null) { - if (!(stack.stackSize >= CarbonizeFurnaceRecipes.instance.getRequiredProcessAmount(stack))) { - return false; - } - - if (this.getStackInSlot(2) == null || this.getStackInSlot(3) == null) { - return true; - } else { - - if (this.getStackInSlot(2).isItemEqual(outputItemStack)) { - int result = this.getStackInSlot(2).stackSize + outputItemStack.stackSize; - if (result <= getInventoryStackLimit() && result <= this.getStackInSlot(2).getMaxStackSize()) { - return true; - } - } - - if (this.getStackInSlot(3).isItemEqual(outputItemStack)) { - int result = this.getStackInSlot(3).stackSize + outputItemStack.stackSize; - if (result <= getInventoryStackLimit() && result <= this.getStackInSlot(3).getMaxStackSize()) { - return true; - } - } - - } - - } - return false; - } - } - - public void processItem() { - if (this.canProcess()) { - ItemStack outputItem = CarbonizeFurnaceRecipes.instance.getProcessResult(this.getStackInSlot(0)); - - if (this.getStackInSlot(2) == null) { - this.setInventorySlotContents(2, outputItem.copy()); - } - else if (this.getStackInSlot(2).isItemEqual(outputItem)) { - this.getStackInSlot(2).stackSize += outputItem.stackSize; - } - else if (this.getStackInSlot(3) == null) { - this.setInventorySlotContents(3, outputItem.copy()); - } - else if (this.getStackInSlot(3).isItemEqual(outputItem)) { - this.getStackInSlot(3).stackSize += outputItem.stackSize; - } - - this.getStackInSlot(0).stackSize -= CarbonizeFurnaceRecipes.instance.getRequiredProcessAmount(this.getStackInSlot(0)); - - if (this.getStackInSlot(0).stackSize <= 0) { - this.setInventorySlotContents(0, null); - } - } - } - - @Override - public boolean acceptsEnergyFrom(IEnergyEmitter iEnergyEmitter, EnumFacing enumFacing) { - return enumFacing != EnumFacing.UP && super.acceptsEnergyFrom(iEnergyEmitter, enumFacing); - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileContainer.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileContainer.java index 1026116..e714dcf 100644 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileContainer.java +++ b/src/main/java/com/mcgoodtime/productionline/tiles/TileContainer.java @@ -74,6 +74,11 @@ public ItemStack removeStackFromSlot(int index) { return null; } + @Override + public boolean isEmpty() { + return false; + } + @Override public int getField(int id) { return 0; @@ -190,13 +195,13 @@ public ItemStack decrStackSize(int slot, int num) { slotItem = this.tileSlots.get(slot).getStack(); - if (slotItem.stackSize <= num) { + if (slotItem.getCount() <= num) { this.tileSlots.get(slot).putStack(null); return slotItem; } else { itemstack = slotItem.splitStack(num); - if (slotItem.stackSize == 0) { + if (slotItem.getCount() == 0) { this.tileSlots.get(slot).putStack(null); } @@ -214,8 +219,8 @@ public ItemStack decrStackSize(int slot, int num) { @Override public void setInventorySlotContents(int index, ItemStack itemStack) { TileSlot slot = this.tileSlots.get(index); - if (itemStack != null && itemStack.stackSize > this.getInventoryStackLimit()) { - itemStack.stackSize = this.getInventoryStackLimit(); + if (itemStack != null && itemStack.getCount() > this.getInventoryStackLimit()) { + itemStack.setCount(this.getInventoryStackLimit()); } slot.putStack(itemStack); } diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileCutter.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileCutter.java deleted file mode 100644 index 28a2dad..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileCutter.java +++ /dev/null @@ -1,37 +0,0 @@ -///* -// * -// * This file is part of ProductionLine, licensed under MIT License (MIT). -// * -// * Copyright (c) 2017 GoodTime Studio -// * Copyright (c) contributors -// * -// * Permission is hereby granted, free of charge, to any person obtaining a copy -// * of this software and associated documentation files (the "Software"), to deal -// * in the Software without restriction, including without limitation the rights -// * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// * copies of the Software, and to permit persons to whom the Software is -// * furnished to do so, subject to the following conditions: -// * -// * The above copyright notice and this permission notice shall be included in -// * all copies or substantial portions of the Software. -// * -// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// * THE SOFTWARE. -// */ -// -//package com.mcgoodtime.productionline.tiles; -// -///** -// * Created by BestOwl on 2017-05-14 21:50 -// * Cutter TileEntity -// * -// * @author BestOwl -// */ -//public class TileCutter extends TileMachine { -// -//} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileFluidKineticGenerator.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileFluidKineticGenerator.java deleted file mode 100644 index 644d6e0..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileFluidKineticGenerator.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.tiles; - -import com.mcgoodtime.productionline.recipes.FluidKineticGeneratorRecipes; -import com.mcgoodtime.productionline.recipes.RecipePart; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlot; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotFluidInput; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotOutput; -import ic2.api.energy.tile.IKineticSource; -import ic2.api.tile.IWrenchable; -import net.minecraft.block.state.IBlockState; -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.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; - -import java.util.Collections; -import java.util.List; - -/** - * The BlockFluidKineticGenerator tile. - * - * @author liach - */ -public class TileFluidKineticGenerator extends TileContainer implements IKineticSource, IWrenchable { - - private int timer; - public final int kuOutput = 32; - public FluidTank fluidTank = new FluidTank(10000); - - public TileFluidKineticGenerator() { - this.tileSlots.add(new TileSlotFluidInput(this, FluidKineticGeneratorRecipes.instance, this.fluidTank)); - this.tileSlots.add(new TileSlotOutput(this)); - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - super.readFromNBT(nbt); - this.fluidTank.readFromNBT(nbt.getCompoundTag("fluidTank")); - } - - @Override - public NBTTagCompound writeToNBT(NBTTagCompound nbt) { - super.writeToNBT(nbt); - - NBTTagCompound fluidTag = new NBTTagCompound(); - this.fluidTank.writeToNBT(fluidTag); - nbt.setTag("fluidTank", fluidTag); - return nbt; - } - - @Override - public void update() { - if (!this.world.isRemote) { - boolean needUpdate = false; - - if (this.fluidTank.getFluidAmount() <= this.fluidTank.getCapacity()) { - for (TileSlot tileSlot : this.tileSlots) { - if (tileSlot instanceof TileSlotFluidInput) { - ((TileSlotFluidInput) tileSlot).drainToTank(); - needUpdate = true; - } - } - } - - - if (this.fluidTank.getFluid() != null && this.maxrequestkineticenergyTick(this.facing) > 0) { - int amount = 0; - for (RecipePart recipePart : FluidKineticGeneratorRecipes.instance.getProcessRecipesList()) { - FluidStack fluidStack = ((FluidKineticGeneratorRecipes.RecipePartFluidKineticGenerator) recipePart).fluidStack; - if (fluidStack.isFluidEqual(this.fluidTank.getFluid())) { - amount = fluidStack.amount; - - } - } - - if (this.fluidTank.getFluidAmount() >= amount) { - this.setActive(true); - - if (this.timer == 20) { - this.timer = 0; - this.fluidTank.getFluid().amount -= amount; - } - this.timer++; - - } else { - this.setActive(false); - this.timer = 0; - } - - if (this.fluidTank.getFluidAmount() < 0) { - this.fluidTank.getFluid().amount = 0; - } - - } - else { - this.setActive(false); - } - - if (needUpdate) { - this.markDirty(); - } - } - } - - @Override - public String getName() { - return "FluidKineticGenerator"; - } - - @Override - public boolean hasCapability(Capability capability, EnumFacing facing) { - return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || super.hasCapability(capability, facing); - } - - @Override - public T getCapability(Capability capability, EnumFacing facing) { - if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { - return (T) fluidTank; - } - return super.getCapability(capability, facing); - } - - @Override - public int maxrequestkineticenergyTick(EnumFacing from) { - return from != this.facing ? 0 : this.kuOutput; - } - - @Override - public int requestkineticenergy(EnumFacing from, int i) { - return from != this.facing ? 0 : (this.fluidTank.getFluidAmount() > 0 ? Math.min(this.kuOutput, i) : 0); - } - - @Override - public EnumFacing getFacing(World world, BlockPos pos) { - return facing; - } - - @Override - public boolean setFacing(World world, BlockPos pos, EnumFacing facing, EntityPlayer player) { - if (facing != this.facing) { - this.facing = facing; - return true; - } - return false; - } - - @Override - public boolean wrenchCanRemove(World world, BlockPos blockPos, EntityPlayer entityPlayer) { - return true; - } - - @Override - public List getWrenchDrops(World world, BlockPos blockPos, IBlockState iBlockState, TileEntity tileEntity, EntityPlayer entityPlayer, int i) { - return Collections.singletonList(new ItemStack(iBlockState.getBlock(), 1, iBlockState.getBlock().getMetaFromState(iBlockState))); - } - -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileHeatDryer.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileHeatDryer.java deleted file mode 100644 index 596e9e3..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileHeatDryer.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.tiles; - -import com.mcgoodtime.productionline.recipes.HeatDryerRecipes; -import com.mcgoodtime.productionline.tiles.tileslots.*; -import ic2.core.upgrade.IUpgradeItem; -import net.minecraft.item.ItemStack; - -/** - * Created by Java0 on 2015/11/18. - * - */ -public class TileHeatDryer extends TileMachine { - - public final int requireEnergy = 500; - public int progress; - - public TileHeatDryer() { - super(3, 300, 1); - this.tileSlots.add(new TileSlotInput(this, HeatDryerRecipes.instance)); - this.tileSlots.add(new TileSlotDischarge(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotOutput(this)); - this.tileSlots.add(new TileSlotUpgrade(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotUpgrade(this, TileSlot.SlotMode.NULL)); - } - - @Override - public String getName() { - return "HeatDryer"; - } - - @Override - public void update() { - super.update(); - if (!this.world.isRemote) { - boolean needUpdate = false; - - if (this.canProcess() && this.energy >= this.energyTick) { - this.setActive(true); - this.energy -= this.energyTick; - this.progress += this.energyTick; - - if (this.progress >= this.requireEnergy) { - this.progress = 0; - this.processItem(); - needUpdate = true; - } - } else { - this.setActive(false); - this.progress = 0; - } - - for (TileSlot tileSlot : this.tileSlots) { - if (tileSlot instanceof TileSlotUpgrade) { - ItemStack stack = tileSlot.getStack(); - if(stack != null && stack.getItem() instanceof IUpgradeItem && ((IUpgradeItem)stack.getItem()).onTick(stack, this)) { - needUpdate = true; - } - } - } - - if (needUpdate) { - this.markDirty(); - } - } - } - - private boolean canProcess() { - if (this.getStackInSlot(0) == null) { - return false; - } else { - ItemStack itemStack = HeatDryerRecipes.instance.getProcessResult(this.getStackInSlot(0)); - if (itemStack != null) { - if (!(itemStack.stackSize >= HeatDryerRecipes.instance.getRequiredProcessAmount(itemStack))) { - return false; - } - if (this.getStackInSlot(2) == null) { - return true; - } else { - if (this.getStackInSlot(2).isItemEqual(itemStack)) { - int result = this.getStackInSlot(2).stackSize + itemStack.stackSize; - if (result <= getInventoryStackLimit() && result <= this.getStackInSlot(2).getMaxStackSize()) { - return true; - } - } - } - - } - return false; - } - } - - public void processItem() { - if (this.canProcess()) { - ItemStack outputItem = HeatDryerRecipes.instance.getProcessResult(this.getStackInSlot(0)); - - if (this.getStackInSlot(2) == null) { - this.setInventorySlotContents(2, outputItem.copy()); - } - else if (this.getStackInSlot(2).isItemEqual(outputItem)) { - this.getStackInSlot(2).stackSize += outputItem.stackSize; - } - - this.getStackInSlot(0).stackSize -= HeatDryerRecipes.instance.getRequiredProcessAmount(this.getStackInSlot(0)); - - if (this.getStackInSlot(0).stackSize <= 0) { - this.setInventorySlotContents(0, null); - } - } - } - -} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileLiquidExtractor.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileLiquidExtractor.java deleted file mode 100644 index 69e1239..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileLiquidExtractor.java +++ /dev/null @@ -1,37 +0,0 @@ -///* -// * -// * This file is part of ProductionLine, licensed under MIT License (MIT). -// * -// * Copyright (c) 2017 GoodTime Studio -// * Copyright (c) contributors -// * -// * Permission is hereby granted, free of charge, to any person obtaining a copy -// * of this software and associated documentation files (the "Software"), to deal -// * in the Software without restriction, including without limitation the rights -// * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// * copies of the Software, and to permit persons to whom the Software is -// * furnished to do so, subject to the following conditions: -// * -// * The above copyright notice and this permission notice shall be included in -// * all copies or substantial portions of the Software. -// * -// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// * THE SOFTWARE. -// */ -// -//package com.mcgoodtime.productionline.tiles; -// -///** -// * Created by BestOwl on 2017-05-14 21:50 -// * LiquidExtractor TileEntity -// * -// * @author BestOwl -// */ -//public class TileLiquidExtractor extends TileMachine { -// -//} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileMachine.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileMachine.java index a423f93..e6b9f72 100644 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileMachine.java +++ b/src/main/java/com/mcgoodtime/productionline/tiles/TileMachine.java @@ -27,8 +27,8 @@ package com.mcgoodtime.productionline.tiles; import ic2.api.tile.IWrenchable; -import ic2.core.upgrade.IUpgradableBlock; -import ic2.core.upgrade.UpgradableProperty; +import ic2.api.upgrade.IUpgradableBlock; +import ic2.api.upgrade.UpgradableProperty; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileMixer.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileMixer.java deleted file mode 100644 index 7fcf893..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TileMixer.java +++ /dev/null @@ -1,37 +0,0 @@ -///* -// * -// * This file is part of ProductionLine, licensed under MIT License (MIT). -// * -// * Copyright (c) 2017 GoodTime Studio -// * Copyright (c) contributors -// * -// * Permission is hereby granted, free of charge, to any person obtaining a copy -// * of this software and associated documentation files (the "Software"), to deal -// * in the Software without restriction, including without limitation the rights -// * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// * copies of the Software, and to permit persons to whom the Software is -// * furnished to do so, subject to the following conditions: -// * -// * The above copyright notice and this permission notice shall be included in -// * all copies or substantial portions of the Software. -// * -// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// * THE SOFTWARE. -// */ -// -//package com.mcgoodtime.productionline.tiles; -// -///** -// * Created by BestOwl on 2017-05-14 21:50 -// * TileMixer TileEntity -// * -// * @author BestOwl -// */ -//public class TileMixer extends TileMachine { -// -//} \ No newline at end of file diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TilePackager.java b/src/main/java/com/mcgoodtime/productionline/tiles/TilePackager.java deleted file mode 100644 index 22e973d..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/TilePackager.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2017 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.mcgoodtime.productionline.tiles; - -import com.mcgoodtime.productionline.recipes.PackagerRecipes; -import com.mcgoodtime.productionline.tiles.tileslots.*; -import ic2.core.upgrade.IUpgradeItem; -import net.minecraft.item.ItemStack; - -import javax.annotation.Nonnull; - -/** - * Created by BestOwl on 2017/3/25. - * - * @author BestOwl - */ -public class TilePackager extends TileMachine { - - public final int requireEnergy = 500; - public int progress; - - public TilePackager() { - super(3, 300, 1); - this.tileSlots.add(new TileSlotInput(this, PackagerRecipes.instance)); - this.tileSlots.add(new TileSlotPackage(this)); - this.tileSlots.add(new TileSlotDischarge(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotOutput(this)); - this.tileSlots.add(new TileSlotUpgrade(this, TileSlot.SlotMode.NULL)); - this.tileSlots.add(new TileSlotUpgrade(this, TileSlot.SlotMode.NULL)); - } - - @Nonnull - @Override - public String getName() { - return "Packager"; - } - - @Override - public void update() { - super.update(); - - if (!this.world.isRemote) { - boolean needUpdate = false; - - if (this.canProcess() && this.energy >= this.energyTick) { - this.setActive(true); - this.energy -= this.energyTick; - this.progress += this.energyTick; - - if (this.progress >= this.requireEnergy) { - this.progress = 0; - this.processItem(); - needUpdate = true; - } - } else { - this.setActive(false); - this.progress = 0; - } - - for (TileSlot tileSlot : this.tileSlots) { - if (tileSlot instanceof TileSlotUpgrade) { - ItemStack stack = tileSlot.getStack(); - if(stack != null && stack.getItem() instanceof IUpgradeItem && ((IUpgradeItem)stack.getItem()).onTick(stack, this)) { - needUpdate = true; - } - } - } - - if (needUpdate) { - this.markDirty(); - } - } - } - - private boolean canProcess() { - if (this.getStackInSlot(0) == null) { - return false; - } else { - ItemStack input = this.getStackInSlot(0); - ItemStack outputStack = PackagerRecipes.instance.getProcessResult(input); - if (outputStack != null) { - if (!(input.stackSize >= PackagerRecipes.instance.getRequiredProcessAmount(input))) { - return false; - } - - if (this.getStackInSlot(1) != null) { // check package - if (this.getStackInSlot(3) == null) { // output slot - return true; - } else { - if (this.getStackInSlot(3).isItemEqual(outputStack)) { - int result = this.getStackInSlot(3).stackSize + outputStack.stackSize; - if (result <= getInventoryStackLimit() && result <= this.getStackInSlot(3).getMaxStackSize()) { - return true; - } - } - } - } - } - return false; - } - } - - public void processItem() { - if (this.canProcess()) { - ItemStack outputItem = PackagerRecipes.instance.getProcessResult(this.getStackInSlot(0)); - - if (this.getStackInSlot(3) == null) { - this.setInventorySlotContents(3, outputItem.copy()); - } - else if (this.getStackInSlot(3).isItemEqual(outputItem)) { - this.getStackInSlot(3).stackSize += outputItem.stackSize; - } - - this.getStackInSlot(0).stackSize -= PackagerRecipes.instance.getRequiredProcessAmount(this.getStackInSlot(0)); - - if (this.getStackInSlot(0).stackSize <= 0) { - this.setInventorySlotContents(0, null); - } - - this.getStackInSlot(1).stackSize--; - - if (this.getStackInSlot(1).stackSize <= 0) { - this.setInventorySlotContents(1, null); - } - } - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/TileTefnutTear.java b/src/main/java/com/mcgoodtime/productionline/tiles/TileTefnutTear.java new file mode 100644 index 0000000..47bcee5 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/tiles/TileTefnutTear.java @@ -0,0 +1,100 @@ +/* + * This file is part of Production Line, licensed under MIT License (MIT). + * + * Copyright (c) 2020 GoodTime Studio + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.mcgoodtime.productionline.tiles; + +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ITickable; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.IEnergyStorage; + +import javax.annotation.Nullable; + +/** + * Created by NightOwl on 2020/7/17 + * + * @author NightOwl + */ +public class TileTefnutTear extends TileEntity implements ITickable { + + private int energyOutput; + private int timer; + + /** + * Like the old updateEntity(), except more generic. + */ + @Override + public void update() { + if (!this.world.isRemote) { + // for better performance, wait 300 ticks before checking water environment + if (timer == 0) { + energyOutput = 0; + + BlockPos pos = this.getPos(); + + if(isNotWater(pos.east()) && isNotWater(pos.south()) && isNotWater(pos.west()) && isNotWater(pos.north())) + { + BlockPos down = this.getPos().down(); + isWater(down); + isWater(down.east()); + isWater(down.south()); + isWater(down.west()); + isWater(down.north()); + isWater(down.north().east()); + isWater(down.north().west()); + isWater(down.south().east()); + isWater(down.south().west()); + } + + } else if (timer == 300) { + timer = -1; + } + timer += 1; + + TileEntity te = this.world.getTileEntity(this.pos.up()); + if (te == null) { + return; + } + if (te.hasCapability(CapabilityEnergy.ENERGY, EnumFacing.DOWN)&&energyOutput>0) { + IEnergyStorage storage = te.getCapability(CapabilityEnergy.ENERGY, EnumFacing.DOWN); + storage.receiveEnergy(energyOutput, false); + } + } + } + + private void isWater(BlockPos pos) { + if (this.world.getBlockState(pos).getBlock() == Blocks.WATER) { + energyOutput += 1; + } + } + + private boolean isNotWater(BlockPos pos){ + return this.world.getBlockState(pos).getBlock() != Blocks.WATER; + } + +} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileCSEU.java b/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileCSEU.java deleted file mode 100644 index 19ce415..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileCSEU.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mcgoodtime.productionline.tiles.eustorage; - -/** - * Created by BestOwl on 2015.11.29.0029. - * - * @author BestOwl - */ -public class TileCSEU extends TileEUStorage { - - public TileCSEU() { - super(2, (int) 720E3); - } - - @Override - public String getName() { - return "CSEU"; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileEUStorage.java b/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileEUStorage.java deleted file mode 100644 index a827d77..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileEUStorage.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.mcgoodtime.productionline.tiles.eustorage; - -import com.mcgoodtime.productionline.tiles.TileElectricContainer; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlot; -import com.mcgoodtime.productionline.tiles.tileslots.TileSlotCharge; -import ic2.api.energy.EnergyNet; -import ic2.api.energy.event.EnergyTileLoadEvent; -import ic2.api.energy.event.EnergyTileUnloadEvent; -import ic2.api.energy.tile.IEnergyAcceptor; -import ic2.api.energy.tile.IEnergyEmitter; -import ic2.api.energy.tile.IEnergySource; -import ic2.api.tile.IEnergyStorage; -import ic2.api.tile.IWrenchable; -import ic2.core.init.MainConfig; -import ic2.core.util.ConfigUtil; -import ic2.core.util.StackUtil; -import net.minecraft.block.state.IBlockState; -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.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; - -import java.util.Collections; -import java.util.List; - -/** - * Created by BestOwl on 2015.11.27.0027. - * - * @author BestOwl - */ -public abstract class TileEUStorage extends TileElectricContainer implements IEnergySource, IEnergyStorage, IWrenchable { - - public RedstoneMode redstoneMode; - public boolean isRedstonePowered = false; - - public TileEUStorage(int tier, int maxStorage) { - super((int) EnergyNet.instance.getPowerFromTier(tier), maxStorage, tier); - this.redstoneMode = RedstoneMode.NONE; -// if (!(this instanceof TileParallelSpaceSU)) { -// this.tileSlots.add(new TileSlotDischarge(this, TileSlot.SlotMode.NULL)); -// this.tileSlots.add(new TileSlotCharge(this, TileSlot.SlotMode.INPUT)); -// } - } - - @Override - public void update() { - super.update(); - if (this.energy > 0) { - for (TileSlot tileSlot : this.tileSlots) { - if (tileSlot instanceof TileSlotCharge) { - double amount = ((TileSlotCharge) tileSlot).charge(this.energy); - this.energy -= amount; - if (amount > 0) { - this.markDirty(); - } - } - } - } - - if (this.redstoneMode == RedstoneMode.OUTPUT_WHEN_REDSTONEPOWER_AND_FULLENEGRY || this.redstoneMode == RedstoneMode.NO_OUTPUT_WHEN_REDSTONEPOWER) { - this.isRedstonePowered = this.world.isBlockIndirectlyGettingPowered(this.pos) > 0; - } - - if (this.shouldEmitRedstonePower()) { - this.world.notifyBlockOfStateChange(this.pos, this.world.getBlockState(this.pos).getBlock()); - } - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - super.readFromNBT(nbt); - this.redstoneMode = RedstoneMode.values()[nbt.getShort("redstoneMode")]; - } - - @Override - public NBTTagCompound writeToNBT(NBTTagCompound nbt) { - super.writeToNBT(nbt).setShort("redstoneMode", (short) this.redstoneMode.ordinal()); - return nbt; - } - - @Override - public boolean acceptsEnergyFrom(IEnergyEmitter iEnergyEmitter, EnumFacing enumFacing) { - return enumFacing != this.facing; - } - - @Override - public boolean emitsEnergyTo(IEnergyAcceptor iEnergyAcceptor, EnumFacing enumFacing) { - return enumFacing == this.facing; - } - - @Override - public double getOfferedEnergy() { - return this.energy < (double)this.energyTick || this.redstoneMode == RedstoneMode.NO_OUTPUT_WHEN_REDSTONEPOWER - && this.isRedstonePowered || this.redstoneMode == RedstoneMode.OUTPUT_WHEN_REDSTONEPOWER_AND_FULLENEGRY && - this.isRedstonePowered && this.energy < (double)this.maxEnergy ? 0.0D : Math.min(this.energy, this.energyTick); - } - - @Override - public void drawEnergy(double amount) { - this.energy -= amount; - } - - @Override - public int getSourceTier() { - return this.tier; - } - - @Override - public boolean setFacing(World world, BlockPos blockPos, EnumFacing side, EntityPlayer entityPlayer) { - if (side == this.facing) { - return false; - } - setFacing(side); - return true; - } - - @Override - public EnumFacing getFacing(World world, BlockPos blockPos) { - return this.facing; - } - - @Override - public void setFacing(EnumFacing facing) { - MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - super.setFacing(facing); - MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); - } - - @Override - public boolean wrenchCanRemove(World world, BlockPos blockPos, EntityPlayer entityPlayer) { - return true; - } - - @Override - public List getWrenchDrops(World world, BlockPos blockPos, IBlockState iBlockState, TileEntity tileEntity, EntityPlayer entityPlayer, int i) { - ItemStack ret = new ItemStack(iBlockState.getBlock(), 1, - iBlockState.getBlock().getMetaFromState(iBlockState)); - float energyRetainedInStorageBlockDrops = ConfigUtil.getFloat(MainConfig.get(), "balance/energyRetainedInStorageBlockDrops"); - if (energyRetainedInStorageBlockDrops > 0) { - NBTTagCompound nbt = StackUtil.getOrCreateNbtData(ret); - nbt.setDouble("energy", this.energy * (double)energyRetainedInStorageBlockDrops); - } - return Collections.singletonList(ret); - } - - public boolean shouldEmitRedstonePower() { - boolean shouldEmitRedstone = false; - switch(this.redstoneMode) { - case EMIT_WHEN_FULL_ENERGY: - shouldEmitRedstone = this.energy >= (double) (this.maxEnergy - this.energyTick * 20); - break; - case EMIT_WHEN_HAS_ENERGY: - shouldEmitRedstone = this.energy > (double) this.energyTick && this.energy < (double)this.maxEnergy; - break; - case EMIT_WHEN_NOFULL_ENERGY: - shouldEmitRedstone = this.energy > (double) this.energyTick && this.energy < (double)this.maxEnergy || this.energy < (double) this.energyTick; - break; - case EMIT_WHEN_NULL_ENERGY: - shouldEmitRedstone = this.energy < (double) this.energyTick; - } - - return shouldEmitRedstone; - } - - @Override - public int getStored() { - return (int) this.energy; - } - - @Override - public void setStored(int energy) { - this.energy = energy; - } - - @Override - public int addEnergy(int amount) { - this.energy += amount; - return amount; - } - - @Override - public int getCapacity() { - return this.maxEnergy; - } - - @Override - public int getOutput() { - return this.energyTick; - } - - @Override - public double getOutputEnergyUnitsPerTick() { - return this.energyTick; - } - - @Override - public boolean isTeleporterCompatible(EnumFacing enumFacing) { - return true; - } - - public enum RedstoneMode { - NONE, - EMIT_WHEN_FULL_ENERGY, - EMIT_WHEN_HAS_ENERGY, - EMIT_WHEN_NOFULL_ENERGY, - EMIT_WHEN_NULL_ENERGY, - NO_OUTPUT_WHEN_REDSTONEPOWER, - OUTPUT_WHEN_REDSTONEPOWER_AND_FULLENEGRY - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileEVSU.java b/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileEVSU.java deleted file mode 100644 index 9d7b5a5..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileEVSU.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of GoodTime-Industrial, licensed under MIT License (MIT). - * - * Copyright (c) 2015 GoodTime Studio - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package com.mcgoodtime.productionline.tiles.eustorage; - -/* - * Created by suhao on 2015-6-3-0003. - */ -public class TileEVSU extends TileEUStorage { - - public TileEVSU() { - super(5, (int) 1E8); - } - - @Override - public String getName() { - return "EVSU"; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileParallelSpaceSU.java b/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileParallelSpaceSU.java deleted file mode 100644 index 832a8f3..0000000 --- a/src/main/java/com/mcgoodtime/productionline/tiles/eustorage/TileParallelSpaceSU.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mcgoodtime.productionline.tiles.eustorage; - -/** - * Created by BestOwl on 2015.11.29.0029. - * - * @author BestOwl - */ -public class TileParallelSpaceSU extends TileEUStorage { - - public TileParallelSpaceSU() { - super(6, (int) 2.5E8); - } - - @Override - public String getName() { - return "ParallelSpaceSU"; - } -} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlot.java b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlot.java index 2706b32..0388a5a 100644 --- a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlot.java +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlot.java @@ -63,7 +63,7 @@ public NBTTagCompound writeToNBT(NBTTagCompound nbt) { } public void readFromNBT(NBTTagCompound nbt) { - this.item = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("TileSlot")); + //this.item = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("TileSlot")); } /** diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotDischarge.java b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotDischarge.java index 870fa7b..1ac5b18 100644 --- a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotDischarge.java +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotDischarge.java @@ -68,8 +68,8 @@ public double discharge(double amount, boolean ignoreLimit) { return 0.0D; } - --stack.stackSize; - if(stack.stackSize <= 0) { + stack.shrink(1); + if(stack.getCount() <= 0) { this.putStack(null); } } diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotFluidInput.java b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotFluidInput.java index e8dd13a..3b2d8d6 100644 --- a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotFluidInput.java +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotFluidInput.java @@ -83,7 +83,7 @@ public void drainToTank() { } } - private FluidStack drain(Fluid fluid, int amount) { + private FluidStack drain(Fluid fluid, int amount) {/* if (FluidContainerRegistry.isFilledContainer(this.item)) { FluidStack container = FluidContainerRegistry.getFluidForFilledItem(this.item); @@ -112,7 +112,7 @@ private FluidStack drain(Fluid fluid, int amount) { } } - } + }*/ return null; } diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotUpgrade.java b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotUpgrade.java index eb9ea5e..d497e9d 100644 --- a/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotUpgrade.java +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tileslots/TileSlotUpgrade.java @@ -25,8 +25,8 @@ package com.mcgoodtime.productionline.tiles.tileslots; import com.mcgoodtime.productionline.tiles.TileContainer; -import ic2.core.upgrade.IUpgradableBlock; -import ic2.core.upgrade.IUpgradeItem; +import ic2.api.upgrade.IUpgradableBlock; +import ic2.api.upgrade.IUpgradeItem; import net.minecraft.item.ItemStack; /** diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/IWireless.java b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/IWireless.java new file mode 100644 index 0000000..9b2797f --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/IWireless.java @@ -0,0 +1,18 @@ +package com.mcgoodtime.productionline.tiles.tilewireless; + +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; + +public interface IWireless { + + String getTerminalName(); + + void setOwner(Entity player); + + Entity getOwner(); + + void link(TileWireless tile); + + void unlink(TileWireless tile); + +} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileTributary.java b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileTributary.java new file mode 100644 index 0000000..f6c03d4 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileTributary.java @@ -0,0 +1,4 @@ +package com.mcgoodtime.productionline.tiles.tilewireless; + +public class TileTributary extends TileWireless{ +} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileWaterSource.java b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileWaterSource.java new file mode 100644 index 0000000..ab26026 --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileWaterSource.java @@ -0,0 +1,13 @@ +package com.mcgoodtime.productionline.tiles.tilewireless; + +public class TileWaterSource extends TileWireless { + + @Override + public void update() { + + } + + + + +} diff --git a/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileWireless.java b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileWireless.java new file mode 100644 index 0000000..a32340d --- /dev/null +++ b/src/main/java/com/mcgoodtime/productionline/tiles/tilewireless/TileWireless.java @@ -0,0 +1,79 @@ +package com.mcgoodtime.productionline.tiles.tilewireless; + +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ITickable; +import net.minecraft.util.math.BlockPos; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class TileWireless extends TileEntity implements IWireless, ITickable { + + List linkedWirelessDecives = new ArrayList<>(); + + private final int X = this.pos.getX(); + private final int Y = this.pos.getY(); + private final int Z = this.pos.getZ(); + + private Entity owner; + + @Override + public void update() { + + } + + @Override + public String getTerminalName() { + return null; + } + + @Override + public void setOwner(Entity player) { + this.owner = player; + } + + @Override + public Entity getOwner() { + return owner; + } + + public boolean sameOwner(Entity player){ + return Objects.equals(owner.getUniqueID(),player.getUniqueID()); + } + + public boolean inRange(BlockPos pos) { + + boolean isSelf = pos.getX() != X && pos.getY() != Y && pos.getZ() != Z; + boolean x_InRange = pos.getX() <= X+getRange(0) && pos.getX()>=X-getRange(0); + boolean y_InRange = pos.getY() <= Y+getRange(1) && pos.getY()>=Y-getRange(1); + boolean z_InRange = pos.getZ() <= Z+getRange(2) && pos.getZ()>=Z-getRange(2); + + + return isSelf && x_InRange && y_InRange && z_InRange ? true : false; + + } + + private int getRange(int xyz){ + int[] range = {(17-1)/2,(9-1)/2,(17-1)/2}; + return range[xyz]; + } + + @Override + public void link(TileWireless tile) { + this.linkedWirelessDecives.add(tile); + } + + @Override + public void unlink(TileWireless tile) { + linkedWirelessDecives.remove(tile); + } + + + public List getLinkedWirelessDecives(){ + return linkedWirelessDecives; + } + + +} diff --git a/src/main/java/com/mcgoodtime/productionline/worldgen/PLWorldGen.java b/src/main/java/com/mcgoodtime/productionline/worldgen/PLWorldGen.java index aa7caf4..7cde4ad 100644 --- a/src/main/java/com/mcgoodtime/productionline/worldgen/PLWorldGen.java +++ b/src/main/java/com/mcgoodtime/productionline/worldgen/PLWorldGen.java @@ -24,13 +24,14 @@ */ package com.mcgoodtime.productionline.worldgen; +import com.mcgoodtime.productionline.core.ProductionLine; import com.mcgoodtime.productionline.init.PLBlocks; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -67,7 +68,10 @@ public PLWorldGen(IBlockState blockState, int ticket, int maxHeight, int genSize public static void init() { new PLWorldGen(PLBlocks.oreIridium.getDefaultState(), 1, 16, 3); - new PLWorldGen(BlockName.resource.getBlockState(ResourceBlock.basalt), 5, 27, 10); + if (ProductionLine.isIC2Loaded) + { + new PLWorldGen(BlockName.resource.getBlockState(ResourceBlock.basalt), 5, 27, 10); + } } private void generateOre(World world, Random rand, int chunkX, int chunkZ) { @@ -94,7 +98,7 @@ private void generateOre(World world, Random rand, int chunkX, int chunkZ) { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { //doesWaterVaporize() return isHellWorld - if ((!world.provider.doesWaterVaporize()) && (!world.provider.hasNoSky())) { + if ((!world.provider.doesWaterVaporize()) && (world.provider.hasSkyLight())) { generateOre(world, random, chunkX, chunkZ); } } diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF index 095818d..91b1ec7 100644 --- a/src/main/resources/META-INF/MANIFEST.MF +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -4,5 +4,3 @@ TweakOrder: 0 MixinConfigs: mixins.productionline.core.json FMLCorePlugin: com.mcgoodtime.productionline.core.coremod.PLCore FMLCorePluginContainsFMLMod: true -FMLAT: gti_at.cfg - diff --git a/src/main/resources/META-INF/productionline_at.cfg b/src/main/resources/META-INF/productionline_at.cfg deleted file mode 100644 index 58aca51..0000000 --- a/src/main/resources/META-INF/productionline_at.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# EntityArrow -public net.minecraft.entity.projectile.EntityArrow field_70254_i # inGround -# ShapedRecipes -public net.minecraft.item.crafting.ShapedRecipes func_77573_a(Lnet/minecraft/inventory/InventoryCrafting;IIZ)Z # checkMatch() - - diff --git a/src/main/resources/assets/productionline/blockstates/adv_solar.json b/src/main/resources/assets/productionline/blockstates/adv_solar.json deleted file mode 100644 index f7a0cc9..0000000 --- a/src/main/resources/assets/productionline/blockstates/adv_solar.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "up": "productionline:blocks/adv_solar_top", - "all": "productionline:blocks/adv_solar_side" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": {} - } - }, - "facing": { - "east": {}, - "north": {}, - "south": {}, - "west": {}, - "down": {} - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/air_brake_casing.json b/src/main/resources/assets/productionline/blockstates/air_brake_casing.json deleted file mode 100644 index 2189775..0000000 --- a/src/main/resources/assets/productionline/blockstates/air_brake_casing.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "front": "productionline:blocks/air_brake_casing_front", - "all": "productionline:blocks/air_brake_casing_side" - } - }, - "variants": { - "inventory": [{}], - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": {}, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/block_misc.json b/src/main/resources/assets/productionline/blockstates/block_misc.json index 05327d7..31e1b07 100644 --- a/src/main/resources/assets/productionline/blockstates/block_misc.json +++ b/src/main/resources/assets/productionline/blockstates/block_misc.json @@ -6,21 +6,7 @@ "variants": { "inventory": [{}], "type": { - "compressed_water_hyacinth": { - "textures": { - "all": "productionline:blocks/compressed_water_hyacinth" - } - }, - "dehydrated_water_hyacinth_block": { - "textures": { - "all": "productionline:blocks/dehydrated_water_hyacinth_block" - } - }, - "optical_glass": { - "textures": { - "all": "productionline:blocks/optical_glass" - } - } + } } } \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/carbonize_furnace.json b/src/main/resources/assets/productionline/blockstates/carbonize_furnace.json deleted file mode 100644 index ff37c5d..0000000 --- a/src/main/resources/assets/productionline/blockstates/carbonize_furnace.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "all": "productionline:blocks/machine_side", - "front": "productionline:blocks/carbonize_furnace_front", - "left": "productionline:blocks/carbonize_furnace_left", - "up": "productionline:blocks/carbonize_furnace_up" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": { - "front": "productionline:blocks/carbonize_furnace_front_active", - "left": "productionline:blocks/carbonize_furnace_left_active", - "up": "productionline:blocks/carbonize_furnace_up_active" - } - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": {}, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/cseu.json b/src/main/resources/assets/productionline/blockstates/cseu.json deleted file mode 100644 index c6c8de6..0000000 --- a/src/main/resources/assets/productionline/blockstates/cseu.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "front": "productionline:blocks/cseu_front", - "up": "productionline:blocks/cseu_top", - "down": "productionline:blocks/cseu_top", - "back": "productionline:blocks/cseu_back", - "all": "productionline:blocks/cseu_side" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": {} - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": { - }, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - }, - "down": { - "x": 90, - "uvlock": true - }, - "up": { - "x": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/cutter.json b/src/main/resources/assets/productionline/blockstates/cutter.json deleted file mode 100644 index e4cdba5..0000000 --- a/src/main/resources/assets/productionline/blockstates/cutter.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "all": "productionline:blocks/machine_side", - "front": "productionline:blocks/cutter_front", - "up": "productionline:blocks/cutter_top" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": { - "front": "productionline:blocks/cutter_front_active", - "up": "productionline:blocks/cutter_top_active" - } - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": {}, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/evsu.json b/src/main/resources/assets/productionline/blockstates/evsu.json deleted file mode 100644 index 9b29c9a..0000000 --- a/src/main/resources/assets/productionline/blockstates/evsu.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "front": "productionline:blocks/evsu_front", - "up": "productionline:blocks/evsu_top", - "down": "productionline:blocks/evsu_top", - "all": "productionline:blocks/evsu_side" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": {} - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": { - }, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - }, - "down": { - "x": 90, - "uvlock": true - }, - "up": { - "x": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/fluid_kinetic_generator.json b/src/main/resources/assets/productionline/blockstates/fluid_kinetic_generator.json deleted file mode 100644 index 9cba82c..0000000 --- a/src/main/resources/assets/productionline/blockstates/fluid_kinetic_generator.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "all": "productionline:blocks/machine_side", - "front": "productionline:blocks/fluid_kinetic_generator_front", - "back": "productionline:blocks/fluid_kinetic_generator_back", - "left": "productionline:blocks/fluid_kinetic_generator_side", - "right": "productionline:blocks/fluid_kinetic_generator_side" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": { - "left": "productionline:blocks/fluid_kinetic_generator_side_active", - "right": "productionline:blocks/fluid_kinetic_generator_side_active" - } - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": {}, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/heat_dryer.json b/src/main/resources/assets/productionline/blockstates/heat_dryer.json deleted file mode 100644 index 9319461..0000000 --- a/src/main/resources/assets/productionline/blockstates/heat_dryer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "all": "productionline:blocks/machine_side", - "front": "productionline:blocks/heat_dryer_front", - "left": "productionline:blocks/heat_dryer_side", - "right": "productionline:blocks/heat_dryer_side", - "up": "productionline:blocks/heat_dryer_up" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": { - "front": "productionline:blocks/heat_dryer_front_active", - "left": "productionline:blocks/heat_dryer_side_active", - "right": "productionline:blocks/heat_dryer_side_active", - "up": "productionline:blocks/heat_dryer_active" - } - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": {}, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/packager.json b/src/main/resources/assets/productionline/blockstates/packager.json deleted file mode 100644 index f989bf9..0000000 --- a/src/main/resources/assets/productionline/blockstates/packager.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "all": "productionline:blocks/machine_side_1", - "front": "productionline:blocks/packager_front", - "up": "productionline:blocks/packager_top", - "down": "productionline:blocks/machine_side_dark" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": { - "front": "productionline:blocks/packager_front_active" - } - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": {}, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/parallel_space_su.json b/src/main/resources/assets/productionline/blockstates/parallel_space_su.json deleted file mode 100644 index 7ba7236..0000000 --- a/src/main/resources/assets/productionline/blockstates/parallel_space_su.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "front": "productionline:blocks/parallel_space_su_front", - "back": "productionline:blocks/parallel_space_su_back", - "all": "productionline:blocks/parallel_space_su_side" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": {}, - "true": { - "textures": {} - } - }, - "facing": { - "east": { - "y": 90, - "uvlock": true - }, - "north": { - }, - "south": { - "y": 180, - "uvlock": true - }, - "west": { - "y": 270, - "uvlock": true - }, - "down": { - "x": 90, - "uvlock": true - }, - "up": { - "x": 270, - "uvlock": true - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/blockstates/the_flower_of_osiris.json b/src/main/resources/assets/productionline/blockstates/the_flower_of_osiris.json new file mode 100644 index 0000000..b0fefd5 --- /dev/null +++ b/src/main/resources/assets/productionline/blockstates/the_flower_of_osiris.json @@ -0,0 +1,18 @@ +{ + "forge_marker": 1, + "variants": { + "normal": [{ + "model": "botania:shapes/cross_tinted", + "textures": { + "cross": "productionline:blocks/the_flower_of_osiris" + } + }], + "inventory": [{ + "model": "builtin/generated", + "transform": "forge:default-item", + "textures": { + "layer0": "productionline:blocks/the_flower_of_osiris" + } + }] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/lang/en_US.lang b/src/main/resources/assets/productionline/lang/en_US.lang deleted file mode 100644 index 328cd1e..0000000 --- a/src/main/resources/assets/productionline/lang/en_US.lang +++ /dev/null @@ -1,20 +0,0 @@ -#ProductionLine Language file -#en_US - -[Item] -item.super_csrashsag.name=super_csrashsag -item.ender_pearl_powder.name=ender_pearl_powder -item.cpu_mk1.name=cpu_mk1 -item.cpu_mk2.name=cpu_mk2 -item.cpu_mk3.name=cpu_mk3 -item.fake_head.name=fake_head -item.toad_coin.name=toad_coin -item.life_converter.name=life_converter -item.condensed_impurities.name=condensed_impurities -item.heart_of_lava.name=heart_of_lava -item.heart_of_pure_white.name=heart_of_pure_white -item.heart_of_ender.name=heart_of_ender -item.liquid_exp_bucket.name=liquid_exp_bucket -item.ender_pearl_bucket.name=ender_pearl_bucket -item.brine_bucket.name=brine_bucket -item.iridium_ingot.name=iridium_ingot diff --git a/src/main/resources/assets/productionline/lang/en_us.lang b/src/main/resources/assets/productionline/lang/en_us.lang new file mode 100644 index 0000000..1600371 --- /dev/null +++ b/src/main/resources/assets/productionline/lang/en_us.lang @@ -0,0 +1,22 @@ +#ProductionLine Language file +#en_US + +itemGroup.ProductionLine=Production Line + +# Blocks +tile.productionline.block.ore_iridium.name=Iridium Ore +tile.productionline.block.generator.tefnut_tear.name=Tefnut's Tear + +# Items +item.productionline.ingot_iridium.name=Iridium Ingot +item.productionline.diamond_apple.name=Diamond Apple +item.productionline.enchanting_seal_sand_storm.name=Enchanting Seal: Sand-Storm +item.productionline.enchanting_seal_spring.name=Enchanting Seal: Spring +item.productionline.enchanting_seal_oasis.name=Enchanting Seal: Oasis +item.productionline.enchanting_seal_another_world.name=Enchanting Seal: Another-World +item.productionline.sheep_crook.name=Sheep Crook +item.productionline.aquamarine.name=Aquamarine +item.productionline.converting_seal_black_cat.name=Converting Seal: Black-Cat +item.productionline.eye_of_the_desert.name=Desert Eye + +tile.botania:flower.the_flower_of_osiris.name=The Flower Of OSIRIS diff --git a/src/main/resources/assets/productionline/lang/zh_CN.lang b/src/main/resources/assets/productionline/lang/zh_CN.lang deleted file mode 100644 index d7a70d7..0000000 --- a/src/main/resources/assets/productionline/lang/zh_CN.lang +++ /dev/null @@ -1,20 +0,0 @@ -#ProductionLine Language file -#zh_CN - -[Item] -item.productionline.super_csrashsag.name=超凡垃圾袋 -item.productionline.ender_pearl_powder.name=末影珍珠粉 -item.productionline.cpu_mk1.name=工业级处理器 -item.productionline.cpu_mk2.name=信息级处理器 -item.productionline.cpu_mk3.name=末影级处理器 -item.productionline.fake_head.name=假的头 -item.productionline.toad_coin.name=虾蟆硬币 -item.productionline.life_converter.name=生命信息超次元转换芯片 -item.productionline.condensed_impurities.name=凝结杂质 -item.productionline.heart_of_lava.name=熔岩之心 -item.productionline.heart_of_pure_white.name=洁白之心 -item.productionline.heart_of_ender.name=末影之心 -item.productionline.liquid_exp_bucket.name=经验液体桶 -item.productionline.ender_pearl_bucket.name=熔融末影珍珠桶 -item.productionline.brine_bucket.name=盐水桶 -item.productionline.iridium_ingot.name=铱锭 diff --git a/src/main/resources/assets/productionline/lang/zh_cn.lang b/src/main/resources/assets/productionline/lang/zh_cn.lang new file mode 100644 index 0000000..c755bf8 --- /dev/null +++ b/src/main/resources/assets/productionline/lang/zh_cn.lang @@ -0,0 +1,22 @@ +#ProductionLine Language file +#zh_CN + +itemGroup.ProductionLine=Production Line + +# Blocks +tile.productionline.block.ore_iridium.name=铱矿石 +tile.productionline.block.generator.tefnut_tear.name=泰芙努特之泪 + +# Items +item.productionline.ingot_iridium.name=铱锭 +item.productionline.diamond_apple.name=钻石苹果 +item.productionline.enchanting_seal_sand_storm.name=增幅法印:沙暴 +item.productionline.enchanting_seal_spring.name=增幅法印:清泉 +item.productionline.enchanting_seal_oasis.name=增幅法印:绿洲 +item.productionline.enchanting_seal_another_world.name=增幅法印:异界 +item.productionline.sheep_crook.name=牧羊杖 +item.productionline.aquamarine.name=水结晶 +item.productionline.converter_card_black_cat.name=模式转换卡:黑猫 +item.productionline.eye_of_the_desert.name=沙漠之眼 + +tile.botania:flower.the_flower_of_osiris.name=欧西里斯之花 \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/block/dry_log.json b/src/main/resources/assets/productionline/models/block/dry_log.json deleted file mode 100644 index 8e69304..0000000 --- a/src/main/resources/assets/productionline/models/block/dry_log.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "productionline:blocks/dry_log" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/block/pad.json b/src/main/resources/assets/productionline/models/block/pad.json deleted file mode 100644 index fca9d3e..0000000 --- a/src/main/resources/assets/productionline/models/block/pad.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "productionline:blocks/pad" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_cluster.json b/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_cluster.json deleted file mode 100644 index 3ff2faf..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_cluster.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/adv_solar_lens_cluster" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_group.json b/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_group.json deleted file mode 100644 index fd2db34..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_group.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/adv_solar_lens_group" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_unit.json b/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_unit.json deleted file mode 100644 index f44e115..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/adv_solar_lens_unit.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/adv_solar_lens_unit" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/air_brake_unit.json b/src/main/resources/assets/productionline/models/item/crafting/air_brake_unit.json deleted file mode 100644 index c4ac10d..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/air_brake_unit.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/air_brake_unit" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/bamboo_charcoal.json b/src/main/resources/assets/productionline/models/item/crafting/bamboo_charcoal.json deleted file mode 100644 index c9d23fc..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/bamboo_charcoal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/bamboo_charcoal" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/bio_fuel.json b/src/main/resources/assets/productionline/models/item/crafting/bio_fuel.json deleted file mode 100644 index f61fedf..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/bio_fuel.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/bio_fuel" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/calculate_array.json b/src/main/resources/assets/productionline/models/item/crafting/calculate_array.json deleted file mode 100644 index e58d267..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/calculate_array.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/calculate_array" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/calculate_chunk.json b/src/main/resources/assets/productionline/models/item/crafting/calculate_chunk.json deleted file mode 100644 index f2c558e..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/calculate_chunk.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/calculate_chunk" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/calculate_unit.json b/src/main/resources/assets/productionline/models/item/crafting/calculate_unit.json deleted file mode 100644 index 9df2882..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/calculate_unit.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/calculate_unit" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/carbon_crystal.json b/src/main/resources/assets/productionline/models/item/crafting/carbon_crystal.json deleted file mode 100644 index 6d53698..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/carbon_crystal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/carbon_crystal" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/carbon_tube.json b/src/main/resources/assets/productionline/models/item/crafting/carbon_tube.json deleted file mode 100644 index 7a3b2d3..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/carbon_tube.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/carbon_tube" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/coarse_batten.json b/src/main/resources/assets/productionline/models/item/crafting/coarse_batten.json deleted file mode 100644 index 75db217..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/coarse_batten.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/coarse_batten" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/corrugated_paper.json b/src/main/resources/assets/productionline/models/item/crafting/corrugated_paper.json deleted file mode 100644 index c0ee155..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/corrugated_paper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/corrugated_paper" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/cyclotron_particle_accelerator.json b/src/main/resources/assets/productionline/models/item/crafting/cyclotron_particle_accelerator.json deleted file mode 100644 index aa8a4ea..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/cyclotron_particle_accelerator.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/cyclotron_particle_accelerator" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/electronic_circuit_control.json b/src/main/resources/assets/productionline/models/item/crafting/electronic_circuit_control.json deleted file mode 100644 index eb83087..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/electronic_circuit_control.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/electronic_circuit_control" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/electronic_circuit_core.json b/src/main/resources/assets/productionline/models/item/crafting/electronic_circuit_core.json deleted file mode 100644 index 85a6793..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/electronic_circuit_core.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/electronic_circuit_core" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/ender_calculation_crystal.json b/src/main/resources/assets/productionline/models/item/crafting/ender_calculation_crystal.json deleted file mode 100644 index 54e6bc4..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/ender_calculation_crystal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/ender_calculation_crystal" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/faggot.json b/src/main/resources/assets/productionline/models/item/crafting/faggot.json deleted file mode 100644 index 8050194..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/faggot.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/faggot" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/firewood.json b/src/main/resources/assets/productionline/models/item/crafting/firewood.json deleted file mode 100644 index 4aa334a..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/firewood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/firewood" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/float_point_calculations_region.json b/src/main/resources/assets/productionline/models/item/crafting/float_point_calculations_region.json deleted file mode 100644 index 28d9f5b..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/float_point_calculations_region.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/float_point_calculations_region" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/heat_insulation_material.json b/src/main/resources/assets/productionline/models/item/crafting/heat_insulation_material.json deleted file mode 100644 index 1fc96a3..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/heat_insulation_material.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/heat_insulation_material" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/heat_insulation_plate.json b/src/main/resources/assets/productionline/models/item/crafting/heat_insulation_plate.json deleted file mode 100644 index c98b58f..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/heat_insulation_plate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/heat_insulation_plate" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/lazuli_module.json b/src/main/resources/assets/productionline/models/item/crafting/lazuli_module.json deleted file mode 100644 index 53b6ac8..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/lazuli_module.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/lazuli_module" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/mill_teeth.json b/src/main/resources/assets/productionline/models/item/crafting/mill_teeth.json deleted file mode 100644 index 4e0fc03..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/mill_teeth.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/mill_teeth" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/mill_wheel.json b/src/main/resources/assets/productionline/models/item/crafting/mill_wheel.json deleted file mode 100644 index d2bbd69..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/mill_wheel.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/mill_wheel" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/obsidian_mechanical_casing.json b/src/main/resources/assets/productionline/models/item/crafting/obsidian_mechanical_casing.json deleted file mode 100644 index c200578..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/obsidian_mechanical_casing.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/obsidian_mechanical_casing" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/obsidian_mechanical_frame.json b/src/main/resources/assets/productionline/models/item/crafting/obsidian_mechanical_frame.json deleted file mode 100644 index 33693bd..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/obsidian_mechanical_frame.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/obsidian_mechanical_frame" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/obsidian_plate_gravity_field.json b/src/main/resources/assets/productionline/models/item/crafting/obsidian_plate_gravity_field.json deleted file mode 100644 index 4a239f3..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/obsidian_plate_gravity_field.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/obsidian_plate_gravity_field" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/paper_bag.json b/src/main/resources/assets/productionline/models/item/crafting/paper_bag.json deleted file mode 100644 index 3a01940..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/paper_bag.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/paper_bag" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/parallel_space_converter.json b/src/main/resources/assets/productionline/models/item/crafting/parallel_space_converter.json deleted file mode 100644 index 3399c0b..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/parallel_space_converter.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/parallel_space_converter" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/pulse_electronic_circuit_control.json b/src/main/resources/assets/productionline/models/item/crafting/pulse_electronic_circuit_control.json deleted file mode 100644 index 03bc340..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/pulse_electronic_circuit_control.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/pulse_electronic_circuit_control" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/pulse_electronic_circuit_core.json b/src/main/resources/assets/productionline/models/item/crafting/pulse_electronic_circuit_core.json deleted file mode 100644 index b943b79..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/pulse_electronic_circuit_core.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/pulse_electronic_circuit_core" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/redstone_module.json b/src/main/resources/assets/productionline/models/item/crafting/redstone_module.json deleted file mode 100644 index 8ee5d6e..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/redstone_module.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/redstone_module" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/rigid_paper.json b/src/main/resources/assets/productionline/models/item/crafting/rigid_paper.json deleted file mode 100644 index 69607b2..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/rigid_paper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/rigid_paper" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/rigid_paper_pack.json b/src/main/resources/assets/productionline/models/item/crafting/rigid_paper_pack.json deleted file mode 100644 index 2a0773b..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/rigid_paper_pack.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/rigid_paper_pack" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/roller.json b/src/main/resources/assets/productionline/models/item/crafting/roller.json deleted file mode 100644 index 3650d64..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/roller.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/roller" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/sawdust.json b/src/main/resources/assets/productionline/models/item/crafting/sawdust.json deleted file mode 100644 index 6b09a04..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/sawdust.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/sawdust" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/small_compressed_water_hyacinth.json b/src/main/resources/assets/productionline/models/item/crafting/small_compressed_water_hyacinth.json deleted file mode 100644 index d5469b1..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/small_compressed_water_hyacinth.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/small_compressed_water_hyacinth" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/tiles.json b/src/main/resources/assets/productionline/models/item/crafting/tiles.json deleted file mode 100644 index 1163a25..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/tiles.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/tiles" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/uu_matter_core.json b/src/main/resources/assets/productionline/models/item/crafting/uu_matter_core.json deleted file mode 100644 index 914bdbe..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/uu_matter_core.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/uu_matter_core" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/crafting/wood_pulp.json b/src/main/resources/assets/productionline/models/item/crafting/wood_pulp.json deleted file mode 100644 index e2b93a0..0000000 --- a/src/main/resources/assets/productionline/models/item/crafting/wood_pulp.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/crafting/wood_pulp" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/food/salt.json b/src/main/resources/assets/productionline/models/item/diamond_apple.json similarity index 51% rename from src/main/resources/assets/productionline/models/item/food/salt.json rename to src/main/resources/assets/productionline/models/item/diamond_apple.json index bfbd789..a2214a0 100644 --- a/src/main/resources/assets/productionline/models/item/food/salt.json +++ b/src/main/resources/assets/productionline/models/item/diamond_apple.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "productionline:item/food/salt" + "layer0": "productionline:item/diamond_apple" } } \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/dry_log.json b/src/main/resources/assets/productionline/models/item/dry_log.json deleted file mode 100644 index 71b9ed0..0000000 --- a/src/main/resources/assets/productionline/models/item/dry_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "productionline:block/dry_log" -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/eustorage/ceu.json b/src/main/resources/assets/productionline/models/item/eustorage/ceu.json deleted file mode 100644 index 8b63a76..0000000 --- a/src/main/resources/assets/productionline/models/item/eustorage/ceu.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/eustorage/ceu" - }, - "overrides": [ - { - "predicate": { - "energy": 0 - }, - "model": "productionline:item/eustorage/ceu" - }, - { - "predicate": { - "energy": 1 - }, - "model": "productionline:item/eustorage/ceu_1" - }, - { - "predicate": { - "energy": 2 - }, - "model": "productionline:item/eustorage/ceu_2" - }, - { - "predicate": { - "energy": 3 - }, - "model": "productionline:item/eustorage/ceu_3" - }, - { - "predicate": { - "energy": 4 - }, - "model": "productionline:item/eustorage/ceu_4" - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/eustorage/ceu_1.json b/src/main/resources/assets/productionline/models/item/eustorage/ceu_1.json deleted file mode 100644 index b4e93bf..0000000 --- a/src/main/resources/assets/productionline/models/item/eustorage/ceu_1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/eustorage/ceu_1" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/eustorage/ceu_2.json b/src/main/resources/assets/productionline/models/item/eustorage/ceu_2.json deleted file mode 100644 index 431768c..0000000 --- a/src/main/resources/assets/productionline/models/item/eustorage/ceu_2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/eustorage/ceu_2" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/eustorage/ceu_3.json b/src/main/resources/assets/productionline/models/item/eustorage/ceu_3.json deleted file mode 100644 index 8b50365..0000000 --- a/src/main/resources/assets/productionline/models/item/eustorage/ceu_3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/eustorage/ceu_3" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/eustorage/ceu_4.json b/src/main/resources/assets/productionline/models/item/eustorage/ceu_4.json deleted file mode 100644 index 198c417..0000000 --- a/src/main/resources/assets/productionline/models/item/eustorage/ceu_4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/eustorage/ceu_4" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/food/diamond_apple.json b/src/main/resources/assets/productionline/models/item/food/diamond_apple.json deleted file mode 100644 index 881c52e..0000000 --- a/src/main/resources/assets/productionline/models/item/food/diamond_apple.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/food/diamond_apple" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/ore/cleaned_crushed_iridium.json b/src/main/resources/assets/productionline/models/item/ore/cleaned_crushed_iridium.json deleted file mode 100644 index c68f601..0000000 --- a/src/main/resources/assets/productionline/models/item/ore/cleaned_crushed_iridium.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/ore/cleaned_crushed_iridium" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/ore/crushed_iridium.json b/src/main/resources/assets/productionline/models/item/ore/crushed_iridium.json deleted file mode 100644 index 80e465a..0000000 --- a/src/main/resources/assets/productionline/models/item/ore/crushed_iridium.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/ore/crushed_iridium" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/ore/dense_diamond_plate.json b/src/main/resources/assets/productionline/models/item/ore/dense_diamond_plate.json deleted file mode 100644 index 06c57e8..0000000 --- a/src/main/resources/assets/productionline/models/item/ore/dense_diamond_plate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/ore/dense_diamond_plate" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/ore/diamond_plate.json b/src/main/resources/assets/productionline/models/item/ore/diamond_plate.json deleted file mode 100644 index 80423da..0000000 --- a/src/main/resources/assets/productionline/models/item/ore/diamond_plate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/ore/diamond_plate" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/ore/dust_iridium.json b/src/main/resources/assets/productionline/models/item/ore/dust_iridium.json deleted file mode 100644 index d65057e..0000000 --- a/src/main/resources/assets/productionline/models/item/ore/dust_iridium.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/ore/dust_iridium" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/ore/small_dust_iridium.json b/src/main/resources/assets/productionline/models/item/ore/small_dust_iridium.json deleted file mode 100644 index 1c1b7e8..0000000 --- a/src/main/resources/assets/productionline/models/item/ore/small_dust_iridium.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/ore/small_dust_iridium" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/packaged_salt.json b/src/main/resources/assets/productionline/models/item/packaged_salt.json deleted file mode 100644 index 32421a1..0000000 --- a/src/main/resources/assets/productionline/models/item/packaged_salt.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/packaged_salt" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/pad.json b/src/main/resources/assets/productionline/models/item/pad.json deleted file mode 100644 index cc08a2a..0000000 --- a/src/main/resources/assets/productionline/models/item/pad.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "productionline:block/pad" -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/record_musicspring.json b/src/main/resources/assets/productionline/models/item/record_musicspring.json deleted file mode 100644 index 5099c8d..0000000 --- a/src/main/resources/assets/productionline/models/item/record_musicspring.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/record_musicspring" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/saltwater_bucket.json b/src/main/resources/assets/productionline/models/item/saltwater_bucket.json deleted file mode 100644 index 49d785c..0000000 --- a/src/main/resources/assets/productionline/models/item/saltwater_bucket.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/saltwater_bucket" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/gravity_ray.json b/src/main/resources/assets/productionline/models/item/tool/gravity_ray.json deleted file mode 100644 index 41a7498..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/gravity_ray.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/gravity_ray_standby" - }, - "display": { - "thirdperson_righthand": { - "rotation": [ -80, 260, -40 ], - "translation": [ -1, -2, 2.5 ], - "scale": [ 0.9, 0.9, 0.9 ] - }, - "thirdperson_lefthand": { - "rotation": [ -80, -280, 40 ], - "translation": [ -1, -2, 2.5 ], - "scale": [ 0.9, 0.9, 0.9 ] - }, - "firstperson_righthand": { - "rotation": [ 0, -90, 25 ], - "translation": [ 1.13, 3.2, 1.13], - "scale": [ 0.68, 0.68, 0.68 ] - }, - "firstperson_lefthand": { - "rotation": [ 0, 90, -25 ], - "translation": [ 1.13, 3.2, 1.13], - "scale": [ 0.68, 0.68, 0.68 ] - } - }, - "overrides": [ - { - "predicate": { - "pulling": 1 - }, - "model": "productionline:item/tool/gravity_ray_pulling_0" - }, - { - "predicate": { - "pulling": 1, - "pull": 0.65 - }, - "model": "productionline:item/tool/gravity_ray_pulling_1" - }, - { - "predicate": { - "pulling": 1, - "pull": 0.9 - }, - "model": "productionline:item/tool/gravity_ray_pulling_2" - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_0.json b/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_0.json deleted file mode 100644 index ff64fae..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_0.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/gravity_ray_pulling_0" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_1.json b/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_1.json deleted file mode 100644 index 6c05d7b..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/gravity_ray_pulling_1" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_2.json b/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_2.json deleted file mode 100644 index c0642fe..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/gravity_ray_pulling_2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/gravity_ray_pulling_2" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_alloy.json b/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_alloy.json deleted file mode 100644 index b088f7e..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_alloy.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/treetap/alloy" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_bronze.json b/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_bronze.json deleted file mode 100644 index 02acdd7..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_bronze.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/treetap/bronze" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_carbon.json b/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_carbon.json deleted file mode 100644 index 365efe3..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_carbon.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/treetap/carbon" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_iron.json b/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_iron.json deleted file mode 100644 index e0dda6b..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/treetap/iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_lead.json b/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_lead.json deleted file mode 100644 index bfb8561..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_lead.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/treetap/lead" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_steel.json b/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_steel.json deleted file mode 100644 index 2c8fe1c..0000000 --- a/src/main/resources/assets/productionline/models/item/tool/treetap/treetap_steel.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "productionline:item/tool/treetap/steel" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/recipes/enchanting_seal_another_world.json b/src/main/resources/assets/productionline/recipes/enchanting_seal_another_world.json new file mode 100644 index 0000000..6a61fce --- /dev/null +++ b/src/main/resources/assets/productionline/recipes/enchanting_seal_another_world.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": + [ + "xxx", + "xyx", + "xxx" + ], + "key": + { + "x": + { + "item": "minecraft:ender_pearl" + }, + "y": + { + "item": "productionline:crafting", + "data": 0 + } + }, + "result": + { + "item": "productionline:seal", + "count": 1, + "data": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/recipes/eye_of_the_desert.json b/src/main/resources/assets/productionline/recipes/eye_of_the_desert.json new file mode 100644 index 0000000..8efbd16 --- /dev/null +++ b/src/main/resources/assets/productionline/recipes/eye_of_the_desert.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": + [ + "xxx", + "yzy", + "xxx" + ], + "key": + { + "x": + { + "item": "minecraft:sand", + "data": 0 + }, + "y": + { + "type": "forge:ore_dict", + "ore": "ingotGold" + }, + "z": + { + "type": "forge:ore_dict", + "ore": "gemDiamond" + } + }, + "result": + { + "item": "productionline:crafting", + "count": 1, + "data": 0 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/sounds/record_MusicSpring.ogg b/src/main/resources/assets/productionline/sounds/record_MusicSpring.ogg deleted file mode 100644 index 08a3eaa..0000000 Binary files a/src/main/resources/assets/productionline/sounds/record_MusicSpring.ogg and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/adv_solar_side.png b/src/main/resources/assets/productionline/textures/blocks/adv_solar_side.png deleted file mode 100644 index 3cdd410..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/adv_solar_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/adv_solar_top.png b/src/main/resources/assets/productionline/textures/blocks/adv_solar_top.png deleted file mode 100644 index 54661f0..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/adv_solar_top.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/air_brake_casing_front.png b/src/main/resources/assets/productionline/textures/blocks/air_brake_casing_front.png deleted file mode 100644 index 46a9d9f..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/air_brake_casing_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/air_brake_casing_side.png b/src/main/resources/assets/productionline/textures/blocks/air_brake_casing_side.png deleted file mode 100644 index d50721a..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/air_brake_casing_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_front.png b/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_front.png deleted file mode 100644 index 7e340cd..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_front_active.png b/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_front_active.png deleted file mode 100644 index 5d7424e..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_front_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_left.png b/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_left.png deleted file mode 100644 index 50f43b6..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_left.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_left_active.png b/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_left_active.png deleted file mode 100644 index 89cf45a..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_left_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_up.png b/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_up.png deleted file mode 100644 index ed02633..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_up.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_up_active.png b/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_up_active.png deleted file mode 100644 index a739d31..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/carbonize_furnace_up_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/compressed_water_hyacinth.png b/src/main/resources/assets/productionline/textures/blocks/compressed_water_hyacinth.png deleted file mode 100644 index c5ec890..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/compressed_water_hyacinth.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cseu_back.png b/src/main/resources/assets/productionline/textures/blocks/cseu_back.png deleted file mode 100644 index 203e928..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cseu_back.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cseu_front.png b/src/main/resources/assets/productionline/textures/blocks/cseu_front.png deleted file mode 100644 index 00fd8c6..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cseu_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cseu_side.png b/src/main/resources/assets/productionline/textures/blocks/cseu_side.png deleted file mode 100644 index 92dc222..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cseu_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cseu_top.png b/src/main/resources/assets/productionline/textures/blocks/cseu_top.png deleted file mode 100644 index 253dd2b..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cseu_top.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cutter_front.png b/src/main/resources/assets/productionline/textures/blocks/cutter_front.png deleted file mode 100644 index 1cfc755..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cutter_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cutter_front_active.png b/src/main/resources/assets/productionline/textures/blocks/cutter_front_active.png deleted file mode 100644 index 15ed581..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cutter_front_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cutter_top.png b/src/main/resources/assets/productionline/textures/blocks/cutter_top.png deleted file mode 100644 index 5b70425..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cutter_top.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/cutter_top_active.png b/src/main/resources/assets/productionline/textures/blocks/cutter_top_active.png deleted file mode 100644 index e946432..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/cutter_top_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/dehydrated_water_hyacinth_block.png b/src/main/resources/assets/productionline/textures/blocks/dehydrated_water_hyacinth_block.png deleted file mode 100644 index 18aa8d3..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/dehydrated_water_hyacinth_block.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/evsu_front.png b/src/main/resources/assets/productionline/textures/blocks/evsu_front.png deleted file mode 100644 index 2538971..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/evsu_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/evsu_side.png b/src/main/resources/assets/productionline/textures/blocks/evsu_side.png deleted file mode 100644 index 61d8fe9..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/evsu_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/evsu_top.png b/src/main/resources/assets/productionline/textures/blocks/evsu_top.png deleted file mode 100644 index c4262d0..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/evsu_top.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_back.png b/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_back.png deleted file mode 100644 index 4f11fc9..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_back.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_front.png b/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_front.png deleted file mode 100644 index 895e671..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_side.png b/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_side.png deleted file mode 100644 index 1a6ae50..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_side_active.png b/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_side_active.png deleted file mode 100644 index 9907132..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/fluid_kinetic_generator_side_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluids/Bio Fuel_still.png b/src/main/resources/assets/productionline/textures/blocks/fluids/Bio Fuel_still.png deleted file mode 100644 index 4c47668..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/fluids/Bio Fuel_still.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluids/Bio Fuel_still.png.mcmeta b/src/main/resources/assets/productionline/textures/blocks/fluids/Bio Fuel_still.png.mcmeta deleted file mode 100644 index fd840e3..0000000 --- a/src/main/resources/assets/productionline/textures/blocks/fluids/Bio Fuel_still.png.mcmeta +++ /dev/null @@ -1,77 +0,0 @@ -{ - "animation": { - "frametime": 4, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 31, - 30, - 29, - 28, - 27, - 26, - 25, - 24, - 23, - 22, - 21, - 20, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/textures/blocks/fluids/Natural Gas_still.png b/src/main/resources/assets/productionline/textures/blocks/fluids/Natural Gas_still.png deleted file mode 100644 index b0ed43d..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/fluids/Natural Gas_still.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/fluids/Natural Gas_still.png.mcmeta b/src/main/resources/assets/productionline/textures/blocks/fluids/Natural Gas_still.png.mcmeta deleted file mode 100644 index 4fadce8..0000000 --- a/src/main/resources/assets/productionline/textures/blocks/fluids/Natural Gas_still.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 4, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_front.png b/src/main/resources/assets/productionline/textures/blocks/heat_dryer_front.png deleted file mode 100644 index 9001f08..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_front_active.png b/src/main/resources/assets/productionline/textures/blocks/heat_dryer_front_active.png deleted file mode 100644 index 6db5649..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_front_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_side.png b/src/main/resources/assets/productionline/textures/blocks/heat_dryer_side.png deleted file mode 100644 index 8c96702..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_side_active.png b/src/main/resources/assets/productionline/textures/blocks/heat_dryer_side_active.png deleted file mode 100644 index fb3b643..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_side_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_up.png b/src/main/resources/assets/productionline/textures/blocks/heat_dryer_up.png deleted file mode 100644 index e34d32c..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_up.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_up_active.png b/src/main/resources/assets/productionline/textures/blocks/heat_dryer_up_active.png deleted file mode 100644 index df5ea24..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/heat_dryer_up_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/optical_glass.png b/src/main/resources/assets/productionline/textures/blocks/optical_glass.png deleted file mode 100644 index 7b45410..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/optical_glass.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/packager_front.png b/src/main/resources/assets/productionline/textures/blocks/packager_front.png deleted file mode 100644 index 4e20210..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/packager_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/packager_front_active.png b/src/main/resources/assets/productionline/textures/blocks/packager_front_active.png deleted file mode 100644 index caf969e..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/packager_front_active.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/packager_top.png b/src/main/resources/assets/productionline/textures/blocks/packager_top.png deleted file mode 100644 index 7e0bea0..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/packager_top.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_back.png b/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_back.png deleted file mode 100644 index d1b7935..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_back.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_front.png b/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_front.png deleted file mode 100644 index 334e16d..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_front.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_side.png b/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_side.png deleted file mode 100644 index 0ef8025..0000000 Binary files a/src/main/resources/assets/productionline/textures/blocks/parallel_space_su_side.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/blocks/blockWaterHyacinth.png b/src/main/resources/assets/productionline/textures/blocks/the_flower_of_osiris.png similarity index 87% rename from src/main/resources/assets/productionline/textures/blocks/blockWaterHyacinth.png rename to src/main/resources/assets/productionline/textures/blocks/the_flower_of_osiris.png index 990ec92..bf95361 100644 Binary files a/src/main/resources/assets/productionline/textures/blocks/blockWaterHyacinth.png and b/src/main/resources/assets/productionline/textures/blocks/the_flower_of_osiris.png differ diff --git a/src/main/resources/assets/productionline/textures/entity/ray.png b/src/main/resources/assets/productionline/textures/entity/ray.png deleted file mode 100644 index b13d246..0000000 Binary files a/src/main/resources/assets/productionline/textures/entity/ray.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/fluid_kinetic_generator.json b/src/main/resources/assets/productionline/textures/fluid_kinetic_generator.json deleted file mode 100644 index 0d42313..0000000 --- a/src/main/resources/assets/productionline/textures/fluid_kinetic_generator.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "model": "productionline:basic_all", - "textures": { - "front": "productionline:blocks/fluid_kinetic_generator_front", - "back": "productionline:blocks/fluid_kinetic_generator_back", - "down": "productionline:blocks/machine_side_dark", - "up": "productionline:blocks/machine_side" - } - }, - "variants": { - "inventory": [{}], - "active": { - "false": { - "textures": { - "all": "productionline:blocks/fluid_kinetic_generator_side" - } - }, - "true": { - "textures": { - "all": "productionline:blocks/fluid_kinetic_generator_side_active" - } - } - }, - "facing": { - "east": { - "y": 90, - "x": 90, - "uvlock": true - }, - "north": { - "x": 90 - }, - "south": { - "y": 180, - "x": 90, - "uvlock": true - }, - "west": { - "y": 270, - "x": 90, - "uvlock": true - }, - "down": { - "x": 180 - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/productionline/textures/gui/GuiAdvSolar.png b/src/main/resources/assets/productionline/textures/gui/GuiAdvSolar.png deleted file mode 100644 index 3b98a77..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiAdvSolar.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/gui/GuiCarbonizeFurnace.png b/src/main/resources/assets/productionline/textures/gui/GuiCarbonizeFurnace.png deleted file mode 100644 index 778bde0..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiCarbonizeFurnace.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/gui/GuiEUStorage.png b/src/main/resources/assets/productionline/textures/gui/GuiEUStorage.png deleted file mode 100644 index f87f665..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiEUStorage.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/gui/GuiFluidKineticGenerator.png b/src/main/resources/assets/productionline/textures/gui/GuiFluidKineticGenerator.png deleted file mode 100644 index b8ff8af..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiFluidKineticGenerator.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/gui/GuiHeatDryer.png b/src/main/resources/assets/productionline/textures/gui/GuiHeatDryer.png deleted file mode 100644 index 861ded0..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiHeatDryer.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/gui/GuiPackager.png b/src/main/resources/assets/productionline/textures/gui/GuiPackager.png deleted file mode 100644 index ba1ff31..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiPackager.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/gui/GuiParallelSpaceSU.png b/src/main/resources/assets/productionline/textures/gui/GuiParallelSpaceSU.png deleted file mode 100644 index 26d74fa..0000000 Binary files a/src/main/resources/assets/productionline/textures/gui/GuiParallelSpaceSU.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_cluster.png b/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_cluster.png deleted file mode 100644 index 6ffb601..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_cluster.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_group.png b/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_group.png deleted file mode 100644 index ff55dcc..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_group.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_unit.png b/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_unit.png deleted file mode 100644 index 4525cbd..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/adv_solar_lens_unit.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/air_brake_unit.png b/src/main/resources/assets/productionline/textures/item/crafting/air_brake_unit.png deleted file mode 100644 index fbdefde..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/air_brake_unit.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/bamboo_charcoal.png b/src/main/resources/assets/productionline/textures/item/crafting/bamboo_charcoal.png deleted file mode 100644 index 3ebb1db..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/bamboo_charcoal.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/calculate_array.png b/src/main/resources/assets/productionline/textures/item/crafting/calculate_array.png deleted file mode 100644 index 05f5537..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/calculate_array.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/calculate_chunk.png b/src/main/resources/assets/productionline/textures/item/crafting/calculate_chunk.png deleted file mode 100644 index d15fb4a..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/calculate_chunk.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/calculate_unit.png b/src/main/resources/assets/productionline/textures/item/crafting/calculate_unit.png deleted file mode 100644 index 62e9ca3..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/calculate_unit.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/carbon_crystal.png b/src/main/resources/assets/productionline/textures/item/crafting/carbon_crystal.png deleted file mode 100644 index da40db4..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/carbon_crystal.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/carbon_tube.png b/src/main/resources/assets/productionline/textures/item/crafting/carbon_tube.png deleted file mode 100644 index 748da0c..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/carbon_tube.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/cyclotron_particle_accelerator.png b/src/main/resources/assets/productionline/textures/item/crafting/cyclotron_particle_accelerator.png deleted file mode 100644 index 8aca08a..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/cyclotron_particle_accelerator.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/electronic_circuit_control.png b/src/main/resources/assets/productionline/textures/item/crafting/electronic_circuit_control.png deleted file mode 100644 index 04bd548..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/electronic_circuit_control.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/electronic_circuit_core.png b/src/main/resources/assets/productionline/textures/item/crafting/electronic_circuit_core.png deleted file mode 100644 index df479df..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/electronic_circuit_core.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/ender_calculation_crystal.png b/src/main/resources/assets/productionline/textures/item/crafting/ender_calculation_crystal.png deleted file mode 100644 index c06accb..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/ender_calculation_crystal.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/float_point_calculations_region.png b/src/main/resources/assets/productionline/textures/item/crafting/float_point_calculations_region.png deleted file mode 100644 index 871a6c8..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/float_point_calculations_region.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/heat_insulation_material.png b/src/main/resources/assets/productionline/textures/item/crafting/heat_insulation_material.png deleted file mode 100644 index 8805ce8..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/heat_insulation_material.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/heat_insulation_plate.png b/src/main/resources/assets/productionline/textures/item/crafting/heat_insulation_plate.png deleted file mode 100644 index c8a6640..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/heat_insulation_plate.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/lazuli_module.png b/src/main/resources/assets/productionline/textures/item/crafting/lazuli_module.png deleted file mode 100644 index de4e043..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/lazuli_module.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/mill_teeth.png b/src/main/resources/assets/productionline/textures/item/crafting/mill_teeth.png deleted file mode 100644 index 3f4de95..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/mill_teeth.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/mill_wheel.png b/src/main/resources/assets/productionline/textures/item/crafting/mill_wheel.png deleted file mode 100644 index 27fee87..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/mill_wheel.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/obsidian_mechanical_casing.png b/src/main/resources/assets/productionline/textures/item/crafting/obsidian_mechanical_casing.png deleted file mode 100644 index 3cc1f33..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/obsidian_mechanical_casing.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/obsidian_mechanical_frame.png b/src/main/resources/assets/productionline/textures/item/crafting/obsidian_mechanical_frame.png deleted file mode 100644 index ad445f0..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/obsidian_mechanical_frame.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/obsidian_plate_gravity_field.png b/src/main/resources/assets/productionline/textures/item/crafting/obsidian_plate_gravity_field.png deleted file mode 100644 index 554ff75..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/obsidian_plate_gravity_field.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/parallel_space_converter.png b/src/main/resources/assets/productionline/textures/item/crafting/parallel_space_converter.png deleted file mode 100644 index c4fcc07..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/parallel_space_converter.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/pulse_electronic_circuit_control.png b/src/main/resources/assets/productionline/textures/item/crafting/pulse_electronic_circuit_control.png deleted file mode 100644 index 2d4a610..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/pulse_electronic_circuit_control.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/pulse_electronic_circuit_core.png b/src/main/resources/assets/productionline/textures/item/crafting/pulse_electronic_circuit_core.png deleted file mode 100644 index 478d795..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/pulse_electronic_circuit_core.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/redstone_module.png b/src/main/resources/assets/productionline/textures/item/crafting/redstone_module.png deleted file mode 100644 index ca99725..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/redstone_module.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/rigid_paper.png b/src/main/resources/assets/productionline/textures/item/crafting/rigid_paper.png deleted file mode 100644 index 3f7346b..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/rigid_paper.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/rigid_paper_pack.png b/src/main/resources/assets/productionline/textures/item/crafting/rigid_paper_pack.png deleted file mode 100644 index 8e7646e..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/rigid_paper_pack.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/roller.png b/src/main/resources/assets/productionline/textures/item/crafting/roller.png deleted file mode 100644 index 21127ee..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/roller.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/rolling_pin.png b/src/main/resources/assets/productionline/textures/item/crafting/rolling_pin.png deleted file mode 100644 index fd20f9f..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/rolling_pin.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/small_compressed_water_hyacinth.png b/src/main/resources/assets/productionline/textures/item/crafting/small_compressed_water_hyacinth.png deleted file mode 100644 index 6cc9754..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/small_compressed_water_hyacinth.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/crafting/uu_matter_core.png b/src/main/resources/assets/productionline/textures/item/crafting/uu_matter_core.png deleted file mode 100644 index 7017e76..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/crafting/uu_matter_core.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/food/diamond_apple.png b/src/main/resources/assets/productionline/textures/item/diamond_apple.png similarity index 100% rename from src/main/resources/assets/productionline/textures/item/food/diamond_apple.png rename to src/main/resources/assets/productionline/textures/item/diamond_apple.png diff --git a/src/main/resources/assets/productionline/textures/item/eustorage/ceu.png b/src/main/resources/assets/productionline/textures/item/eustorage/ceu.png deleted file mode 100644 index 3b66d6f..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/eustorage/ceu.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_1.png b/src/main/resources/assets/productionline/textures/item/eustorage/ceu_1.png deleted file mode 100644 index fa6c651..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_1.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_2.png b/src/main/resources/assets/productionline/textures/item/eustorage/ceu_2.png deleted file mode 100644 index 98e8b3c..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_2.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_3.png b/src/main/resources/assets/productionline/textures/item/eustorage/ceu_3.png deleted file mode 100644 index c255540..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_3.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_4.png b/src/main/resources/assets/productionline/textures/item/eustorage/ceu_4.png deleted file mode 100644 index c48da2f..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/eustorage/ceu_4.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/food/salt.png b/src/main/resources/assets/productionline/textures/item/food/salt.png deleted file mode 100644 index b20546e..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/food/salt.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/ore/cleaned_crushed_iridium.png b/src/main/resources/assets/productionline/textures/item/ore/cleaned_crushed_iridium.png deleted file mode 100644 index ddf7fba..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/ore/cleaned_crushed_iridium.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/ore/crushed_iridium.png b/src/main/resources/assets/productionline/textures/item/ore/crushed_iridium.png deleted file mode 100644 index b17ddda..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/ore/crushed_iridium.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/ore/dense_diamond_plate.png b/src/main/resources/assets/productionline/textures/item/ore/dense_diamond_plate.png deleted file mode 100644 index 98998ae..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/ore/dense_diamond_plate.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/ore/diamond_plate.png b/src/main/resources/assets/productionline/textures/item/ore/diamond_plate.png deleted file mode 100644 index 2b1095a..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/ore/diamond_plate.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/ore/dust_iridium.png b/src/main/resources/assets/productionline/textures/item/ore/dust_iridium.png deleted file mode 100644 index f282512..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/ore/dust_iridium.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/ore/small_dust_iridium.png b/src/main/resources/assets/productionline/textures/item/ore/small_dust_iridium.png deleted file mode 100644 index cdfb9cc..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/ore/small_dust_iridium.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/packaged_salt.png b/src/main/resources/assets/productionline/textures/item/packaged_salt.png deleted file mode 100644 index 0622399..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/packaged_salt.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/record_musicspring.png b/src/main/resources/assets/productionline/textures/item/record_musicspring.png deleted file mode 100644 index c8d5892..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/record_musicspring.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/saltwater_bucket.png b/src/main/resources/assets/productionline/textures/item/saltwater_bucket.png deleted file mode 100644 index 10d90dc..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/saltwater_bucket.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_0.png b/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_0.png deleted file mode 100644 index c3d3fc9..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_0.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_1.png b/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_1.png deleted file mode 100644 index 63e1553..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_1.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_2.png b/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_2.png deleted file mode 100644 index cfe5fa7..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_pulling_2.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_standby.png b/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_standby.png deleted file mode 100644 index 90883f1..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/gravity_ray_standby.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumAxe.png b/src/main/resources/assets/productionline/textures/item/tool/itemIridiumAxe.png deleted file mode 100644 index 1d50abb..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumAxe.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumPickaxe.png b/src/main/resources/assets/productionline/textures/item/tool/itemIridiumPickaxe.png deleted file mode 100644 index bc0c35b..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumPickaxe.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumSpade.png b/src/main/resources/assets/productionline/textures/item/tool/itemIridiumSpade.png deleted file mode 100644 index 327a338..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumSpade.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumSword.png b/src/main/resources/assets/productionline/textures/item/tool/itemIridiumSword.png deleted file mode 100644 index 3f3e96e..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/itemIridiumSword.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/treetap/alloy.png b/src/main/resources/assets/productionline/textures/item/tool/treetap/alloy.png deleted file mode 100644 index 01fc9a8..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/treetap/alloy.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/treetap/bronze.png b/src/main/resources/assets/productionline/textures/item/tool/treetap/bronze.png deleted file mode 100644 index 6db624d..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/treetap/bronze.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/treetap/carbon.png b/src/main/resources/assets/productionline/textures/item/tool/treetap/carbon.png deleted file mode 100644 index 56e742f..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/treetap/carbon.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/treetap/iron.png b/src/main/resources/assets/productionline/textures/item/tool/treetap/iron.png deleted file mode 100644 index cc3fadd..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/treetap/iron.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/treetap/lead.png b/src/main/resources/assets/productionline/textures/item/tool/treetap/lead.png deleted file mode 100644 index d6554c6..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/treetap/lead.png and /dev/null differ diff --git a/src/main/resources/assets/productionline/textures/item/tool/treetap/steel.png b/src/main/resources/assets/productionline/textures/item/tool/treetap/steel.png deleted file mode 100644 index 9b91b8a..0000000 Binary files a/src/main/resources/assets/productionline/textures/item/tool/treetap/steel.png and /dev/null differ diff --git a/src/main/resources/mixins.productionline.core.json b/src/main/resources/mixins.productionline.core.json index 57226b8..edc0526 100644 --- a/src/main/resources/mixins.productionline.core.json +++ b/src/main/resources/mixins.productionline.core.json @@ -1,11 +1,9 @@ { "required": true, - "minVersion": "0.4.4", + "minVersion": "0.8", "package": "com.mcgoodtime.productionline.mixin", "priority": 1111, - "mixins": [ - "MixinTileEntityFurnace" - ], + "mixins": [], "compatibilityLevel": "JAVA_8", "client": [], "server": [] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..fdf76db --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,7 @@ +{ + "pack": { + "description": "Production Line resources", + "pack_format": 3, + "_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)." + } +}