Some random fixes, 959 errors

This commit is contained in:
modmuss50 2019-02-21 18:11:55 +00:00
parent 0975b4353b
commit f6a79ce579
37 changed files with 131 additions and 186 deletions

View file

@ -54,10 +54,10 @@ public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem {
List<IBaseRecipeType> scrapboxRecipeList = RecipeHandler.getRecipeClassFromName(Reference.SCRAPBOX_RECIPE);
int random = new Random().nextInt(scrapboxRecipeList.size());
ItemStack out = scrapboxRecipeList.get(random).getOutput(0);
stack.splitStack(1);
stack.split(1);
TileEntityDispenser tile = source.getBlockTileEntity();
EnumFacing enumfacing = tile.getWorld().getBlockState(new BlockPos(source.getX(), source.getY(), source.getZ())).getValue(BlockDispenser.FACING);
EnumFacing enumfacing = tile.getWorld().getBlockState(new BlockPos(source.getX(), source.getY(), source.getZ())).get(BlockDispenser.FACING);
IPosition iposition = BlockDispenser.getDispensePosition(source);
doDispense(source.getWorld(), out, 6, enumfacing, iposition);
}

View file

@ -33,6 +33,7 @@ import net.minecraftforge.oredict.OreDictionary;
import javax.annotation.Nonnull;
import java.util.List;
@Deprecated //needs to go and be repalced by a version for tags. Has some other stuff that might be useful in another class so im not removing it just yet
public class OreDictUtils {
public static String toFirstLower(String string) {

View file

@ -29,6 +29,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagString;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@ -58,7 +59,7 @@ public class StackWIPHandler {
}
private void addHead(String name) {
ItemStack head = new ItemStack(Items.SKULL, 1, 3);
ItemStack head = new ItemStack(Items.PLAYER_HEAD, 3);
head.setTag(new NBTTagCompound());
head.getTag().setTag("SkullOwner", new NBTTagString(name));
devHeads.add(head);
@ -69,11 +70,11 @@ public class StackWIPHandler {
public void toolTip(ItemTooltipEvent event) {
Block block = Block.getBlockFromItem(event.getItemStack().getItem());
if (block != null && wipBlocks.contains(block)) {
event.getToolTip().add(TextFormatting.RED + StringUtils.t("techreborn.tooltip.wip"));
event.getToolTip().add(new TextComponentString(TextFormatting.RED + StringUtils.t("techreborn.tooltip.wip")));
}
if (devHeads.contains(event.getItemStack())) {
event.getToolTip().add(TextFormatting.GOLD + "TechReborn Developer");
event.getToolTip().add(new TextComponentString(TextFormatting.GOLD + "TechReborn Developer"));
}
}
}