Recipe changes and DOGECOIN
This commit is contained in:
parent
88fbcb1aaf
commit
77104b39ce
14 changed files with 191 additions and 19 deletions
58
src/main/java/techreborn/items/ItemFrequencyTransmitter.java
Normal file
58
src/main/java/techreborn/items/ItemFrequencyTransmitter.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
package techreborn.items;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.api.ScrapboxList;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
||||
public class ItemFrequencyTransmitter extends ItemTextureBase implements ITexturedItem
|
||||
{
|
||||
|
||||
public ItemFrequencyTransmitter()
|
||||
{
|
||||
setUnlocalizedName("techreborn.frequencyTransmitter");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World world, EntityPlayer player,
|
||||
EnumHand hand)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
int random = world.rand.nextInt(ScrapboxList.stacks.size());
|
||||
ItemStack out = ScrapboxList.stacks.get(random).copy();
|
||||
float xOffset = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float yOffset = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float zOffset = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityitem = new EntityItem(world, player.getPosition().getX() + xOffset,
|
||||
player.getPosition().getY() + yOffset, player.getPosition().getZ() + zOffset, out);
|
||||
|
||||
entityitem.setPickupDelay(20);
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
|
||||
itemStack.stackSize--;
|
||||
}
|
||||
return new ActionResult<>(EnumActionResult.SUCCESS, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int arg0)
|
||||
{
|
||||
return "techreborn:items/misc/frequency_transmitter";
|
||||
}
|
||||
}
|
|
@ -24,8 +24,8 @@ public class ItemParts extends ItemTextureBase {
|
|||
"doubleThoriumCell", "quadThoriumCell", "plutoniumCell", "doublePlutoniumCell", "quadPlutoniumCell",
|
||||
"destructoPack", "iridiumNeutronReflector", "massHoleDevice", "computerMonitor", "machineParts",
|
||||
"thickNeutronReflector", "neutronReflector", "electronicCircuit", "advancedCircuit", "rubberSap", "rubber",
|
||||
"scrap", "pump", "teleporter", "advancedAlloy", "mixedmetalingot", "carbonmesh", "carbonfiber",
|
||||
"frequencyTransmitter", "CoolantSimple", "CoolantTriple", "CoolantSix" };
|
||||
"scrap", "pump", "teleporter", "advancedAlloy", "mixedmetalingot", "carbonmesh", "carbonfiber", "dogecoin",
|
||||
"CoolantSimple", "CoolantTriple", "CoolantSix" };
|
||||
|
||||
public ItemParts() {
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue