Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Add Forge DataFixer.
Unsure how useful this will be, but eh.
Dieser Commit ist enthalten in:
Ursprung
b0777f6b06
Commit
feed5173ec
@ -57,6 +57,7 @@
|
||||
<allow pkg="io.netty.buffer"/>
|
||||
<allow pkg="org.spongepowered.api" />
|
||||
<allow pkg="com.mojang.brigadier" />
|
||||
<allow pkg="com.mojang.datafixers" />
|
||||
</subpackage>
|
||||
|
||||
<subpackage name="sponge">
|
||||
|
2730
worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeDataFixer.java
Normale Datei
2730
worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeDataFixer.java
Normale Datei
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
@ -26,6 +26,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.MultiUserPlatform;
|
||||
import com.sk89q.worldedit.extension.platform.Preference;
|
||||
import com.sk89q.worldedit.world.DataFixer;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.registry.Registries;
|
||||
import net.minecraft.command.Commands;
|
||||
@ -53,11 +54,13 @@ class ForgePlatform extends AbstractPlatform implements MultiUserPlatform {
|
||||
|
||||
private final ForgeWorldEdit mod;
|
||||
private final MinecraftServer server;
|
||||
private final ForgeDataFixer dataFixer;
|
||||
private boolean hookingEvents = false;
|
||||
|
||||
ForgePlatform(ForgeWorldEdit mod) {
|
||||
this.mod = mod;
|
||||
this.server = ServerLifecycleHooks.getCurrentServer();
|
||||
this.dataFixer = new ForgeDataFixer(getDataVersion());
|
||||
}
|
||||
|
||||
boolean isHookingEvents() {
|
||||
@ -75,6 +78,11 @@ class ForgePlatform extends AbstractPlatform implements MultiUserPlatform {
|
||||
return 1631;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataFixer getDataFixer() {
|
||||
return dataFixer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidMobType(String type) {
|
||||
return net.minecraftforge.registries.ForgeRegistries.ENTITIES.containsKey(new ResourceLocation(type));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren