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.

LeeCrafts

Members
  • Joined

  • Last visited

Everything posted by LeeCrafts

  1. My solution is in the code below. Please let me know if there is a better way. // client events @Mod.EventBusSubscriber(modid = ExampleMod.MODID, value = Dist.CLIENT) public static class ClientForgeEvents { // To attack with the hammer, the player must hold left click for CHARGE_LIMIT ticks, and then let go. // A capability is attached to LocalPlayers to store the hammer charge time. // Uncomment the commented lines if you want the attack indicator bar to fill while the hammer attack is charged. // However, you would need access transformers for this. It becomes even more necessary to modify the LivingEntity::attackStrengthTicker field when the packet is sent to the server (see the packet class below). @SubscribeEvent public static void clientTick(TickEvent.ClientTickEvent event) { if (event.phase == TickEvent.Phase.END) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null) { localPlayer.getCapability(ModCapabilities.PLAYER_CAPABILITY).ifPresent(iPlayerCap -> { PlayerCap playerCap = (PlayerCap) iPlayerCap; boolean leftMouse = Minecraft.getInstance().mouseHandler.isLeftPressed(); boolean holdingHammer = localPlayer.getMainHandItem().getItem() == ModItems.HAMMER_THING.get(); if (!holdingHammer || !leftMouse) { if (!leftMouse) { if (playerCap.hammerCharge >= CHARGE_LIMIT) { localPlayer.swing(InteractionHand.MAIN_HAND); // If an entity is in reach, it'll be hit by the hammer attack (see packet class below) HitResult hitResult = Minecraft.getInstance().hitResult; if (hitResult != null && hitResult.getType() == HitResult.Type.ENTITY) { int entityId = ((EntityHitResult) hitResult).getEntity().getId(); PacketHandler.INSTANCE.sendToServer(new ServerboundHammerThingAttackPacket(entityId)); } } } playerCap.hammerCharge = 0; // if (holdingHammer) localPlayer.attackStrengthTicker = CHARGE_LIMIT; } else { playerCap.hammerCharge = Math.min(CHARGE_LIMIT, playerCap.hammerCharge + 1); // localPlayer.attackStrengthTicker = playerCap.hammerCharge; } }); } } } // cancels vanilla mining and swinging mechanics when player presses left click while holding hammer @SubscribeEvent public static void inputEvent(InputEvent.InteractionKeyMappingTriggered event) { if (event.isAttack()) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null && localPlayer.getMainHandItem().getItem() == ModItems.HAMMER_THING.get()) { event.setSwingHand(false); event.setCanceled(true); } } } } // packet class public class ServerboundHammerThingAttackPacket { public final int targetId; public ServerboundHammerThingAttackPacket(int targetId) { this.targetId = targetId; } public ServerboundHammerThingAttackPacket(FriendlyByteBuf buffer) { this(buffer.readInt()); } public void encode(FriendlyByteBuf buffer) { buffer.writeInt(this.targetId); } public void handle(Supplier<NetworkEvent.Context> ctx) { ctx.get().enqueueWork(() -> { ServerPlayer sender = ctx.get().getSender(); if (sender != null) { // This line is necessary. Otherwise attackStrengthTicker would be 0, making the attack very weak. // attackStrengthTicker must be set server side, hence the server bound packet. sender.attackStrengthTicker = CHARGE_LIMIT; Entity entity = sender.level.getEntity(this.targetId); if (entity != null) { sender.attack(entity); } } }); ctx.get().setPacketHandled(true); } } // and finally, the packet handler class public class PacketHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel( new ResourceLocation(ExampleMod.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); private PacketHandler() { } public static void init() { int index = 0; INSTANCE.messageBuilder(ServerboundHammerThingAttackPacket.class, index++, NetworkDirection.PLAY_TO_SERVER) .encoder(ServerboundHammerThingAttackPacket::encode).decoder(ServerboundHammerThingAttackPacket::new) .consumerMainThread(ServerboundHammerThingAttackPacket::handle).add(); } } (btw if you think the (first person) item animations are a bit awkward, I recommend you to look at this: https://forge.gemwire.uk/wiki/Custom_Item_Animations)
  2. Yes, true. That's the challenge I believe. The weapon I'm trying to make is supposed to be heavy hammer, and I would think it would be a bit unfitting if I had to use right-click to attack with a melee weapon.
  3. Thanks, I was just hoping there would be an easier way (e.g. using methods like Item::releaseUsing), but I guess I'm gonna have to manually implement events and capabilities (and possibly sync the data to the server because the mouse handler is client side). To be honest, not THAT much different, but more difficult regardless because I have to track if left click is held, not right click. And there does not seem to be any vanilla methods in the Item class / IForgeItem interface that tracks if left click is held down.
  4. I would like to implement a weapon with a unique attack mechanic. When the left click is held, the weapon starts charging. The weapon deals damage when left click is released. How do I do this? Should I use the LeftClickBlock and LeftClickEmpty events?
  5. Found the solution. I had to discard the vehicle and respawn it whenever its passenger dismounts it. Edit: MAJOR bug has been fixed. If logging out while riding the vehicle, the (player) passenger "dismounts" it, and calling Entity::discard does not actually work for some reason. The vehicle's replacement still gets added to the world, so if the player then rejoins the world, the vehicle gets duplicated. To prevent this bug, we must have an event listener that checks if the player is riding the vehicle while logging out. Therefore, a capability is needed for the vehicle. // Events class @SubscribeEvent public static void playerLogOutEvent(PlayerEvent.PlayerLoggedOutEvent event) { Player player = event.getEntity(); if (!player.level.isClientSide) { if (player.getVehicle() instanceof CustomVehicle customVehicle) { customVehicle.getCapability(ModCapabilities.CUSTOM_VEHICLE_CAPABILITY).ifPresent(iCustomVehicleCap -> { CustomVehicleCap customVehicleCap = (CustomVehicleCap) iCustomVehicleCap; customVehicleCap.playerPassengerHadLoggedOut = true; }); } } } // Custom vehicle class // This method gets called whenever a passenger dismounts the vehicle @Override public @NotNull Vec3 getDismountLocationForPassenger(@NotNull LivingEntity pPassenger) { Vec3 vec3 = super.getDismountLocationForPassenger(pPassenger); this.getCapability(ModCapabilities.CUSTOM_VEHICLE_CAPABILITY).ifPresent(iCustomVehicleCap -> { CustomVehicleCap customVehicleCap = (CustomVehicleCap) iCustomVehicleCap; // As said before, when the player "dismounts" the vehicle by logging off, calling discard() does not actually discard the vehicle for some reason. // Therefore, in this situation, another steed shouldn't replace it. if (!customVehicleCap.playerPassengerHadLoggedOut) { // this line may be slightly different depending on your vehicle entity's constructor CustomVehicle customVehicle = new CustomVehicle(this.getX(), this.getY(), this.getZ(), this.level); customVehicle.setVariant(this.getVariant()); customVehicle.setYRot(this.getYRot()); this.level.addFreshEntity(customVehicle); this.discard(); } else { customVehicleCap.playerPassengerHadLoggedOut = false; } // this.discard(); }); return vec3; } Note: my vehicle only holds 1 passenger. If your custom vehicle can hold multiple passengers, you might need to check if there are any remaining passengers before discarding + replacing your vehicle.
  6. Hello, I have successfully implemented a custom vehicle whose code is slightly based on the vanilla minecraft boat. Unfortunately, my vehicle also shares the same glitch as the boat: when the player dismounts, the vehicle under their feet sometimes gets teleported to another location, causing the player to get stuck and experience a camera "jitter" effect. Through some debugging, I have discovered that the server and client are not always synced regarding the position of the vehicle. Do I need to use a custom packet for this? I tried Entity:syncPacketPositionCodec but to no avail.
  7. In that case, I guess I would have to manually implement the spawning mechanics (e.g. by subscribing to LivingTickEvent). Thank you for your help. 👍
  8. I want my custom mob to spawn high in the sky (like at y-level 192), as it's supposed to be a flying mob. I've noticed that my mob is able to spawn in the air, but only nearby solid blocks at the y-level where I want it to spawn. Here is my code below that listens to the SpawnPlacementRegisterEvent: @SubscribeEvent public static void onSpawnPlacementRegisterEvent(SpawnPlacementRegisterEvent event) { event.register(ModEntityTypes.CUSTOM_MOB.get(), SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CustomMob::checkCustomMobSpawnRules, SpawnPlacementRegisterEvent.Operation.OR); } // (CustomMob::checkCustomMobSpawnRules checks if the BlockPos is in the air)
  9. Solved. I just had to override GeoEntityRenderer::actuallyRender and apply the rotations there. Super.actuallyRender has to be called afterwards (not before). I think that the reason why I had to do this manually is because my CustomProjectileEntity is not a LivingEntity. I looked at the code in the GeoEntityRenderer class, and its rendering methods apply rotations to entity that are LivingEntities. Kinda explains why the custom mob I had also created with GeckoLib had no issue rotating. And there's no need to call updateRotation() because the projectile's rotation is already initialized in Projectile::shoot.
  10. I am implementing a custom projectile that simply goes in a straight line. Nearly everything about my custom projectile works, except the rotation. I want the projectile to rotate in the direction it is going, like an arrow. This is my source code below. public class CustomProjectileEntity extends Projectile implements GeoAnimatable { private double shooterX; private double shooterY; private double shooterZ; // Constructor is placed here; shooterX, shooterY, and shooterZ are initialized public void shoot(LivingEntity target, float velocity) { double xDir = target.getX() - this.shooterX; double yDir = target.getY() - this.shooterY; double zDir = target.getZ() - this.shooterZ; this.shoot(xDir, yDir, zDir, velocity, 0.0f); } public void tick() { super.tick(); // ... Vec3 vec3 = this.getDeltaMovement(); double newX = this.getX() + vec3.x; double newY = this.getY() + vec3.y; double newZ = this.getZ() + vec3.z; this.setDeltaMovement(vec3); // this.updateRotation(); // no need because projectile rotation is already initialized in Projectile::shoot! this.setPos(newX, newY, newZ); } // other methods ... } You can also see that I created this custom entity with GeckoLib. Other than the code above, is there anything I need to change in the Renderer class? public class CustomProjectileRenderer extends GeoEntityRenderer<CustomProjectileEntity> { public CustomProjectileRenderer(EntityRendererProvider.Context renderManager) { super(renderManager, new CustomProjectileModel()); this.shadowRadius = 0.0f; } public @NotNull ResourceLocation getTextureLocation(@NotNull CustomProjectileEntity instance) { return new ResourceLocation(ExampleMod.MODID, "textures/entity/custom_projectile_texture.png"); } // SOLUTION: override GeoEntityRenderer::actuallyRender @Override public void actuallyRender(PoseStack poseStack, CustomProjectileEntity animatable, BakedGeoModel model, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { poseStack.mulPose(Axis.YP.rotationDegrees(animatable.getYRot())); poseStack.mulPose(Axis.XP.rotationDegrees(-animatable.getXRot())); super.actuallyRender(poseStack, animatable, model, renderType, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, red, green, blue, alpha); } }
  11. Haha my bad, thanks. But is there anything I need to do regarding FMLClientSetupEvent?
  12. Do you mean I have to do the registering in FMLClientSetupEvent? If so, would I have to use DeferredRegister<ScreenEvent> or something of the like? So far, I tried subscribing to ScreenEvent.InitScreenEvent.Post and checked if event.getScreen() instanceof PauseScreen, but it didn't seem to work. Maybe it's because I have not registered for the ScreenEvent(s). Code below: @Mod.EventBusSubscriber(modid = GoofyGoober.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) ... public static void onInitScreenEvent(ScreenEvent.InitScreenEvent.Post event) { System.out.println("init screen"); // does not get printed if (event.getScreen() instanceof PauseScreen pauseScreen) { System.out.println("game paused"); // does not get printed either } } ...
  13. Hello, I would like to add a custom setting to the game's GUI pause menu that adjusts the volume of my mod’s custom sounds. More specifically, I want to add to the pre-existing game’s volume settings, and my custom setting would be a slider. How should I get started? Should I look at the SoundOptionsScreen class?
  14. Yea I dunno if it’s a bug or expected behavior, it worked for the 1.18.2 version of my mod though (it’s been a while since I last tested for that version so maybe I should try again lol <- edit: I tested it and the 1.18.2 version works). Anyways, my GitHub repo has like >50 commits…so it’s kind of a good idea to do a shallow clone. 😅 .git keeps track of all history by default.
  15. My bad I that I wasn’t clear enough. It does work fine when I try to join the server as Dev—that is, using ./gradlew runClient. But the error appears when I run a Minecraft launcher with the mod’s .jar file (e.g. putting it in the mods folder). Then when I join the localhost server using an account like Lee_Crafts, I get kicked out instantly and receive those aforementioned errors.
  16. Update: I've tried /op-ing my account and now I have a new error: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(17768) + length(1) exceeds writerIndex(17768): UnpooledHeapByteBuf(ridx: 17768, widx: 17768, cap: 17768/17768) What’s more confusing is that it worked for 1.18.2, before I updated my mod for 1.19.
  17. Hmm, to be honest I do not know how I would reproduce this. But if this worked for you, then it must be a problem from my end. I guess I’ll just re-clone my project and try again
  18. Source code: https://github.com/wleethecoder/Goofy-Goober-Minecraft-Mod/tree/1.19
  19. Log: https://mclo.gs/deeEs09 Error message: Internal Exception: io.netty.handler.codec.DecoderException: VarIntArray with size 112 is bigger than allowed 6 I have no clue how this error is occurring. It happens when I attempt join a dedicated server for my mod (i.e. ./gradlew runServer) via my personal Minecraft account. But strangely enough, I don't experience any issues when I join the server using ./gradlew runClient on another Terminal window. I'm not even sure if this issue relates to my mod at all.
  20. I am personally having trouble with this as well. Like with 1.18.2, I only want simple text to be displayed on the middle of the screen. But I am unsure what Component methods I should use. EDIT: The code below worked for me. player.displayClientMessage(Component.literal(message), true);
  21. I have now tried the other method of downloading the newest MDK for 1.19 and copying the src files over. So far I have tried building without ParchmentMC, and the build succeeded in ~4 mins. But strangely enough, another task "createMcpToSrg" was running for two hours (I eventually stopped it because I felt like it was going nowhere), and it kept printing that same message: 1:44:14 PM: Executing ':createMcpToSrg :createMcpToSrg :createMcpToSrg'... > Configure project : Java: 17.0.2, JVM: 17.0.2+8-LTS-86 (Oracle Corporation), Arch: x86_64 WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula. /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/world/level/LevelReader.java:185: warning: [dep-ann] deprecated item is not annotated with @Deprecated default boolean isAreaLoaded(BlockPos center, int range) { ^ /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/network/FriendlyByteBuf.java:104: warning: [dep-ann] deprecated item is not annotated with @Deprecated public <T> T readWithCodec(Codec<T> p_130058_) { ^ /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/network/FriendlyByteBuf.java:114: warning: [dep-ann] deprecated item is not annotated with @Deprecated public <T> void writeWithCodec(Codec<T> p_130060_, T p_130061_) { ^ /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/world/level/biome/BiomeSpecialEffects.java:216: warning: [removal] BIOME_INFO_NOISE in Biome has been deprecated and marked for removal double d0 = Biome.BIOME_INFO_NOISE.getValue(p_48097_ * 0.0225D, p_48098_ * 0.0225D, false); ^ /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/world/level/levelgen/structure/pieces/StructurePiecesBuilder.java:48: warning: [dep-ann] deprecated item is not annotated with @Deprecated public void moveInsideHeights(RandomSource p_226971_, int p_226972_, int p_226973_) { ^ /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/world/level/levelgen/placement/NoiseBasedCountPlacement.java:34: warning: [removal] BIOME_INFO_NOISE in Biome has been deprecated and marked for removal double d0 = Biome.BIOME_INFO_NOISE.getValue((double)p_226353_.getX() / this.noiseFactor, (double)p_226353_.getZ() / this.noiseFactor, false); ^ /Users/wsl/Downloads/example mod/build/tmp/expandedArchives/forge-1.19-41.0.45_mapped_official_1.19-sources.jar_e563b5d4e301a8df6a6751389455afd1/net/minecraft/world/level/levelgen/placement/NoiseThresholdCountPlacement.java:34: warning: [removal] BIOME_INFO_NOISE in Biome has been deprecated and marked for removal double d0 = Biome.BIOME_INFO_NOISE.getValue((double)p_226356_.getX() / 200.0D, (double)p_226356_.getZ() / 200.0D, false); ^ Expiring Daemon because JVM heap space is exhausted Daemon will be stopped at the end of the build after running out of JVM memory Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Expiring Daemon because JVM heap space is exhausted Should I be worried about this? Currently my game runs without issue.
  22. My changes: buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } // maven { url = 'https://maven.parchmentmc.org' } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true // classpath 'org.parchmentmc:librarian:1.+' } } plugins { id 'eclipse' id 'maven-publish' } apply plugin: 'net.minecraftforge.gradle' //apply plugin: 'org.parchmentmc.librarian.forgegradle' version = '1.18.2-0.0.1' group = 'com.leecrafts.examplemod' archivesBaseName = 'examplemod' java.toolchain.languageVersion = JavaLanguageVersion.of(17) println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: 'official', version: '1.19' ... } ... Output still has same error (but somehow the build is "successful"): https://pastebin.com/YhPZpgaf
  23. Hello, I am trying to update my mod to 1.19 by changing some parameters in the build.gradle file, but the output starts repeatedly printing "Expiring Daemon because JVM heap space is exhausted" upon build. It did not seem to matter when I increased my IDE maximum heap size or my shared build process heap size (e.g. to 4GB), which has left me quite confused. Here is my build.gradle: buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } maven { url = 'https://maven.parchmentmc.org' } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true classpath 'org.parchmentmc:librarian:1.+' } } plugins { id 'eclipse' id 'maven-publish' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.parchmentmc.librarian.forgegradle' version = '1.18.2-0.0.1' group = 'com.leecrafts.examplemod' archivesBaseName = 'examplemod' java.toolchain.languageVersion = JavaLanguageVersion.of(17) println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: 'parchment', version: '1.18.2-2022.03.13-1.19' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' property 'forge.enabledGameTestNamespaces', 'examplemod' mods { examplemod { source sourceSets.main } } } server { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' property 'forge.enabledGameTestNamespaces', 'examplemod' mods { examplemod { source sourceSets.main } } } gameTestServer { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' property 'forge.enabledGameTestNamespaces', 'examplemod' mods { examplemod { source sourceSets.main } } } data { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { examplemod { source sourceSets.main } } } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { } dependencies { minecraft 'net.minecraftforge:forge:1.19-41.0.35' } jar { manifest { attributes([ "Specification-Title" : "examplemod", "Specification-Vendor" : "examplemodsareus", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : "examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } And here is the (very long) output when I run Gradle build: https://pastebin.com/bz2f3aGZ Is there anything else I need to do to fix this?

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.