Skip to content

Commit 63bf9eb

Browse files
committed
Version 1.1.2
Added Cold Aercloud Material Added Blue Aercloud Material Added Golden Aercloud Material Added Candy Cane Material Added Cushy Trait Added Festive Trait Modified Enlightened Trait to also have a chance to drop Ambrosium on kills Modified Valkyrie Material's tool parts and tools appearance Fixed Reach Trait's extended block reach never going away if you log out with it active
1 parent 8577ed6 commit 63bf9eb

File tree

12 files changed

+180
-2
lines changed

12 files changed

+180
-2
lines changed

src/main/java/shnupbups/tinkersaether/config/TAConfig.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ public class TAConfig extends Configuration {
4040
@Config.RequiresMcRestart
4141
public static boolean swet = true;
4242

43+
@Config.Comment("Whether Candy Cane is enabled or not.")
44+
@Config.RequiresMcRestart
45+
public static boolean candycane = true;
46+
47+
@Config.Comment("Whether Blue Aercloud is enabled or not.")
48+
@Config.RequiresMcRestart
49+
public static boolean aercloudBlue = true;
50+
51+
@Config.Comment("Whether Cold Aercloud is enabled or not.")
52+
@Config.RequiresMcRestart
53+
public static boolean aercloudCold = true;
54+
55+
@Config.Comment("Whether Gold Aercloud is enabled or not.")
56+
@Config.RequiresMcRestart
57+
public static boolean aercloudGold = true;
58+
4359
@Config.Comment("Whether Darts and Dart Shooters are enabled or not.")
4460
@Config.RequiresMcRestart
4561
public static boolean darts = true;

src/main/java/shnupbups/tinkersaether/misc/OreDict.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,12 @@ public static void register() {
1616
OreDictionary.registerOre("gemGoldenAmber",ItemsAether.golden_amber);
1717
OreDictionary.registerOre("slimeball",ItemsAether.swetty_ball);
1818
OreDictionary.registerOre("slimeballSwet",ItemsAether.swetty_ball);
19+
OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,0));
20+
OreDictionary.registerOre("aercloudCold",new ItemStack(BlocksAether.aercloud,1,0));
21+
OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,1));
22+
OreDictionary.registerOre("aercloudBlue",new ItemStack(BlocksAether.aercloud,1,1));
23+
OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,2));
24+
OreDictionary.registerOre("aercloudGold",new ItemStack(BlocksAether.aercloud,1,2));
25+
OreDictionary.registerOre("candyCane",ItemsAether.candy_cane);
1926
}
2027
}

