Jump to content

Strahlend

Members
  • Posts

    10
  • Joined

  • Last visited

Strahlend's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thank you for pointing this out for me. I read something about this but my eyes just glazed over it because I had been dealing with it for so long. The issue was that my laptop was trying to use the integrated graphics processor vs using the dedicated Nvidia GPU. Cheers!
  2. It was working fine, then I reloaded gradle and it stopped working. I tried creating a fresh new project with no extra code and that did the same there. In the spoiler is crash log. I am using IntelliJ and I have already tried updating graphics drivers restarting computer invalidating caches restarting intellij rerunning genIntellijRuns Please let me know what I can do to fix this problem.
  3. Lol yes! Thank you for the tip! I am looking into making an exploding arrow next and noticed that abstract arrows are only created server side as well. I have a lot to learn. 😵
  4. Your answer showed me that I had a bit more to learn but I was able to figure it out! Here is the finished result. Thank you! @Override public boolean onEntityItemUpdate(ItemStack stack, ItemEntity entity) { if (entity.isOnGround()) { entity.level.explode(entity, entity.getX(), entity.getY(0.0625D), entity.getZ(), 4.0F, Explosion.BlockInteraction.BREAK); entity.kill(); } return super.onEntityItemUpdate(stack, entity); }
  5. I want to be able to detect if an item stack is touching a block and which block its touching when the player drops it. I am overloading the dropped by player event on this item. How can I get what the stack is touching / if its falling? Thanks! Edit: I am using Forge Version 1.18.2
  6. I got it working! This was what I ended up with. Thank you for your help. @Override public boolean onBlockDestroyed(ItemStack stack, World worldIn, BlockState state, BlockPos pos, LivingEntity entityLiving) { ItemStack item = new ItemStack(Items.DIAMOND, 1); ItemEntity itemDrop = new ItemEntity(worldIn, pos.getX(), pos.getY(), pos.getZ(), item); if (state.getBlockHardness(worldIn, pos) != 0.0F) { stack.damageItem(0, entityLiving, (entity) -> { entity.sendBreakAnimation(EquipmentSlotType.MAINHAND); }); } worldIn.addEntity(itemDrop); return true; }
  7. Thank you for the reply poopoodice! I guess I don't understand how to create an ItemStack. Could you explain it for me or point in the direction to figure it out?
  8. I am trying to make a sword that will spawn diamonds upon breaking any block. This is my first ever mod and I don't think I am understanding how to spawn objects. I overriding the onBlockDestroyed method and adding the spawnAdditionalDrops method to drop diamonds upon the block breaking. Would someone be able to help me figure out how to set diamonds to be dropped? @Override public boolean onBlockDestroyed(ItemStack stack, World worldIn, BlockState state, BlockPos pos, LivingEntity entityLiving) { IItemProvider provider = new IItemProvider() { @Override public Item asItem() { // I'm not sure whats going on here. return null; } }; ItemStack itemDrop = new ItemStack(provider); if (state.getBlockHardness(worldIn, pos) != 0.0F) { stack.damageItem(100, entityLiving, (entity) -> { entity.sendBreakAnimation(EquipmentSlotType.MAINHAND); state.spawnAdditionalDrops((ServerWorld) worldIn, pos, itemDrop); }); } return super.onBlockDestroyed(stack, worldIn, state, pos, entityLiving); }
  9. Thanks for the reply I found the issue. The launch wrapper was broken causing the error. Here is a link to download the fixed one. https://libraries.minecraft.net/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar This is the file path Feed the Beast Server\libraries\net\minecraft\launchwrapper\1.12 Then replace the launch wrapper with the fixed one and it works.
  10. FTB Beyond Version 1.8.1 Running Minecraft 1.10.2 Here is the server log. I have ran the FTB installer any suggestions will help. Thank you.
×
×
  • Create New...

Important Information

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