Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How should i go about this?


AussieTerra
 Share

Recommended Posts

Hi there, please forgive me, this is my first time using forge for developing a little personal visualization for SP (i make these a god-awful lot :S )

 

What i would like help in is figuring out what i need to do differently in order to make my mod work with forge. I have a mod that at the moment just edits base Minecraft classes. (Minecraft.java, GuiIngame.java, RenderGlobal.java) though i assume that working through forge would no longer allow me to do this and get away with it, so how do i go about editing these classes so that they work when it comes to obfuscating, zipping and placing in the mods folder?

 

thank you in advance,

AussieTerra

Link to comment
Share on other sites

That's what i'm after :)

 

I'm extreeemely familiar with extending classes and whatnot to avoid editing base classes however i'm not entirely sure whether Forge and even minecraft structure allows for it. does Forge have a solution to overriding certain parts of a class without editing their base?

Link to comment
Share on other sites

How you read keyboard events with LWJGL is like this:

while (Keyboard.next()) {
   // do stuff with Keyboard.getEventKey() or other Keyboard.getEvent*** methods
}

 

Minecraft does exactly that. FML now adds a hook inside that while loop and fires the KeyEvent. Inside your event handler you can now do whatever you want with the key information.

 

Link to comment
Share on other sites

rendering AABBs and calculating where to render them relative to the player from a list of co-ordinates

 

i've just been reading tutorial after tutorial and they're saying stuff about TickHandlers and whatnot

 

does forge have a magical way of doing that?

Link to comment
Share on other sites

Uh-oh.. i can't register my TickHandler properly :S

 

How do i set it up properly? i've included my code below

 

in the main mod file:

...
public VisualizationsClientProxy proxy;

@EventHandler
public void load(FMLInitializationEvent event)
{	
	proxy.registerClientTickHandler();
                 ...
        }

 

in my proxy file:

public void registerClientTickHandler()
{
	TickRegistry.registerTickHandler(new VisualizationsRenderTickHandler(), Side.CLIENT);
}

 

The tick handle:

import java.util.EnumSet;

import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class VisualizationsRenderTickHandler implements ITickHandler
{

@Override
public void tickStart(EnumSet<TickType> type, Object... tickData) {
	// TODO Auto-generated method stub

}

@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
	// TODO Auto-generated method stub
	System.out.println("TickEnd");

}

@Override
public EnumSet<TickType> ticks() {
	// TODO Auto-generated method stub
	return null;
}

