mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Add Forge DataFixer.
Unsure how useful this will be, but eh.
This commit is contained in:
parent
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">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user