src/main/java/shnupbups/tinkersaether/modules/ModuleBase.java

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public ModuleBase() {
4343
public static final Material gravitite = Materials.mat("gravitite", 0xCC55AA);
4444
public static final Material valkyrie = Materials.mat("valkyrie", 0xEEEEDD);
4545
public static final Material swet = Materials.mat("swet", 0x29A6D9);
46+
public static final Material candycane = Materials.mat("candycane", 0xFF3333);
47+
public static final Material aercloudBlue = Materials.mat("aercloudBlue", 0x99B2C2);
48+
public static final Material aercloudCold = Materials.mat("aercloudCold", 0xAAAAAA);
49+
public static final Material aercloudGold = Materials.mat("aercloudGold", 0xFFF1A1);
4650

4751
public static final TAItem valkyrieIngot = new TAItem("valkyrie_ingot");
4852
public static final TAItem valkyrieNugget = new TAItem("valkyrie_nugget");
@@ -165,6 +169,61 @@ public void preInit() {
165169
TinkerRegistry.integrate(swetMi).preInit();
166170
}
167171

172+
if(TAConfig.candycane) {
173+
TinkerRegistry.addMaterialStats(candycane,
174+
new HeadMaterialStats(250, 2.5f, 5.0f, STONE),
175+
new HandleMaterialStats(1.2f, -120),
176+
new ExtraMaterialStats(120),
177+
TinkersAether.plzNo);
178+
candycane.setCraftable(true).setCastable(false);
179+
candycane.addItem("candyCane", 1, Material.VALUE_Ingot);
180+
candycane.addTrait(Festive.festive);
181+
candycane.addTrait(tasty);
182+
MaterialIntegration candycaneMi = new MaterialIntegration(candycane).setRepresentativeItem("candyCane");
183+
TinkerRegistry.integrate(candycaneMi).preInit();
184+
}
185+
186+
if(TAConfig.aercloudCold) {
187+
TinkerRegistry.addMaterialStats(aercloudCold,
188+
new HeadMaterialStats(2000, 0.5f, 0.0f, STONE),
189+
new HandleMaterialStats(0.2f, -500),
190+
new ExtraMaterialStats(0),
191+
TinkersAether.plzNo);
192+
aercloudCold.setCraftable(true).setCastable(false);
193+
aercloudCold.addItem("aercloudCold", 1, Material.VALUE_Ingot);
194+
aercloudCold.addTrait(Cushy.cushy);
195+
MaterialIntegration aercloudColdMi = new MaterialIntegration(aercloudCold).setRepresentativeItem("aercloudCold");
196+
TinkerRegistry.integrate(aercloudColdMi).preInit();
197+
}
198+
199+
if(TAConfig.aercloudBlue) {
200+
TinkerRegistry.addMaterialStats(aercloudBlue,
201+
new HeadMaterialStats(2000, 0.5f, 0.0f, STONE),
202+
new HandleMaterialStats(0.2f, -500),
203+
new ExtraMaterialStats(0),
204+
TinkersAether.plzNo);
205+
aercloudBlue.setCraftable(true).setCastable(false);
206+
aercloudBlue.addItem("aercloudBlue", 1, Material.VALUE_Ingot);
207+
aercloudBlue.addTrait(Cushy.cushy);
208+
aercloudBlue.addTrait(Cushy.cushy, MaterialTypes.HEAD);
209+
aercloudBlue.addTrait(Launching.launching, MaterialTypes.HEAD);
210+
MaterialIntegration aercloudBlueMi = new MaterialIntegration(aercloudBlue).setRepresentativeItem("aercloudBlue");
211+
TinkerRegistry.integrate(aercloudBlueMi).preInit();
212+
}
213+
214+
if(TAConfig.aercloudGold) {
215+
TinkerRegistry.addMaterialStats(aercloudGold,
216+
new HeadMaterialStats(2500, 1.0f, 0.1f, STONE),
217+
new HandleMaterialStats(0.25f, -400),
218+
new ExtraMaterialStats(20),
219+
TinkersAether.plzNo);
220+
aercloudGold.setCraftable(true).setCastable(false);
221+
aercloudGold.addItem("aercloudGold", 1, Material.VALUE_Ingot);
222+
aercloudGold.addTrait(Cushy.cushy);
223+
MaterialIntegration aercloudGoldMi = new MaterialIntegration(aercloudGold).setRepresentativeItem("aercloudGold");
224+
TinkerRegistry.integrate(aercloudGoldMi).preInit();
225+
}
226+
168227
TinkersAether.logger.info("Base Module - Materials Registered");
169228

170229
TinkersAether.logger.info("Base Module - End PreInit");
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package shnupbups.tinkersaether.traits;
2+
3+
import net.minecraft.entity.EntityLivingBase;
4+
import net.minecraft.init.Enchantments;
5+
import net.minecraft.item.ItemStack;
6+
import net.minecraft.nbt.NBTTagCompound;
7+
import slimeknights.tconstruct.library.traits.AbstractTrait;
8+
import slimeknights.tconstruct.library.utils.ToolBuilder;
9+
10+
public class Cushy extends AbstractTrait {
11+
public static final Cushy cushy = new Cushy();
12+
13+
public Cushy() {
14+
super("cushy", 0xBBBBBF);
15+
}
16+
17+
@Override
18+
public void applyEffect(NBTTagCompound rootCompound, NBTTagCompound modifierTag) {
19+
super.applyEffect(rootCompound, modifierTag);
20+
ToolBuilder.addEnchantment(rootCompound, Enchantments.SILK_TOUCH);
21+
}
22+
23+
@Override
24+
public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
25+
return newDamage*0.1f;
26+
}
27+
}