@Override
public String getLabel() {
	// TODO Auto-generated method stub
	return null;
}
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • is there a way to find out which one is broken?
    • [14:10:39] [main/INFO]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 39.0.75, --fml.mcVersion, 1.18.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20211210.034407] [14:10:39] [main/INFO]: ModLauncher 9.1.0+9.1.0+main.6690ee51 starting: java version 17.0.1 by Eclipse Adoptium [14:10:39] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2319!/ Service=ModLauncher Env=SERVER [14:10:40] [main/INFO]: Found mod file AI-Improvements-1.18-0.4.0.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file BetterDungeons-Forge-1.18.1-1.0.1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file BetterMineshafts-Forge-1.18.1-1.0.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file DungeonsArise-1.18.1-2.1.49d-beta.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file FastFurnace-1.18.1-6.0.2.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file FastWorkbench-1.18.1-6.0.1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file ferritecore-4.1.2-forge.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file jmt_mcmt-1.18.1-0.24.2-118-modcore.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file Placebo-1.18.1-6.1.1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file TerraForged-1_18_1.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file Terralith_v2.0.12_Fabric+Forge.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file YungsApi-1.18.1-Forge-26.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:40] [main/INFO]: Found mod file YungsBridges-Forge-1.18.1-1.0.jar of type MOD with locator {mods folder locator at /home/container/mods} [14:10:41] [main/INFO]: Found mod file fmlcore-1.18.1-39.0.75.jar of type LIBRARY with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file javafmllanguage-1.18.1-39.0.75.jar of type LANGPROVIDER with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file mclanguage-1.18.1-39.0.75.jar of type LANGPROVIDER with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file server-1.18.1-20211210.034407-srg.jar of type MOD with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:41] [main/INFO]: Found mod file forge-1.18.1-39.0.75-universal.jar of type MOD with locator net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@7a8fa663 [14:10:48] [main/INFO]: Compatibility level set to JAVA_17 [14:10:48] [main/INFO]: Launching target 'forgeserver' with arguments [] [14:10:49] [main/WARN]: Reference map 'yungsbridges.refmap.json' for yungsbridges.mixins.json could not be read. If this is a development environment you can ignore this message [14:10:50] [main/INFO]: [JMTSUPERTRANS] PalettedContainerReLock Transformer Called [14:10:50] [main/INFO]: [JMTSUPERTRANS] PalettedContainerReLock Transformer Complete [14:10:51] [main/INFO]: [JMTSUPERTRANS] UtilExecutorListingHack Transformer Called [14:10:51] [main/INFO]: [JMTSUPERTRANS] UtilExecutorListingHack Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] TE Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] TE Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] Entity Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] Entity Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldCollections Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldCollections Transformer Ran [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldCollections Transformer Complete [14:10:55] [main/INFO]: [JMTSUPERTRANS] ServerWorldParaProvider Transformer Called [14:10:55] [main/INFO]: [JMTSUPERTRANS] Matched method <init> (Lnet/minecraft/server/MinecraftServer;Ljava/util/concurrent/Executor;Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lnet/minecraft/world/level/storage/ServerLevelData;Lnet/minecraft/resources/ResourceKey;Lnet/minecraft/world/level/dimension/DimensionType;Lnet/minecraft/server/level/progress/ChunkProgressListener;Lnet/minecraft/world/level/chunk/ChunkGenerator;ZJLjava/util/List;Z)V [14:10:56] [main/INFO]: [JMTSUPERTRANS] ServerWorldParaProvider Transformer Complete [14:10:57] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Called [14:10:57] [main/INFO]: [JMTSUPERTRANS] WorldGetTE Transformer Complete [14:10:57] [main/INFO]: [JMTSUPERTRANS] TE Transformer Called [14:10:57] [main/INFO]: [JMTSUPERTRANS] TE Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkPatch Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkPatch Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkNowPatch Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPGetChunkNowPatch Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPTick Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] SCPTick Transformer Complete [14:11:03] [main/INFO]: [JMTSUPERTRANS] ServerWorldTickChunk Transformer Called [14:11:03] [main/INFO]: [JMTSUPERTRANS] ServerWorldTickChunk Transformer Complete [14:11:04] [main/INFO]: [JMTSUPERTRANS] ChunkLoadCache Transformer Called [14:11:06] [main/INFO]: [JMTSUPERTRANS] TemplateManagerHashMap Transformer Called [14:11:06] [main/INFO]: [JMTSUPERTRANS] TemplateManagerHashMap Transformer Ran [14:11:06] [main/INFO]: [JMTSUPERTRANS] TemplateManagerHashMap Transformer Complete [14:11:08] [main/INFO]: [JMTSUPERTRANS] World Transformer Called [14:11:08] [main/INFO]: YOU ARE USING 1.16 - Says coremods (if this is wrong something borked) [14:11:08] [main/INFO]: [JMTSUPERTRANS] FOUND TARGET INSNS [14:11:08] [main/INFO]: [JMTSUPERTRANS] World Transformer Complete [14:11:08] [main/INFO]: [JMTSUPERTRANS] ServerExecutionThread Transformer Called [14:11:08] [main/INFO]: [JMTSUPERTRANS] Not seen adding method [14:11:08] [main/INFO]: [JMTSUPERTRANS] ServerExecutionThread Transformer Complete [14:11:09] [modloading-worker-0/INFO]: Forge mod loading, version 39.0.75, for MC 1.18.1 with MCP 20211210.034407 [14:11:09] [modloading-worker-0/INFO]: MinecraftForge v39.0.75 Initialized [14:11:11] [modloading-worker-0/INFO]: Patching ServerResources#<init> [14:11:11] [modloading-worker-0/INFO]: Loaded seedfix v1.0 by Justsnoopy30! [14:11:12] [modloading-worker-0/INFO]: Environment: [14:11:12] [modloading-worker-0/INFO]: - Dev:       false [14:11:12] [modloading-worker-0/INFO]: - Profiling: false [14:11:12] [modloading-worker-0/INFO]: - Unlimited: false [14:11:12] [modloading-worker-0/INFO]: - Debugging: false [14:11:12] [modloading-worker-0/INFO]: - Data Gen:  false [14:11:12] [modloading-worker-0/INFO]: - Cores:     1 [14:11:12] [modloading-worker-0/INFO]: Set TerraForged API: ForgeCommonAPI [14:11:13] [main/INFO]: Registering world-gen core codecs [14:11:13] [main/INFO]: Registering world-gen component codecs [14:11:13] [main/INFO]: Locking mod world-gen registries [14:11:13] [main/INFO]: Registering world-gen content [14:11:14] [Forge Version Check/INFO]: [jmt_mcmt] Starting version check at https://gitcdn.link/repo/jediminer543/JMT-MCMT/master/etc/update.json [14:11:15] [Forge Version Check/INFO]: [jmt_mcmt] Found status: BETA Current: 0.24.2-118 Target: null [14:11:15] [Forge Version Check/INFO]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json [14:11:15] [main/INFO]: Extracting default datapack to /home/container/config/terraforged/pack-v0 [14:11:15] [main/WARN]: Mod 'terraforged' took 2.934 s to run a deferred task. [14:11:16] [modloading-worker-0/INFO]: Got IMC [] [14:11:16] [Forge Version Check/INFO]: [forge] Found status: OUTDATED Current: 39.0.75 Target: 39.1.0 [14:11:21] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [14:11:21] [main/INFO]: Injecting safe world-gen network codec [14:11:22] [main/INFO]: Injecting world-gen registry defaults [14:11:23] [main/INFO]: Loading world-gen registry content from data [14:11:24] [main/WARN]: Assets URL 'union:/home/container/libraries/net/minecraft/server/1.18.1-20211210.034407/server-1.18.1-20211210.034407-srg.jar%2351!/assets/.mcassetsroot' uses unexpected schema [14:11:24] [main/WARN]: Assets URL 'union:/home/container/libraries/net/minecraft/server/1.18.1-20211210.034407/server-1.18.1-20211210.034407-srg.jar%2351!/data/.mcassetsroot' uses unexpected schema [14:11:24] [main/WARN]: Couldn't get pack info for: net.minecraft.server.packs.ResourcePackFileNotFoundException: 'pack.mcmeta' in ResourcePack './world/datapacks/RPG Mng.zip' [14:11:24] [main/INFO]: Found new data pack file/ExplosionRebuilderDatapack.v2.0.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/ThirtyFangs Kingdom.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/Venturecraft Beta 0.4.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/choicetheorem-overhaul-village-1-18-2-2-8.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/daily-quests-e1041.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/fokastudio-s-ender-expansion-v1-4a-e840.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/incendium-v5-0-3.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/special-mobs-v6-6-spmdpi-3-0.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/splatus-mountain-villages-v1.zip, loading it automatically [14:11:24] [main/INFO]: Found new data pack file/towns-and-towers-structure-overhaul-terralith-1-6.zip, loading it automatically [14:11:25] [main/INFO]: MCMT Registering Commands [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] [14:11:26] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [14:11:26] [main/INFO]: Reloading ResourceManager: Default, YungsApi-1.18.1-Forge-26.jar, BetterDungeons-Forge-1.18.1-1.0.1.jar, jmt_mcmt-1.18.1-0.24.2-118-modcore.jar, FastFurnace-1.18.1-6.0.2.jar, ferritecore-4.1.2-forge.jar, AI-Improvements-1.18-0.4.0.jar, YungsBridges-Forge-1.18.1-1.0.jar, forge-1.18.1-39.0.75-universal.jar, BetterMineshafts-Forge-1.18.1-1.0.jar, Terralith_v2.0.12_Fabric+Forge.jar, TerraForged-1_18_1.jar, FastWorkbench-1.18.1-6.0.1.jar, Placebo-1.18.1-6.1.1.jar, DungeonsArise-1.18.1-2.1.49d-beta.jar, ExplosionRebuilderDatapack.v2.0.zip, ThirtyFangs Kingdom.zip, Venturecraft Beta 0.4.zip, choicetheorem-overhaul-village-1-18-2-2-8.zip, daily-quests-e1041.zip, fokastudio-s-ender-expansion-v1-4a-e840.zip, incendium-v5-0-3.zip, special-mobs-v6-6-spmdpi-3-0.zip, splatus-mountain-villages-v1.zip, towns-and-towers-structure-overhaul-terralith-1-6.zip [14:11:26] [main/WARN]: ResourcePack: ignored non-lowercase namespace: .DS_Store in ./world/datapacks/Venturecraft Beta 0.4.zip [14:11:53] [Worker-Main-2/INFO]: Loaded 7 recipes [14:11:55] [Worker-Main-2/INFO]: Registered 0 additional loot tables. [14:11:56] [Worker-Main-2/INFO]: Loaded 1276 advancements [14:11:56] [Worker-Main-2/INFO]: Registered 0 additional recipes. [14:11:58] [main/FATAL]: Failed to start the minecraft server com.google.gson.JsonParseException: Error loading registry data: Not a valid resource location: #minecraft:infiniburn_end Non [a-z0-9_.-] character in namespace of location: #minecraft:infiniburn_end     at net.minecraft.core.RegistryAccess.m_175498_(RegistryAccess.java:156) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]     at net.minecraft.core.RegistryAccess.m_175503_(RegistryAccess.java:155) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.core.RegistryAccess.m_175500_(RegistryAccess.java:146) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.resources.RegistryReadOps.m_195841_(RegistryReadOps.java:37) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.resources.RegistryReadOps.m_179866_(RegistryReadOps.java:31) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at net.minecraft.server.Main.main(Main.java:161) ~[server-1.18.1-20211210.034407-srg.jar%2351!/:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]     at net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$launchService$0(CommonServerLaunchHandler.java:46) ~[fmlloader-1.18.1-39.0.75.jar%2323!/:?]     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.0.jar%235!/:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]   I dont know if this is what you wanted but its the only I could find
    • Mr. diesieben07 und Mr. Luis_ST. Ich danke Ihnen für Ihre Geduld. Erst jetzt habe ich gelernt, dass "Listen Events" als Parameter zurückgegeben werden, also habe ich auch gelernt, dass man Methoden direkt mit Parametern aufrufen kann. Ich stelle den Ereigniscode zur Verfügung, weil es sich um ein geringfügiges Problem handelt und ich ein sehr schlechter Fragesteller wäre, wenn Sie auch für dieses Problem den Ereigniscode selbst durchgehen müssten. Ich verwende derzeit ein Übersetzungsgerät, um mit Ihnen zu kommunizieren, daher werden viele Wörter nicht klar und deutlich zu verstehen sein, und ich entschuldige mich für etwaige Missverständnisse. Ich bin Ihnen beiden dankbar, dass Sie sich trotz Ihres vollen Terminkalenders die Zeit genommen haben, um meine Fragen zu beantworten. Ich gebe Ihnen beiden ein Dankeschön, um meine Dankbarkeit auszudrücken. Ich danke Ihnen nochmals. :):)
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.