mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-28 07:55:53 +00:00
Use lambdas for short anonymous methods
This commit is contained in:
1 parent
93025510ae
commit
9675585891
16 files changed
+23
-149
No files matched your search
@@ -88,14 +88,10 @@ public class ItemModelMesherForge extends ItemModelMesher
|
||||
models.put(e.getKey(), mods);
|
||||
}
|
||||
final TIntObjectHashMap<IBakedModel> map = mods;
|
||||
e.getValue().forEachEntry(new TIntObjectProcedure<ModelResourceLocation>()
|
||||
e.getValue().forEachEntry((meta, location) ->
|
||||
{
|
||||
@Override
|
||||
public boolean execute(int meta, ModelResourceLocation location)
|
||||
{
|
||||
map.put(meta, manager.getModel(location));
|
||||
return true;
|
||||
}
|
||||
map.put(meta, manager.getModel(location));
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,14 +231,7 @@ public class ForgeGuiFactory implements IModGuiFactory
|
||||
props.add(ForgeModContainer.getConfig().get(VERSION_CHECK_CAT, mod.getModId(), true)); //Get or make the value in the config
|
||||
}
|
||||
props.addAll(values.values()); // Add any left overs from the config
|
||||
Collections.sort(props, new Comparator<Property>()
|
||||
{
|
||||
@Override
|
||||
public int compare(Property o1, Property o2)
|
||||
{
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
}
|
||||
});
|
||||
props.sort(Comparator.comparing(Property::getName));
|
||||
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
list.add(new ConfigElement(global));
|
||||
|
||||
@@ -1145,14 +1145,7 @@ public final class ModelLoader extends ModelBakery
|
||||
* Helper method for registering all itemstacks for given item to map to universal bucket model.
|
||||
*/
|
||||
public static void setBucketModelDefinition(Item item) {
|
||||
ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition()
|
||||
{
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(@Nonnull ItemStack stack)
|
||||
{
|
||||
return ModelDynBucket.LOCATION;
|
||||
}
|
||||
});
|
||||
ModelLoader.setCustomMeshDefinition(item, stack -> ModelDynBucket.LOCATION);
|
||||
ModelBakery.registerItemVariants(item, ModelDynBucket.LOCATION);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user