this doesn't compile yet, but have something to peek at
This commit is contained in:
parent
973f1019a5
commit
5fcdd978d7
329 changed files with 3247 additions and 2953 deletions
|
@ -1,12 +1,8 @@
|
|||
package WayofTime.bloodmagic.tile;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
@ -18,9 +14,6 @@ public class TileAlchemyArray extends TileInventory implements ITickable, IAlche
|
|||
{
|
||||
public boolean isActive = false;
|
||||
public int activeCounter = 0;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public EnumFacing rotation = EnumFacing.HORIZONTALS[0];;
|
||||
|
||||
private String key = "empty";
|
||||
|
@ -153,4 +146,13 @@ public class TileAlchemyArray extends TileInventory implements ITickable, IAlche
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getRotation() {
|
||||
return rotation;
|
||||
}
|
||||
|
||||
public void setRotation(EnumFacing rotation) {
|
||||
this.rotation = rotation;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package WayofTime.bloodmagic.tile;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -25,7 +24,6 @@ import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
|||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
@Getter
|
||||
public class TileAlchemyTable extends TileInventory implements ISidedInventory, ITickable
|
||||
{
|
||||
public static final int orbSlot = 6;
|
||||
|
@ -398,4 +396,40 @@ public class TileAlchemyTable extends TileInventory implements ISidedInventory,
|
|||
setInventorySlotContents(i, result[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getOrbSlot() {
|
||||
return orbSlot;
|
||||
}
|
||||
|
||||
public static int getToolSlot() {
|
||||
return toolSlot;
|
||||
}
|
||||
|
||||
public static int getOutputSlot() {
|
||||
return outputSlot;
|
||||
}
|
||||
|
||||
public EnumFacing getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public boolean isSlave() {
|
||||
return isSlave;
|
||||
}
|
||||
|
||||
public int getBurnTime() {
|
||||
return burnTime;
|
||||
}
|
||||
|
||||
public int getTicksRequired() {
|
||||
return ticksRequired;
|
||||
}
|
||||
|
||||
public BlockPos getConnectedPos() {
|
||||
return connectedPos;
|
||||
}
|
||||
|
||||
public boolean[] getBlockedSlots() {
|
||||
return blockedSlots;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package WayofTime.bloodmagic.tile;
|
||||
|
||||
import WayofTime.bloodmagic.tile.base.TileTicking;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -25,12 +23,7 @@ public class TileDemonCrystal extends TileTicking
|
|||
|
||||
public double progressToNextCrystal = 0;
|
||||
public int internalCounter = 0;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public int crystalCount = 1;
|
||||
@Getter
|
||||
@Setter
|
||||
public EnumFacing placement = EnumFacing.UP; //Side that this crystal is placed on.
|
||||
|
||||
public TileDemonCrystal()
|
||||
|
@ -188,4 +181,20 @@ public class TileDemonCrystal extends TileTicking
|
|||
tag.setDouble("progress", progressToNextCrystal);
|
||||
return tag;
|
||||
}
|
||||
|
||||
public int getCrystalCount() {
|
||||
return crystalCount;
|
||||
}
|
||||
|
||||
public void setCrystalCount(int crystalCount) {
|
||||
this.crystalCount = crystalCount;
|
||||
}
|
||||
|
||||
public EnumFacing getPlacement() {
|
||||
return placement;
|
||||
}
|
||||
|
||||
public void setPlacement(EnumFacing placement) {
|
||||
this.placement = placement;
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@ import WayofTime.bloodmagic.api.soul.DemonWillHolder;
|
|||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.api.soul.IDemonWillConduit;
|
||||
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.tile.base.TileTicking;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -60,7 +60,7 @@ public class TileDemonCrystallizer extends TileTicking implements IDemonWillCond
|
|||
|
||||
public boolean formCrystal(EnumDemonWillType type, BlockPos position)
|
||||
{
|
||||
getWorld().setBlockState(position, ModBlocks.DEMON_CRYSTAL.getStateFromMeta(type.ordinal()));
|
||||
getWorld().setBlockState(position, RegistrarBloodMagicBlocks.DEMON_CRYSTAL.getStateFromMeta(type.ordinal()));
|
||||
TileEntity tile = getWorld().getTileEntity(position);
|
||||
if (tile instanceof TileDemonCrystal)
|
||||
{
|
||||
|
|
|
@ -13,11 +13,6 @@ public class TileDimensionalPortal extends TileBase
|
|||
public int masterStoneY;
|
||||
public int masterStoneZ;
|
||||
|
||||
public TileDimensionalPortal()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
public void deserialize(NBTTagCompound tagCompound)
|
||||
{
|
||||
portalID = tagCompound.getString(RitualPortal.PORTAL_ID_TAG);
|
||||
|
|
|
@ -6,13 +6,11 @@ import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual;
|
|||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.tile.base.TileBase;
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@NoArgsConstructor
|
||||
public class TileImperfectRitualStone extends TileBase implements IImperfectRitualStone
|
||||
{
|
||||
// IImperfectRitualStone
|
||||
|
|
|
@ -4,8 +4,6 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -26,13 +24,11 @@ import WayofTime.bloodmagic.api.Constants;
|
|||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
|
||||
import WayofTime.bloodmagic.inversion.InversionPillarHandler;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.tile.base.TileTicking;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TileInversionPillar extends TileTicking
|
||||
{
|
||||
public static double willPerOperation = 0.5;
|
||||
|
@ -73,7 +69,7 @@ public class TileInversionPillar extends TileTicking
|
|||
public TileInversionPillar(EnumDemonWillType type)
|
||||
{
|
||||
this.type = type;
|
||||
asm = BloodMagic.proxy.load(new ResourceLocation(Constants.Mod.MODID.toLowerCase(), "asms/block/inversion_pillar.json"), ImmutableMap.<String, ITimeValue>of("offset", animationOffset, "cycle_length", cycleLength));
|
||||
asm = BloodMagic.proxy.load(new ResourceLocation(BloodMagic.MODID.toLowerCase(), "asms/block/inversion_pillar.json"), ImmutableMap.<String, ITimeValue>of("offset", animationOffset, "cycle_length", cycleLength));
|
||||
animationOffsetValue = -1;
|
||||
}
|
||||
|
||||
|
@ -156,9 +152,9 @@ public class TileInversionPillar extends TileTicking
|
|||
if (!candidatePos.equals(BlockPos.ORIGIN))
|
||||
{
|
||||
currentInversion = 0;
|
||||
IBlockState pillarState = ModBlocks.INVERSION_PILLAR.getStateFromMeta(type.ordinal());
|
||||
IBlockState bottomState = ModBlocks.INVERSION_PILLAR_END.getStateFromMeta(type.ordinal() * 2);
|
||||
IBlockState topState = ModBlocks.INVERSION_PILLAR_END.getStateFromMeta(type.ordinal() * 2 + 1);
|
||||
IBlockState pillarState = RegistrarBloodMagicBlocks.INVERSION_PILLAR.getStateFromMeta(type.ordinal());
|
||||
IBlockState bottomState = RegistrarBloodMagicBlocks.INVERSION_PILLAR_END.getStateFromMeta(type.ordinal() * 2);
|
||||
IBlockState topState = RegistrarBloodMagicBlocks.INVERSION_PILLAR_END.getStateFromMeta(type.ordinal() * 2 + 1);
|
||||
getWorld().setBlockState(candidatePos, pillarState);
|
||||
getWorld().setBlockState(candidatePos.down(), bottomState);
|
||||
getWorld().setBlockState(candidatePos.up(), topState);
|
||||
|
@ -178,9 +174,9 @@ public class TileInversionPillar extends TileTicking
|
|||
{
|
||||
Vec3d vec = new Vec3d(getWorld().rand.nextDouble() * 2 - 1, getWorld().rand.nextDouble() * 2 - 1, getWorld().rand.nextDouble() * 2 - 1).normalize().scale(2 * currentInfectionRadius);
|
||||
|
||||
BlockPos centralPos = pos.add(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
BlockPos centralPos = pos.add(vec.x, vec.y, vec.z);
|
||||
|
||||
getWorld().setBlockState(centralPos, ModBlocks.DEMON_EXTRAS.getStateFromMeta(0));
|
||||
getWorld().setBlockState(centralPos, RegistrarBloodMagicBlocks.DEMON_EXTRAS.getStateFromMeta(0));
|
||||
currentInversion -= 1000;
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +193,7 @@ public class TileInversionPillar extends TileTicking
|
|||
|
||||
Vec3d vec = new Vec3d(world.rand.nextDouble() * 2 - 1, world.rand.nextDouble() * 2 - 1, world.rand.nextDouble() * 2 - 1).normalize().scale(wantedAverageDistance);
|
||||
|
||||
BlockPos centralPos = pillarPos.add(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
BlockPos centralPos = pillarPos.add(vec.x, vec.y, vec.z);
|
||||
BlockPos testPos = null;
|
||||
candidateTest: for (int h = 0; h <= heightCheckRange; h++)
|
||||
{
|
||||
|
@ -385,7 +381,7 @@ public class TileInversionPillar extends TileTicking
|
|||
Block block = state.getBlock();
|
||||
if (block == Blocks.DIRT || block == Blocks.STONE || block == Blocks.GRASS)
|
||||
{
|
||||
if (getWorld().setBlockState(offsetPos, ModBlocks.DEMON_EXTRAS.getStateFromMeta(0)))
|
||||
if (getWorld().setBlockState(offsetPos, RegistrarBloodMagicBlocks.DEMON_EXTRAS.getStateFromMeta(0)))
|
||||
{
|
||||
WorldDemonWillHandler.drainWill(getWorld(), pos, type, willPerOperation, true);
|
||||
currentInversion -= inversionPerOperation;
|
||||
|
@ -434,4 +430,164 @@ public class TileInversionPillar extends TileTicking
|
|||
}
|
||||
return super.getCapability(capability, side);
|
||||
}
|
||||
|
||||
public static double getWillPerOperation() {
|
||||
return willPerOperation;
|
||||
}
|
||||
|
||||
public static void setWillPerOperation(double willPerOperation) {
|
||||
TileInversionPillar.willPerOperation = willPerOperation;
|
||||
}
|
||||
|
||||
public static double getInversionPerOperation() {
|
||||
return inversionPerOperation;
|
||||
}
|
||||
|
||||
public static void setInversionPerOperation(double inversionPerOperation) {
|
||||
TileInversionPillar.inversionPerOperation = inversionPerOperation;
|
||||
}
|
||||
|
||||
public static double getAddedInversionPerFailedCheck() {
|
||||
return addedInversionPerFailedCheck;
|
||||
}
|
||||
|
||||
public static void setAddedInversionPerFailedCheck(double addedInversionPerFailedCheck) {
|
||||
TileInversionPillar.addedInversionPerFailedCheck = addedInversionPerFailedCheck;
|
||||
}
|
||||
|
||||
public static double getInversionToIncreaseRadius() {
|
||||
return inversionToIncreaseRadius;
|
||||
}
|
||||
|
||||
public static void setInversionToIncreaseRadius(double inversionToIncreaseRadius) {
|
||||
TileInversionPillar.inversionToIncreaseRadius = inversionToIncreaseRadius;
|
||||
}
|
||||
|
||||
public static double getInversionToAddPillar() {
|
||||
return inversionToAddPillar;
|
||||
}
|
||||
|
||||
public static void setInversionToAddPillar(double inversionToAddPillar) {
|
||||
TileInversionPillar.inversionToAddPillar = inversionToAddPillar;
|
||||
}
|
||||
|
||||
public static double getOperationThreshold() {
|
||||
return operationThreshold;
|
||||
}
|
||||
|
||||
public static void setOperationThreshold(double operationThreshold) {
|
||||
TileInversionPillar.operationThreshold = operationThreshold;
|
||||
}
|
||||
|
||||
public static double getInversionToSpreadWill() {
|
||||
return inversionToSpreadWill;
|
||||
}
|
||||
|
||||
public static void setInversionToSpreadWill(double inversionToSpreadWill) {
|
||||
TileInversionPillar.inversionToSpreadWill = inversionToSpreadWill;
|
||||
}
|
||||
|
||||
public static double getWillPushRate() {
|
||||
return willPushRate;
|
||||
}
|
||||
|
||||
public static void setWillPushRate(double willPushRate) {
|
||||
TileInversionPillar.willPushRate = willPushRate;
|
||||
}
|
||||
|
||||
public static double getInversionCostPerWillSpread() {
|
||||
return inversionCostPerWillSpread;
|
||||
}
|
||||
|
||||
public static void setInversionCostPerWillSpread(double inversionCostPerWillSpread) {
|
||||
TileInversionPillar.inversionCostPerWillSpread = inversionCostPerWillSpread;
|
||||
}
|
||||
|
||||
public static double getMinimumWillForChunkWhenSpreading() {
|
||||
return minimumWillForChunkWhenSpreading;
|
||||
}
|
||||
|
||||
public static void setMinimumWillForChunkWhenSpreading(double minimumWillForChunkWhenSpreading) {
|
||||
TileInversionPillar.minimumWillForChunkWhenSpreading = minimumWillForChunkWhenSpreading;
|
||||
}
|
||||
|
||||
public IAnimationStateMachine getAsm() {
|
||||
return asm;
|
||||
}
|
||||
|
||||
public float getAnimationOffsetValue() {
|
||||
return animationOffsetValue;
|
||||
}
|
||||
|
||||
public void setAnimationOffsetValue(float animationOffsetValue) {
|
||||
this.animationOffsetValue = animationOffsetValue;
|
||||
}
|
||||
|
||||
public VariableValue getAnimationOffset() {
|
||||
return animationOffset;
|
||||
}
|
||||
|
||||
public VariableValue getCycleLength() {
|
||||
return cycleLength;
|
||||
}
|
||||
|
||||
public EnumDemonWillType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(EnumDemonWillType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public double getCurrentInversion() {
|
||||
return currentInversion;
|
||||
}
|
||||
|
||||
public void setCurrentInversion(double currentInversion) {
|
||||
this.currentInversion = currentInversion;
|
||||
}
|
||||
|
||||
public int getConsecutiveFailedChecks() {
|
||||
return consecutiveFailedChecks;
|
||||
}
|
||||
|
||||
public void setConsecutiveFailedChecks(int consecutiveFailedChecks) {
|
||||
this.consecutiveFailedChecks = consecutiveFailedChecks;
|
||||
}
|
||||
|
||||
public int getConsecutiveFailedAirChecks() {
|
||||
return consecutiveFailedAirChecks;
|
||||
}
|
||||
|
||||
public void setConsecutiveFailedAirChecks(int consecutiveFailedAirChecks) {
|
||||
this.consecutiveFailedAirChecks = consecutiveFailedAirChecks;
|
||||
}
|
||||
|
||||
public int getCurrentInfectionRadius() {
|
||||
return currentInfectionRadius;
|
||||
}
|
||||
|
||||
public void setCurrentInfectionRadius(int currentInfectionRadius) {
|
||||
this.currentInfectionRadius = currentInfectionRadius;
|
||||
}
|
||||
|
||||
public int getCounter() {
|
||||
return counter;
|
||||
}
|
||||
|
||||
public void setCounter(int counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
public boolean isRegistered() {
|
||||
return isRegistered;
|
||||
}
|
||||
|
||||
public void setRegistered(boolean registered) {
|
||||
isRegistered = registered;
|
||||
}
|
||||
|
||||
public static double getMaxWillForChunk() {
|
||||
return maxWillForChunk;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.tile.base.TileTicking;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -28,15 +25,13 @@ import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
|||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.RitualHelper;
|
||||
import WayofTime.bloodmagic.item.ItemActivationCrystal;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public class TileMasterRitualStone extends TileTicking implements IMasterRitualStone
|
||||
{
|
||||
private String owner;
|
||||
|
@ -46,11 +41,8 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
private int activeTime;
|
||||
private int cooldown;
|
||||
private Ritual currentRitual;
|
||||
@Setter
|
||||
private EnumFacing direction = EnumFacing.NORTH;
|
||||
@Setter
|
||||
private boolean inverted;
|
||||
|
||||
private List<EnumDemonWillType> currentActiveWillConfig = new ArrayList<EnumDemonWillType>();
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +62,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
if (!isActive() && !isPowered() && isRedstoned() && getCurrentRitual() != null)
|
||||
{
|
||||
active = true;
|
||||
ItemStack crystalStack = NBTHelper.checkNBT(new ItemStack(ModItems.ACTIVATION_CRYSTAL, 1, getCurrentRitual().getCrystalLevel()));
|
||||
ItemStack crystalStack = NBTHelper.checkNBT(new ItemStack(RegistrarBloodMagicItems.ACTIVATION_CRYSTAL, 1, getCurrentRitual().getCrystalLevel()));
|
||||
crystalStack.getTagCompound().setString(Constants.NBT.OWNER_UUID, getOwner());
|
||||
activateRitual(crystalStack, null, getCurrentRitual());
|
||||
redstoned = false;
|
||||
|
@ -420,4 +412,64 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
|
||||
return getWorld().isBlockPowered(getPos());
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public SoulNetwork getCachedNetwork() {
|
||||
return cachedNetwork;
|
||||
}
|
||||
|
||||
public void setCachedNetwork(SoulNetwork cachedNetwork) {
|
||||
this.cachedNetwork = cachedNetwork;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public boolean isRedstoned() {
|
||||
return redstoned;
|
||||
}
|
||||
|
||||
public void setRedstoned(boolean redstoned) {
|
||||
this.redstoned = redstoned;
|
||||
}
|
||||
|
||||
public int getActiveTime() {
|
||||
return activeTime;
|
||||
}
|
||||
|
||||
public void setActiveTime(int activeTime) {
|
||||
this.activeTime = activeTime;
|
||||
}
|
||||
|
||||
public Ritual getCurrentRitual() {
|
||||
return currentRitual;
|
||||
}
|
||||
|
||||
public void setCurrentRitual(Ritual currentRitual) {
|
||||
this.currentRitual = currentRitual;
|
||||
}
|
||||
|
||||
public void setDirection(EnumFacing direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public boolean isInverted() {
|
||||
return inverted;
|
||||
}
|
||||
|
||||
public void setInverted(boolean inverted) {
|
||||
this.inverted = inverted;
|
||||
}
|
||||
|
||||
public List<EnumDemonWillType> getCurrentActiveWillConfig() {
|
||||
return currentActiveWillConfig;
|
||||
}
|
||||
|
||||
public void setCurrentActiveWillConfig(List<EnumDemonWillType> currentActiveWillConfig) {
|
||||
this.currentActiveWillConfig = currentActiveWillConfig;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
import WayofTime.bloodmagic.block.BlockMimic;
|
||||
import WayofTime.bloodmagic.entity.mob.EntityMimic;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicItems;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
double posY = this.pos.getY() + 0.5 + (2 * getWorld().rand.nextDouble() - 1) * potionSpawnRadius;
|
||||
double posZ = this.pos.getZ() + 0.5 + (2 * getWorld().rand.nextDouble() - 1) * potionSpawnRadius;
|
||||
|
||||
ItemStack newStack = new ItemStack(potionStack.getItem() == ModItems.POTION_FLASK ? Items.SPLASH_POTION : potionStack.getItem());
|
||||
ItemStack newStack = new ItemStack(potionStack.getItem() == RegistrarBloodMagicItems.POTION_FLASK ? Items.SPLASH_POTION : potionStack.getItem());
|
||||
newStack.setTagCompound(potionStack.getTagCompound());
|
||||
|
||||
EntityPotion potionEntity = new EntityPotion(getWorld(), posX, posY, posZ, newStack);
|
||||
|
@ -122,7 +122,7 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionSet"));
|
||||
}
|
||||
return true;
|
||||
} else if (heldItem.getItem() == ModItems.POTION_FLASK)
|
||||
} else if (heldItem.getItem() == RegistrarBloodMagicItems.POTION_FLASK)
|
||||
{
|
||||
//The potion flask is empty, therefore we have to reset the stored potion.
|
||||
if (!world.isRemote)
|
||||
|
@ -143,7 +143,7 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
if (player.isSneaking())
|
||||
return false;
|
||||
|
||||
if (!player.getHeldItem(hand).isEmpty() && player.getHeldItem(hand).getItem() == new ItemStack(ModBlocks.MIMIC).getItem())
|
||||
if (!player.getHeldItem(hand).isEmpty() && player.getHeldItem(hand).getItem() == new ItemStack(RegistrarBloodMagicBlocks.MIMIC).getItem())
|
||||
return false;
|
||||
|
||||
if (!getStackInSlot(0).isEmpty() && !player.getHeldItem(hand).isEmpty())
|
||||
|
|
|
@ -2,14 +2,15 @@ package WayofTime.bloodmagic.tile;
|
|||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.tile.base.TileTicking;
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@NoArgsConstructor
|
||||
public class TilePhantomBlock extends TileTicking
|
||||
{
|
||||
private int ticksRemaining = 10;
|
||||
|
||||
public TilePhantomBlock() {
|
||||
}
|
||||
|
||||
public TilePhantomBlock(int ticksRemaining)
|
||||
{
|
||||
this.ticksRemaining = ticksRemaining;
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package WayofTime.bloodmagic.tile;
|
||||
|
||||
public class TilePlinth extends TileInventory
|
||||
{
|
||||
public TilePlinth()
|
||||
{
|
||||
super(1, "plinth");
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.tile;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.tile.base.TileTicking;
|
||||
import com.google.common.base.Strings;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -88,7 +88,7 @@ public class TileSpectralBlock extends TileTicking
|
|||
if (world.isAirBlock(blockPos))
|
||||
return;
|
||||
IBlockState cachedState = world.getBlockState(blockPos);
|
||||
world.setBlockState(blockPos, ModBlocks.SPECTRAL_BLOCK.getDefaultState());
|
||||
world.setBlockState(blockPos, RegistrarBloodMagicBlocks.SPECTRAL.getDefaultState());
|
||||
TileSpectralBlock tile = (TileSpectralBlock) world.getTileEntity(blockPos);
|
||||
tile.setContainedBlockInfo(cachedState);
|
||||
tile.setDuration(duration);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue