Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DarkNightling

Members
  • Joined

  • Last visited

Everything posted by DarkNightling

  1. Code: package com.github.darkly.rigmodresurrected.block; import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnReason; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.loot.LootContext; import net.minecraft.loot.LootParameters; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; import java.util.Random; import java.util.stream.Collectors; public class EntityBlock extends Block { private final List<EntityType<?>> randomEntities; public EntityBlock() { super(AbstractBlock.Properties.create(Material.IRON).hardnessAndResistance(0.6F)); randomEntities = ForgeRegistries.ENTITIES.getValues().stream() .filter(entityType -> entityType.getClassification() != EntityClassification.MISC) .filter(entityType -> !isProjectileOrBoss(entityType)) .collect(Collectors.toList()); } private boolean isProjectileOrBoss(EntityType<?> entityType) { // Define your logic to identify projectiles and bosses return entityType.equals(EntityType.ENDER_DRAGON) || entityType.equals(EntityType.WITHER); } @Nonnull @Override public ActionResultType onBlockActivated(@Nonnull BlockState state, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull PlayerEntity player, @Nonnull Hand hand, @Nonnull BlockRayTraceResult hit) { if (!world.isRemote && !randomEntities.isEmpty()) { int fortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItem(hand)); spawnRandomEntities(world, pos, fortuneLevel); return ActionResultType.CONSUME; } return ActionResultType.SUCCESS; } private void spawnRandomEntities(World world, BlockPos pos, int fortuneLevel) { Random random = new Random(); int numberOfEntities = 1 + random.nextInt(fortuneLevel + 1); for (int i = 0; i < numberOfEntities; i++) { EntityType<?> entityType = randomEntities.get(random.nextInt(randomEntities.size())); if (entityType != null && entityType.create(world) != null) { entityType.spawn((ServerWorld) world, null, null, pos.up(), SpawnReason.SPAWNER, true, false); } } } @Override public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) { ItemStack tool = builder.get(LootParameters.TOOL); if (tool != null && EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) { return Collections.singletonList(new ItemStack(this)); } return super.getDrops(state, builder); } } errors: EntityBlock.java S problems A Overrides deprecated method in 'net.minecraft.block.AbstractBlock' :48 A Not annotated method overrides method annotated with @MethodsReturnNonnullByDefault :69 A Overrides deprecated method in 'net.minecraft.block.AbstractBlock' :69 A Not annotated parameter overrides @ParametersAreNonnullByDefault parameter :69 A 'getDrops(net.minecraft.block.BlockState, net.minecraft.loot.LootContext.Builder)' is deprecated :74
  2. file:///C:/Users/Diamo/curseforge/minecraft/Instances/modded%20oneblock%20skyblock%20test/logs/debug.log file:///C:/Users/Diamo/curseforge/minecraft/Instances/modded%20oneblock%20skyblock%20test/logs/latest.log
  3. debug.log = https://bytebin.lucko.me/Iautk0FAIr latest.log = https://bytebin.lucko.me/VrTTBjmsTW
  4. crash report: https://gist.github.com/Rubyz67/8c27315e6b29f027e5cf95c5881ce2d7 debug.log: https://gist.github.com/Rubyz67/302c2c6a0a274929cf627ff72c06c65e latest.log: https://gist.github.com/Rubyz67/da8f089755d9a9f691c49f9f59738757
  5. debug.log https://gist.github.com/Rubyz67/7b795bb3005960d0ff0421d006137ff5
  6. crashing every time i load my world crash-2021-08-14_17.49.04-client.txt
  7. its the debug thats all u need the full log has other stuff in it
  8. when i play in my world it crashes after a few min debug log: https://gist.github.com/Rubyz67/572b0c6707510e2ac8d0b234e61efd83
  9. i never got a problem before but ever since i updated 10+ mods it started happening about 4 days ago here is the debug log: https://gist.github.com/Rubyz67/99ae14f6f2853d4e8a787a99c725ad58
  10. These mods worked before and now they dont what happend plz help https://drive.google.com/file/d/1ZY11Ks_YgVcUSy7-zFH7HqIagXNanmKB/view?usp=sharing modpack open is curseforge: https://drive.google.com/file/d/1ct-nESZEeOjTQdena3JVIj7Xmkoqk-n6/view?usp=sharing
  11. i think it broke i played on this world for over 4 months
  12. no offense but i need help not a repeat of my story
  13. https://discord.gg/moddedmc the server for the links above ^^^
  14. for the attachments in the modded mc discord server https://discord.com/channels/166630061217153024/254806806516203520/870236060511240252 https://discord.com/channels/166630061217153024/254806806516203520/870236162537713714
  15. for the attachments in the modded mc discord server https://discord.com/channels/166630061217153024/254806806516203520/870236060511240252 https://discord.com/channels/166630061217153024/254806806516203520/870236162537713714
  16. here is the debug log and screenshots of mods i recently updated Screen Shot 2021-07-29 at 5.22.20 AM.png debug.log.zip

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.