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.

TheElementGuy

Members
  • Joined

  • Last visited

Everything posted by TheElementGuy

  1. Whenever I try to make a new game or load an existing game, it says "Datapack Validation Failed" and it says "Go Back" or "Reset to Default". Every datapack seems not to be working, and I am using the following mods: Forge Just Enough Items Journeymap Ultimate Transport for Minecraft Architectury Mekanism Mekanism Generators Several Ores There is no log because the game isn't crashing. Please help.
  2. I am trying to set up my mod with gradle, but every time I run genVSCodeRuns, I get the error: Could not resolve all files for configuration ':runtimeClasspathCopy'. > Could not find net.minecraftforge:forge:1.19-41.1.0_mapped_official_1.19. Searched in the following locations: - file:/C:/Users/judea/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.19-41.1.0_mapped_official_1.19/forge-1.19-41.1.0_mapped_official_1.19.pom - file:/C:/Users/judea/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.19-41.1.0_mapped_official_1.19/forge-1.19-41.1.0_mapped_official_1.19.jar Required by: project : I don't know how to fix it.
  3. I have a global loot modifier to make zombified piglins drop "bolts", an item in my mod. I can't get the GLM to edit the loot table. Github repo: github.com/JPermSolves/ElementalSwords. Any help would be appreciated
  4. Thank you for the help. I ended up using an if statement to see if it is being called on the server and strike lightning if so.
  5. I have an item and I want to get the ServerLevel. I tried to cast UseOnContext.getLevel() to ServerLevel but that gave an error. I also tried UseOneContext.getPlayer().level but that couldn't cast. The reason I need a ServerLevel is because I am trying to use a lightning bolt. Any help is appreciated.
  6. I have a mod and when I tried to add blocks it said "java.lang.reflect.InvocationTargetException: null" for an error. Code is on github.com/JPermSolves/ElementalSwords. Debug log: https://pastebin.com/KLN16yHr
  7. I made it. The error was fixed.
  8. pastebin.com/a2NUkGWQ whenever I paste the link it just says: debug.log - Pastebin.com.
  9. I did not register the serializer. Thanks.
  10. I have a mod and I want the mod version to be 1.1 so should I change the version in mods.toml, build.gradle Implementation-Version, or build.gradle Specification-Version? I can't tell which one to change.
  11. I am trying to play Minecraft but it has an error. The code is 1. Message is "game ended with bad state". Log: debug.log - Pastebin.com.
  12. I am making a plant sword and I want any mobs hit with it to be stuck in wood. I don't want it to suffocate the mob, so I want to know if a block is in it's hitbox.
  13. Otherwise there is just a mound of powdered snow.
  14. Optional because before I want to set the block, I check if quark is loaded. It works without quark.
  15. I have a mod with an Ice Sword, and I want it to be when you hit something, the surrounding dirt turns to permafrost, a block in Quark. How can I get that mod from the Quark mod? Any help is appreciated.
  16. I made a Global Loot Modifier that doesn't seem to be working. I've probably messed up in the FireSwordInChest.java file. Here is FireSwordInChest.java: package com.juder.elementalswords.event.loot; import com.google.gson.JsonObject; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.common.loot.LootModifier; import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import java.util.List; public class FireSwordFromChestAdditionModifier extends LootModifier { private final Item addition; protected FireSwordFromChestAdditionModifier(LootItemCondition[] conditionsIn, Item addition) { super(conditionsIn); this.addition = addition; } @Nonnull @Override protected List<ItemStack> doApply(List<ItemStack> generatedLoot, LootContext context) { System.out.println("YO!"); generatedLoot.add(new ItemStack(addition, 1)); return generatedLoot; } public static class Serializer extends GlobalLootModifierSerializer<FireSwordFromChestAdditionModifier> { @Override public FireSwordFromChestAdditionModifier read(ResourceLocation name, JsonObject object, LootItemCondition[] conditionsIn) { Item addition = ForgeRegistries.ITEMS.getValue(new ResourceLocation(GsonHelper.getAsString(object, "addition"))); return new FireSwordFromChestAdditionModifier(conditionsIn, addition); } @Override public JsonObject write(FireSwordFromChestAdditionModifier instance) { JsonObject json = makeConditions(instance.conditions); json.addProperty("addition", ForgeRegistries.ITEMS.getKey(instance.addition).toString()); return json; } } } Any help would be appreciated.
  17. I have 3 swords I would like to have generate in chests, but I don't know how to edit vanilla loot tables. The closest thing I could find was a forum page for 1.16.4.
  18. package com.juder.elementalswords.effect; import com.juder.elementalswords.ElementalSwords; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectCategory; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ModEffects { public static final DeferredRegister<MobEffect> MOB_EFFECTS = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, ElementalSwords.MOD_ID); public static final RegistryObject<MobEffect> FREEZE = MOB_EFFECTS.register("freeze", () -> new FreezeEffect(MobEffectCategory.HARMFUL, 3124687)); public static void register(IEventBus eventBus) { MOB_EFFECTS.register(eventBus); } }
  19. I am trying to make a potion called "Freeze" which will freeze a player, but it won't register, and I can't access it. Here is my code: package com.juder.elementalswords.effect; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectCategory; import net.minecraft.world.entity.LivingEntity; public class FreezeEffect extends MobEffect { public FreezeEffect(MobEffectCategory mobEffectCategory, int color) { super(mobEffectCategory, color); } @Override public void applyEffectTick(LivingEntity entity, int amplifier) { // TODO Auto-generated method stub if (!entity.level.isClientSide) { double x = entity.getX(); double y = entity.getY(); double z = entity.getZ(); entity.teleportTo(x, y, z); entity.setDeltaMovement(0, 0, 0); } super.applyEffectTick(entity, amplifier); } @Override public boolean isDurationEffectTick(int duration, int amplifier) { // TODO Auto-generated method stub return true; } }

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.