src/main/java/shnupbups/tinkersaether/traits/Enlightened.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@ public void afterBlockBreak(ItemStack tool, World world, IBlockState state, Bloc
2424
world.spawnEntity(amb);
2525
}
2626
}
27+
28+
@Override
29+
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
30+
if(!target.isEntityAlive() && !target.getEntityWorld().isRemote && random.nextInt(20) == 0) {
31+
EntityItem amb = new EntityItem(target.getEntityWorld(), target.getPosition().getX(), target.getPosition().getY(), target.getPosition().getZ());
32+
amb.setItem(new ItemStack(ItemsAether.ambrosium_shard, 1));
33+
target.getEntityWorld().spawnEntity(amb);
34+
}
35+
}
2736
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package shnupbups.tinkersaether.traits;
2+
3+
import com.legacy.aether.items.ItemsAether;
4+
import net.minecraft.block.state.IBlockState;
5+
import net.minecraft.entity.EntityLivingBase;
6+
import net.minecraft.entity.item.EntityItem;
7+
import net.minecraft.item.ItemStack;
8+
import net.minecraft.util.math.BlockPos;
9+
import net.minecraft.world.World;
10+
import slimeknights.tconstruct.library.traits.AbstractTrait;
11+
12+
public class Festive extends AbstractTrait {
13+
public static final Festive festive = new Festive();
14+
15+
public Festive() {
16+
super("festive",0xEEEE11);
17+
}
18+
19+
@Override
20+
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
21+
if (!world.isRemote && world.rand.nextBoolean()) {
22+
EntityItem amb = new EntityItem(world, pos.getX(), pos.getY(), pos.getZ());
23+
amb.setItem(new ItemStack(ItemsAether.candy_cane, 1));
24+
world.spawnEntity(amb);
25+
}
26+
}
27+
28+
@Override
29+
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
30+
if(!target.isEntityAlive() && !target.getEntityWorld().isRemote && random.nextBoolean()) {
31+
EntityItem amb = new EntityItem(target.getEntityWorld(), target.getPosition().getX(), target.getPosition().getY(), target.getPosition().getZ());
32+
amb.setItem(new ItemStack(ItemsAether.candy_cane, 1));
33+
target.getEntityWorld().spawnEntity(amb);
34+
}
35+
}
36+
}

src/main/java/shnupbups/tinkersaether/traits/Reach.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import net.minecraft.util.math.AxisAlignedBB;
88
import net.minecraft.util.math.Vec3d;
99
import net.minecraftforge.common.MinecraftForge;
10+
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
1011
import net.minecraftforge.event.entity.living.LivingEvent;
1112
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
1213
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@@ -20,13 +21,22 @@
2021
public class Reach extends AbstractTrait {
2122
public static final Reach reach = new Reach();
2223

23-
public static final AttributeModifier reachModifier = new AttributeModifier(UUID.randomUUID(), "Tinkers Aether Reach Modifier", 5.0D, 0);
24+
public static final AttributeModifier reachModifier = new AttributeModifier(UUID.fromString("df6eabe7-6947-4a56-9099-002f90370708"), "Tinkers Aether Reach Modifier", 5.0D, 0);
2425

2526
public Reach() {
2627
super("reach",0xEEEEDD);
2728
MinecraftForge.EVENT_BUS.register(this);
2829
}
2930

31+
//Made a mistake in previous versions... this should fix it!
32+
@SubscribeEvent
33+
public void onPlayerJoin(EntityJoinWorldEvent event) {
34+
if ((event.getEntity() instanceof EntityPlayer)) {
35+
EntityPlayer player = (EntityPlayer) event.getEntity();
36+
player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).removeAllModifiers();
37+
}
38+
}
39+
3040
@SubscribeEvent
3141
public void onPlayerUpdate(LivingEvent.LivingUpdateEvent event) {
3242
if ((event.getEntityLiving() instanceof EntityPlayer)) {

src/main/resources/assets/tinkersaether/lang/en_us.lang

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ material.holystone.name=Holystone
55
material.goldenamber.name=Golden Amber
66
material.valkyrie.name=Valkyrie
77
material.swet.name=Swet
8+
material.candycane.name=Candy Cane
9+
material.aercloudblue.name=Blue Aercloud
10+
material.aercloudcold.name=Cold Aercloud
11+
material.aercloudgold.name=Golden Aercloud
812

913
fluid.gravitite.name=Molten Gravitite
1014
fluid.valkyrie.name=Molten Valkyrie Metal
@@ -41,5 +45,9 @@ modifier.reach.name=Reach
4145
modifier.reach.desc=§oAngelic arms!§r\nWhilst holding this tool, you can reach further.
4246
modifier.swetty.name=Swetty
4347
modifier.swetty.desc=§oEww, gooey!§r\nIt'll wash off.
48+
modifier.festive.name=Festive
49+
modifier.festive.desc=§oCandy canes!§r\nLick them in a spear and kill your enemies.
50+
modifier.cushy.name=Cushy
51+
modifier.cushy.desc=§oLike a cushion.§r\nSilky, but doesn't hurt much.
4452

4553
tinkersaether.config.title=Tinker's Aether Configuration
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "block",
3+
"parameters": {
4+
"texture": "tinkersaether:materials/candycane"
5+
}
6+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "block",
33
"parameters": {
4-
"texture": "tinkersaether:blocks/valkyrie_block"
4+
"texture": "tinkersaether:materials/valkyrie"
55
}
66
}

0 commit comments

Comments
 (0)