Added compatibility for 1.10

This commit is contained in:
modmuss50 2016-06-25 15:25:04 +01:00
parent fa9e941217
commit 7719633599
2 changed files with 10 additions and 1 deletions

View file

@ -73,6 +73,9 @@ if (ENV.BUILD_NUMBER) {
minecraft {
version = "1.9.4-12.17.0.1950"
if(ENV.JOB_BASE_NAME == "TechReborn-1.10"){
version = "1.10-12.18.0.1992-1.10.0"
}
mappings = "snapshot_20160518"
replace "@MODVERSION@", project.version
// makeObfSourceJar = false
@ -175,6 +178,9 @@ modsIO {
artifact = jar.archivePath
modid = "1182"
minecraft = "1.9.4"
if(ENV.JOB_BASE_NAME == "TechReborn-1.10"){
minecraft = "1.10"
}
changelog = "See github at : https://github.com/TechReborn/TechReborn"
tag = "alpha"
current = true

View file

@ -5,7 +5,9 @@ import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.dispenser.IPosition;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityDispenser;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import techreborn.api.ScrapboxList;
public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem
@ -21,7 +23,8 @@ public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem
float zOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;
stack.splitStack(1);
EnumFacing enumfacing = BlockDispenser.getFacing(source.getBlockMetadata());
TileEntityDispenser tile = source.getBlockTileEntity();
EnumFacing enumfacing = tile.getWorld().getBlockState(new BlockPos(source.getX(), source.getY(), source.getZ())).getValue(BlockDispenser.FACING);
IPosition iposition = BlockDispenser.getDispensePosition(source);
doDispense(source.getWorld(), out, 6, enumfacing, iposition);
return stack;