mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Update mappings to 09/21 snapshots.
Conflict with getMatrix in ITransformation, so renamed to getMatrixVec.
This commit is contained in:
1 parent
5ed03945a0
commit
94e1a8e0a4
210 files changed
+1052
-978
No files matched your search
@@ -56,6 +56,13 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.Marker;
|
||||
import org.apache.logging.log4j.MarkerManager;
|
||||
|
||||
import net.minecraftforge.registries.IForgeRegistry.AddCallback;
|
||||
import net.minecraftforge.registries.IForgeRegistry.ClearCallback;
|
||||
import net.minecraftforge.registries.IForgeRegistry.CreateCallback;
|
||||
import net.minecraftforge.registries.IForgeRegistry.DummyFactory;
|
||||
import net.minecraftforge.registries.IForgeRegistry.MissingFactory;
|
||||
import net.minecraftforge.registries.IForgeRegistry.ValidateCallback;
|
||||
|
||||
public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRegistryInternal<V>, IForgeRegistryModifiable<V>
|
||||
{
|
||||
public static Marker REGISTRIES = MarkerManager.getMarker("REGISTRIES");
|
||||
@@ -782,7 +789,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setString("K", e.getKey().toString());
|
||||
tag.setInteger("V", e.getValue());
|
||||
tag.setInt("V", e.getValue());
|
||||
ids.add(tag);
|
||||
});
|
||||
data.setTag("ids", ids);
|
||||
@@ -825,21 +832,21 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
return ret;
|
||||
}
|
||||
|
||||
NBTTagList list = nbt.getTagList("ids", 10);
|
||||
NBTTagList list = nbt.getList("ids", 10);
|
||||
list.forEach(e ->
|
||||
{
|
||||
NBTTagCompound comp = (NBTTagCompound)e;
|
||||
ret.ids.put(new ResourceLocation(comp.getString("K")), comp.getInteger("V"));
|
||||
ret.ids.put(new ResourceLocation(comp.getString("K")), comp.getInt("V"));
|
||||
});
|
||||
|
||||
list = nbt.getTagList("aliases", 10);
|
||||
list = nbt.getList("aliases", 10);
|
||||
list.forEach(e ->
|
||||
{
|
||||
NBTTagCompound comp = (NBTTagCompound)e;
|
||||
ret.overrides.put(new ResourceLocation(comp.getString("K")), comp.getString("V"));
|
||||
});
|
||||
|
||||
list = nbt.getTagList("overrides", 10);
|
||||
list = nbt.getList("overrides", 10);
|
||||
list.forEach(e ->
|
||||
{
|
||||
NBTTagCompound comp = (NBTTagCompound)e;
|
||||
@@ -852,10 +859,10 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
ret.blocked.add(i);
|
||||
}
|
||||
|
||||
list = nbt.getTagList("dummied", 10); //10 - NBTTagCompound, Old format. New format is String list. For now we will just merge the old and new. TODO: Remove in 1.13
|
||||
list = nbt.getList("dummied", 10); //10 - NBTTagCompound, Old format. New format is String list. For now we will just merge the old and new. TODO: Remove in 1.13
|
||||
list.forEach(e -> ret.dummied.add(new ResourceLocation(((NBTTagCompound)e).getString("K"))));
|
||||
|
||||
list = nbt.getTagList("dummied", 8); //8 - NBTTagString, New format, less redundant/verbose
|
||||
list = nbt.getList("dummied", 8); //8 - NBTTagString, New format, less redundant/verbose
|
||||
list.forEach(e -> ret.dummied.add(new ResourceLocation(((NBTTagString)e).getString())));
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -71,6 +71,8 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.Marker;
|
||||
import org.apache.logging.log4j.MarkerManager;
|
||||
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException.WrappedPrintStream;
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
* MODDERS SHOULD HAVE NO REASON TO USE THIS CLASS
|
||||
@@ -356,7 +358,7 @@ public class GameData
|
||||
@Override
|
||||
public Block createDummy(ResourceLocation key)
|
||||
{
|
||||
Block ret = new BlockDummyAir(Block.Builder.func_200945_a(Material.AIR));
|
||||
Block ret = new BlockDummyAir(Block.Builder.create(Material.AIR));
|
||||
GameData.forceRegistryName(ret, key);
|
||||
return ret;
|
||||
}
|
||||
@@ -386,7 +388,7 @@ public class GameData
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Block, Item> blockToItem = owner.getSlaveMap(BLOCK_TO_ITEM, Map.class);
|
||||
((ItemBlock)item).func_195946_a(blockToItem, item);
|
||||
((ItemBlock)item).addToBlockToItemMap(blockToItem, item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putObject(ResourceLocation key, V value)
|
||||
public void put(ResourceLocation key, V value)
|
||||
{
|
||||
register(-1, key, value);
|
||||
}
|
||||
@@ -75,14 +75,14 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
|
||||
// Reading Functions
|
||||
@Override
|
||||
@Nullable
|
||||
public V getObject(@Nullable ResourceLocation name)
|
||||
public V get(@Nullable ResourceLocation name)
|
||||
{
|
||||
return this.delegate.getValue(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ResourceLocation getNameForObject(V value)
|
||||
public ResourceLocation getKey(V value)
|
||||
{
|
||||
return this.delegate.getKey(value);
|
||||
}
|
||||
@@ -94,14 +94,14 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIDForObject(@Nullable V value)
|
||||
public int getId(@Nullable V value)
|
||||
{
|
||||
return this.delegate.getID(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public V getObjectById(int id)
|
||||
public V get(int id)
|
||||
{
|
||||
return this.delegate.getValue(id);
|
||||
}
|
||||
@@ -120,7 +120,7 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public V getRandomObject(Random random)
|
||||
public V getRandom(Random random)
|
||||
{
|
||||
Collection<V> values = this.delegate.getValues();
|
||||
return values.stream().skip(random.nextInt(values.size())).findFirst().orElse(null);
|
||||
|
||||
@@ -61,7 +61,7 @@ class NamespacedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamesp
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putObject(ResourceLocation key, V value)
|
||||
public void put(ResourceLocation key, V value)
|
||||
{
|
||||
register(-1, key, value);
|
||||
}
|
||||
@@ -70,14 +70,14 @@ class NamespacedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamesp
|
||||
// Reading Functions
|
||||
@Override
|
||||
@Nullable
|
||||
public V getObject(@Nullable ResourceLocation name)
|
||||
public V get(@Nullable ResourceLocation name)
|
||||
{
|
||||
return this.delegate.getValue(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public ResourceLocation getNameForObject(V value)
|
||||
public ResourceLocation getKey(V value)
|
||||
{
|
||||
return this.delegate.getKey(value);
|
||||
}
|
||||
@@ -89,14 +89,14 @@ class NamespacedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamesp
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIDForObject(@Nullable V value)
|
||||
public int getId(@Nullable V value)
|
||||
{
|
||||
return this.delegate.getID(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public V getObjectById(int id)
|
||||
public V get(int id)
|
||||
{
|
||||
return this.delegate.getValue(id);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ class NamespacedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamesp
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public V getRandomObject(Random random)
|
||||
public V getRandom(Random random)
|
||||
{
|
||||
Collection<V> values = this.delegate.getValues();
|
||||
return values.stream().skip(random.nextInt(values.size())).findFirst().orElse(null);
|
||||
|
||||
Reference in new issue
Block a user