Skip to content

Commit

Permalink
make all more pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
nosqd committed Aug 15, 2024
1 parent da94116 commit 91c4f1b
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 64 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# no-limit-minecarts

this is fabric mod for snapshot 24w33a that removes limits on gamerule maxMinecartSpeed

named "fuck my ass" because was made at night lol
<img src="assets/nlm-icon-128-r.png" alt="Icon">

# No Limit Minecarts

> 24w33a Fabric Mod that removes limits for gamerule `maxMinecartSpeed`
## Downloads
> Download from [github releases](https://github.com/nosqd/no-limit-minecarts/releases)
## Why minecarts is slow when speed is max?
> I've noticed that speed of minecart kinda limited when there are no passengers.
## Contributing
> Feel free to contribute, anything, like anything this project started tonight to just have fun with new update.
6 changes: 6 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> Collect all TODO from files to here
- [src/main/java/ru/nosqd/nlm/mixin/IntRuleMixin.java](src/main/java/ru/nosqd/nlm/mixin/IntRuleMixin.java) TODO: find better solution to this.
- [src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java](src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java) TODO: maybe add F3 line
- [src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java](src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java) TODO: maybe add when you set value greater than 1000 show message like "Your gamerules are boosted by no limit minecarts"
- [src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java](src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java) TODO: add notification when you join world without minecart feature flag like "this world can't be boosted by no limit minecarts"
Binary file added assets/nlm-icon-128-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/nlm-icon-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/nlm-icon-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/nlm-icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 0 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ base {
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}

loom {
Expand All @@ -31,13 +26,9 @@ loom {
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.

}

processResources {
Expand All @@ -53,9 +44,6 @@ tasks.withType(JavaCompile).configureEach {
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
Expand All @@ -68,7 +56,6 @@ jar {
}
}

// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
Expand All @@ -77,11 +64,6 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
9 changes: 2 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop

minecraft_version=24w33a
yarn_mappings=24w33a+build.1
loader_version=0.15.11

# Mod Properties
mod_version=1.0.0
maven_group=ru.nosqd.fma
archives_base_name=fma
maven_group=ru.nosqd.nlm
archives_base_name=no-limit-minecarts
18 changes: 0 additions & 18 deletions src/main/java/ru/nosqd/fma/FuckMyAssMod.java

This file was deleted.

20 changes: 20 additions & 0 deletions src/main/java/ru/nosqd/nlm/NoLimitMinecartsMod.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ru.nosqd.nlm;

import net.fabricmc.api.DedicatedServerModInitializer;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

// TODO: maybe add F3 line
// TODO: maybe add when you set value greater than 1000 show message like "Your gamerules are boosted by no limit minecarts"
// TODO: add notification when you join world without minecart feature flag like "this world can't be boosted by no limit minecarts"

public class NoLimitMinecartsMod implements ModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger("no-limit-minecarts");

@Override
public void onInitialize() {
LOGGER.info("Starting No Limit Minecarts mod");
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package ru.nosqd.fma.mixin;
package ru.nosqd.nlm.mixin;

import com.mojang.brigadier.arguments.IntegerArgumentType;
import net.minecraft.resource.featuretoggle.FeatureFlag;
import net.minecraft.resource.featuretoggle.FeatureFlags;
import net.minecraft.resource.featuretoggle.FeatureSet;
import net.minecraft.server.MinecraftServer;
Expand All @@ -10,7 +8,6 @@
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.function.BiConsumer;
Expand All @@ -24,7 +21,7 @@ static GameRules.Type<GameRules.IntRule> create(int initialValue, int min, int m

@Inject(method = "create(IIILnet/minecraft/resource/featuretoggle/FeatureSet;Ljava/util/function/BiConsumer;)Lnet/minecraft/world/GameRules$Type;", at = @At("RETURN"), cancellable = true)
private static void create(int initialValue, int min, int max, FeatureSet featureSet, BiConsumer<MinecraftServer, GameRules.IntRule> biConsumer, CallbackInfoReturnable<GameRules.Type<GameRules.IntRule>> cir) {
// this is shit
// TODO: find better solution to this.
if (featureSet.contains(FeatureFlags.field_52556) && max == 1000) {
cir.setReturnValue(create(initialValue, min, 2147483647, featureSet, biConsumer));
return;
Expand Down
Binary file added src/main/resources/assets/nlm/nlm-icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
{
"schemaVersion": 1,
"id": "fmamod",
"id": "no-limit-minecarts",
"version": "${version}",
"name": "FUCK MY ASS MOD",
"description": "This is an example description! Tell everyone what your mod is about!",
"name": "No Limit Minecarts",
"description": "24w33a Fabric Mod that removes limits for gamerule `maxMinecartSpeed`",
"authors": [
"Me!"
"nosqd",
"bethetka.ru"
],
"contact": {
"homepage": "https://fabricmc.net/",
"sources": "https://github.com/FabricMC/fabric-example-mod"
"homepage": "https://nlm.nosqd.ru/",
"sources": "https://github.com/nosqd/no-limit-minecarts",
"email": "[email protected]"
},
"license": "CC0-1.0",
"icon": "assets/fmamod/icon.png",
"environment": "server",
"icon": "assets/nlm/nlm-icon-64.png",
"environment": "*",
"entrypoints": {
"server": [
"ru.nosqd.fma.FuckMyAssMod"
"main": [
"ru.nosqd.nlm.NoLimitMinecartsMod"
]
},
"mixins": [
"fmamod.mixins.json"
"nlm.mixins.json"
],
"depends": {
"fabricloader": ">=0.15.11",
"minecraft": "*",
"minecraft": "~1.21-alpha.24.33.a",
"java": ">=21"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"required": true,
"package": "ru.nosqd.fma.mixin",
"package": "ru.nosqd.nlm.mixin",
"compatibilityLevel": "JAVA_21",
"mixins": [
"IntRuleMixin"
Expand Down

0 comments on commit 91c4f1b

Please sign in to comment.