Skip to content

Commit

Permalink
Merge pull request #57 from sweetrpg/1.20
Browse files Browse the repository at this point in the history
Code cleanup
  • Loading branch information
paulyhedral authored Dec 9, 2024
2 parents 2db89c5 + 3c8418d commit 2cfc510
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 402 deletions.
2 changes: 1 addition & 1 deletion .release-info/1.20/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.12
0.2.13
23 changes: 0 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,11 @@ repositories {
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
// sonatype { // plugin accessor
// }

mavenCentral()
mavenLocal()
// flatDir {
// dirs 'libs'
// }

}

//idea {
// module {
// downloadJavadoc = true
// downloadSources = true
// }
//}

minecraft {
mappings channel: 'official', version: project.mc_version

Expand Down Expand Up @@ -177,11 +164,6 @@ dependencies {

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${jupiter_version}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiter_version}")

// lwjgl {
// version = Release.latest
// implementation Preset.everything
// }
}

// Define a task to create a jar of project sources
Expand Down Expand Up @@ -252,11 +234,6 @@ curseforge {
changelogType = 'markdown'
releaseType = findProperty("curseforge_release_type") ?: 'beta'
addGameVersion project.target_mc_version
// for (String v : project.additional_mc_versions.split(',')) {
// if (v) {
// addGameVersion v
// }
// }
relations {
optionalDependency 'configured'
requiredDependency 'jei'
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/com/sweetrpg/crafttracker/CraftTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import com.sweetrpg.crafttracker.common.config.ConfigHandler;
import com.sweetrpg.crafttracker.common.event.EventHandler;
import com.sweetrpg.crafttracker.common.lib.Constants;
import com.sweetrpg.crafttracker.common.registry.ModRecipeSerializers;
import com.sweetrpg.crafttracker.common.registry.ModRegistries;
import com.sweetrpg.crafttracker.data.CTAdvancementProvider;
import com.sweetrpg.crafttracker.data.CTLangProvider;
import net.minecraft.data.DataGenerator;
Expand Down Expand Up @@ -53,15 +51,6 @@ public CraftTracker() {
modEventBus.addListener(CommonSetup::init);
modEventBus.addListener(this::interModProcess);

// Registries
// ModBlocks.BLOCKS.register(modEventBus);
// ModBlockEntityTypes.TILE_ENTITIES.register(modEventBus);
// ModItems.ITEMS.register(modEventBus);
// ModSerializers.SERIALIZERS.register(modEventBus);
ModRecipeSerializers.RECIPE_SERIALIZERS.register(modEventBus);

modEventBus.addListener(ModRegistries::newRegistry);

IEventBus forgeEventBus = MinecraftForge.EVENT_BUS;
forgeEventBus.addListener(this::serverStarting);
forgeEventBus.addListener(this::registerCommands);
Expand All @@ -71,7 +60,6 @@ public CraftTracker() {
// Client Events
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
modEventBus.addListener(this::clientSetup);
modEventBus.addListener(ClientSetup::addClientReloadListeners);
modEventBus.addListener(ClientSetup::addKeyBindings);

forgeEventBus.register(new ClientEventHandler());
Expand All @@ -94,16 +82,11 @@ public void registerCommands(final RegisterCommandsEvent event) {
public void clientSetup(final FMLClientSetupEvent event) {
LOGGER.debug("Client startup");

ClientSetup.setupScreenManagers(event);

}

protected void interModProcess(final InterModProcessEvent event) {
LOGGER.debug("event {}", event);

// BackwardsComp.init();
// IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

AddonManager.init();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

public class ClientSetup {

public static void setupScreenManagers(final FMLClientSetupEvent event) {
}

public static void addClientReloadListeners(final RegisterClientReloadListenersEvent event) {
}

public static void addKeyBindings(final FMLClientSetupEvent event) {

MinecraftForge.EVENT_BUS.addListener(ClientEventHandler::onScreenInit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.sweetrpg.crafttracker.common.manager.ShoppingListManager;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin;
import mezz.jei.api.registration.*;
import mezz.jei.api.runtime.IJeiRuntime;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
Expand All @@ -24,55 +23,6 @@ public ResourceLocation getPluginUid() {
return new ResourceLocation(Constants.MOD_ID, Constants.JEI_PLUGIN_ID);
}

@Override
public void registerItemSubtypes(ISubtypeRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerItemSubtypes: {}", registration);

}

@Override
public void registerRecipes(IRecipeRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerRecipes: {}", registration);

}

@Override
public void registerIngredients(IModIngredientRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerIngredients: {}", registration);
}

@Override
public void registerCategories(IRecipeCategoryRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerCategories: {}", registration);
}

@Override
public void registerVanillaCategoryExtensions(IVanillaCategoryExtensionRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerVanillaCategoryExtensions: {}", registration);
}

@Override
public void registerRecipeTransferHandlers(IRecipeTransferRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerRecipeTransferHandlers: {}", registration);
}

@Override
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerRecipeCatalysts: {}", registration);
}

@Override
public void registerGuiHandlers(IGuiHandlerRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerGuiHandlers: {}", registration);

}

@Override
public void registerAdvanced(IAdvancedRegistration registration) {
CraftTracker.LOGGER.debug("CTPlugin#registerAdvanced: {}", registration);

}

@Override
public void onRuntimeAvailable(IJeiRuntime jeiRuntime) {
CraftTracker.LOGGER.debug("CTPlugin#onRuntimeAvailable: {}", jeiRuntime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
@Mod.EventBusSubscriber(modid = Constants.MOD_ID)
public class EventHandler {

// @SubscribeEvent
// public void onEntitySpawn(final EntityJoinWorldEvent event) {
// CraftTracker.LOGGER.trace("EventHandler#onEntitySpawn: {}", event);
//
// }

@SubscribeEvent
public void playerLoggedIn(final PlayerLoggedInEvent event) {
CraftTracker.LOGGER.debug("EventHandler#playerLoggedIn: {}", event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ public class Resources {

public static final ResourceLocation SMALL_WIDGETS = getGui("small_widgets");

public static ResourceLocation getEntity(String type, String textureFileName) {
return Util.getResource("textures/entity/" + type + "/" + textureFileName + ".png");
}

public static ResourceLocation getGui(String textureFileName) {
return Util.getResource("textures/gui/" + textureFileName + ".png");
}
Expand Down

This file was deleted.

This file was deleted.

37 changes: 0 additions & 37 deletions src/main/java/com/sweetrpg/crafttracker/common/util/Cache.java

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/com/sweetrpg/crafttracker/common/util/TextUtils.java

This file was deleted.

Loading

0 comments on commit 2cfc510

Please sign in to comment.