mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 11:29:23 +01:00
Removed Firework Box Minecart.
Aaw :(
This commit is contained in:
parent
8b433056d2
commit
5cef7badac
8 changed files with 0 additions and 190 deletions
|
@ -19,7 +19,6 @@ import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
|
|||
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.ItemCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
|
||||
import de.ellpeck.actuallyadditions.mod.event.InitEvents;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.cave.CaveWorldType;
|
||||
|
@ -80,7 +79,6 @@ public class ActuallyAdditions{
|
|||
PacketHandler.init();
|
||||
InitToolMaterials.init();
|
||||
InitArmorMaterials.init();
|
||||
InitEntities.init();
|
||||
InitBlocks.init();
|
||||
InitFluids.init();
|
||||
InitItems.init();
|
||||
|
|
|
@ -155,7 +155,6 @@ public class CreativeTab extends CreativeTabs{
|
|||
this.add(InitItems.itemBatteryQuadruple);
|
||||
this.add(InitItems.itemBatteryQuintuple);
|
||||
this.add(InitItems.itemTeleStaff);
|
||||
this.add(InitItems.itemMinecartFireworkBox);
|
||||
|
||||
this.add(InitItems.itemGrowthRing);
|
||||
this.add(InitItems.itemMagnetRing);
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* This file ("EntityFireworkBoxMinecart.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.entity;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityFireworkBoxMinecart extends EntityRFMinecart{
|
||||
|
||||
private int cooldownTimer;
|
||||
private boolean isPowered;
|
||||
|
||||
public EntityFireworkBoxMinecart(World world){
|
||||
super(world, 20000, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivatorRailPass(int x, int y, int z, boolean receivingPower){
|
||||
if(receivingPower != this.isPowered){
|
||||
this.isPowered = receivingPower;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
super.onUpdate();
|
||||
|
||||
if(!this.worldObj.isRemote){
|
||||
if(this.cooldownTimer > 0 && this.isPowered){
|
||||
this.cooldownTimer--;
|
||||
if(this.cooldownTimer <= 0){
|
||||
//TODO Check for power level here + make charging possible
|
||||
TileEntityFireworkBox.spawnFireworks(this.worldObj, this.posX, this.posY, this.posZ);
|
||||
this.storage.extractEnergy(TileEntityFireworkBox.USE_PER_SHOT, false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.cooldownTimer = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getDisplayTile(){
|
||||
return InitBlocks.blockFireworkBox.getDefaultState();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound compound){
|
||||
super.writeEntityToNBT(compound);
|
||||
|
||||
compound.setInteger("Cooldown", this.cooldownTimer);
|
||||
compound.setBoolean("Powered", this.isPowered);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound compound){
|
||||
super.readEntityFromNBT(compound);
|
||||
|
||||
this.cooldownTimer = compound.getInteger("Cooldown");
|
||||
this.isPowered = compound.getBoolean("Powered");
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* This file ("EntityRFMinecart.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.entity;
|
||||
|
||||
import cofh.api.energy.EnergyStorage;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityRFMinecart extends EntityMinecart{
|
||||
|
||||
public EnergyStorage storage;
|
||||
|
||||
public EntityRFMinecart(World world, int rfCap, int maxTransfer){
|
||||
super(world);
|
||||
|
||||
this.storage = new EnergyStorage(rfCap, maxTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound compound){
|
||||
super.writeEntityToNBT(compound);
|
||||
|
||||
this.storage.writeToNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound compound){
|
||||
super.readEntityFromNBT(compound);
|
||||
|
||||
this.storage.readFromNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType(){
|
||||
return Type.CHEST;
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* This file ("InitEntities.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.entity;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class InitEntities{
|
||||
|
||||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Entities...");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityFireworkBoxMinecart.class, ModUtil.MOD_ID+":minecartFireworkBox", 0, ActuallyAdditions.instance, 256, 1, true);
|
||||
}
|
||||
}
|
|
@ -206,12 +206,9 @@ public class InitItems{
|
|||
|
||||
public static Item itemRarmorModuleReconstructor;
|
||||
|
||||
public static Item itemMinecartFireworkBox;
|
||||
|
||||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Items...");
|
||||
|
||||
itemMinecartFireworkBox = new ItemFireworkBoxMinecart("itemMinecartFireworkBox");
|
||||
itemSpawnerChanger = new ItemSpawnerChanger("itemSpawnerChanger");
|
||||
itemMisc = new ItemMisc("itemMisc");
|
||||
itemCrateKeeper = new ItemGeneric("itemCrateKeeper");
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* This file ("ItemFireworkBoxMinecart.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.items;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.entity.EntityFireworkBoxMinecart;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemFireworkBoxMinecart extends ItemMinecartAA{
|
||||
|
||||
public ItemFireworkBoxMinecart(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityMinecart createCart(World world, double x, double y, double z){
|
||||
EntityMinecart entity = new EntityFireworkBoxMinecart(world);
|
||||
entity.setPosition(x, y, z);
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "actuallyadditions:item/standardItem",
|
||||
"textures": {
|
||||
"layer0": "actuallyadditions:items/itemMinecartFireworkBox"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue