Jump to content

Whompy

Members
  • Posts

    36
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Whompy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have created an custom projectile that is when fired when right clicking a sword, however this projectile seems to not collide with anything (it passes through blocks and entities) How do I fix this?
  2. I have an item that displays text in chat upon right click How do I prevent an item like this from spamming in the chat by holding the right click button?
  3. Not updating 1.12.2 makes sense, however I do think that there should be a place to ask modding questions regarding old versions. This could be achieved via creating a new forum area call Old Mod Version Development. In this area moderators could just ignore questions, and let people willing to work with older versions answer questions.
  4. Why has the forums dropped 1.12.2 support? Wouldn't it be better to create a section devoted to issues in "old versions" which moderators don't give help too? Also when did it drop 1.12 support just curious
  5. I am attempting to create a custom machine that takes in two items and a liquid and outputs another item how would I go about creating such a machine
  6. Ok I figured it out on my own thanks for the help
  7. ok fine, my question why do u need to see more of my code? Is there more code relating to the right click function that I should take a look at?
  8. So other than that, what is wrong with my code?
  9. I am too lazy to make a github, sorry for not responding earlier btw Here's the variables I forgot to put in the thread when I created the public Boolean, enablestats was what appeared in the autogenerated return statement. I honestly don't know what it does nor have I looked into it ItemStack glass = new ItemStack(Blocks.GLASS); ItemStack Magic_orb = new ItemStack(ModItems.ORB_OF_CHANNELING); Item sponge = Item.getItemFromBlock(Blocks.SPONGE);
  10. I am aware of this my block is about the size of a slab so it's fine
  11. I have two blocks that I am trying to use to craft items from my mod. The first block when right clicked, is supposed to check for an item above it in this case a glass block, then check for a ball of magma cream and a modded item I made in the first two slots of the container. However, nothing is happening when the block is right clicked so I assume one of the if statements is faulty. Here's my onblockactivated method (idk why indents are weird in eclipse they look fine): @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if(!playerIn.isSneaking()) { if(worldIn.getBlockState(pos.down(1)) == ModBlocks.Magic_Sponge.getDefaultState()) { List<EntityItem> entities = worldIn.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(), pos.getX()+1,pos.getY() + 1, pos.getZ()+1)); for (EntityItem entity : entities) { if(entity.getItem().getItem() == glass.getItem()) { TileEntityMagicSponge tileentity = (TileEntityMagicSponge)worldIn.getTileEntity(pos.down()); Item Magma_cream = tileentity.getStackInSlot(1).getItem(); Item Magic_Caytalist = tileentity.getStackInSlot(2).getItem(); ItemStack stack = entity.getItem(); if(Magma_cream == Items.MAGMA_CREAM.getItemById(378) && Magic_Caytalist == ModItems.CAYTALIST.getItemById(4110)) { if(!worldIn.isRemote) { while (stack.getCount() > 0) { EntityItem item = new EntityItem(worldIn, pos.getX()+0.5F, pos.getY(), pos.getZ()+0.5F, Magic_orb); worldIn.spawnEntity(item); stack.shrink(1); tileentity.removeStackFromSlot(0); tileentity.removeStackFromSlot(1); worldIn.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_FIREWORK_LAUNCH, entity.getSoundCategory(), 0.8F, 0.8F + entity.world.rand.nextFloat() * 0.4F); } } } } } } } return enableStats; } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.