Examples of WeightedMobSpawnGroup


Examples of com.khorn.terraincontrol.configuration.WeightedMobSpawnGroup

{

    @Test
    public void testSerialization() throws InvalidConfigException
    {
        WeightedMobSpawnGroup creeperGroup = new WeightedMobSpawnGroup("Creeper", 10, 3, 5);
        WeightedMobSpawnGroup sheepGroup = new WeightedMobSpawnGroup("Sheep", 5, 1, 3);
        List<WeightedMobSpawnGroup> groups = Arrays.asList(creeperGroup, sheepGroup);
        assertEquals(groups, fromJson(toJson(groups)));
    }
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WeightedMobSpawnGroup

    }

    @Test
    public void testValues()
    {
        WeightedMobSpawnGroup creeperGroup = new WeightedMobSpawnGroup("Creeper", 10, 3, 5);

        assertEquals("Creeper", creeperGroup.mob);
        assertEquals(10, creeperGroup.weight);
        assertEquals(3, creeperGroup.min);
        assertEquals(5, creeperGroup.max);

        assertEquals(creeperGroup.mob, creeperGroup.getConfigName());
        assertEquals(creeperGroup.weight, creeperGroup.getWeight());
        assertEquals(creeperGroup.min, creeperGroup.getMin());
        assertEquals(creeperGroup.max, creeperGroup.getMax());
    }
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WeightedMobSpawnGroup

     */
    @Test
    public void testRoundtrip()
    {
        List<WeightedMobSpawnGroup> groups = Arrays.asList(
                new WeightedMobSpawnGroup("Cow", 10, 2, 5),
                new WeightedMobSpawnGroup("Chicken", 8, 3, 6)
                );
        assertEquals(groups, fromMinecraftList(toMinecraftlist(groups)));
    }
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WeightedMobSpawnGroup

     * @param biomeMeta Minecraft's type.
     * @return Our type.
     */
    private static WeightedMobSpawnGroup fromMinecraftGroup(BiomeGenBase.SpawnListEntry biomeMeta)
    {
        return new WeightedMobSpawnGroup(fromMinecraftClass(biomeMeta.entityClass), biomeMeta.itemWeight, biomeMeta.minGroupCount, biomeMeta.maxGroupCount);
    }
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WeightedMobSpawnGroup

     * @param biomeMeta Minecraft's type.
     * @return Our type.
     */
    private static WeightedMobSpawnGroup fromMinecraftGroup(BiomeMeta biomeMeta)
    {
        return new WeightedMobSpawnGroup(fromMinecraftClass(biomeMeta.b), getWeight(biomeMeta), biomeMeta.c, biomeMeta.d);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.