• 0

    posted a message on Villager making things more expensive the more I trade with him [1.14]

    I thought they were supposed to lower prices the more you trade with them. it use to cost me 23 potatoes for one emerald. now its 45 potatoes for one emerald. what happened?

    Posted in: Survival Mode
  • 0

    posted a message on Working on an Island Village
    Quote from MCF_100151321»

    Looking good so far. I suggest looking at some building tutorials for watch people build villages on youtube. Try to make your buildings more varied in shape and add interest. Maybe separate buildings for a baker, butcher, inn, etc? Some bushes and trees and maybe a pond will also make it look better. Really good start so far though. Keep it up!


    There will be separate buildings for bakers and butchers. I plan to add a smithy as well. I also will add defensive structures like archer towers to give the island a "well defended" look. I plan to add at least 30 different buildings (including residential homes). One thing I have to do is keep the farming district a certain distance away from the planned public facilities district. There I will build libraries (with enchanting table), taverns and other stuff. I have a lot of plans for this island village.

    Posted in: Survival Mode
  • 0

    posted a message on Working on an Island Village

    Thanks for the feedback. The island had a large portion of conveniently flat land making it easy for building. The number of animals is also relatively high which will make building animal pens easy. I don't think pillager patrols spawn in forests so the island should be quite safe for villagers. The main problem I have faced so far is that when mining I have found very little iron on the island and the only way to get large amounts of iron is to go caving and expose yourself to dangerous mobs.

    Posted in: Survival Mode
  • 2

    posted a message on Working on an Island Village

    I have found a seed with a very nice forest island spawn. To the north is a few villages on the mainland and going even more north will lead you to a jungle with a temple in it. Here are some pictures of the village I am building:


    The residential district:

    The farming district:

    Inside a standard house:

    My house has a gate to prevent villagers from entering my house:


    Edit 12:11PM 4/19/2019:


    The Village Expands. I added a smithy:

    The Farming District Expanded:

    The new barn for storing crops:


    Edit: 4:47 PM 4/20/2019

    The village has gotten so large now that iron golems and stray cats are now spawning and the villagers are breeding on their own. The village now has 4 iron golems, and I think over 10 villagers living in it.


    Buildings I plan to add:
    Archer towers.
    Armory (For storing excess weapons such as bows and arrows, and for storing unused armor).

    Library (For enchanting).

    A small fortress.

    Brewery (For Potions).

    An inn.

    A tavern.

    Several more residential homes.


    The Seed: 1718626086689732879

    (Please do not spoil what treasures are in this map as I want to find them on my own).


    This is going to be a medieval themed village. Any suggestions as to what I should add?

    Posted in: Survival Mode
  • 0

    posted a message on What is the best enchantment to protect against blaze fireballs?

    Is it projectile protection or flame protection?

    Posted in: Survival Mode
  • 0

    posted a message on Looking for a jungle island seed [1.13]

    Try this:

    -721376150468336

    I discovered this seed a while ago and posted it in:

    https://www.minecraftforum.net/forums/minecraft-java-edition/seeds/2899033-my-new-island-home-seed

    It is massive and is a good distance away from the mainland.

    Posted in: Seeds
  • 0

    posted a message on WorldPainter - graphical & interactive map creator/generator

    Was the thing where ocean monuments spawning underground finally fixed?

    Posted in: Minecraft Tools
  • 0

    posted a message on Should Pillagers be Able to Open Doors?
    Quote from maesag»

    mojang should allow villagers to open gate doors to use gate doors instead of regular doors


    I don't think that would be a good idea either because I like using gates to protect farms and I don't want villagers stealing my crops. if they give villagers the ability to open gates they should advance their AI to tell what crops belong to them and which ones belong to the player.

    Posted in: Recent Updates and Snapshots
  • 0

    posted a message on Should Pillagers be Able to Open Doors?

    I really think this is a bad idea as it makes the village even harder to defend.

    Posted in: Recent Updates and Snapshots
  • 0

    posted a message on Where would one get permision to write and sell a book about a minecraft adventure?

    I have seen books for sale at Walmart stores that seem very interesting. I was wondering if I could actually do something similar and write my own book and sell it? Do I have to get special permissions to do this?

    Posted in: Discussion
  • 0

    posted a message on [SOLVED] Placing blocks when right clicking on block with GUI.

    The gui of the block still opens... but if the player is holding a block in their hands when right clicking on the block with GUI it places the block the player is holding. How do I stop the player from placing blocks when right clicking on a custom block with GUI?


    Here is my code:


    package kenneths_mods.kenneths_survival_craft_mod.init.blocks.machines.basic_sawmill;
    
    import java.util.List;
    
    import kenneths_mods.kenneths_survival_craft_mod.KennethsSurvivalCraftMain;
    import kenneths_mods.kenneths_survival_craft_mod.util.Reference;
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockHorizontal;
    import net.minecraft.block.SoundType;
    import net.minecraft.block.material.Material;
    import net.minecraft.block.properties.IProperty;
    import net.minecraft.block.properties.PropertyDirection;
    import net.minecraft.block.state.BlockStateContainer;
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.client.util.ITooltipFlag;
    import net.minecraft.creativetab.CreativeTabs;
    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.Mirror;
    import net.minecraft.util.Rotation;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.IBlockAccess;
    import net.minecraft.world.World;
    
    public class BlockBasicSawmill extends Block {
    	
    	public static final PropertyDirection FACING = BlockHorizontal.FACING;
    	
    	public BlockBasicSawmill() {
    		super(Material.WOOD);
    		setUnlocalizedName("basic_sawmill");
    		setRegistryName("basic_sawmill");
    		setHardness(6);
    		setResistance(15);
    		setSoundType(SoundType.WOOD);
    		setHarvestLevel("axe", 1);
    		setCreativeTab(CreativeTabs.DECORATIONS);
    	}
    	
    	@Override
    	public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) {
    		super.addInformation(stack, player, tooltip, advanced);
    		tooltip.add("Used to saw basic planks into refined planks");
    		tooltip.add("Strong enough to work on wood types:");
    		tooltip.add("Oak");
    		tooltip.add("Birch");
    		tooltip.add("Spruce");
    		tooltip.add("Dark Oak");
    		tooltip.add("Jungle");
    		tooltip.add("Acacia");
    	}
    	@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) {
    			playerIn.openGui(KennethsSurvivalCraftMain.INSTANCE, Reference.GUI_BASIC_SAWMILL_ID, worldIn, pos.getX(), pos.getY(), pos.getZ());
    		}
    		return super.onBlockActivated(worldIn, pos, state, playerIn, hand, facing, hitX, hitY, hitZ);
    	}
    	@Override
    	public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
    		if(!worldIn.isRemote) {
    			IBlockState north = worldIn.getBlockState(pos.north());
    			IBlockState south = worldIn.getBlockState(pos.south());
                IBlockState west = worldIn.getBlockState(pos.west());
                IBlockState east = worldIn.getBlockState(pos.east());
                EnumFacing face = (EnumFacing)state.getValue(FACING);
                
                if (face == EnumFacing.NORTH && north.isFullBlock() && !south.isFullBlock()) face = EnumFacing.SOUTH;
                else if (face == EnumFacing.SOUTH && south.isFullBlock() && !north.isFullBlock()) face = EnumFacing.NORTH;
                else if (face == EnumFacing.WEST && west.isFullBlock() && !east.isFullBlock()) face = EnumFacing.EAST;
                else if (face == EnumFacing.EAST && east.isFullBlock() && !west.isFullBlock()) face = EnumFacing.WEST;
                worldIn.setBlockState(pos, state.withProperty(FACING, face), 2);
    		}
    	}
    	@Override
    	public boolean hasTileEntity(IBlockState state) {
    		return true;
    	}
    	@Override
    	public TileEntity createTileEntity(World world, IBlockState state) {
    		return new TileEntityBasicSawmill();
    	}
    	@Override
    	public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) {
    		return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
    	}
    	@Override
    	public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
    		worldIn.setBlockState(pos, this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
    	}
    	@Override
    	public IBlockState withRotation(IBlockState state, Rotation rot){
    		return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING)));
    	}
    	@Override
    	public IBlockState withMirror(IBlockState state, Mirror mirrorIn) {
    		return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
    	}
    	@Override
    	public IBlockState getStateFromMeta(int meta) {
    		EnumFacing facing = EnumFacing.getFront(meta);
    		if(facing.getAxis() == EnumFacing.Axis.Y) facing = EnumFacing.NORTH;
    		return this.getDefaultState().withProperty(FACING, facing);
    	}
    	@Override
    	public int getMetaFromState(IBlockState state) {
    		return ((EnumFacing)state.getValue(FACING)).getIndex();
    	}
    	@Override
    	protected BlockStateContainer createBlockState() {
    		return new BlockStateContainer(this, new IProperty[] {FACING});
    	}
    	@Override
    	public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
    		return true;
    	}
    	@Override
    	public boolean isOpaqueCube(IBlockState state) {
    		return false;
    	}
    	@Override
    	public boolean isFullBlock(IBlockState state) {
    		return false;
    	}
    }
    
    Posted in: Modification Development
  • 0

    posted a message on Two Containers nearly identical.... One gets an error.

    I fixed it!

    this:

    @Override
    public boolean hasTileEntity() {
    	return true;
    }



    Should have been this:

    @Override
    public boolean hasTileEntity(IBlockState state) {
     return true;
    }

    Posted in: Modification Development
  • 0

    posted a message on Two Containers nearly identical.... One gets an error.

    I made some changes:


    The Blacksmiths Anvil Block:

    package kenneths_mods.kenneth_medieval_mod.init.machines.blacksmiths_anvil;
    
    import kenneths_mods.kenneth_medieval_mod.KennethsMedievalModMain;
    import kenneths_mods.kenneth_medieval_mod.util.Reference;
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockHorizontal;
    import net.minecraft.block.material.Material;
    import net.minecraft.block.properties.IProperty;
    import net.minecraft.block.properties.PropertyDirection;
    import net.minecraft.block.state.BlockStateContainer;
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.EnumFacing;
    import net.minecraft.util.EnumHand;
    import net.minecraft.util.Mirror;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.IBlockAccess;
    import net.minecraft.world.World;
    
    public class BlockBlacksmithsAnvil extends Block {
    	
    	public static final PropertyDirection FACING = BlockHorizontal.FACING;
    	
    	public BlockBlacksmithsAnvil() {
    		super(Material.IRON);
    		setUnlocalizedName("blacksmiths_anvil");
    		setRegistryName("blacksmiths_anvil");
    		setHardness(6);
    		setResistance(30);
    		setHarvestLevel("pickaxe", 1);
    		setCreativeTab(CreativeTabs.DECORATIONS);
    		this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
    	}
    	@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) {
    			TileEntityBlacksmithsAnvil te = (TileEntityBlacksmithsAnvil)worldIn.getTileEntity(pos);
    			te.testTE(playerIn, pos);
    			playerIn.openGui(KennethsMedievalModMain.instance, Reference.GUI_BLACKSMITHS_ANVIL_ID, worldIn, pos.getX(), pos.getY(), pos.getZ());
    		}
    		
    		return true;
    		
    	}
    	@Override
    	public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
    		if (!worldIn.isRemote) {
                IBlockState iblockstate = worldIn.getBlockState(pos.north());
                IBlockState iblockstate1 = worldIn.getBlockState(pos.south());
                IBlockState iblockstate2 = worldIn.getBlockState(pos.west());
                IBlockState iblockstate3 = worldIn.getBlockState(pos.east());
                EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
                if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock()) {
                    enumfacing = EnumFacing.SOUTH;
                } else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock()) {
                    enumfacing = EnumFacing.NORTH;
                } else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock()) {
                    enumfacing = EnumFacing.EAST;
                } else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock()) {
                    enumfacing = EnumFacing.WEST;
                }
                worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
            }
    	}
    	@Override
    	public IBlockState getStateFromMeta(int meta) {
    		EnumFacing facing = EnumFacing.getFront(meta);
    		if(facing.getAxis() == EnumFacing.Axis.Y) facing = EnumFacing.NORTH;
    		return this.getDefaultState().withProperty(FACING, facing);
    	}
    	@Override
    	public int getMetaFromState(IBlockState state) {
    		return ((EnumFacing)state.getValue(FACING)).getIndex();
    	}
    	@Override
    	public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
            return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
        }
    	@Override
    	public IBlockState withMirror(IBlockState state, Mirror mirrorIn) {
            return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
        }
    	@Override
        protected BlockStateContainer createBlockState() {
            return new BlockStateContainer(this, new IProperty[] {FACING});
        }
    	@Override
    	public boolean hasTileEntity() {
    		return true;
    	}
    	@Override
    	public TileEntity createTileEntity(World world, IBlockState state) {
    		return new TileEntityBlacksmithsAnvil();
    	}
    	@Override
    	public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
    		return true;
    	}
    	@Override
    	public boolean isOpaqueCube(IBlockState state) {
    		return false;
    	}
    	@Override
    	public boolean isFullBlock(IBlockState state) {
    		return false;
    	}
    }



    and the Blacksmiths Anvil TE:

    package kenneths_mods.kenneth_medieval_mod.init.machines.blacksmiths_anvil;
    
    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.ITickable;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.util.text.ITextComponent;
    import net.minecraft.util.text.TextComponentString;
    import net.minecraft.util.text.TextComponentTranslation;
    import net.minecraft.world.World;
    import net.minecraftforge.common.capabilities.Capability;
    import net.minecraftforge.items.CapabilityItemHandler;
    import net.minecraftforge.items.ItemStackHandler;
    
    public class TileEntityBlacksmithsAnvil extends TileEntity implements ITickable {
    	
    	private ItemStackHandler handler = new ItemStackHandler(3);
    	private String customName;
    	public int smithTime;
    	
    	@Override
    	public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {
    		return (oldState.getBlock() != newState.getBlock());
    	}
    	@Override
    	public void update () {
    		if(!this.world.isRemote) {
    			if(this.handler.getStackInSlot(2).getCount() < 1) {
    				if(RecipesBlacksmithsAnvil.INSTANCE.inputsMatchARecipe(this.handler.getStackInSlot(0), this.handler.getStackInSlot(1))) {
    					this.handler.setStackInSlot(2, RecipesBlacksmithsAnvil.INSTANCE.getSmithingResult(this.handler.getStackInSlot(0), this.handler.getStackInSlot(1)));
    				}
    			}
    		}
    	}
    	public void testTE (EntityPlayer player, BlockPos pos) {
    		if(!this.world.isRemote) {
    			player.sendMessage(new TextComponentString("Tested:" + pos.getX() + "," + pos.getY() + "," + pos.getZ()));
    		}
    	}
    	@Override
    	public void readFromNBT(NBTTagCompound compound) {
    		super.readFromNBT(compound);
    		this.handler.deserializeNBT(compound.getCompoundTag("Inventory"));
    		this.smithTime = compound.getInteger("ST");
    		if(compound.hasKey("CustomName", 8)) {
    			this.setCustomName(compound.getString("CustomName"));
    		}
    	}
    	@Override
    	public NBTTagCompound writeToNBT(NBTTagCompound compound) {
    		super.writeToNBT(compound);
    		compound.setTag("Inventory", this.handler.serializeNBT());
    		compound.setInteger("ST", this.smithTime);
    		if(this.hasCustomName()) {
    			compound.setString("CustomName", this.customName);
    		}
    		return compound;
    	}
    	public boolean hasCustomName () {
    		return this.customName != null && !this.customName.isEmpty();
    	}
    	public void setCustomName(String customName) {
    		this.customName = customName;
    	}
    	@Override
    	public ITextComponent getDisplayName() {
    		return this.hasCustomName() ? new TextComponentString(this.customName) : new TextComponentTranslation("Smithing Anvil");
    	}
    	
    	public int getField (int id) {
    		switch (id) {
    		case 0:
    			return this.smithTime;
    		default:
    			return 0;
    		}
    	}
    	@Override
    	public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
    		if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    	@Override
    	public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
    		if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
    			return (T) this.handler;
    		}
    		return super.getCapability(capability, facing);
    	}
    }




    But now I get:


    [11:02:27] [Client thread/INFO] [minecraft/AdvancementList]: Loaded 15 advancements
    [11:02:32] [Server thread/FATAL] [minecraft/MinecraftServer]: Error executing task
    java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_191]
    at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_191]
    at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) [MinecraftServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
    Caused by: java.lang.NullPointerException
    at kenneths_mods.kenneth_medieval_mod.init.machines.blacksmiths_anvil.BlockBlacksmithsAnvil.onBlockActivated(BlockBlacksmithsAnvil.java:42) ~[BlockBlacksmithsAnvil.class:?]
    at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:475) ~[PlayerInteractionManager.class:?]
    at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:769) ~[NetHandlerPlayServer.class:?]
    at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_191]
    at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_191]
    at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
    ... 5 more
    [11:02:33] [Server thread/INFO] [minecraft/IntegratedServer]: Saving and pausing game...


    Line 42 of BlockBlacksmithsAnvil:


    te.testTE(playerIn, pos);
    Posted in: Modification Development
  • 0

    posted a message on Two Containers nearly identical.... One gets an error.

    I think they are... I based my smithing anvil's container code on all the other containers I used. The only difference is that the smithing anvil's container has an extra slot. The tile entity is registered, and so is the GUI so I have no idea what is wrong. The other containers do not give me errors.

    Posted in: Modification Development
  • To post a comment, please .