Added own Space Stone
This commit is contained in:
parent
81fe7f456c
commit
d862acc910
|
@ -1,6 +1,7 @@
|
|||
package anvil.infinity.compat;
|
||||
|
||||
import anvil.infinity.abilities.*;
|
||||
import lucraft.mods.heroesexpansion.abilities.AbilityBlackHole;
|
||||
import lucraft.mods.heroesexpansion.abilities.AbilityForceField;
|
||||
import lucraft.mods.heroesexpansion.abilities.AbilityGrabEntity;
|
||||
import lucraft.mods.heroesexpansion.abilities.AbilityPortal;
|
||||
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
|
||||
|
@ -13,4 +14,18 @@ public class HELoadedProxy implements HEProxy {
|
|||
return new AbilityGrabEntity(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability getAbilityPortal(EntityLivingBase entity) {
|
||||
return new AbilityPortal(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability getAbilityForcefield(EntityLivingBase entity) {
|
||||
return new AbilityForceField(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability getAbilityBlackhole(EntityLivingBase entity) {
|
||||
return new AbilityBlackHole(entity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,4 +11,18 @@ public class HENotLoadedProxy implements HEProxy {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability getAbilityForcefield(EntityLivingBase entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability getAbilityPortal(EntityLivingBase entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability getAbilityBlackhole(EntityLivingBase entity) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,4 +7,10 @@ public interface HEProxy {
|
|||
|
||||
Ability getAbilityGrabEntity(EntityLivingBase entity);
|
||||
|
||||
Ability getAbilityPortal(EntityLivingBase entity);
|
||||
|
||||
Ability getAbilityForcefield(EntityLivingBase entity);
|
||||
|
||||
Ability getAbilityBlackhole(EntityLivingBase entity);
|
||||
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ public class ConfigHandler {
|
|||
mindStoneShine = config.getInt("Mind Stone shine", colorcat, 0xDAFF0A, 0x000000, 0xFFFFFF, "Shine color of the Mind Stone");
|
||||
soulStoneColor = config.getInt("Soul Stone color", colorcat, 0xDE7300, 0x000000, 0xFFFFFF, "Color of the Soul Stone");
|
||||
soulStoneShine = config.getInt("Soul Stone shine", colorcat, 0xFF8B00, 0x000000, 0xFFFFFF, "Shine color of the Soul Stone");
|
||||
spaceStoneColor = config.getInt("Space Stone color", colorcat, 0x0255ff, 0x000000, 0xFFFFFF, "Color of the Space Stone");
|
||||
spaceStoneShine = config.getInt("Space Stone shine", colorcat, 0x6ac5ff, 0x000000, 0xFFFFFF, "Shine color of the Space Stone");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package anvil.infinity.items;
|
||||
|
||||
import anvil.infinity.compat.CompatHandler;
|
||||
import anvil.infinity.helpers.GauntelHelper;
|
||||
import lucraft.mods.lucraftcore.infinity.EnumInfinityStone;
|
||||
import lucraft.mods.lucraftcore.infinity.ModuleInfinity;
|
||||
import lucraft.mods.lucraftcore.infinity.items.ItemInfinityStone;
|
||||
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
|
||||
import lucraft.mods.lucraftcore.util.abilitybar.EnumAbilityBarColor;
|
||||
import lucraft.mods.lucraftcore.util.helper.StringHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
public class ItemSpaceStone extends ItemInfinityStone {
|
||||
|
||||
public ItemSpaceStone(String name) {
|
||||
this.setTranslationKey(name);
|
||||
this.setRegistryName(StringHelper.unlocalizedToResourceName(name));
|
||||
this.setCreativeTab(ModuleInfinity.TAB);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumInfinityStone getType() {
|
||||
return EnumInfinityStone.SPACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContainer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability.AbilityMap addStoneAbilities(EntityLivingBase entity, Ability.AbilityMap abilities, Ability.EnumAbilityContext context) {
|
||||
|
||||
if (CompatHandler.isHeroesExpansion) {
|
||||
abilities.put("portal", CompatHandler.HeroesExpension.getAbilityPortal(entity).setDataValue(Ability.BAR_COLOR, EnumAbilityBarColor.LIGHT_BLUE));
|
||||
abilities.put("grab_entity", CompatHandler.HeroesExpension.getAbilityGrabEntity(entity).setDataValue(Ability.BAR_COLOR, EnumAbilityBarColor.LIGHT_BLUE));
|
||||
abilities.put("forcefield", CompatHandler.HeroesExpension.getAbilityForcefield(entity).setMaxCooldown(60).setDataValue(Ability.BAR_COLOR, EnumAbilityBarColor.LIGHT_BLUE));
|
||||
|
||||
if (GauntelHelper.hasPowerStone(entity)) {
|
||||
abilities.put("blackhole", CompatHandler.HeroesExpension.getAbilityBlackhole(entity).setMaxCooldown(6000).setDataValue(Ability.BAR_COLOR, EnumAbilityBarColor.LIGHT_BLUE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return super.addStoneAbilities(entity, abilities, context);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@ public class Items {
|
|||
public static Item REALITY_STONE = new ItemRealityStone("reality_stone");
|
||||
public static Item SOUL_STONE = new ItemSoulStone("soul_stone");
|
||||
public static Item TIME_STONE = new ItemTimeStone("time_stone");
|
||||
public static Item SPACE_STONE = new ItemSpaceStone("space_stone");
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onRegisterItems(RegistryEvent.Register<Item> e) {
|
||||
|
@ -32,6 +33,7 @@ public class Items {
|
|||
e.getRegistry().register(REALITY_STONE);
|
||||
e.getRegistry().register(SOUL_STONE);
|
||||
e.getRegistry().register(TIME_STONE);
|
||||
e.getRegistry().register(SPACE_STONE);
|
||||
|
||||
}
|
||||
|
||||
|
@ -45,6 +47,7 @@ public class Items {
|
|||
REALITY_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.realityStoneColor), new Color(ConfigHandler.realityStoneShine)));
|
||||
SOUL_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.soulStoneColor), new Color(ConfigHandler.soulStoneShine)));
|
||||
TIME_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.timeStoneColor), new Color(ConfigHandler.timeStoneShine)));
|
||||
SPACE_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.spaceStoneColor), new Color(ConfigHandler.spaceStoneShine)));
|
||||
|
||||
|
||||
ItemHelper.registerItemModel(POWER_STONE, Infinity.MOD_ID, "power_stone");
|
||||
|
@ -52,6 +55,7 @@ public class Items {
|
|||
ItemHelper.registerItemModel(REALITY_STONE, Infinity.MOD_ID, "reality_stone");
|
||||
ItemHelper.registerItemModel(SOUL_STONE, Infinity.MOD_ID, "soul_stone");
|
||||
ItemHelper.registerItemModel(TIME_STONE, Infinity.MOD_ID, "time_stone");
|
||||
ItemHelper.registerItemModel(SPACE_STONE, Infinity.MOD_ID, "space_stone");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ item.reality_stone.name=Realitätsstein
|
|||
item.soul_stone.name=Seelenstein
|
||||
item.time_stone.name=Zeitstein
|
||||
item.mind_stone.name=Gedankenstein
|
||||
item.space_stone.name=Raumstein
|
||||
infinity.snap.text=Du hättest auf den Kopf zielen sollen.
|
||||
infinity.snap.death=zerfiel zu Staub
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ item.reality_stone.name=Reality Stone
|
|||
item.soul_stone.name=Soul Stone
|
||||
item.time_stone.name=Time Stone
|
||||
item.mind_stone.name=Mind Stone
|
||||
item.space_stone.name=Space Stone
|
||||
infinity.snap.text=You should have gone for the head.
|
||||
infinity.snap.irontext=And I am ... Iron Man
|
||||
infinity.snap.death=was dusted away
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"parent": "builtin/entity",
|
||||
"display": {
|
||||
"gui": {
|
||||
"rotation": [ 30, 45, 0 ],
|
||||
"translation": [ 0, 3, 0],
|
||||
"scale":[ 3, 3, 3 ]
|
||||
},
|
||||
"ground": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 0, 0],
|
||||
"scale":[ 1, 1, 1 ]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 0, 0],
|
||||
"scale":[ 1, 1, 1 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 2, 0],
|
||||
"scale":[ 2, 2, 2 ]
|
||||
},
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 45, 0, 0 ],
|
||||
"translation": [ 0, 0, 0],
|
||||
"scale":[ 1, 1, 1 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 45, 0, 0 ],
|
||||
"translation": [ 0, 0, 0],
|
||||
"scale":[ 1, 1, 1 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 5, 0],
|
||||
"scale":[ 1, 1, 1 ]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 5, 0],
|
||||
"scale":[ 1, 1, 1 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue