mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
3
.gitignore
vendored
3
.gitignore
vendored
@@ -247,5 +247,6 @@ nbdist/
|
||||
|
||||
**/testDir/
|
||||
|
||||
platforms/**/run/**
|
||||
platforms/fabric/run/**
|
||||
|
||||
platforms/forge/run/**
|
||||
|
||||
@@ -19,9 +19,6 @@ package com.dfsek.terra.fabric;
|
||||
|
||||
import cloud.commandframework.execution.CommandExecutionCoordinator;
|
||||
import cloud.commandframework.fabric.FabricServerCommandManager;
|
||||
|
||||
import com.dfsek.terra.lifecycle.util.RegistryUtil;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import org.slf4j.Logger;
|
||||
@@ -46,6 +43,7 @@ public class FabricEntryPoint implements ModInitializer {
|
||||
commandSender -> (ServerCommandSource) commandSender
|
||||
);
|
||||
|
||||
|
||||
manager.brigadierManager().setNativeNumberSuggestions(false);
|
||||
|
||||
TERRA_PLUGIN.getEventManager().callEvent(new CommandRegistrationEvent(manager));
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.dfsek.terra.fabric.mixin;
|
||||
|
||||
import com.dfsek.terra.lifecycle.util.RegistryUtil;
|
||||
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
|
||||
@Mixin(Registry.class)
|
||||
public class RegistryMixin {
|
||||
@Inject(method = "<clinit>", at = @At("RETURN"))
|
||||
private static void registerTerraGenerators(CallbackInfo ci) {
|
||||
RegistryUtil.register();
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
"package": "com.dfsek.terra.fabric.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
"RegistryMixin"
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.dfsek.terra.api.handle.WorldHandle;
|
||||
|
||||
public class MinecraftWorldHandle implements WorldHandle {
|
||||
|
||||
private static BlockState AIR = null;
|
||||
private static final BlockState AIR = (BlockState) Blocks.AIR.getDefaultState();
|
||||
|
||||
@Override
|
||||
public @NotNull BlockState createBlockState(@NotNull String data) {
|
||||
@@ -46,7 +46,6 @@ public class MinecraftWorldHandle implements WorldHandle {
|
||||
|
||||
@Override
|
||||
public @NotNull BlockState air() {
|
||||
if (AIR == null) AIR = (BlockState) Blocks.AIR.getDefaultState();
|
||||
return AIR;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
"NoiseConfigMixin",
|
||||
"RegistryMixin",
|
||||
"lifecycle.MinecraftServerMixin"
|
||||
],
|
||||
"client": [
|
||||
|
||||
@@ -19,9 +19,6 @@ package com.dfsek.terra.quilt;
|
||||
|
||||
import cloud.commandframework.execution.CommandExecutionCoordinator;
|
||||
import cloud.commandframework.fabric.FabricServerCommandManager;
|
||||
|
||||
import com.dfsek.terra.lifecycle.util.RegistryUtil;
|
||||
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import org.quiltmc.loader.api.ModContainer;
|
||||
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
|
||||
@@ -45,8 +42,7 @@ public class QuiltEntryPoint implements ModInitializer {
|
||||
serverCommandSource -> (CommandSender) serverCommandSource,
|
||||
commandSender -> (ServerCommandSource) commandSender
|
||||
);
|
||||
|
||||
RegistryUtil.register();
|
||||
|
||||
|
||||
manager.brigadierManager().setNativeNumberSuggestions(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user