mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fixed the bundle being directly used outside of the registry system.
This commit is contained in:
committed by
IronApollo
parent
53308416ff
commit
26d4ea101e
@ -27,16 +27,25 @@ import com.sk89q.worldedit.world.registry.BundledBlockRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ForgeBlockRegistry extends BundledBlockRegistry {
|
||||
|
||||
private Map<Material, ForgeBlockMaterial> materialMap = new HashMap<>();
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getName(BlockType blockType) {
|
||||
return Block.REGISTRY.getObject(new ResourceLocation(blockType.getId())).getLocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockMaterial getMaterial(BlockType blockType) {
|
||||
return materialMap.computeIfAbsent(Block.getBlockFromName(blockType.getId()).getDefaultState().getMaterial(),
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.forge;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.sk89q.worldedit.blocks.BaseItem;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import com.sk89q.worldedit.world.registry.ItemRegistry;
|
||||
@ -37,5 +38,18 @@ public class ForgeItemRegistry implements ItemRegistry {
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
=======
|
||||
import com.sk89q.worldedit.world.item.ItemType;
|
||||
import com.sk89q.worldedit.world.registry.BundledItemRegistry;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ForgeItemRegistry extends BundledItemRegistry {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getName(ItemType itemType) {
|
||||
return super.getName(itemType); // TODO
|
||||
>>>>>>> b75d5149... Fixed the bundle being directly used outside of the registry system.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user