3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Add Forge DataFixer.

Unsure how useful this will be, but eh.
Dieser Commit ist enthalten in:
wizjany 2019-05-17 19:39:18 -04:00
Ursprung b0777f6b06
Commit feed5173ec
3 geänderte Dateien mit 2739 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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">

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -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));