Skip 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.

warjort

Members
  • Joined

  • Last visited

Everything posted by warjort

  1. There's like zero chance this is minecraft/forge issue. It's a java program that run's in a java virtual machine. It doesn't even get to talk to the operating system directly, let alone the hardware. minecraft/forge -> java -> operating system -> hardware You should look at your operating system logs to see if it recorded something, e.g. windows event viewer Otherwise, your most likely causes are; An interruption or spike in your power supply Faulty hardware (overheating is only one example of this). But PC support is not really a subject for these forums. ๐Ÿ™‚
  2. I don't think you want to reset the vanilla stat. Some other mod might be using for some other processing. You should make your own stat, something like: // Registration public static final DeferredRegister<ResourceLocation> STATS = DeferredRegister.create(Registry.CUSTOM_STAT_REGISTRY, MODID); public static final RegistryObject<ResourceLocation> MY_PLAY_TIME = STATS.register("my_play_time", () -> new ResourceLocation(MODID, "my_play_time")); @SubscribeEvent public static void tickHandler(TickEvent.PlayerTickEvent event) { if (event.side.isServer() && event.phase == Phase.END) { ServerPlayer player = (ServerPlayer) event.player; ServerStatsCounter stats = player.getStats(); // Increment the stat Stat<ResourceLocation> stat = Stats.CUSTOM.get(MY_PLAY_TIME.get()); player.awardStat(stat); // Check the stat int playTime = stats.getValue(stat); if (playTime >= 200) { player.resetStat(stat); // Your ban code here } } } You obviously need to register the STATS registry like other DeferredRegisters. And you will want to add something to your language file so the stat has a proper description in the stats screen. That way the players can see how long they have until they get banned. ๐Ÿ™‚
  3. @Mod.EventBusSubscriber(modid = MODID, value = Dist.CLIENT) public class ClientEvents { @SubscribeEvent public static void renderCrossHair(RenderGuiOverlayEvent.Pre event) { if (VanillaGuiOverlay.CROSSHAIR.type() == event.getOverlay()) { if (Minecraft.getInstance().player.getItemInHand(InteractionHand.OFF_HAND).is(Items.DIAMOND)) { event.setCanceled(true); } } } } Now put a diamond in your offhand/shield slot. ๐Ÿ™‚
  4. You can use one of those player stats I suggested. Or you can attach a player capability that holds the data. Look at "DataStorage" here: https://forge.gemwire.uk/wiki/Main_Page
  5. The most important part of that code for your question is "timerToKick" and yet you don't show how it is defined? I can deduce it must be a static field somewhere which means every player is updating/checking the same timer. Also, I guess you never tested this code on a client? It would crash on that unchecked cast to a ServerPlayer.
  6. Subscribe to RenderGuiOverlayEvent.Pre and event.setCancel(true) for whatever conditions you want. The overlay you want is: VanillaGuiOverlay.CROSSHAIR
  7. Show what you tried. "It doesn't work" type statements are useless. We are not psychic. ๐Ÿ™‚ I don't know if these are useful to you, but every player has a number of Stats that keep track of durations (in ticks). e.g. Stats.PLAY_TIME or Stats.TIME_SINCE_DEATH You could also make your own Stat using a PlayerTickEvent if these are not what you want.
  8. warjort replied to OmarPR's topic in Modder Support
    Mod File: /C:/Users/compu/AppData/Roaming/.minecraft/mods/AdditionalEnchantedMiner-1.19.2-19.6.jar Failure message: QuarryPlus has class loading errors java.lang.reflect.InvocationTargetException: null Mod Version: 19.6 Mod Issue URL: https://github.com/Kotori316/QuarryPlus/issues Exception message: java.lang.IncompatibleClassChangeError: Method 'net.minecraftforge.eventbus.api.BusBuilder net.minecraftforge.eventbus.api.BusBuilder.builder()' must be Methodref constant If you have the latest versions, you should contact the mod author using that link.
  9. Why would you need that? You just to need make your repository public in the "change visibility" settings. Then post a link to it.
  10. Caused by: java.lang.NoClassDefFoundError: com/simibubi/create/repack/registrate/Registrate at com.github.talrey.createdeco.CreateDecoMod.<init>(CreateDecoMod.java:53) ~[createdeco-1.2.9-1.18.2.jar%2382!/:1.2.9-1.18.2] ... 14 more This is an issue with createdeco. It's probably not up-to-date with the latest changes to create. https://github.com/talrey/CreateDeco/issues/36 https://github.com/Creators-of-Create/Create/issues/3645
  11. For curseforge you need to enable the forge debug.log in the minecraft settings. It will then be in the logs subfolder of the profile folder.
  12. That's a misrepresentation and I think you know it. ๐Ÿ™‚ Isn't having fun the whole point of writing mods? I agree they are 2 different philosophies (which you prefer is a matter of taste): Forge: A one-stop shop for everything you need for modding, concentrating on mod compatibility/correctness Fabric: An a-la-carte (don't pay for what you don't need) approach where the fabric-api concentrates on common use cases and the ecosystem provides more specialised apis, and don't expect it to hold your hand when it comes to writing correct mods Forge itself has something of the a-la-carte with mods like curios, "waila", jei, patchoulli, terrablender, etc. having specialised apis not provided by forge. It's really a matter of where the 2 draw the line. I agree the difference in philosophy makes porting mods more difficult. For the original poster, Litematica are already working on it (but they have been for a while): https://github.com/maruohon/litematica/issues/234
  13. java.lang.ClassCastException: class net.minecraft.client.renderer.CubeMap cannot be cast to class shadows.packmenu.panorama.VariedRenderSkyboxCube (net.minecraft.client.renderer.CubeMap is in module [email protected] of loader 'TRANSFORMER' @1ad1be5d; shadows.packmenu.panorama.VariedRenderSkyboxCube is in module [email protected] of loader 'TRANSFORMER' @1ad1be5d) at shadows.packmenu.PackMenuClient.lambda$load$0(PackMenuClient.java:140) ~[PackMenu-1.18.2-4.1.1.jar%23274!/:4.1.1] {re:classloading} The actual error is in PackMenu. But given the error message, it is likely an earlier problem not shown in the crash report. Post a link to your logs/debug.log
  14. This was fixed in 43.1.2: https://github.com/MinecraftForge/MinecraftForge/issues/8985 https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.1.2/forge-1.19.2-43.1.2-changelog.txt
  15. -- MOD createcurios -- Details: Mod File: /C:/Users/A0001/curseforge/minecraft/Instances/Betta Minecraft/mods/Create-Curios-1.18.2-v1.0.0.jar Failure message: Create Curios (createcurios) encountered an error during the sided_setup event phase java.lang.NoSuchFieldError: GOGGLES Mod Version: 1.0.0 Mod Issue URL: NOT PROVIDED Exception message: java.lang.NoSuchFieldError: GOGGLES Stacktrace: at com.luis.createcurios.goggle.Render.register(Render.java:14) ~[Create-Curios-1.18.2-v1.0.0.jar%23110!/:1.0] {re:classloading,pl:runtimedistcleaner:A} at com.luis.createcurios.goggle.Overlay.onClientSetup(Overlay.java:32) ~[Create-Curios-1.18.2-v1.0.0.jar%23110!/:1.0] {re:classloading} It's an issue with createcurios, it's probably not up-to-date with the recent changes in create, contact the mod author.
  16. I deduce you didn't read what I suggested. ๐Ÿ™‚
  17. You are going to need spend time looking at that wiki. You will just annoy people if you keep asking questions about stuff that is answered there. e.g. your modded item question is answered in the Registration section under @ObjectHolder Since you don't show your code, I have no idea why it gives you 2 items. I can tell you that a debugger will help you understand what is happening. By the way, earlier you posted a screen shot of your code. Don't do this. In some forums posting text as images will get your thread locked or deleted, not here though, people will just complain. ๐Ÿ™‚ You should always post code using <> tool so we can clearly see it and quote it.
  18. These aren't forge/minecraft questions, these are java questions. We don't really answer those here. Knowing java is a prerequisite for minecraft modding. But since one of them is partly minecraft related I will answer them. Your main problem is you are not passing the correct parameter types or not passing parameters at all. (basic java). () -> new PlacedFeature(MY_KELP_CONFIGURED.getHolder().get())))); This constructor takes 2 parameters, you are missing the List of PlacementModifers which is the whole point of this class. You can see what is done for kelp in AquaticPlacements. event.getGeneration().addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MY_KELP_PLACED); This methods wants a PlacedFeature not a RegistryObject<PlacedFeature>, use MY_KELP_PLACED.get() - which gives you the real object.
  19. The /give command is handled by you guessed it the GiveCommand class. ๐Ÿ™‚ You are still going to need the Block.use() method, except instead of dropping the item on the ground, you have to put in the player's inventory. Fortunately for you Forge has you covered. You don't need to copy the code from the GiveCommand, you can use ItemHandlerHelper.giveItemToPlayer(player, itemStack, 0);
  20. I think you are new to java as well. ๐Ÿ™‚ * Your code only runs the client because calling super.use() returns PASS which means you don't want to do anything on the server. * Entity.spawnAtLocation is not a static method, your code won't even compile - you need an instance of an entity, e.g. player.spawnAtLocation() Look at CraftingTableBlock.use() - replace displaying the gui with your code Minecraft's interactions methods use an idiom where they are called twice, first on the client and then if you return SUCCESS it calls the same method on the server. Here's a link to the wiki: https://forge.gemwire.uk/wiki/Main_Page you should at least read about "Understanding sides"
  21. You need a placed feature as well. Feature = the thing that places blocks ConfiguredFeature = Configuration(s) of that feature, e.g. how big an ore vein or which ore PlacedFeature = PlacementModifier(s) that decides where to put it, e.g. cactus goes on sand, diamonds generate at the bottom of the world But more importantly you need a Biome that uses it. To modify vanilla biomes see: https://forge.gemwire.uk/wiki/Biome_Modifiers or before 1.19 you use the BiomeLoadingEvent
  22. look at the code in BanPlayerCommands.banPlayers()
  23. There are many different places in the minecraft code that does this (some more complicated than others). Perhaps the simplest is Containers.dropItemStack() which is used to drop items on the ground when you break a chest or furnace, etc. Another would be Entity.spawnAtLocation() which spawns an Item(Stack) at the entity's location. NOTE: You need do this on the logical server.
  24. That's a feature correct? Continuing the theme of reinventing vanilla ๐Ÿ™‚ Something like (untested code): private static final DeferredRegister<Feature<?>> FEATURES = DeferredRegister.create(Registry.FEATURE_REGISTRY, ExampleMod.MODID); public static final RegistryObject<Feature<NoneFeatureConfiguration>> MY_KELP = FEATURES.register("my_kelp", () -> new KelpFeature(NoneFeatureConfiguration.CODEC)); public static final RegistryObject<ConfiguredFeature<?, ?>> MY_KELP_CONFIGURED = CONFIGURED_FEATURES.register("my_kelp", () -> new ConfiguredFeature<>(MY_KELP.get(), NoneFeatureConfiguration.INSTANCE));
  25. Isn't that trivial? Maybe I don't understand your question. Why you would need your own configured feature for this (it is the same as the vanilla one) unless you intend to use your own/different Feature. public static final RegistryObject<ConfiguredFeature<?, ?>> MY_KELP_CONFIGURED = CONFIGURED_FEATURES.register("my_kelp", () -> new ConfiguredFeature<>(Feature.KELP, NoneFeatureConfiguration.INSTANCE));

Important Information

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

Account

Navigation

Search

Search

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.