Compare commits
3 Commits
BOP-1.16.4
...
BOP-1.9.4-
Author | SHA1 | Date |
---|---|---|
Forstride | 1cb0e8008f | |
Forstride | e49990e15b | |
Blay09 | e5569f9090 |
|
@ -8,10 +8,13 @@
|
||||||
|
|
||||||
package biomesoplenty.api.generation;
|
package biomesoplenty.api.generation;
|
||||||
|
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate;
|
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate;
|
||||||
|
|
||||||
|
import java.util.EnumMap;
|
||||||
|
|
||||||
public enum GeneratorStage
|
public enum GeneratorStage
|
||||||
{
|
{
|
||||||
@SerializedName("pre")
|
@SerializedName("pre")
|
||||||
|
@ -66,10 +69,29 @@ public enum GeneratorStage
|
||||||
{
|
{
|
||||||
return this.decorateType;
|
return this.decorateType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final EnumMap<Decorate.EventType, GeneratorStage> decorateTypeMapper = Maps.newEnumMap(Decorate.EventType.class);
|
||||||
|
static
|
||||||
|
{
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.BIG_SHROOM, BIG_SHROOM);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.CACTUS, CACTUS);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.CLAY, CLAY);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.DEAD_BUSH, DEAD_BUSH);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.LILYPAD, LILYPAD);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.FLOWERS, FLOWERS);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.GRASS, GRASS);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.LAKE_WATER, LAKE_WATER);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.LAKE_LAVA, LAKE_LAVA);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.PUMPKIN, PUMPKIN);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.REED, REED);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.SAND, SAND);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.SAND_PASS2, SAND_PASS2);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.SHROOM, SHROOM);
|
||||||
|
decorateTypeMapper.put(Decorate.EventType.TREE, TREE);
|
||||||
|
}
|
||||||
|
|
||||||
public static GeneratorStage mapDecorateType(Decorate.EventType decorateType)
|
public static GeneratorStage mapDecorateType(Decorate.EventType decorateType)
|
||||||
{
|
{
|
||||||
//Somewhat of a hack, requires the ordering of our enum to be the same as the decorate event
|
return decorateType != Decorate.EventType.CUSTOM ? decorateTypeMapper.get(decorateType) : null;
|
||||||
return decorateType != Decorate.EventType.CUSTOM ? GeneratorStage.values()[decorateType.ordinal() + 1] : null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,12 +41,11 @@ public class ItemMudball extends Item
|
||||||
if (!world.isRemote)
|
if (!world.isRemote)
|
||||||
{
|
{
|
||||||
EntityMudball mudball = new EntityMudball(world, player);
|
EntityMudball mudball = new EntityMudball(world, player);
|
||||||
//TODO: replace this
|
mudball.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||||
//mudball.func_184538_a(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F);
|
|
||||||
world.spawnEntityInWorld(mudball);
|
world.spawnEntityInWorld(mudball);
|
||||||
}
|
}
|
||||||
|
|
||||||
player.addStat(StatList.getObjectUseStats(this));
|
player.addStat(StatList.getObjectUseStats(this));
|
||||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue