mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
First draft of Entity Registry re-write.
This commit is contained in:
1 parent
5ac6d374ed
commit
97ea0c4713
14 files changed
+298
-207
No files matched your search
@@ -420,7 +420,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
|
||||
{
|
||||
universalBucket = new UniversalBucket();
|
||||
universalBucket.setUnlocalizedName("forge.bucketFilled");
|
||||
GameRegistry.registerItem(universalBucket, "bucketFilled");
|
||||
GameRegistry.register(universalBucket.setRegistryName("forge", "bucketFilled"));
|
||||
MinecraftForge.EVENT_BUS.register(universalBucket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
/**
|
||||
* Represents a captured snapshot of a block which will not change
|
||||
@@ -150,7 +150,7 @@ public class BlockSnapshot implements Serializable
|
||||
{
|
||||
if (this.replacedBlock == null)
|
||||
{
|
||||
this.replacedBlock = GameRegistry.findBlock(this.getRegistryName().getResourceDomain(), this.getRegistryName().getResourcePath()).getStateFromMeta(getMeta());
|
||||
this.replacedBlock = ForgeRegistries.BLOCKS.getValue(this.getRegistryName()).getStateFromMeta(getMeta());
|
||||
}
|
||||
return this.replacedBlock;
|
||||
}
|
||||
@@ -326,4 +326,4 @@ public class BlockSnapshot implements Serializable
|
||||
public void setWorld(World world) { this.world = world; }
|
||||
public ResourceLocation getRegistryName() { return registryName; }
|
||||
public int getMeta() { return meta; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user