-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Golden Amber material. Does good damage, but is... pretty bad at everything else. Also added 'Gilded' trait, which lets axes harvest Golden Amber from Golden Oak logs. Trait is on Gravitite and Golden Amber. Small preparations for things to come.
- Loading branch information
Showing
8 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package shnupbups.tinkersaether.traits; | ||
|
||
import com.legacy.aether.blocks.BlocksAether; | ||
import com.legacy.aether.blocks.util.EnumLogType; | ||
import com.legacy.aether.items.ItemsAether; | ||
import net.minecraft.block.properties.PropertyEnum; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.entity.item.EntityItem; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import slimeknights.tconstruct.library.traits.AbstractTrait; | ||
|
||
public class Gilded extends AbstractTrait { | ||
public static final Gilded gilded = new Gilded(); | ||
|
||
public Gilded() { | ||
super("gilded",0xFFDD11); | ||
} | ||
|
||
@Override | ||
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) { | ||
if (!world.isRemote && state.getBlock().equals(BlocksAether.aether_log) && wasEffective) { | ||
if (state.getValue(PropertyEnum.create("aether_logs", EnumLogType.class)) == EnumLogType.Oak) { | ||
EntityItem amb = new EntityItem(world, pos.getX(), pos.getY(), pos.getZ()); | ||
amb.setItem(new ItemStack(ItemsAether.golden_amber, 1 + random.nextInt(2))); | ||
world.spawnEntity(amb); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters