Sweeping changes, mainly NBT related
This commit is contained in:
parent
4035d91151
commit
c8996c8fba
|
@ -113,18 +113,18 @@ public class AlchemyArrayEffectLaputa extends AlchemyArrayEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger("radius", radius);
|
tag.putInt("radius", radius);
|
||||||
tag.setInteger("teleportHeightOffset", teleportHeightOffset);
|
tag.putInt("teleportHeightOffset", teleportHeightOffset);
|
||||||
tag.setInteger(Constants.NBT.X_COORD, currentPos.getX());
|
tag.putInt(Constants.NBT.X_COORD, currentPos.getX());
|
||||||
tag.setInteger(Constants.NBT.Y_COORD, currentPos.getY());
|
tag.putInt(Constants.NBT.Y_COORD, currentPos.getY());
|
||||||
tag.setInteger(Constants.NBT.Z_COORD, currentPos.getZ());
|
tag.putInt(Constants.NBT.Z_COORD, currentPos.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
radius = tag.getInteger("radius");
|
radius = tag.getInt("radius");
|
||||||
teleportHeightOffset = tag.getInteger("teleportHeightOffset");
|
teleportHeightOffset = tag.getInt("teleportHeightOffset");
|
||||||
currentPos = new BlockPos(tag.getInteger(Constants.NBT.X_COORD), tag.getInteger(Constants.NBT.Y_COORD), tag.getInteger(Constants.NBT.Z_COORD));
|
currentPos = new BlockPos(tag.getInt(Constants.NBT.X_COORD), tag.getInt(Constants.NBT.Y_COORD), tag.getInt(Constants.NBT.Z_COORD));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class AlchemyCircleRenderer {
|
||||||
float size = 1.0F * getSizeModifier(craftTime);
|
float size = 1.0F * getSizeModifier(craftTime);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
|
|
@ -82,21 +82,21 @@ public class BloodAltar implements IFluidHandler {
|
||||||
if (fluid != null)
|
if (fluid != null)
|
||||||
setMainFluid(fluid);
|
setMainFluid(fluid);
|
||||||
|
|
||||||
FluidStack fluidOut = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInteger(Constants.NBT.OUTPUT_AMOUNT));
|
FluidStack fluidOut = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInt(Constants.NBT.OUTPUT_AMOUNT));
|
||||||
setOutputFluid(fluidOut);
|
setOutputFluid(fluidOut);
|
||||||
|
|
||||||
FluidStack fluidIn = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInteger(Constants.NBT.INPUT_AMOUNT));
|
FluidStack fluidIn = new FluidStack(BlockLifeEssence.getLifeEssence(), tagCompound.getInt(Constants.NBT.INPUT_AMOUNT));
|
||||||
setInputFluid(fluidIn);
|
setInputFluid(fluidIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
internalCounter = tagCompound.getInteger("internalCounter");
|
internalCounter = tagCompound.getInt("internalCounter");
|
||||||
altarTier = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_TIER)).or(AltarTier.ONE);
|
altarTier = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_TIER)).or(AltarTier.ONE);
|
||||||
isActive = tagCompound.getBoolean(Constants.NBT.ALTAR_ACTIVE);
|
isActive = tagCompound.getBoolean(Constants.NBT.ALTAR_ACTIVE);
|
||||||
liquidRequired = tagCompound.getInteger(Constants.NBT.ALTAR_LIQUID_REQ);
|
liquidRequired = tagCompound.getInt(Constants.NBT.ALTAR_LIQUID_REQ);
|
||||||
canBeFilled = tagCompound.getBoolean(Constants.NBT.ALTAR_FILLABLE);
|
canBeFilled = tagCompound.getBoolean(Constants.NBT.ALTAR_FILLABLE);
|
||||||
isUpgraded = tagCompound.getBoolean(Constants.NBT.ALTAR_UPGRADED);
|
isUpgraded = tagCompound.getBoolean(Constants.NBT.ALTAR_UPGRADED);
|
||||||
consumptionRate = tagCompound.getInteger(Constants.NBT.ALTAR_CONSUMPTION_RATE);
|
consumptionRate = tagCompound.getInt(Constants.NBT.ALTAR_CONSUMPTION_RATE);
|
||||||
drainRate = tagCompound.getInteger(Constants.NBT.ALTAR_DRAIN_RATE);
|
drainRate = tagCompound.getInt(Constants.NBT.ALTAR_DRAIN_RATE);
|
||||||
consumptionMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER);
|
consumptionMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER);
|
||||||
efficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER);
|
efficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER);
|
||||||
selfSacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER);
|
selfSacrificeEfficiencyMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER);
|
||||||
|
@ -104,18 +104,18 @@ public class BloodAltar implements IFluidHandler {
|
||||||
capacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER);
|
capacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER);
|
||||||
orbCapacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER);
|
orbCapacityMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER);
|
||||||
dislocationMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER);
|
dislocationMultiplier = tagCompound.getFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER);
|
||||||
capacity = tagCompound.getInteger(Constants.NBT.ALTAR_CAPACITY);
|
capacity = tagCompound.getInt(Constants.NBT.ALTAR_CAPACITY);
|
||||||
bufferCapacity = tagCompound.getInteger(Constants.NBT.ALTAR_BUFFER_CAPACITY);
|
bufferCapacity = tagCompound.getInt(Constants.NBT.ALTAR_BUFFER_CAPACITY);
|
||||||
progress = tagCompound.getInteger(Constants.NBT.ALTAR_PROGRESS);
|
progress = tagCompound.getInt(Constants.NBT.ALTAR_PROGRESS);
|
||||||
isResultBlock = tagCompound.getBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK);
|
isResultBlock = tagCompound.getBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK);
|
||||||
lockdownDuration = tagCompound.getInteger(Constants.NBT.ALTAR_LOCKDOWN_DURATION);
|
lockdownDuration = tagCompound.getInt(Constants.NBT.ALTAR_LOCKDOWN_DURATION);
|
||||||
accelerationUpgrades = tagCompound.getInteger(Constants.NBT.ALTAR_ACCELERATION_UPGRADES);
|
accelerationUpgrades = tagCompound.getInt(Constants.NBT.ALTAR_ACCELERATION_UPGRADES);
|
||||||
demonBloodDuration = tagCompound.getInteger(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION);
|
demonBloodDuration = tagCompound.getInt(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION);
|
||||||
cooldownAfterCrafting = tagCompound.getInteger(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING);
|
cooldownAfterCrafting = tagCompound.getInt(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING);
|
||||||
chargingRate = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_RATE);
|
chargingRate = tagCompound.getInt(Constants.NBT.ALTAR_CHARGE_RATE);
|
||||||
chargingFrequency = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY);
|
chargingFrequency = tagCompound.getInt(Constants.NBT.ALTAR_CHARGE_FREQUENCY);
|
||||||
totalCharge = tagCompound.getInteger(Constants.NBT.ALTAR_TOTAL_CHARGE);
|
totalCharge = tagCompound.getInt(Constants.NBT.ALTAR_TOTAL_CHARGE);
|
||||||
maxCharge = tagCompound.getInteger(Constants.NBT.ALTAR_MAX_CHARGE);
|
maxCharge = tagCompound.getInt(Constants.NBT.ALTAR_MAX_CHARGE);
|
||||||
currentTierDisplayed = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED)).or(AltarTier.ONE);
|
currentTierDisplayed = Enums.getIfPresent(AltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED)).or(AltarTier.ONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,42 +124,42 @@ public class BloodAltar implements IFluidHandler {
|
||||||
if (fluid != null)
|
if (fluid != null)
|
||||||
fluid.writeToNBT(tagCompound);
|
fluid.writeToNBT(tagCompound);
|
||||||
else
|
else
|
||||||
tagCompound.setString(Constants.NBT.EMPTY, "");
|
tagCompound.putString(Constants.NBT.EMPTY, "");
|
||||||
|
|
||||||
if (fluidOutput != null)
|
if (fluidOutput != null)
|
||||||
tagCompound.setInteger(Constants.NBT.OUTPUT_AMOUNT, fluidOutput.amount);
|
tagCompound.putInt(Constants.NBT.OUTPUT_AMOUNT, fluidOutput.amount);
|
||||||
|
|
||||||
if (fluidInput != null)
|
if (fluidInput != null)
|
||||||
tagCompound.setInteger(Constants.NBT.INPUT_AMOUNT, fluidInput.amount);
|
tagCompound.putInt(Constants.NBT.INPUT_AMOUNT, fluidInput.amount);
|
||||||
|
|
||||||
tagCompound.setInteger("internalCounter", internalCounter);
|
tagCompound.putInt("internalCounter", internalCounter);
|
||||||
tagCompound.setString(Constants.NBT.ALTAR_TIER, altarTier.name());
|
tagCompound.putString(Constants.NBT.ALTAR_TIER, altarTier.name());
|
||||||
tagCompound.setBoolean(Constants.NBT.ALTAR_ACTIVE, isActive);
|
tagCompound.putBoolean(Constants.NBT.ALTAR_ACTIVE, isActive);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_LIQUID_REQ, liquidRequired);
|
tagCompound.putInt(Constants.NBT.ALTAR_LIQUID_REQ, liquidRequired);
|
||||||
tagCompound.setBoolean(Constants.NBT.ALTAR_FILLABLE, canBeFilled);
|
tagCompound.putBoolean(Constants.NBT.ALTAR_FILLABLE, canBeFilled);
|
||||||
tagCompound.setBoolean(Constants.NBT.ALTAR_UPGRADED, isUpgraded);
|
tagCompound.putBoolean(Constants.NBT.ALTAR_UPGRADED, isUpgraded);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_CONSUMPTION_RATE, consumptionRate);
|
tagCompound.putInt(Constants.NBT.ALTAR_CONSUMPTION_RATE, consumptionRate);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_DRAIN_RATE, drainRate);
|
tagCompound.putInt(Constants.NBT.ALTAR_DRAIN_RATE, drainRate);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER, consumptionMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_CONSUMPTION_MULTIPLIER, consumptionMultiplier);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER, efficiencyMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_EFFICIENCY_MULTIPLIER, efficiencyMultiplier);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER, sacrificeEfficiencyMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_SACRIFICE_MULTIPLIER, sacrificeEfficiencyMultiplier);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER, selfSacrificeEfficiencyMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_SELF_SACRIFICE_MULTIPLIER, selfSacrificeEfficiencyMultiplier);
|
||||||
tagCompound.setBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK, isResultBlock);
|
tagCompound.putBoolean(Constants.NBT.ALTAR_IS_RESULT_BLOCK, isResultBlock);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER, capacityMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_CAPACITY_MULTIPLIER, capacityMultiplier);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER, orbCapacityMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_ORB_CAPACITY_MULTIPLIER, orbCapacityMultiplier);
|
||||||
tagCompound.setFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER, dislocationMultiplier);
|
tagCompound.putFloat(Constants.NBT.ALTAR_DISLOCATION_MULTIPLIER, dislocationMultiplier);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_CAPACITY, capacity);
|
tagCompound.putInt(Constants.NBT.ALTAR_CAPACITY, capacity);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_PROGRESS, progress);
|
tagCompound.putInt(Constants.NBT.ALTAR_PROGRESS, progress);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_BUFFER_CAPACITY, bufferCapacity);
|
tagCompound.putInt(Constants.NBT.ALTAR_BUFFER_CAPACITY, bufferCapacity);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_LOCKDOWN_DURATION, lockdownDuration);
|
tagCompound.putInt(Constants.NBT.ALTAR_LOCKDOWN_DURATION, lockdownDuration);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_ACCELERATION_UPGRADES, accelerationUpgrades);
|
tagCompound.putInt(Constants.NBT.ALTAR_ACCELERATION_UPGRADES, accelerationUpgrades);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION, demonBloodDuration);
|
tagCompound.putInt(Constants.NBT.ALTAR_DEMON_BLOOD_DURATION, demonBloodDuration);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING, cooldownAfterCrafting);
|
tagCompound.putInt(Constants.NBT.ALTAR_COOLDOWN_AFTER_CRAFTING, cooldownAfterCrafting);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_RATE, chargingRate);
|
tagCompound.putInt(Constants.NBT.ALTAR_CHARGE_RATE, chargingRate);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency);
|
tagCompound.putInt(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge);
|
tagCompound.putInt(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge);
|
||||||
tagCompound.setInteger(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge);
|
tagCompound.putInt(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge);
|
||||||
tagCompound.setString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name());
|
tagCompound.putString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startCycle() {
|
public void startCycle() {
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class BlockBloodLight extends Block {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) {
|
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) {
|
||||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
|
|
||||||
if (rand.nextInt(3) != 0) {
|
if (rand.nextInt(3) != 0) {
|
||||||
world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0);
|
world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0);
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class BlockBloodTank extends BlockInteger implements IVariantProvider, IB
|
||||||
if (bloodTank.getTank().getFluid() != null) {
|
if (bloodTank.getTank().getFluid() != null) {
|
||||||
bloodTank.getTank().getFluid().writeToNBT(fluidTag);
|
bloodTank.getTank().getFluid().writeToNBT(fluidTag);
|
||||||
CompoundNBT dropTag = new CompoundNBT();
|
CompoundNBT dropTag = new CompoundNBT();
|
||||||
dropTag.setTag("Fluid", fluidTag);
|
dropTag.put("Fluid", fluidTag);
|
||||||
drop.setTagCompound(dropTag);
|
drop.setTagCompound(dropTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public class BlockBloodTank extends BlockInteger implements IVariantProvider, IB
|
||||||
TileBloodTank bloodTank = (TileBloodTank) tile;
|
TileBloodTank bloodTank = (TileBloodTank) tile;
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("Fluid")) {
|
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("Fluid")) {
|
||||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag.getCompoundTag("Fluid"));
|
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tag.getCompound("Fluid"));
|
||||||
bloodTank.getTank().setFluid(fluidStack);
|
bloodTank.getTank().setFluid(fluidStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class Sprite {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(int x, int y) {
|
public void draw(int x, int y) {
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(textureLocation);
|
Minecraft.getInstance().renderEngine.bindTexture(textureLocation);
|
||||||
float f = 0.00390625F;
|
float f = 0.00390625F;
|
||||||
float f1 = 0.00390625F;
|
float f1 = 0.00390625F;
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class GuiBloodMagicConfig extends GuiConfig {
|
||||||
|
|
||||||
elements.addAll(ConfigElement.from(ConfigHandler.class).getChildElements());
|
elements.addAll(ConfigElement.from(ConfigHandler.class).getChildElements());
|
||||||
elements.add(new ConfigElement(BloodMagic.RITUAL_MANAGER.getConfig().getCategory("rituals")));
|
elements.add(new ConfigElement(BloodMagic.RITUAL_MANAGER.getConfig().getCategory("rituals")));
|
||||||
if (Minecraft.getMinecraft().world != null)
|
if (Minecraft.getInstance().world != null)
|
||||||
elements.add(new DummyElementEditHUD(BloodMagic.NAME, "config." + BloodMagic.MODID + ".edit_hud"));
|
elements.add(new DummyElementEditHUD(BloodMagic.NAME, "config." + BloodMagic.MODID + ".edit_hud"));
|
||||||
|
|
||||||
return elements;
|
return elements;
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class GuiItemRoutingNode extends ContainerScreen {
|
||||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
this.renderHoveredToolTip(mouseX, mouseY);
|
this.renderHoveredToolTip(mouseX, mouseY);
|
||||||
|
|
||||||
Minecraft.getMinecraft().fontRenderer.drawString(inventory.getName(), xSize, ySize / 4, 4210752);
|
Minecraft.getInstance().fontRenderer.drawString(inventory.getName(), xSize, ySize / 4, 4210752);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -114,10 +114,10 @@ public class ElementRegistry {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onRenderOverlay(RenderGameOverlayEvent.Pre event) {
|
public static void onRenderOverlay(RenderGameOverlayEvent.Pre event) {
|
||||||
if (event.getType() == RenderGameOverlayEvent.ElementType.HOTBAR) {
|
if (event.getType() == RenderGameOverlayEvent.ElementType.HOTBAR) {
|
||||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance());
|
||||||
|
|
||||||
for (HUDElement element : HUD_ELEMENTS.values()) {
|
for (HUDElement element : HUD_ELEMENTS.values()) {
|
||||||
if (!element.shouldRender(Minecraft.getMinecraft()))
|
if (!element.shouldRender(Minecraft.getInstance()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Vector2f position = ELEMENT_INFO.get(getKey(element)).getPosition();
|
Vector2f position = ELEMENT_INFO.get(getKey(element)).getPosition();
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class GuiEditHUD extends Screen {
|
||||||
drawDefaultBackground();
|
drawDefaultBackground();
|
||||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
|
|
||||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance());
|
||||||
for (HUDElement element : ElementRegistry.getElements()) {
|
for (HUDElement element : ElementRegistry.getElements()) {
|
||||||
if (dragged == element)
|
if (dragged == element)
|
||||||
continue;
|
continue;
|
||||||
|
@ -87,7 +87,7 @@ public class GuiEditHUD extends Screen {
|
||||||
@Override
|
@Override
|
||||||
protected void mouseReleased(int mouseX, int mouseY, int state) {
|
protected void mouseReleased(int mouseX, int mouseY, int state) {
|
||||||
if (dragged != null) {
|
if (dragged != null) {
|
||||||
ScaledResolution resolution = new ScaledResolution(Minecraft.getMinecraft());
|
ScaledResolution resolution = new ScaledResolution(Minecraft.getInstance());
|
||||||
Point bounded = getBoundedDrag(resolution, mouseX, mouseY);
|
Point bounded = getBoundedDrag(resolution, mouseX, mouseY);
|
||||||
float xPos = (float) ((bounded.x) / resolution.getScaledWidth_double());
|
float xPos = (float) ((bounded.x) / resolution.getScaledWidth_double());
|
||||||
float yPos = (float) ((bounded.y) / resolution.getScaledHeight_double());
|
float yPos = (float) ((bounded.y) / resolution.getScaledHeight_double());
|
||||||
|
@ -105,7 +105,7 @@ public class GuiEditHUD extends Screen {
|
||||||
protected void actionPerformed(Button button) {
|
protected void actionPerformed(Button button) {
|
||||||
switch (button.id) {
|
switch (button.id) {
|
||||||
case 0: {
|
case 0: {
|
||||||
Minecraft.getMinecraft().displayGuiScreen(parent);
|
Minecraft.getInstance().displayGuiScreen(parent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
|
@ -116,12 +116,12 @@ public class GuiEditHUD extends Screen {
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
ElementRegistry.save(currentOverrides);
|
ElementRegistry.save(currentOverrides);
|
||||||
Minecraft.getMinecraft().displayGuiScreen(parent);
|
Minecraft.getInstance().displayGuiScreen(parent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3: {
|
case 3: {
|
||||||
currentOverrides.clear();
|
currentOverrides.clear();
|
||||||
Minecraft.getMinecraft().displayGuiScreen(parent);
|
Minecraft.getInstance().displayGuiScreen(parent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ElementDemonAura extends HUDElement {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||||
Minecraft minecraft = Minecraft.getMinecraft();
|
Minecraft minecraft = Minecraft.getInstance();
|
||||||
PlayerEntity player = minecraft.player;
|
PlayerEntity player = minecraft.player;
|
||||||
|
|
||||||
minecraft.getTextureManager().bindTexture(BAR_LOCATION);
|
minecraft.getTextureManager().bindTexture(BAR_LOCATION);
|
||||||
|
@ -73,6 +73,6 @@ public class ElementDemonAura extends HUDElement {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldRender(Minecraft minecraft) {
|
public boolean shouldRender(Minecraft minecraft) {
|
||||||
return Utils.canPlayerSeeDemonWill(Minecraft.getMinecraft().player);
|
return Utils.canPlayerSeeDemonWill(Minecraft.getInstance().player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public abstract class ElementDivinedInformation<T extends TileEntity> extends El
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldRender(Minecraft minecraft) {
|
public boolean shouldRender(Minecraft minecraft) {
|
||||||
PlayerEntity player = Minecraft.getMinecraft().player;
|
PlayerEntity player = Minecraft.getInstance().player;
|
||||||
ItemStack sigilStack = player.getHeldItem(Hand.MAIN_HAND);
|
ItemStack sigilStack = player.getHeldItem(Hand.MAIN_HAND);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (simple) {
|
if (simple) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class ElementHolding extends HUDElement {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F);
|
||||||
HOLDING_BAR.draw(drawX, drawY);
|
HOLDING_BAR.draw(drawX, drawY);
|
||||||
|
|
||||||
Minecraft minecraft = Minecraft.getMinecraft();
|
Minecraft minecraft = Minecraft.getInstance();
|
||||||
ItemStack sigilHolding = minecraft.player.getHeldItemMainhand();
|
ItemStack sigilHolding = minecraft.player.getHeldItemMainhand();
|
||||||
// Check mainhand for Sigil of Holding
|
// Check mainhand for Sigil of Holding
|
||||||
if (!(sigilHolding.getItem() == RegistrarBloodMagicItems.SIGIL_HOLDING))
|
if (!(sigilHolding.getItem() == RegistrarBloodMagicItems.SIGIL_HOLDING))
|
||||||
|
@ -74,12 +74,12 @@ public class ElementHolding extends HUDElement {
|
||||||
GlStateManager.translate((float) (-(x + 8)), (float) (-(y + 12)), 0.0F);
|
GlStateManager.translate((float) (-(x + 8)), (float) (-(y + 12)), 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
Minecraft.getMinecraft().getRenderItem().renderItemAndEffectIntoGUI(player, stack, x, y);
|
Minecraft.getInstance().getRenderItem().renderItemAndEffectIntoGUI(player, stack, x, y);
|
||||||
|
|
||||||
if (animation > 0.0F)
|
if (animation > 0.0F)
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
Minecraft.getMinecraft().getRenderItem().renderItemOverlays(Minecraft.getMinecraft().fontRenderer, stack, x, y);
|
Minecraft.getInstance().getRenderItem().renderItemOverlays(Minecraft.getInstance().fontRenderer, stack, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class ElementItemStack extends HUDElement {
|
||||||
@Override
|
@Override
|
||||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||||
RenderHelper.enableGUIStandardItemLighting();
|
RenderHelper.enableGUIStandardItemLighting();
|
||||||
Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(stack, drawX, drawY);
|
Minecraft.getInstance().getRenderItem().renderItemIntoGUI(stack, drawX, drawY);
|
||||||
RenderHelper.disableStandardItemLighting();
|
RenderHelper.disableStandardItemLighting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,14 @@ public class ElementString extends HUDElement {
|
||||||
private ITextComponent[] display;
|
private ITextComponent[] display;
|
||||||
|
|
||||||
public ElementString(ITextComponent... display) {
|
public ElementString(ITextComponent... display) {
|
||||||
super(getMaxStringWidth(display), (Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 2) * display.length - 2);
|
super(getMaxStringWidth(display), (Minecraft.getInstance().fontRenderer.FONT_HEIGHT + 2) * display.length - 2);
|
||||||
|
|
||||||
this.display = display;
|
this.display = display;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||||
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
|
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||||
for (ITextComponent drawText : display) {
|
for (ITextComponent drawText : display) {
|
||||||
fontRenderer.drawStringWithShadow(drawText.getFormattedText(), drawX, drawY, 14737632);
|
fontRenderer.drawStringWithShadow(drawText.getFormattedText(), drawX, drawY, 14737632);
|
||||||
drawY += fontRenderer.FONT_HEIGHT + 2;
|
drawY += fontRenderer.FONT_HEIGHT + 2;
|
||||||
|
@ -25,7 +25,7 @@ public class ElementString extends HUDElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getMaxStringWidth(ITextComponent... display) {
|
private static int getMaxStringWidth(ITextComponent... display) {
|
||||||
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
|
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
|
||||||
int maxWidth = 0;
|
int maxWidth = 0;
|
||||||
for (ITextComponent drawText : display)
|
for (ITextComponent drawText : display)
|
||||||
if (fontRenderer.getStringWidth(drawText.getFormattedText()) > maxWidth)
|
if (fontRenderer.getStringWidth(drawText.getFormattedText()) > maxWidth)
|
||||||
|
|
|
@ -31,24 +31,24 @@ public abstract class ElementTileInformation<T extends TileEntity> extends HUDEl
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
public void draw(ScaledResolution resolution, float partialTicks, int drawX, int drawY) {
|
||||||
T tile = (T) Minecraft.getMinecraft().world.getTileEntity(Minecraft.getMinecraft().objectMouseOver.getBlockPos());
|
T tile = (T) Minecraft.getInstance().world.getTileEntity(Minecraft.getInstance().objectMouseOver.getBlockPos());
|
||||||
|
|
||||||
int yOffset = 0;
|
int yOffset = 0;
|
||||||
for (Pair<Sprite, Function<T, String>> sprite : information) {
|
for (Pair<Sprite, Function<T, String>> sprite : information) {
|
||||||
sprite.getLeft().draw(drawX, drawY + yOffset);
|
sprite.getLeft().draw(drawX, drawY + yOffset);
|
||||||
int textY = drawY + yOffset + (sprite.getLeft().getTextureHeight() / 4);
|
int textY = drawY + yOffset + (sprite.getLeft().getTextureHeight() / 4);
|
||||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow((tile != null && tile.getClass() == tileClass) ? sprite.getRight().apply(tile) : "?", drawX + sprite.getLeft().getTextureWidth() + 2, textY, Color.WHITE.getRGB());
|
Minecraft.getInstance().fontRenderer.drawStringWithShadow((tile != null && tile.getClass() == tileClass) ? sprite.getRight().apply(tile) : "?", drawX + sprite.getLeft().getTextureWidth() + 2, textY, Color.WHITE.getRGB());
|
||||||
yOffset += sprite.getLeft().getTextureHeight() + 2;
|
yOffset += sprite.getLeft().getTextureHeight() + 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldRender(Minecraft minecraft) {
|
public boolean shouldRender(Minecraft minecraft) {
|
||||||
RayTraceResult trace = Minecraft.getMinecraft().objectMouseOver;
|
RayTraceResult trace = Minecraft.getInstance().objectMouseOver;
|
||||||
if (trace == null || trace.typeOfHit != RayTraceResult.Type.BLOCK)
|
if (trace == null || trace.typeOfHit != RayTraceResult.Type.BLOCK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TileEntity tile = Minecraft.getMinecraft().world.getTileEntity(trace.getBlockPos());
|
TileEntity tile = Minecraft.getInstance().world.getTileEntity(trace.getBlockPos());
|
||||||
if (tile == null || !tileClass.isAssignableFrom(tile.getClass()))
|
if (tile == null || !tileClass.isAssignableFrom(tile.getClass()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public enum KeyBindings {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void handleKeybind() {
|
public void handleKeybind() {
|
||||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding)
|
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding)
|
||||||
ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, -1);
|
ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, -1);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public enum KeyBindings {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void handleKeybind() {
|
public void handleKeybind() {
|
||||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding)
|
if (player.getHeldItemMainhand().getItem() instanceof ItemSigilHolding)
|
||||||
ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, 1);
|
ClientHandler.cycleSigil(player.getHeldItemMainhand(), player, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class AttractorAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
float size = 1.0F * getSizeModifier(craftTime);
|
float size = 1.0F * getSizeModifier(craftTime);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
float size = 3.0F;
|
float size = 3.0F;
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
@ -159,7 +159,7 @@ public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
|
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arraysResources[i]);
|
Minecraft.getInstance().renderEngine.bindTexture(arraysResources[i]);
|
||||||
float newSize = 1;
|
float newSize = 1;
|
||||||
float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(i, craftTime);
|
float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(i, craftTime);
|
||||||
float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(i, craftTime);
|
float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(i, craftTime);
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1);
|
GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.rotate(rot, 0, 0, 1);
|
GlStateManager.rotate(rot, 0, 0, 1);
|
||||||
double var31 = 0.0D;
|
double var31 = 0.0D;
|
||||||
|
@ -119,7 +119,7 @@ public class DualAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
// Bind the second texture to the circle
|
// Bind the second texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(secondaryArrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(secondaryArrayResource);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.rotate(-rot, 0, 0, 1);
|
GlStateManager.rotate(-rot, 0, 0, 1);
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class MobSacrificeAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
float size = 1.0F * getSizeModifier(craftTime);
|
float size = 1.0F * getSizeModifier(craftTime);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
@ -126,14 +126,14 @@ public class MobSacrificeAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
|
|
||||||
for (int i = 1; i <= 3; i++) {
|
for (int i = 1; i <= 3; i++) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(bottomArrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(bottomArrayResource);
|
||||||
translateAndRotateFloatingArray(tessellator, wr, size, rot, craftTime, i);
|
translateAndRotateFloatingArray(tessellator, wr, size, rot, craftTime, i);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Render the main array.
|
//Render the main array.
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
// GlStateManager.rotate(rot, 0, 0, 1);
|
// GlStateManager.rotate(rot, 0, 0, 1);
|
||||||
renderStandardCircle(tessellator, wr, 3);
|
renderStandardCircle(tessellator, wr, 3);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
@ -146,7 +146,7 @@ public class MobSacrificeAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
swirlSize = 3 * (craftTime - 40) / 60;
|
swirlSize = 3 * (craftTime - 40) / 60;
|
||||||
}
|
}
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(mobSacrificeSwirlResource);
|
Minecraft.getInstance().renderEngine.bindTexture(mobSacrificeSwirlResource);
|
||||||
GlStateManager.translate(0, 0, 0.1);
|
GlStateManager.translate(0, 0, 0.1);
|
||||||
GlStateManager.rotate(rot / 3, 0, 0, 1);
|
GlStateManager.rotate(rot / 3, 0, 0, 1);
|
||||||
renderStandardCircle(tessellator, wr, swirlSize);
|
renderStandardCircle(tessellator, wr, swirlSize);
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class SingleAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1);
|
GlStateManager.rotate(rotation.getHorizontalAngle() + 180, 0, 0, 1);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.rotate(rot, 0, 0, 1);
|
GlStateManager.rotate(rot, 0, 0, 1);
|
||||||
double var31 = 0.0D;
|
double var31 = 0.0D;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class StaticAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
float size = 1.0F * getSizeModifier(craftTime);
|
float size = 1.0F * getSizeModifier(craftTime);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class TurretAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
float size = 1.0F * getSizeModifier(craftTime);
|
float size = 1.0F * getSizeModifier(craftTime);
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
@ -135,21 +135,21 @@ public class TurretAlchemyCircleRenderer extends AlchemyCircleRenderer {
|
||||||
GlStateManager.rotate((float) ((pitch + 90) * getStartupPitchYawRatio(craftTime)), 1, 0, 0);
|
GlStateManager.rotate((float) ((pitch + 90) * getStartupPitchYawRatio(craftTime)), 1, 0, 0);
|
||||||
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(bottomArrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(bottomArrayResource);
|
||||||
GlStateManager.rotate(-rot, 0, 0, 1);
|
GlStateManager.rotate(-rot, 0, 0, 1);
|
||||||
GlStateManager.translate(0, 0, -bottomHeightOffset);
|
GlStateManager.translate(0, 0, -bottomHeightOffset);
|
||||||
renderStandardCircle(tessellator, wr, size / 2);
|
renderStandardCircle(tessellator, wr, size / 2);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(middleArrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(middleArrayResource);
|
||||||
GlStateManager.rotate(0, 0, 0, 1);
|
GlStateManager.rotate(0, 0, 0, 1);
|
||||||
GlStateManager.translate(0, 0, -middleHeightOffset);
|
GlStateManager.translate(0, 0, -middleHeightOffset);
|
||||||
renderStandardCircle(tessellator, wr, size);
|
renderStandardCircle(tessellator, wr, size);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(arrayResource);
|
Minecraft.getInstance().renderEngine.bindTexture(arrayResource);
|
||||||
GlStateManager.rotate(rot, 0, 0, 1);
|
GlStateManager.rotate(rot, 0, 0, 1);
|
||||||
GlStateManager.translate(0, 0, -topHeightOffset);
|
GlStateManager.translate(0, 0, -topHeightOffset);
|
||||||
renderStandardCircle(tessellator, wr, size);
|
renderStandardCircle(tessellator, wr, size);
|
||||||
|
|
|
@ -54,11 +54,11 @@ public class RenderAltar extends TileEntityRenderer<TileAltar> {
|
||||||
|
|
||||||
float size = 0.8f;
|
float size = 0.8f;
|
||||||
|
|
||||||
TextureAtlasSprite fluidStillSprite = Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(fluid.getStill().toString());
|
TextureAtlasSprite fluidStillSprite = Minecraft.getInstance().getTextureMapBlocks().getTextureExtry(fluid.getStill().toString());
|
||||||
|
|
||||||
int fluidColor = fluid.getColor(fluidStack);
|
int fluidColor = fluid.getColor(fluidStack);
|
||||||
|
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
Minecraft.getInstance().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||||
setGLColorFromInt(fluidColor);
|
setGLColorFromInt(fluidColor);
|
||||||
|
|
||||||
double uMin = (double) fluidStillSprite.getMinU();
|
double uMin = (double) fluidStillSprite.getMinU();
|
||||||
|
@ -78,7 +78,7 @@ public class RenderAltar extends TileEntityRenderer<TileAltar> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderItem(ItemStack stack) {
|
private void renderItem(ItemStack stack) {
|
||||||
ItemRenderer itemRenderer = Minecraft.getMinecraft().getRenderItem();
|
ItemRenderer itemRenderer = Minecraft.getInstance().getRenderItem();
|
||||||
if (!stack.isEmpty()) {
|
if (!stack.isEmpty()) {
|
||||||
GlStateManager.translate(0.5, 1, 0.5);
|
GlStateManager.translate(0.5, 1, 0.5);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
|
@ -100,7 +100,7 @@ public class RenderAltar extends TileEntityRenderer<TileAltar> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderHologram(TileAltar altar, AltarTier tier, float partialTicks) {
|
private void renderHologram(TileAltar altar, AltarTier tier, float partialTicks) {
|
||||||
ClientPlayerEntity player = Minecraft.getMinecraft().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
World world = player.world;
|
World world = player.world;
|
||||||
|
|
||||||
if (tier == AltarTier.ONE)
|
if (tier == AltarTier.ONE)
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderBloodTank extends TileEntityRenderer<TileBloodTank> {
|
public class RenderBloodTank extends TileEntityRenderer<TileBloodTank> {
|
||||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
private static final Minecraft mc = Minecraft.getInstance();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
public void render(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
||||||
|
@ -49,7 +49,7 @@ public class RenderBloodTank extends TileEntityRenderer<TileBloodTank> {
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
BufferBuilder buffer = tessellator.getBuffer();
|
BufferBuilder buffer = tessellator.getBuffer();
|
||||||
|
|
||||||
TextureAtlasSprite fluid = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(renderFluid.getStill().toString());
|
TextureAtlasSprite fluid = Minecraft.getInstance().getTextureMapBlocks().getAtlasSprite(renderFluid.getStill().toString());
|
||||||
fluid = fluid == null ? mc.getTextureMapBlocks().getMissingSprite() : fluid;
|
fluid = fluid == null ? mc.getTextureMapBlocks().getMissingSprite() : fluid;
|
||||||
|
|
||||||
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class RenderDemonCrucible extends TileEntityRenderer<TileDemonCrucible> {
|
public class RenderDemonCrucible extends TileEntityRenderer<TileDemonCrucible> {
|
||||||
public static Minecraft mc = Minecraft.getMinecraft();
|
public static Minecraft mc = Minecraft.getInstance();
|
||||||
public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png");
|
public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png");
|
||||||
public static float minHeight = 0.6497f;
|
public static float minHeight = 0.6497f;
|
||||||
public static float maxHeight = 0.79f;
|
public static float maxHeight = 0.79f;
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class RenderFakeBlocks {
|
||||||
double maxZ = minZ + 1;
|
double maxZ = minZ + 1;
|
||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
BufferBuilder wr = tessellator.getBuffer();
|
BufferBuilder wr = tessellator.getBuffer();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
Minecraft.getInstance().renderEngine.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||||
|
|
||||||
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class RenderItemRoutingNode extends TileEntityRenderer<TileRoutingNode> {
|
public class RenderItemRoutingNode extends TileEntityRenderer<TileRoutingNode> {
|
||||||
private static final ResourceLocation beamTexture = new ResourceLocation(BloodMagic.MODID, "textures/entities/nodeBeam.png");
|
private static final ResourceLocation beamTexture = new ResourceLocation(BloodMagic.MODID, "textures/entities/nodeBeam.png");
|
||||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
private static final Minecraft mc = Minecraft.getInstance();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(TileRoutingNode tileNode, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
public void render(TileRoutingNode tileNode, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class RenderEntityBloodLight extends EntityRenderer<EntityBloodLight> {
|
public class RenderEntityBloodLight extends EntityRenderer<EntityBloodLight> {
|
||||||
private final ItemRenderer renderItem = Minecraft.getMinecraft().getRenderItem();
|
private final ItemRenderer renderItem = Minecraft.getInstance().getRenderItem();
|
||||||
|
|
||||||
public RenderEntityBloodLight(EntityRendererManager renderManagerIn) {
|
public RenderEntityBloodLight(EntityRendererManager renderManagerIn) {
|
||||||
super(renderManagerIn);
|
super(renderManagerIn);
|
||||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
||||||
private static final ResourceLocation SPIDER_TEXTURES = new ResourceLocation("textures/entity/spider/spider.png");
|
private static final ResourceLocation SPIDER_TEXTURES = new ResourceLocation("textures/entity/spider/spider.png");
|
||||||
Minecraft minecraft = Minecraft.getMinecraft();
|
Minecraft minecraft = Minecraft.getInstance();
|
||||||
|
|
||||||
public RenderEntityMimic(EntityRendererManager renderManagerIn) {
|
public RenderEntityMimic(EntityRendererManager renderManagerIn) {
|
||||||
super(renderManagerIn, new ModelMimic(), 1.0F);
|
super(renderManagerIn, new ModelMimic(), 1.0F);
|
||||||
|
@ -49,7 +49,7 @@ public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
||||||
|
|
||||||
ItemStack itemstack = mimic.getMimicItemStack();
|
ItemStack itemstack = mimic.getMimicItemStack();
|
||||||
Item item = itemstack.getItem();
|
Item item = itemstack.getItem();
|
||||||
Minecraft minecraft = Minecraft.getMinecraft();
|
Minecraft minecraft = Minecraft.getInstance();
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
|
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
@ -70,7 +70,7 @@ public class RenderEntityMimic extends MobRenderer<EntityMimic> {
|
||||||
|
|
||||||
if (!StringUtils.isNullOrEmpty(s)) {
|
if (!StringUtils.isNullOrEmpty(s)) {
|
||||||
gameprofile = SkullTileEntity.updateGameProfile(new GameProfile(null, s));
|
gameprofile = SkullTileEntity.updateGameProfile(new GameProfile(null, s));
|
||||||
nbttagcompound.setTag("SkullOwner", NBTUtil.writeGameProfile(new CompoundNBT(), gameprofile));
|
nbttagcompound.putTag("SkullOwner", NBTUtil.writeGameProfile(new CompoundNBT(), gameprofile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class RenderEntitySoulSnare extends EntityRenderer<EntitySoulSnare> {
|
public class RenderEntitySoulSnare extends EntityRenderer<EntitySoulSnare> {
|
||||||
private final ItemRenderer renderItem = Minecraft.getMinecraft().getRenderItem();
|
private final ItemRenderer renderItem = Minecraft.getInstance().getRenderItem();
|
||||||
|
|
||||||
public RenderEntitySoulSnare(EntityRendererManager renderManagerIn) {
|
public RenderEntitySoulSnare(EntityRendererManager renderManagerIn) {
|
||||||
super(renderManagerIn);
|
super(renderManagerIn);
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class LayerAlchemyCircle<T extends EntityCorruptedSheep> implements Layer
|
||||||
float size = 3.0F;
|
float size = 3.0F;
|
||||||
|
|
||||||
// Bind the texture to the circle
|
// Bind the texture to the circle
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARRAY_TEXTURE);
|
Minecraft.getInstance().renderEngine.bindTexture(ARRAY_TEXTURE);
|
||||||
|
|
||||||
GlStateManager.disableCull();
|
GlStateManager.disableCull();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class EntryText extends EntryResourceLocation {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void drawExtras(Book book, CategoryAbstract category, int entryX, int entryY, int entryWidth, int entryHeight, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) {
|
public void drawExtras(Book book, CategoryAbstract category, int entryX, int entryY, int entryWidth, int entryHeight, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(image);
|
Minecraft.getInstance().getTextureManager().bindTexture(image);
|
||||||
GuiHelper.drawSizedIconWithoutColor(entryX + 4, entryY + 2, 8, 8, 1F);
|
GuiHelper.drawSizedIconWithoutColor(entryX + 4, entryY + 2, 8, 8, 1F);
|
||||||
|
|
||||||
boolean startFlag = fontRendererObj.getUnicodeFlag();
|
boolean startFlag = fontRendererObj.getUnicodeFlag();
|
||||||
|
|
|
@ -51,13 +51,13 @@ public class PageAlchemyArray extends Page {
|
||||||
int x = guiLeft + 65;
|
int x = guiLeft + 65;
|
||||||
int y = guiTop + 30;
|
int y = guiTop + 30;
|
||||||
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/alchemyArrayCrafting.png"));
|
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/alchemyArrayCrafting.png"));
|
||||||
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack.isEmpty() ? 0 : 26));
|
guiBase.drawTexturedModalRect(x, y, 0, 0, 62, 88 + (outputStack.isEmpty() ? 0 : 26));
|
||||||
|
|
||||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.alchemyArray"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||||
|
|
||||||
for (ResourceLocation arrayResource : arrayResources) {
|
for (ResourceLocation arrayResource : arrayResources) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(arrayResource);
|
Minecraft.getInstance().getTextureManager().bindTexture(arrayResource);
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.translate(x + 2, y + 28, 0);
|
GlStateManager.translate(x + 2, y + 28, 0);
|
||||||
GlStateManager.scale(scale, scale, scale);
|
GlStateManager.scale(scale, scale, scale);
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class PageAltarRecipe extends Page {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png"));
|
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png"));
|
||||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
||||||
|
|
||||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.bloodAltar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.bloodAltar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class PageTartaricForgeRecipe extends Page {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/soulForge.png"));
|
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/soulForge.png"));
|
||||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 146, 104);
|
||||||
|
|
||||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.soulForge"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.bloodmagic.page.soulForge"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||||
|
|
|
@ -4,18 +4,22 @@ import WayofTime.bloodmagic.BloodMagic;
|
||||||
import WayofTime.bloodmagic.util.Constants;
|
import WayofTime.bloodmagic.util.Constants;
|
||||||
import WayofTime.bloodmagic.compat.waila.provider.*;
|
import WayofTime.bloodmagic.compat.waila.provider.*;
|
||||||
import WayofTime.bloodmagic.tile.*;
|
import WayofTime.bloodmagic.tile.*;
|
||||||
|
import mcp.mobius.waila.api.IRegistrar;
|
||||||
import mcp.mobius.waila.api.IWailaPlugin;
|
import mcp.mobius.waila.api.IWailaPlugin;
|
||||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
import mcp.mobius.waila.api.TooltipPosition;
|
||||||
import mcp.mobius.waila.api.WailaPlugin;
|
import mcp.mobius.waila.api.WailaPlugin;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
@WailaPlugin
|
@WailaPlugin
|
||||||
public class BloodMagicHwylaPlugin implements IWailaPlugin {
|
public class BloodMagicHwylaPlugin implements IWailaPlugin {
|
||||||
|
|
||||||
|
public static final ResourceLocation CONFIG_SHOW_ALTAR_STATS = new ResourceLocation(BloodMagic.MODID, "show_altar_stats");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void register(IWailaRegistrar registrar) {
|
public void register(IRegistrar registrar) {
|
||||||
registrar.registerBodyProvider(DataProviderBloodAltar.INSTANCE, TileAltar.class);
|
registrar.registerComponentProvider(DataProviderBloodAltar.INSTANCE, TooltipPosition.BODY, TileAltar.class);
|
||||||
registrar.registerNBTProvider(DataProviderBloodAltar.INSTANCE, TileAltar.class);
|
registrar.registerBlockDataProvider(DataProviderBloodAltar.INSTANCE, TileAltar.class);
|
||||||
registrar.addConfig(BloodMagic.MODID, Constants.Compat.WAILA_CONFIG_ALTAR, true);
|
registrar.addConfig(CONFIG_SHOW_ALTAR_STATS, true);
|
||||||
|
|
||||||
registrar.registerBodyProvider(DataProviderTeleposer.INSTANCE, TileTeleposer.class);
|
registrar.registerBodyProvider(DataProviderTeleposer.INSTANCE, TileTeleposer.class);
|
||||||
registrar.registerNBTProvider(DataProviderTeleposer.INSTANCE, TileTeleposer.class);
|
registrar.registerNBTProvider(DataProviderTeleposer.INSTANCE, TileTeleposer.class);
|
||||||
|
|
|
@ -48,9 +48,9 @@ public class DataProviderAlchemyArray implements IWailaDataProvider {
|
||||||
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
||||||
TileAlchemyArray alchemyArray = (TileAlchemyArray) te;
|
TileAlchemyArray alchemyArray = (TileAlchemyArray) te;
|
||||||
if (!alchemyArray.getStackInSlot(0).isEmpty())
|
if (!alchemyArray.getStackInSlot(0).isEmpty())
|
||||||
tag.setString("reagent", alchemyArray.getStackInSlot(0).getDisplayName());
|
tag.putString("reagent", alchemyArray.getStackInSlot(0).getDisplayName());
|
||||||
if (!alchemyArray.getStackInSlot(1).isEmpty())
|
if (!alchemyArray.getStackInSlot(1).isEmpty())
|
||||||
tag.setString("catalyst", alchemyArray.getStackInSlot(1).getDisplayName());
|
tag.putString("catalyst", alchemyArray.getStackInSlot(1).getDisplayName());
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
package WayofTime.bloodmagic.compat.waila.provider;
|
package WayofTime.bloodmagic.compat.waila.provider;
|
||||||
|
|
||||||
import WayofTime.bloodmagic.ConfigHandler;
|
import WayofTime.bloodmagic.ConfigHandler;
|
||||||
import WayofTime.bloodmagic.util.Constants;
|
import WayofTime.bloodmagic.compat.waila.BloodMagicHwylaPlugin;
|
||||||
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
||||||
import WayofTime.bloodmagic.item.sigil.ItemSigilDivination;
|
import WayofTime.bloodmagic.item.sigil.ItemSigilDivination;
|
||||||
import WayofTime.bloodmagic.tile.TileAltar;
|
import WayofTime.bloodmagic.tile.TileAltar;
|
||||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
import mcp.mobius.waila.api.IComponentProvider;
|
||||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
import mcp.mobius.waila.api.IDataAccessor;
|
||||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
import mcp.mobius.waila.api.IPluginConfig;
|
||||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
import mcp.mobius.waila.api.IServerDataProvider;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import net.minecraft.util.text.TranslationTextComponent;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,35 +25,31 @@ import java.util.List;
|
||||||
* href="https://github.com/tterrag1098">tterrag1098</a>. Originally implemented
|
* href="https://github.com/tterrag1098">tterrag1098</a>. Originally implemented
|
||||||
* in ImLookingAtBlood by <a href="https://github.com/Pokefenn">Pokefenn</a>.
|
* in ImLookingAtBlood by <a href="https://github.com/Pokefenn">Pokefenn</a>.
|
||||||
*/
|
*/
|
||||||
public class DataProviderBloodAltar implements IWailaDataProvider {
|
public class DataProviderBloodAltar implements IComponentProvider, IServerDataProvider<TileEntity> {
|
||||||
|
|
||||||
public static final IWailaDataProvider INSTANCE = new DataProviderBloodAltar();
|
public static final DataProviderBloodAltar INSTANCE = new DataProviderBloodAltar();
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
public void appendBody(List<ITextComponent> tooltip, IDataAccessor accessor, IPluginConfig config) {
|
||||||
if (!config.getConfig(Constants.Compat.WAILA_CONFIG_ALTAR))
|
if (!config.get(BloodMagicHwylaPlugin.CONFIG_SHOW_ALTAR_STATS))
|
||||||
return currenttip;
|
return;
|
||||||
|
|
||||||
if (accessor.getNBTData().hasKey("altar")) {
|
if (accessor.getServerData().contains("altar")) {
|
||||||
CompoundNBT altarData = accessor.getNBTData().getCompoundTag("altar");
|
CompoundNBT altarData = accessor.getServerData().getCompound("altar");
|
||||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarTier", altarData.getInteger("tier")));
|
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentAltarTier", altarData.getInt("tier")));
|
||||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", altarData.getInteger("capacity")));
|
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentAltarCapacity", altarData.getInt("capacity")));
|
||||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentEssence", altarData.getInteger("stored")));
|
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentEssence", altarData.getInt("stored")));
|
||||||
|
|
||||||
if (altarData.hasKey("charge")) {
|
if (altarData.contains("charge")) {
|
||||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", altarData.getInteger("progress") + "%"));
|
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentAltarProgress.percent", altarData.getInt("progress") + "%"));
|
||||||
currenttip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.seer.currentCharge", altarData.getInteger("charge")));
|
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.seer.currentCharge", altarData.getInt("charge")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return currenttip;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
public void appendServerData(CompoundNBT tag, ServerPlayerEntity player, World world, TileEntity tileEntity) {
|
||||||
TileAltar altar = (TileAltar) te;
|
TileAltar altar = (TileAltar) tileEntity;
|
||||||
|
|
||||||
boolean hasSigil = false;
|
boolean hasSigil = false;
|
||||||
boolean hasSeer = false;
|
boolean hasSeer = false;
|
||||||
|
@ -76,20 +72,18 @@ public class DataProviderBloodAltar implements IWailaDataProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasSeer && !hasSigil)
|
if (!hasSeer && !hasSigil)
|
||||||
return tag;
|
return;
|
||||||
|
|
||||||
CompoundNBT altarData = new CompoundNBT();
|
CompoundNBT altarData = new CompoundNBT();
|
||||||
altarData.setInteger("tier", altar.getTier().toInt());
|
altarData.putInt("tier", altar.getTier().toInt());
|
||||||
altarData.setInteger("capacity", altar.getCapacity());
|
altarData.putInt("capacity", altar.getCapacity());
|
||||||
altarData.setInteger("stored", altar.getCurrentBlood());
|
altarData.putInt("stored", altar.getCurrentBlood());
|
||||||
if (hasSeer) {
|
if (hasSeer) {
|
||||||
altarData.setInteger("progress", (int) (((double) altar.getProgress() / (double) altar.getLiquidRequired() * 100) / altar.getStackInSlot(0).getCount()));
|
altarData.putInt("progress", (int) (((double) altar.getProgress() / (double) altar.getLiquidRequired() * 100) / altar.getStackInSlot(0).getCount()));
|
||||||
altarData.setInteger("charge", altar.getTotalCharge());
|
altarData.putInt("charge", altar.getTotalCharge());
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setTag("altar", altarData);
|
tag.put("altar", altarData);
|
||||||
|
|
||||||
return tag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasStack(ItemStack stack, PlayerEntity player) {
|
public static boolean hasStack(ItemStack stack, PlayerEntity player) {
|
||||||
|
|
|
@ -42,10 +42,10 @@ public class DataProviderBloodTank implements IWailaDataProvider {
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
public CompoundNBT getNBTData(ServerPlayerEntity player, TileEntity te, CompoundNBT tag, World world, BlockPos pos) {
|
||||||
TileBloodTank tank = (TileBloodTank) te;
|
TileBloodTank tank = (TileBloodTank) te;
|
||||||
tag.setInteger("tier", tank.getBlockMetadata() + 1);
|
tag.putInt("tier", tank.getBlockMetadata() + 1);
|
||||||
tag.setInteger("capacity", tank.capacity);
|
tag.putInt("capacity", tank.capacity);
|
||||||
if (tank.getTank().getFluid() != null)
|
if (tank.getTank().getFluid() != null)
|
||||||
tag.setTag("fluid", tank.getTank().getFluid().writeToNBT(new CompoundNBT()));
|
tag.put("fluid", tank.getTank().getFluid().writeToNBT(new CompoundNBT()));
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class DataProviderMimic implements IWailaDataProvider {
|
||||||
if (shareTag != null)
|
if (shareTag != null)
|
||||||
item.setTag("nbt", shareTag);
|
item.setTag("nbt", shareTag);
|
||||||
|
|
||||||
tag.setTag("mimiced", item);
|
tag.put("mimiced", item);
|
||||||
}
|
}
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,21 +57,21 @@ public class DataProviderRitualController implements IWailaDataProvider {
|
||||||
|
|
||||||
if (te instanceof TileMasterRitualStone) {
|
if (te instanceof TileMasterRitualStone) {
|
||||||
TileMasterRitualStone mrs = (TileMasterRitualStone) te;
|
TileMasterRitualStone mrs = (TileMasterRitualStone) te;
|
||||||
tag.setBoolean("master", true);
|
tag.putBoolean("master", true);
|
||||||
if (mrs.getCurrentRitual() != null) {
|
if (mrs.getCurrentRitual() != null) {
|
||||||
tag.setString("ritual", mrs.getCurrentRitual().getTranslationKey());
|
tag.putString("ritual", mrs.getCurrentRitual().getTranslationKey());
|
||||||
tag.setBoolean("active", mrs.isActive());
|
tag.putBoolean("active", mrs.isActive());
|
||||||
if (mrs.getOwner() != null)
|
if (mrs.getOwner() != null)
|
||||||
tag.setString("owner", PlayerHelper.getUsernameFromUUID(mrs.getOwner()));
|
tag.putString("owner", PlayerHelper.getUsernameFromUUID(mrs.getOwner()));
|
||||||
tag.setBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(mrs.getCurrentRitual()), false));
|
tag.putBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(mrs.getCurrentRitual()), false));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tag.setBoolean("master", false);
|
tag.putBoolean("master", false);
|
||||||
|
|
||||||
ImperfectRitual ritual = BloodMagic.RITUAL_MANAGER.getImperfectRitual(world.getBlockState(pos.up()));
|
ImperfectRitual ritual = BloodMagic.RITUAL_MANAGER.getImperfectRitual(world.getBlockState(pos.up()));
|
||||||
if (ritual != null) {
|
if (ritual != null) {
|
||||||
tag.setString("ritual", ritual.getTranslationKey());
|
tag.putString("ritual", ritual.getTranslationKey());
|
||||||
tag.setBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(ritual), false));
|
tag.putBoolean("enabled", BloodMagic.RITUAL_MANAGER.enabled(BloodMagic.RITUAL_MANAGER.getId(ritual), false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class DataProviderTeleposer implements IWailaDataProvider {
|
||||||
CompoundNBT focusData = new CompoundNBT();
|
CompoundNBT focusData = new CompoundNBT();
|
||||||
focusData.setTag("pos", NBTUtil.createPosTag(focus.getBlockPos(contained)));
|
focusData.setTag("pos", NBTUtil.createPosTag(focus.getBlockPos(contained)));
|
||||||
focusData.setInteger("dim", contained.getTagCompound().getInteger(Constants.NBT.DIMENSION_ID));
|
focusData.setInteger("dim", contained.getTagCompound().getInteger(Constants.NBT.DIMENSION_ID));
|
||||||
tag.setTag("focus", focusData);
|
tag.put("focus", focusData);
|
||||||
}
|
}
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,11 @@ public class BMWorldSavedData extends WorldSavedData {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tagCompound) {
|
public void read(CompoundNBT tagCompound) {
|
||||||
ListNBT networkData = tagCompound.getTagList("networkData", 10);
|
ListNBT networkData = tagCompound.getList("networkData", 10);
|
||||||
|
|
||||||
for (int i = 0; i < networkData.tagCount(); i++) {
|
for (int i = 0; i < networkData.size(); i++) {
|
||||||
CompoundNBT data = networkData.getCompoundTagAt(i);
|
CompoundNBT data = networkData.getCompound(i);
|
||||||
SoulNetwork network = SoulNetwork.fromNBT(data);
|
SoulNetwork network = SoulNetwork.fromNBT(data);
|
||||||
network.setParent(this);
|
network.setParent(this);
|
||||||
soulNetworks.put(network.getPlayerId(), network);
|
soulNetworks.put(network.getPlayerId(), network);
|
||||||
|
@ -46,12 +46,12 @@ public class BMWorldSavedData extends WorldSavedData {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT writeToNBT(CompoundNBT tagCompound) {
|
public CompoundNBT write(CompoundNBT tagCompound) {
|
||||||
ListNBT networkData = new ListNBT();
|
ListNBT networkData = new ListNBT();
|
||||||
for (SoulNetwork soulNetwork : soulNetworks.values())
|
for (SoulNetwork soulNetwork : soulNetworks.values())
|
||||||
networkData.appendTag(soulNetwork.serializeNBT());
|
networkData.add(soulNetwork.serializeNBT());
|
||||||
|
|
||||||
tagCompound.setTag("networkData", networkData);
|
tagCompound.put("networkData", networkData);
|
||||||
|
|
||||||
return tagCompound;
|
return tagCompound;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.bloodmagic.core.data;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.nbt.NBTBase;
|
import net.minecraft.nbt.INBT;
|
||||||
import net.minecraft.nbt.NBTUtil;
|
import net.minecraft.nbt.NBTUtil;
|
||||||
import net.minecraftforge.common.util.INBTSerializable;
|
import net.minecraftforge.common.util.INBTSerializable;
|
||||||
|
|
||||||
|
@ -26,14 +26,14 @@ public class Binding implements INBTSerializable<CompoundNBT> {
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT serializeNBT() {
|
public CompoundNBT serializeNBT() {
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
tag.setTag("id", NBTUtil.createUUIDTag(uuid));
|
tag.put("id", NBTUtil.writeUniqueId(uuid));
|
||||||
tag.setString("name", name);
|
tag.putString("name", name);
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deserializeNBT(CompoundNBT nbt) {
|
public void deserializeNBT(CompoundNBT nbt) {
|
||||||
this.uuid = NBTUtil.getUUIDFromTag(nbt.getCompoundTag("id"));
|
this.uuid = NBTUtil.readUniqueId(nbt.getCompound("id"));
|
||||||
this.name = nbt.getString("name");
|
this.name = nbt.getString("name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,11 +57,11 @@ public class Binding implements INBTSerializable<CompoundNBT> {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Binding fromStack(ItemStack stack) {
|
public static Binding fromStack(ItemStack stack) {
|
||||||
if (!stack.hasTagCompound()) // Definitely hasn't been bound yet.
|
if (!stack.hasTag()) // Definitely hasn't been bound yet.
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
NBTBase bindingTag = stack.getTagCompound().getTag("binding");
|
INBT bindingTag = stack.getTag().get("binding");
|
||||||
if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.isEmpty()) // Make sure it's both a tag compound and that it has actual data.
|
if (bindingTag == null || bindingTag.getId() != 10) // Make sure it's both a tag compound and that it has actual data.
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
Binding binding = new Binding();
|
Binding binding = new Binding();
|
||||||
|
|
|
@ -150,13 +150,13 @@ public class SoulNetwork implements INBTSerializable<CompoundNBT> {
|
||||||
public void hurtPlayer(PlayerEntity user, float syphon) {
|
public void hurtPlayer(PlayerEntity user, float syphon) {
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
if (syphon < 100 && syphon > 0) {
|
if (syphon < 100 && syphon > 0) {
|
||||||
if (!user.capabilities.isCreativeMode) {
|
if (!user.isCreative()) {
|
||||||
user.hurtResistantTime = 0;
|
user.hurtResistantTime = 0;
|
||||||
user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F);
|
user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (syphon >= 100) {
|
} else if (syphon >= 100) {
|
||||||
if (!user.capabilities.isCreativeMode) {
|
if (!user.isCreative()) {
|
||||||
for (int i = 0; i < ((syphon + 99) / 100); i++) {
|
for (int i = 0; i < ((syphon + 99) / 100); i++) {
|
||||||
user.hurtResistantTime = 0;
|
user.hurtResistantTime = 0;
|
||||||
user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F);
|
user.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 1.0F);
|
||||||
|
@ -228,17 +228,17 @@ public class SoulNetwork implements INBTSerializable<CompoundNBT> {
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT serializeNBT() {
|
public CompoundNBT serializeNBT() {
|
||||||
CompoundNBT tagCompound = new CompoundNBT();
|
CompoundNBT tagCompound = new CompoundNBT();
|
||||||
tagCompound.setString("playerId", getPlayerId().toString());
|
tagCompound.putString("playerId", getPlayerId().toString());
|
||||||
tagCompound.setInteger("currentEssence", getCurrentEssence());
|
tagCompound.putInt("currentEssence", getCurrentEssence());
|
||||||
tagCompound.setInteger("orbTier", getOrbTier());
|
tagCompound.putInt("orbTier", getOrbTier());
|
||||||
return tagCompound;
|
return tagCompound;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deserializeNBT(CompoundNBT nbt) {
|
public void deserializeNBT(CompoundNBT nbt) {
|
||||||
this.playerId = UUID.fromString(nbt.getString("playerId"));
|
this.playerId = UUID.fromString(nbt.getString("playerId"));
|
||||||
this.currentEssence = nbt.getInteger("currentEssence");
|
this.currentEssence = nbt.getInt("currentEssence");
|
||||||
this.orbTier = nbt.getInteger("orbTier");
|
this.orbTier = nbt.getInt("orbTier");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SoulNetwork fromNBT(CompoundNBT tagCompound) {
|
public static SoulNetwork fromNBT(CompoundNBT tagCompound) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package WayofTime.bloodmagic.core.data;
|
package WayofTime.bloodmagic.core.data;
|
||||||
|
|
||||||
import net.minecraft.command.ICommandSender;
|
import net.minecraft.command.ICommandSource;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -40,21 +40,21 @@ public class SoulTicket {
|
||||||
* @return A description in the format block|dimensionID|pos
|
* @return A description in the format block|dimensionID|pos
|
||||||
*/
|
*/
|
||||||
public static SoulTicket block(World world, BlockPos pos, int amount) {
|
public static SoulTicket block(World world, BlockPos pos, int amount) {
|
||||||
return new SoulTicket(new StringTextComponent("block|" + world.provider.getDimension() + "|" + pos.toLong()), amount);
|
return new SoulTicket(new StringTextComponent("block|" + world.dimension.getDimension() + "|" + pos.toLong()), amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return A description in the format item|item registry name|dimensionID|entityName|entityPos
|
* @return A description in the format item|item registry name|dimensionID|entityName|entityPos
|
||||||
*/
|
*/
|
||||||
public static SoulTicket item(ItemStack itemStack, World world, Entity entity, int amount) {
|
public static SoulTicket item(ItemStack itemStack, World world, Entity entity, int amount) {
|
||||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.provider.getDimension() + "|" + entity.getPersistentID()), amount);
|
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.dimension.getDimension() + "|" + entity.getCachedUniqueIdString()), amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return A description in the format item|item registry name|dimensionID|pos
|
* @return A description in the format item|item registry name|dimensionID|pos
|
||||||
*/
|
*/
|
||||||
public static SoulTicket item(ItemStack itemStack, World world, BlockPos pos, int amount) {
|
public static SoulTicket item(ItemStack itemStack, World world, BlockPos pos, int amount) {
|
||||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.provider.getDimension() + "|" + pos.toLong()), amount);
|
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName() + "|" + world.dimension.getDimension() + "|" + pos.toLong()), amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,8 +64,8 @@ public class SoulTicket {
|
||||||
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName()), amount);
|
return new SoulTicket(new StringTextComponent("item|" + itemStack.getItem().getRegistryName()), amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SoulTicket command(ICommandSender sender, String command, int amount) {
|
public static SoulTicket command(ICommandSource sender, String command, int amount) {
|
||||||
return new SoulTicket(new StringTextComponent("command|" + command + "|" + sender.getName()), amount);
|
return new SoulTicket(new StringTextComponent("command|" + command + "|" + sender.toString()), amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO maybe make it check the amount??
|
// TODO maybe make it check the amount??
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class OrbRegistry {
|
||||||
public static ItemStack getOrbStack(BloodOrb orb) {
|
public static ItemStack getOrbStack(BloodOrb orb) {
|
||||||
ItemStack ret = new ItemStack(ORB_ITEM);
|
ItemStack ret = new ItemStack(ORB_ITEM);
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
tag.setString("orb", orb.getRegistryName().toString());
|
tag.putString("orb", orb.getRegistryName().toString());
|
||||||
ret.setTagCompound(tag);
|
ret.setTagCompound(tag);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ public abstract class EntityAspectedDemonBase extends EntityDemonBase {
|
||||||
public void writeEntityToNBT(CompoundNBT tag) {
|
public void writeEntityToNBT(CompoundNBT tag) {
|
||||||
super.writeEntityToNBT(tag);
|
super.writeEntityToNBT(tag);
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, this.getType().toString());
|
tag.putString(Constants.NBT.WILL_TYPE, this.getType().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -176,14 +176,14 @@ public class EntityCorruptedChicken extends EntityAspectedDemonBase {
|
||||||
super.readEntityFromNBT(compound);
|
super.readEntityFromNBT(compound);
|
||||||
|
|
||||||
if (compound.hasKey("EggLayTime")) {
|
if (compound.hasKey("EggLayTime")) {
|
||||||
this.timeUntilNextEgg = compound.getInteger("EggLayTime");
|
this.timeUntilNextEgg = compound.getInt("EggLayTime");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeEntityToNBT(CompoundNBT compound) {
|
public void writeEntityToNBT(CompoundNBT compound) {
|
||||||
super.writeEntityToNBT(compound);
|
super.writeEntityToNBT(compound);
|
||||||
compound.setInteger("EggLayTime", this.timeUntilNextEgg);
|
compound.putInt("EggLayTime", this.timeUntilNextEgg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -214,9 +214,9 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
||||||
@Override
|
@Override
|
||||||
public void writeEntityToNBT(CompoundNBT tag) {
|
public void writeEntityToNBT(CompoundNBT tag) {
|
||||||
super.writeEntityToNBT(tag);
|
super.writeEntityToNBT(tag);
|
||||||
tag.setBoolean("Sheared", this.getSheared());
|
tag.putBoolean("Sheared", this.getSheared());
|
||||||
tag.setByte("Color", (byte) this.getFleeceColor().getMetadata());
|
tag.putByte("Color", (byte) this.getFleeceColor().getMetadata());
|
||||||
tag.setInteger("protection", this.protectionCooldown);
|
tag.putInt("protection", this.protectionCooldown);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -224,7 +224,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
||||||
super.readEntityFromNBT(tag);
|
super.readEntityFromNBT(tag);
|
||||||
this.setSheared(tag.getBoolean("Sheared"));
|
this.setSheared(tag.getBoolean("Sheared"));
|
||||||
this.setFleeceColor(DyeColor.byMetadata(tag.getByte("Color")));
|
this.setFleeceColor(DyeColor.byMetadata(tag.getByte("Color")));
|
||||||
this.protectionCooldown = tag.getInteger("protection");
|
this.protectionCooldown = tag.getInt("protection");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -164,9 +164,9 @@ public class EntityDemonBase extends CreatureEntity implements IEntityOwnable {
|
||||||
super.writeEntityToNBT(tag);
|
super.writeEntityToNBT(tag);
|
||||||
|
|
||||||
if (this.getOwnerId() == null) {
|
if (this.getOwnerId() == null) {
|
||||||
tag.setString("OwnerUUID", "");
|
tag.putString("OwnerUUID", "");
|
||||||
} else {
|
} else {
|
||||||
tag.setString("OwnerUUID", this.getOwnerId().toString());
|
tag.putString("OwnerUUID", this.getOwnerId().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,11 @@ public class EntityMimic extends EntityDemonBase {
|
||||||
public void writeEntityToNBT(CompoundNBT tag) {
|
public void writeEntityToNBT(CompoundNBT tag) {
|
||||||
super.writeEntityToNBT(tag);
|
super.writeEntityToNBT(tag);
|
||||||
|
|
||||||
tag.setBoolean("dropItemsOnBreak", dropItemsOnBreak);
|
tag.putBoolean("dropItemsOnBreak", dropItemsOnBreak);
|
||||||
tag.setTag("tileTag", tileTag);
|
tag.put("tileTag", tileTag);
|
||||||
tag.setInteger("metaOfReplacedBlock", metaOfReplacedBlock);
|
tag.putInt("metaOfReplacedBlock", metaOfReplacedBlock);
|
||||||
tag.setInteger("playerCheckRadius", playerCheckRadius);
|
tag.putInt("playerCheckRadius", playerCheckRadius);
|
||||||
tag.setString("stateOfReplacedBlock", stateOfReplacedBlock.toString());
|
tag.putString("stateOfReplacedBlock", stateOfReplacedBlock.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,9 +78,9 @@ public class EntityMimic extends EntityDemonBase {
|
||||||
super.readEntityFromNBT(tag);
|
super.readEntityFromNBT(tag);
|
||||||
|
|
||||||
dropItemsOnBreak = tag.getBoolean("dropItemsOnBreak");
|
dropItemsOnBreak = tag.getBoolean("dropItemsOnBreak");
|
||||||
tileTag = tag.getCompoundTag("tileTag");
|
tileTag = tag.getCompound("tileTag");
|
||||||
metaOfReplacedBlock = tag.getInteger("metaOfReplacedBlock");
|
metaOfReplacedBlock = tag.getInt("metaOfReplacedBlock");
|
||||||
playerCheckRadius = tag.getInteger("playerCheckRadius");
|
playerCheckRadius = tag.getInt("playerCheckRadius");
|
||||||
stateOfReplacedBlock = StateUtil.parseState(tag.getString("stateOfReplacedBlock"));
|
stateOfReplacedBlock = StateUtil.parseState(tag.getString("stateOfReplacedBlock"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -358,9 +358,9 @@ public class EntitySentientSpecter extends EntityDemonBase {
|
||||||
public void writeEntityToNBT(CompoundNBT tag) {
|
public void writeEntityToNBT(CompoundNBT tag) {
|
||||||
super.writeEntityToNBT(tag);
|
super.writeEntityToNBT(tag);
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
|
|
||||||
tag.setBoolean("sentientArmour", wasGivenSentientArmour);
|
tag.putBoolean("sentientArmour", wasGivenSentientArmour);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -142,15 +142,15 @@ public class EntityBloodLight extends ThrowableEntity implements IThrowableEntit
|
||||||
@Override
|
@Override
|
||||||
public void writeEntityToNBT(CompoundNBT nbt) {
|
public void writeEntityToNBT(CompoundNBT nbt) {
|
||||||
super.writeEntityToNBT(nbt);
|
super.writeEntityToNBT(nbt);
|
||||||
nbt.setInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
nbt.putInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
||||||
nbt.setInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
nbt.putInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readEntityFromNBT(CompoundNBT nbt) {
|
public void readEntityFromNBT(CompoundNBT nbt) {
|
||||||
super.readEntityFromNBT(nbt);
|
super.readEntityFromNBT(nbt);
|
||||||
ticksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
ticksInAir = nbt.getInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
||||||
maxTicksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
maxTicksInAir = nbt.getInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -88,22 +88,22 @@ public class EntityMeteor extends ThrowableEntity implements IThrowableEntity {
|
||||||
@Override
|
@Override
|
||||||
public void writeEntityToNBT(CompoundNBT nbt) {
|
public void writeEntityToNBT(CompoundNBT nbt) {
|
||||||
super.writeEntityToNBT(nbt);
|
super.writeEntityToNBT(nbt);
|
||||||
nbt.setInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
nbt.putInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR, ticksInAir);
|
||||||
nbt.setInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
nbt.putInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR, maxTicksInAir);
|
||||||
nbt.setDouble("radiusModifier", radiusModifier);
|
nbt.putDouble("radiusModifier", radiusModifier);
|
||||||
nbt.setDouble("explosionModifier", explosionModifier);
|
nbt.putDouble("explosionModifier", explosionModifier);
|
||||||
nbt.setDouble("fillerChance", fillerChance);
|
nbt.putDouble("fillerChance", fillerChance);
|
||||||
if (!meteorStack.isEmpty())
|
if (!meteorStack.isEmpty())
|
||||||
meteorStack.writeToNBT(nbt);
|
meteorStack.writeToNBT(nbt);
|
||||||
else
|
else
|
||||||
nbt.setBoolean("noItem", true);
|
nbt.putBoolean("noItem", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readEntityFromNBT(CompoundNBT nbt) {
|
public void readEntityFromNBT(CompoundNBT nbt) {
|
||||||
super.readEntityFromNBT(nbt);
|
super.readEntityFromNBT(nbt);
|
||||||
ticksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
ticksInAir = nbt.getInt(Constants.NBT.PROJECTILE_TICKS_IN_AIR);
|
||||||
maxTicksInAir = nbt.getInteger(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
maxTicksInAir = nbt.getInt(Constants.NBT.PROJECTILE_MAX_TICKS_IN_AIR);
|
||||||
radiusModifier = nbt.getDouble("radiusModifier");
|
radiusModifier = nbt.getDouble("radiusModifier");
|
||||||
explosionModifier = nbt.getDouble("explosionModifier");
|
explosionModifier = nbt.getDouble("explosionModifier");
|
||||||
fillerChance = nbt.getDouble("fillerChance");
|
fillerChance = nbt.getDouble("fillerChance");
|
||||||
|
|
|
@ -260,9 +260,9 @@ public class EntitySentientArrow extends ArrowEntity {
|
||||||
public void writeEntityToNBT(CompoundNBT tag) {
|
public void writeEntityToNBT(CompoundNBT tag) {
|
||||||
super.writeEntityToNBT(tag);
|
super.writeEntityToNBT(tag);
|
||||||
|
|
||||||
tag.setDouble("reimbursement", reimbursedAmountOnHit);
|
tag.putDouble("reimbursement", reimbursedAmountOnHit);
|
||||||
tag.setInteger("currentLevel", currentLevel);
|
tag.putInt("currentLevel", currentLevel);
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -271,7 +271,7 @@ public class EntitySentientArrow extends ArrowEntity {
|
||||||
|
|
||||||
reimbursedAmountOnHit = tag.getDouble("reimbursement");
|
reimbursedAmountOnHit = tag.getDouble("reimbursement");
|
||||||
type = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH));
|
type = EnumDemonWillType.valueOf(tag.getString(Constants.NBT.WILL_TYPE).toUpperCase(Locale.ENGLISH));
|
||||||
currentLevel = tag.getInteger("currentLevel");
|
currentLevel = tag.getInt("currentLevel");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,8 +4,8 @@ import WayofTime.bloodmagic.core.data.SoulNetwork;
|
||||||
import WayofTime.bloodmagic.core.data.SoulTicket;
|
import WayofTime.bloodmagic.core.data.SoulTicket;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
import net.minecraftforge.eventbus.api.Cancelable;
|
||||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
|
||||||
public class SoulNetworkEvent extends Event {
|
public class SoulNetworkEvent extends Event {
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ItemBloodOrb extends ItemBindableBase implements IBloodOrb {
|
||||||
for (BloodOrb orb : RegistrarBloodMagic.BLOOD_ORBS) {
|
for (BloodOrb orb : RegistrarBloodMagic.BLOOD_ORBS) {
|
||||||
ItemStack orbStack = new ItemStack(this);
|
ItemStack orbStack = new ItemStack(this);
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
tag.setString("orb", orb.getRegistryName().toString());
|
tag.putString("orb", orb.getRegistryName().toString());
|
||||||
orbStack.setTagCompound(tag);
|
orbStack.setTagCompound(tag);
|
||||||
list.add(orbStack);
|
list.add(orbStack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class ItemExperienceBook extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("experience", exp);
|
tag.putDouble("experience", exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double getStoredExperience(ItemStack stack) {
|
public static double getStoredExperience(ItemStack stack) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class ItemInscriptionTool extends ItemEnum.Variant<EnumRuneType> implemen
|
||||||
|
|
||||||
ItemStack stack = new ItemStack(this, 1, runeType.ordinal());
|
ItemStack stack = new ItemStack(this, 1, runeType.ordinal());
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
tag.setInteger(Constants.NBT.USES, 10);
|
tag.putInt(Constants.NBT.USES, 10);
|
||||||
stack.setTagCompound(tag);
|
stack.setTagCompound(tag);
|
||||||
list.add(stack);
|
list.add(stack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.potion.EffectInstance;
|
||||||
import net.minecraft.potion.Effects;
|
import net.minecraft.potion.Effects;
|
||||||
import net.minecraft.util.*;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTBase;
|
import net.minecraft.nbt.INBT;
|
||||||
import net.minecraft.nbt.NBTUtil;
|
import net.minecraft.nbt.NBTUtil;
|
||||||
import net.minecraft.util.ActionResultType;
|
import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
|
@ -74,12 +74,12 @@ public class ItemLavaCrystal extends ItemBindableBase implements IVariantProvide
|
||||||
if (stack.getTagCompound() == null) // hasTagCompound doesn't work on empty stacks with tags
|
if (stack.getTagCompound() == null) // hasTagCompound doesn't work on empty stacks with tags
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
NBTBase bindingTag = stack.getTagCompound().getTag("binding");
|
INBT bindingTag = stack.getTagCompound().getTag("binding");
|
||||||
if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.isEmpty()) // Make sure it's both a tag compound and that it has actual data.
|
if (bindingTag == null || bindingTag.getId() != 10 || bindingTag.isEmpty()) // Make sure it's both a tag compound and that it has actual data.
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
CompoundNBT nbt = (CompoundNBT) bindingTag;
|
CompoundNBT nbt = (CompoundNBT) bindingTag;
|
||||||
return new Binding(NBTUtil.getUUIDFromTag(nbt.getCompoundTag("id")), nbt.getString("name"));
|
return new Binding(NBTUtil.getUUIDFromTag(nbt.getCompound("id")), nbt.getString("name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -375,7 +375,7 @@ public class ItemRitualDiviner extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setInteger(Constants.NBT.DIRECTION, direction.getIndex());
|
tag.putInt(Constants.NBT.DIRECTION, direction.getIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Direction getDirection(ItemStack stack) {
|
public Direction getDirection(ItemStack stack) {
|
||||||
|
@ -386,12 +386,12 @@ public class ItemRitualDiviner extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
int dir = tag.getInteger(Constants.NBT.DIRECTION);
|
int dir = tag.getInt(Constants.NBT.DIRECTION);
|
||||||
if (dir == 0) {
|
if (dir == 0) {
|
||||||
return Direction.NORTH;
|
return Direction.NORTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Direction.VALUES[tag.getInteger(Constants.NBT.DIRECTION)];
|
return Direction.VALUES[tag.getInt(Constants.NBT.DIRECTION)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -464,7 +464,7 @@ public class ItemRitualDiviner extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString("current_ritual", key);
|
tag.putString("current_ritual", key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCurrentRitual(ItemStack stack) {
|
public String getCurrentRitual(ItemStack stack) {
|
||||||
|
|
|
@ -204,9 +204,9 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
||||||
public ItemStack setBlockPos(ItemStack stack, BlockPos pos) {
|
public ItemStack setBlockPos(ItemStack stack, BlockPos pos) {
|
||||||
stack = NBTHelper.checkNBT(stack);
|
stack = NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT itemTag = stack.getTagCompound();
|
CompoundNBT itemTag = stack.getTagCompound();
|
||||||
itemTag.setInteger(Constants.NBT.X_COORD, pos.getX());
|
itemTag.putInt(Constants.NBT.X_COORD, pos.getX());
|
||||||
itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY());
|
itemTag.putInt(Constants.NBT.Y_COORD, pos.getY());
|
||||||
itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ());
|
itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ());
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,9 +218,9 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
||||||
public ItemStack setMasterBlockPos(ItemStack stack, BlockPos pos) {
|
public ItemStack setMasterBlockPos(ItemStack stack, BlockPos pos) {
|
||||||
stack = NBTHelper.checkNBT(stack);
|
stack = NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT itemTag = stack.getTagCompound();
|
CompoundNBT itemTag = stack.getTagCompound();
|
||||||
itemTag.setInteger(Constants.NBT.X_COORD + "master", pos.getX());
|
itemTag.putInt(Constants.NBT.X_COORD + "master", pos.getX());
|
||||||
itemTag.setInteger(Constants.NBT.Y_COORD + "master", pos.getY());
|
itemTag.putInt(Constants.NBT.Y_COORD + "master", pos.getY());
|
||||||
itemTag.setInteger(Constants.NBT.Z_COORD + "master", pos.getZ());
|
itemTag.putInt(Constants.NBT.Z_COORD + "master", pos.getZ());
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString("range", range);
|
tag.putString("range", range);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cycleReader(ItemStack stack, PlayerEntity player) {
|
public void cycleReader(ItemStack stack, PlayerEntity player) {
|
||||||
|
@ -259,7 +259,7 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setInteger(Constants.NBT.RITUAL_READER, state.ordinal());
|
tag.putInt(Constants.NBT.RITUAL_READER, state.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnumRitualReaderState getState(ItemStack stack) {
|
public EnumRitualReaderState getState(ItemStack stack) {
|
||||||
|
@ -270,7 +270,7 @@ public class ItemRitualReader extends Item implements IVariantProvider {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
return EnumRitualReaderState.values()[tag.getInteger(Constants.NBT.RITUAL_READER)];
|
return EnumRitualReaderState.values()[tag.getInt(Constants.NBT.RITUAL_READER)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class ItemTelepositionFocus extends ItemEnum.Variant<ItemTelepositionFocu
|
||||||
|
|
||||||
if (coords != null && tag != null) {
|
if (coords != null && tag != null) {
|
||||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.coords", coords.getX(), coords.getY(), coords.getZ()));
|
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.coords", coords.getX(), coords.getY(), coords.getZ()));
|
||||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.dimension", tag.getInteger(Constants.NBT.DIMENSION_ID)));
|
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.telepositionFocus.dimension", tag.getInt(Constants.NBT.DIMENSION_ID)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ public class ItemTelepositionFocus extends ItemEnum.Variant<ItemTelepositionFocu
|
||||||
public ItemStack setBlockPos(ItemStack stack, World world, BlockPos pos) {
|
public ItemStack setBlockPos(ItemStack stack, World world, BlockPos pos) {
|
||||||
stack = NBTHelper.checkNBT(stack);
|
stack = NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT itemTag = stack.getTagCompound();
|
CompoundNBT itemTag = stack.getTagCompound();
|
||||||
itemTag.setInteger(Constants.NBT.X_COORD, pos.getX());
|
itemTag.putInt(Constants.NBT.X_COORD, pos.getX());
|
||||||
itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY());
|
itemTag.putInt(Constants.NBT.Y_COORD, pos.getY());
|
||||||
itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ());
|
itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ());
|
||||||
itemTag.setInteger(Constants.NBT.DIMENSION_ID, world.provider.getDimension());
|
itemTag.putInt(Constants.NBT.DIMENSION_ID, world.provider.getDimension());
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,14 @@ public class ItemCuttingFluid extends ItemEnum.Variant<ItemCuttingFluid.FluidTyp
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
return tag.getInteger("used");
|
return tag.getInt("used");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void applyDamageToFluid(ItemStack stack) {
|
public void applyDamageToFluid(ItemStack stack) {
|
||||||
int damage = Math.min(getDamageOfFluid(stack) + 1, getMaxUsesForFluid(stack));
|
int damage = Math.min(getDamageOfFluid(stack) + 1, getMaxUsesForFluid(stack));
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setInteger("used", damage);
|
tag.putInt("used", damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxUsesForFluid(ItemStack stack) {
|
public int getMaxUsesForFluid(ItemStack stack) {
|
||||||
|
|
|
@ -396,13 +396,13 @@ public class ItemLivingArmour extends ArmorItem implements ISpecialArmor, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setTag(Constants.NBT.LIVING_ARMOUR, livingTag);
|
tag.put(Constants.NBT.LIVING_ARMOUR, livingTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsEnabled(ItemStack stack, boolean bool) {
|
public void setIsEnabled(ItemStack stack, boolean bool) {
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
tag.setBoolean("enabled", bool);
|
tag.putBoolean("enabled", bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEnabled(ItemStack stack) {
|
public boolean isEnabled(ItemStack stack) {
|
||||||
|
@ -414,7 +414,7 @@ public class ItemLivingArmour extends ArmorItem implements ISpecialArmor, IMeshP
|
||||||
public void setIsElytra(ItemStack stack, boolean bool) {
|
public void setIsElytra(ItemStack stack, boolean bool) {
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
tag.setBoolean("elytra", bool);
|
tag.putBoolean("elytra", bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isElytra(ItemStack stack) {
|
public boolean isElytra(ItemStack stack) {
|
||||||
|
@ -439,7 +439,7 @@ public class ItemLivingArmour extends ArmorItem implements ISpecialArmor, IMeshP
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
return tag.getCompoundTag(Constants.NBT.LIVING_ARMOUR);
|
return tag.getCompound(Constants.NBT.LIVING_ARMOUR);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Add the ability to have the armour give an upgrade with a higher level
|
//TODO: Add the ability to have the armour give an upgrade with a higher level
|
||||||
|
|
|
@ -250,7 +250,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("costModifier", modifier);
|
tag.putDouble("costModifier", modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getArmourModifier(ItemStack stack) {
|
public double getArmourModifier(ItemStack stack) {
|
||||||
|
@ -264,7 +264,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("armourModifier", modifier);
|
tag.putDouble("armourModifier", modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -338,7 +338,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
newArmour.setTagCompound(omegaTag);
|
newArmour.setTagCompound(omegaTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
omegaTag.setTag("armour", tag);
|
omegaTag.put("armour", tag);
|
||||||
Map<Enchantment, Integer> enchantmentMap = EnchantmentHelper.getEnchantments(previousArmour);
|
Map<Enchantment, Integer> enchantmentMap = EnchantmentHelper.getEnchantments(previousArmour);
|
||||||
EnchantmentHelper.setEnchantments(enchantmentMap, newArmour);
|
EnchantmentHelper.setEnchantments(enchantmentMap, newArmour);
|
||||||
}
|
}
|
||||||
|
@ -349,7 +349,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundNBT tag = omegaTag.getCompoundTag("armour");
|
CompoundNBT tag = omegaTag.getCompound("armour");
|
||||||
return new ItemStack(tag);
|
return new ItemStack(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAbilitiesOfArmour(EnumDemonWillType type, double willValue, ItemStack armourStack) {
|
public void setAbilitiesOfArmour(EnumDemonWillType type, double willValue, ItemStack armourStack) {
|
||||||
|
@ -468,7 +468,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getKnockbackResistance(ItemStack stack) {
|
public double getKnockbackResistance(ItemStack stack) {
|
||||||
|
@ -483,7 +483,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("knockback", kb);
|
tag.putDouble("knockback", kb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getSpeedBoost(ItemStack stack) {
|
public double getSpeedBoost(ItemStack stack) {
|
||||||
|
@ -498,7 +498,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("speed", speed);
|
tag.putDouble("speed", speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDamageBoost(ItemStack stack) {
|
public double getDamageBoost(ItemStack stack) {
|
||||||
|
@ -513,7 +513,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("damage", damage);
|
tag.putDouble("damage", damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAttackSpeedBoost(ItemStack stack) {
|
public double getAttackSpeedBoost(ItemStack stack) {
|
||||||
|
@ -528,7 +528,7 @@ public class ItemSentientArmour extends ArmorItem implements ISpecialArmor, IMes
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("attackSpeed", attackSpeed);
|
tag.putDouble("attackSpeed", attackSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void revertAllArmour(PlayerEntity player) {
|
public static void revertAllArmour(PlayerEntity player) {
|
||||||
|
|
|
@ -59,9 +59,9 @@ public class ItemBlockMimic extends ItemBlockEnum {
|
||||||
CompoundNBT tileTag = getTagFromTileEntity(tileReplaced);
|
CompoundNBT tileTag = getTagFromTileEntity(tileReplaced);
|
||||||
if (tileReplaced != null) {
|
if (tileReplaced != null) {
|
||||||
CompoundNBT voidTag = new CompoundNBT();
|
CompoundNBT voidTag = new CompoundNBT();
|
||||||
voidTag.setInteger("x", pos.getX());
|
voidTag.putInt("x", pos.getX());
|
||||||
voidTag.setInteger("y", pos.getY());
|
voidTag.putInt("y", pos.getY());
|
||||||
voidTag.setInteger("z", pos.getZ());
|
voidTag.putInt("z", pos.getZ());
|
||||||
tileReplaced.readFromNBT(voidTag);
|
tileReplaced.readFromNBT(voidTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ public class InventoryHolding extends ItemInventory {
|
||||||
nbtTagCompound = new CompoundNBT();
|
nbtTagCompound = new CompoundNBT();
|
||||||
|
|
||||||
UUID uuid = UUID.randomUUID();
|
UUID uuid = UUID.randomUUID();
|
||||||
nbtTagCompound.setLong(Constants.NBT.MOST_SIG, uuid.getMostSignificantBits());
|
nbtTagCompound.putLong(Constants.NBT.MOST_SIG, uuid.getMostSignificantBits());
|
||||||
nbtTagCompound.setLong(Constants.NBT.LEAST_SIG, uuid.getLeastSignificantBits());
|
nbtTagCompound.putLong(Constants.NBT.LEAST_SIG, uuid.getLeastSignificantBits());
|
||||||
}
|
}
|
||||||
|
|
||||||
writeToNBT(nbtTagCompound);
|
writeToNBT(nbtTagCompound);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class ItemInventory implements IInventory {
|
||||||
|
|
||||||
for (int i = 0; i < tags.tagCount(); i++) {
|
for (int i = 0; i < tags.tagCount(); i++) {
|
||||||
if (!isSyncedSlot(i)) {
|
if (!isSyncedSlot(i)) {
|
||||||
CompoundNBT data = tags.getCompoundTagAt(i);
|
CompoundNBT data = tags.getCompound(i);
|
||||||
byte j = data.getByte(Constants.NBT.SLOT);
|
byte j = data.getByte(Constants.NBT.SLOT);
|
||||||
|
|
||||||
if (j >= 0 && j < inventory.size()) {
|
if (j >= 0 && j < inventory.size()) {
|
||||||
|
@ -71,14 +71,14 @@ public class ItemInventory implements IInventory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTag(Constants.NBT.ITEMS, tags);
|
tagCompound.putTag(Constants.NBT.ITEMS, tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromStack(ItemStack masterStack) {
|
public void readFromStack(ItemStack masterStack) {
|
||||||
if (masterStack != null) {
|
if (masterStack != null) {
|
||||||
NBTHelper.checkNBT(masterStack);
|
NBTHelper.checkNBT(masterStack);
|
||||||
CompoundNBT tag = masterStack.getTagCompound();
|
CompoundNBT tag = masterStack.getTagCompound();
|
||||||
readFromNBT(tag.getCompoundTag(Constants.NBT.ITEM_INVENTORY));
|
readFromNBT(tag.getCompound(Constants.NBT.ITEM_INVENTORY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class ItemInventory implements IInventory {
|
||||||
CompoundNBT tag = masterStack.getTagCompound();
|
CompoundNBT tag = masterStack.getTagCompound();
|
||||||
CompoundNBT invTag = new CompoundNBT();
|
CompoundNBT invTag = new CompoundNBT();
|
||||||
writeToNBT(invTag);
|
writeToNBT(invTag);
|
||||||
tag.setTag(Constants.NBT.ITEM_INVENTORY, invTag);
|
tag.put(Constants.NBT.ITEM_INVENTORY, invTag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,9 +187,9 @@ public class ItemNodeRouter extends Item implements INodeRenderer, IVariantProvi
|
||||||
public ItemStack setBlockPos(ItemStack stack, BlockPos pos) {
|
public ItemStack setBlockPos(ItemStack stack, BlockPos pos) {
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
CompoundNBT itemTag = stack.getTagCompound();
|
CompoundNBT itemTag = stack.getTagCompound();
|
||||||
itemTag.setInteger(Constants.NBT.X_COORD, pos.getX());
|
itemTag.putInt(Constants.NBT.X_COORD, pos.getX());
|
||||||
itemTag.setInteger(Constants.NBT.Y_COORD, pos.getY());
|
itemTag.putInt(Constants.NBT.Y_COORD, pos.getY());
|
||||||
itemTag.setInteger(Constants.NBT.Z_COORD, pos.getZ());
|
itemTag.putInt(Constants.NBT.Z_COORD, pos.getZ());
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,14 +140,14 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
|
||||||
for (int i = 0; i < inventorySize; i++) {
|
for (int i = 0; i < inventorySize; i++) {
|
||||||
if (!inventory.get(i).isEmpty()) {
|
if (!inventory.get(i).isEmpty()) {
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
tag.setByte(Constants.NBT.SLOT, (byte) i);
|
tag.putByte(Constants.NBT.SLOT, (byte) i);
|
||||||
inventory.get(i).writeToNBT(tag);
|
inventory.get(i).writeToNBT(tag);
|
||||||
itemList.appendTag(tag);
|
itemList.appendTag(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inventoryTag.setTag(Constants.NBT.ITEMS, itemList);
|
inventoryTag.put(Constants.NBT.ITEMS, itemList);
|
||||||
itemTag.setTag(Constants.NBT.ITEM_INVENTORY, inventoryTag);
|
itemTag.put(Constants.NBT.ITEM_INVENTORY, inventoryTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -248,7 +248,7 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundNBT inventoryTag = tagCompound.getCompoundTag(Constants.NBT.ITEM_INVENTORY);
|
CompoundNBT inventoryTag = tagCompound.getCompoundTag(Constants.NBT.ITEM_INVENTORY);
|
||||||
ListNBT tagList = inventoryTag.getTagList(Constants.NBT.ITEMS, 10);
|
ListNBT tagList = inventoryTag.getList(Constants.NBT.ITEMS, 10);
|
||||||
|
|
||||||
if (tagList.isEmpty()) {
|
if (tagList.isEmpty()) {
|
||||||
return NonNullList.withSize(inventorySize, ItemStack.EMPTY);
|
return NonNullList.withSize(inventorySize, ItemStack.EMPTY);
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class ItemSigilTeleposition extends ItemSigilBase {
|
||||||
else
|
else
|
||||||
tagCompound = stack.getTagCompound();
|
tagCompound = stack.getTagCompound();
|
||||||
|
|
||||||
tagCompound.setTag("tplocation", location.serializeNBT());
|
tagCompound.putTag("tplocation", location.serializeNBT());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class TeleportLocation implements INBTSerializable<CompoundNBT> {
|
public static class TeleportLocation implements INBTSerializable<CompoundNBT> {
|
||||||
|
@ -140,14 +140,14 @@ public class ItemSigilTeleposition extends ItemSigilBase {
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT serializeNBT() {
|
public CompoundNBT serializeNBT() {
|
||||||
CompoundNBT tag = new CompoundNBT();
|
CompoundNBT tag = new CompoundNBT();
|
||||||
tag.setInteger("dim", dim);
|
tag.putInt("dim", dim);
|
||||||
tag.setLong("pos", pos.toLong());
|
tag.putLong("pos", pos.toLong());
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deserializeNBT(CompoundNBT nbt) {
|
public void deserializeNBT(CompoundNBT nbt) {
|
||||||
this.dim = nbt.getInteger("dim");
|
this.dim = nbt.getInt("dim");
|
||||||
this.pos = BlockPos.fromLong(nbt.getLong("pos"));
|
this.pos = BlockPos.fromLong(nbt.getLong("pos"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
||||||
|
|
||||||
if (tag.hasKey("stored")) {
|
if (tag.hasKey("stored")) {
|
||||||
tooltip.add(" ");
|
tooltip.add(" ");
|
||||||
tooltip.add(tag.getCompoundTag("stored").getString("display"));
|
tooltip.add(tag.getCompound("stored").getString("display"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
if (tag.hasKey("stored"))
|
if (tag.hasKey("stored"))
|
||||||
return super.getItemStackDisplayName(stack) + " (" + tag.getCompoundTag("stored").getString("display") + ")";
|
return super.getItemStackDisplayName(stack) + " (" + tag.getCompound("stored").getString("display") + ")";
|
||||||
|
|
||||||
return super.getItemStackDisplayName(stack);
|
return super.getItemStackDisplayName(stack);
|
||||||
}
|
}
|
||||||
|
@ -96,8 +96,8 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
||||||
} else if (stack.hasTagCompound() && stack.getTagCompound().hasKey("stored")) {
|
} else if (stack.hasTagCompound() && stack.getTagCompound().hasKey("stored")) {
|
||||||
BlockState worldState = world.getBlockState(blockPos);
|
BlockState worldState = world.getBlockState(blockPos);
|
||||||
CompoundNBT storedTag = stack.getTagCompound().getCompoundTag("stored");
|
CompoundNBT storedTag = stack.getTagCompound().getCompoundTag("stored");
|
||||||
BlockState storedState = NBTUtil.readBlockState(storedTag.getCompoundTag("state"));
|
BlockState storedState = NBTUtil.readBlockState(storedTag.getCompound("state"));
|
||||||
CompoundNBT tileData = storedTag.hasKey("tileData") ? storedTag.getCompoundTag("tileData") : null;
|
CompoundNBT tileData = storedTag.hasKey("tileData") ? storedTag.getCompound("tileData") : null;
|
||||||
|
|
||||||
if (!worldState.getBlock().isReplaceable(world, blockPos))
|
if (!worldState.getBlock().isReplaceable(world, blockPos))
|
||||||
blockPos = blockPos.offset(side);
|
blockPos = blockPos.offset(side);
|
||||||
|
@ -133,7 +133,7 @@ public class ItemSigilTransposition extends ItemSigilBase {
|
||||||
return super.getNBTShareTag(stack);
|
return super.getNBTShareTag(stack);
|
||||||
|
|
||||||
CompoundNBT shareTag = stack.getTagCompound().copy();
|
CompoundNBT shareTag = stack.getTagCompound().copy();
|
||||||
CompoundNBT storedTag = shareTag.getCompoundTag("stored");
|
CompoundNBT storedTag = shareTag.getCompound("stored");
|
||||||
storedTag.removeTag("state");
|
storedTag.removeTag("state");
|
||||||
storedTag.removeTag("stored");
|
storedTag.removeTag("stored");
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class ItemMonsterSoul extends ItemEnum.Variant<ItemMonsterSoul.WillType>
|
||||||
|
|
||||||
soulStack.setItemDamage(type.ordinal());
|
soulStack.setItemDamage(type.ordinal());
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOULS, souls);
|
tag.putDouble(Constants.NBT.SOULS, souls);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class ItemSentientArmourGem extends Item implements IMeshProvider {
|
||||||
public ItemMeshDefinition getMeshDefinition() {
|
public ItemMeshDefinition getMeshDefinition() {
|
||||||
return stack -> {
|
return stack -> {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
NonNullList<ItemStack> armourInventory = Minecraft.getMinecraft().player.inventory.armorInventory;
|
NonNullList<ItemStack> armourInventory = Minecraft.getInstance().player.inventory.armorInventory;
|
||||||
for (ItemStack armourStack : armourInventory) {
|
for (ItemStack armourStack : armourInventory) {
|
||||||
if (armourStack != null && armourStack.getItem() instanceof ItemSentientArmour) {
|
if (armourStack != null && armourStack.getItem() instanceof ItemSentientArmour) {
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -349,7 +349,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -364,7 +364,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -379,7 +379,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDropOfActivatedSword(ItemStack stack) {
|
public double getDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -394,7 +394,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getHealthBonusOfSword(ItemStack stack) {
|
public double getHealthBonusOfSword(ItemStack stack) {
|
||||||
|
@ -409,7 +409,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -424,7 +424,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getSpeedOfSword(ItemStack stack) {
|
public double getSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -439,7 +439,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDigSpeedOfSword(ItemStack stack) {
|
public double getDigSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -454,7 +454,7 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMeshP
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -164,7 +164,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble("damage", damage);
|
tag.putDouble("damage", damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDamageAdded(ItemStack stack) {
|
public double getDamageAdded(ItemStack stack) {
|
||||||
|
@ -180,7 +180,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setFloat("velocity", velocity);
|
tag.putFloat("velocity", velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getVelocityOfArrow(ItemStack stack) {
|
public float getVelocityOfArrow(ItemStack stack) {
|
||||||
|
@ -200,7 +200,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDrainOfActivatedBow(ItemStack stack) {
|
public double getDrainOfActivatedBow(ItemStack stack) {
|
||||||
|
@ -215,7 +215,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getStaticDropOfActivatedBow(ItemStack stack) {
|
public double getStaticDropOfActivatedBow(ItemStack stack) {
|
||||||
|
@ -230,7 +230,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDropOfActivatedBow(ItemStack stack) {
|
public double getDropOfActivatedBow(ItemStack stack) {
|
||||||
|
@ -245,7 +245,7 @@ public class ItemSentientBow extends BowItem implements IMultiWillTool, ISentien
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -348,7 +348,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -363,7 +363,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -378,7 +378,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDropOfActivatedSword(ItemStack stack) {
|
public double getDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -393,7 +393,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getHealthBonusOfSword(ItemStack stack) {
|
public double getHealthBonusOfSword(ItemStack stack) {
|
||||||
|
@ -408,7 +408,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -423,7 +423,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getSpeedOfSword(ItemStack stack) {
|
public double getSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -438,7 +438,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDigSpeedOfSword(ItemStack stack) {
|
public double getDigSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -453,7 +453,7 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -349,7 +349,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -364,7 +364,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -379,7 +379,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDropOfActivatedSword(ItemStack stack) {
|
public double getDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -394,7 +394,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getHealthBonusOfSword(ItemStack stack) {
|
public double getHealthBonusOfSword(ItemStack stack) {
|
||||||
|
@ -409,7 +409,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -424,7 +424,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getSpeedOfSword(ItemStack stack) {
|
public double getSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -439,7 +439,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDigSpeedOfSword(ItemStack stack) {
|
public double getDigSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -454,7 +454,7 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DIG_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -330,7 +330,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DAMAGE, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDrainOfActivatedSword(ItemStack stack) {
|
public double getDrainOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -345,7 +345,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ACTIVE_DRAIN, drain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
public double getStaticDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -360,7 +360,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_STATIC_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDropOfActivatedSword(ItemStack stack) {
|
public double getDropOfActivatedSword(ItemStack stack) {
|
||||||
|
@ -375,7 +375,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_DROP, drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getHealthBonusOfSword(ItemStack stack) {
|
public double getHealthBonusOfSword(ItemStack stack) {
|
||||||
|
@ -390,7 +390,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_HEALTH, hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAttackSpeedOfSword(ItemStack stack) {
|
public double getAttackSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -405,7 +405,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_ATTACK_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getSpeedOfSword(ItemStack stack) {
|
public double getSpeedOfSword(ItemStack stack) {
|
||||||
|
@ -420,7 +420,7 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
tag.putDouble(Constants.NBT.SOUL_SWORD_SPEED, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
|
||||||
|
|
||||||
CompoundNBT tag = soulGemStack.getTagCompound();
|
CompoundNBT tag = soulGemStack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.SOULS, souls);
|
tag.putDouble(Constants.NBT.SOULS, souls);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -244,7 +244,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setString(Constants.NBT.WILL_TYPE, type.toString());
|
tag.putString(Constants.NBT.WILL_TYPE, type.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -18,7 +18,7 @@ public abstract class ItemSoulBreathContainer extends Item implements ISoulBreat
|
||||||
public void setBreath(ItemStack stack, double amount) {
|
public void setBreath(ItemStack stack, double amount) {
|
||||||
CompoundNBT tag = stack.getTagCompound();
|
CompoundNBT tag = stack.getTagCompound();
|
||||||
|
|
||||||
tag.setDouble(Constants.NBT.BREATH, amount);
|
tag.putDouble(Constants.NBT.BREATH, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -212,15 +212,15 @@ public class LivingArmour implements ILivingArmour {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
maxUpgradePoints = Math.max(100, tag.getInteger("maxUpgradePoints"));
|
maxUpgradePoints = Math.max(100, tag.getInt("maxUpgradePoints"));
|
||||||
|
|
||||||
ListNBT upgradeTags = tag.getTagList("upgrades", 10);
|
ListNBT upgradeTags = tag.getList("upgrades", 10);
|
||||||
if (upgradeTags != null) {
|
if (upgradeTags != null) {
|
||||||
for (int i = 0; i < upgradeTags.tagCount(); i++) {
|
for (int i = 0; i < upgradeTags.tagCount(); i++) {
|
||||||
CompoundNBT upgradeTag = upgradeTags.getCompoundTagAt(i);
|
CompoundNBT upgradeTag = upgradeTags.getCompound(i);
|
||||||
String key = upgradeTag.getString("key");
|
String key = upgradeTag.getString("key");
|
||||||
int level = upgradeTag.getInteger("level");
|
int level = upgradeTag.getInt("level");
|
||||||
CompoundNBT nbtTag = upgradeTag.getCompoundTag("upgrade");
|
CompoundNBT nbtTag = upgradeTag.getCompound("upgrade");
|
||||||
LivingArmourUpgrade upgrade = LivingArmourHandler.generateUpgradeFromKey(key, level, nbtTag);
|
LivingArmourUpgrade upgrade = LivingArmourHandler.generateUpgradeFromKey(key, level, nbtTag);
|
||||||
if (upgrade != null) {
|
if (upgrade != null) {
|
||||||
upgradeMap.put(key, upgrade);
|
upgradeMap.put(key, upgrade);
|
||||||
|
@ -238,7 +238,7 @@ public class LivingArmour implements ILivingArmour {
|
||||||
}
|
}
|
||||||
StatTracker tracker = (StatTracker) obj;
|
StatTracker tracker = (StatTracker) obj;
|
||||||
String key = tracker.getUniqueIdentifier();
|
String key = tracker.getUniqueIdentifier();
|
||||||
CompoundNBT trackerTag = tag.getCompoundTag(key);
|
CompoundNBT trackerTag = tag.getCompound(key);
|
||||||
if (!trackerTag.isEmpty()) {
|
if (!trackerTag.isEmpty()) {
|
||||||
tracker.readFromNBT(trackerTag);
|
tracker.readFromNBT(trackerTag);
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ public class LivingArmour implements ILivingArmour {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag, boolean forceWrite) {
|
public void writeToNBT(CompoundNBT tag, boolean forceWrite) {
|
||||||
tag.setInteger("maxUpgradePoints", maxUpgradePoints);
|
tag.putInt("maxUpgradePoints", maxUpgradePoints);
|
||||||
|
|
||||||
ListNBT tags = new ListNBT();
|
ListNBT tags = new ListNBT();
|
||||||
|
|
||||||
|
@ -262,14 +262,14 @@ public class LivingArmour implements ILivingArmour {
|
||||||
CompoundNBT nbtTag = new CompoundNBT();
|
CompoundNBT nbtTag = new CompoundNBT();
|
||||||
upgrade.writeToNBT(nbtTag);
|
upgrade.writeToNBT(nbtTag);
|
||||||
|
|
||||||
upgradeTag.setString("key", upgrade.getUniqueIdentifier());
|
upgradeTag.putString("key", upgrade.getUniqueIdentifier());
|
||||||
upgradeTag.setInteger("level", upgrade.getUpgradeLevel());
|
upgradeTag.putInt("level", upgrade.getUpgradeLevel());
|
||||||
upgradeTag.setTag("upgrade", nbtTag);
|
upgradeTag.put("upgrade", nbtTag);
|
||||||
|
|
||||||
tags.appendTag(upgradeTag);
|
tags.appendTag(upgradeTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setTag("upgrades", tags);
|
tag.put("upgrades", tags);
|
||||||
|
|
||||||
for (Entry<String, StatTracker> entry : trackerMap.entrySet()) {
|
for (Entry<String, StatTracker> entry : trackerMap.entrySet()) {
|
||||||
StatTracker tracker = entry.getValue();
|
StatTracker tracker = entry.getValue();
|
||||||
|
@ -284,7 +284,7 @@ public class LivingArmour implements ILivingArmour {
|
||||||
CompoundNBT trackerTag = new CompoundNBT();
|
CompoundNBT trackerTag = new CompoundNBT();
|
||||||
tracker.writeToNBT(trackerTag);
|
tracker.writeToNBT(trackerTag);
|
||||||
|
|
||||||
tag.setTag(key, trackerTag);
|
tag.put(key, trackerTag);
|
||||||
|
|
||||||
tracker.resetDirty();
|
tracker.resetDirty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,12 +51,12 @@ public class LivingArmourUpgradeBattleHungry extends LivingArmourUpgrade {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger("timer", timer);
|
tag.putInt("timer", timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
timer = tag.getInteger("timer");
|
timer = tag.getInt("timer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerArrowProtect extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.arrowProtect");
|
totalDamage = tag.getInt(BloodMagic.MODID + ".tracker.arrowProtect");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.arrowProtect", totalDamage);
|
tag.putInt(BloodMagic.MODID + ".tracker.arrowProtect", totalDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerArrowShot extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalShots = tag.getInteger(BloodMagic.MODID + ".tracker.trickShot");
|
totalShots = tag.getInt(BloodMagic.MODID + ".tracker.trickShot");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.trickShot", totalShots);
|
tag.putInt(BloodMagic.MODID + ".tracker.trickShot", totalShots);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerCriticalStrike extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setDouble(BloodMagic.MODID + ".tracker.criticalStrike", totalDamageDealt);
|
tag.putDouble(BloodMagic.MODID + ".tracker.criticalStrike", totalDamageDealt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerDigging extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalBlocksDug = tag.getInteger(BloodMagic.MODID + ".tracker.digging");
|
totalBlocksDug = tag.getInt(BloodMagic.MODID + ".tracker.digging");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.digging", totalBlocksDug);
|
tag.putInt(BloodMagic.MODID + ".tracker.digging", totalBlocksDug);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerExperience extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setDouble(BloodMagic.MODID + ".tracker.experienced", totalExperienceGained);
|
tag.putDouble(BloodMagic.MODID + ".tracker.experienced", totalExperienceGained);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,12 +31,12 @@ public class StatTrackerFallProtect extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalDamage = tag.getInteger(BloodMagic.MODID + ".tracker.fallProtect");
|
totalDamage = tag.getInt(BloodMagic.MODID + ".tracker.fallProtect");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.fallProtect", totalDamage);
|
tag.putInt(BloodMagic.MODID + ".tracker.fallProtect", totalDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,12 +29,12 @@ public class StatTrackerFireResist extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalFireTicks = tag.getInteger(BloodMagic.MODID + ".tracker.fire");
|
totalFireTicks = tag.getInt(BloodMagic.MODID + ".tracker.fire");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.fire", totalFireTicks);
|
tag.putInt(BloodMagic.MODID + ".tracker.fire", totalFireTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -34,12 +34,12 @@ public class StatTrackerFood extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
foodEaten = tag.getInteger(BloodMagic.MODID + ".tracker.foodEaten");
|
foodEaten = tag.getInt(BloodMagic.MODID + ".tracker.foodEaten");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.foodEaten", foodEaten);
|
tag.putInt(BloodMagic.MODID + ".tracker.foodEaten", foodEaten);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerGraveDigger extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setDouble(BloodMagic.MODID + ".tracker.graveDigger", totalDamageDealt);
|
tag.putDouble(BloodMagic.MODID + ".tracker.graveDigger", totalDamageDealt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -32,12 +32,12 @@ public class StatTrackerGrimReaperSprint extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalDeaths = tag.getInteger(BloodMagic.MODID + ".tracker.grimReaper");
|
totalDeaths = tag.getInt(BloodMagic.MODID + ".tracker.grimReaper");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.grimReaper", totalDeaths);
|
tag.putInt(BloodMagic.MODID + ".tracker.grimReaper", totalDeaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerHealthboost extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setDouble(BloodMagic.MODID + ".tracker.health", totalHealthGenned);
|
tag.putDouble(BloodMagic.MODID + ".tracker.health", totalHealthGenned);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -32,12 +32,12 @@ public class StatTrackerJump extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(CompoundNBT tag) {
|
public void readFromNBT(CompoundNBT tag) {
|
||||||
totalJumps = tag.getInteger(BloodMagic.MODID + ".tracker.jump");
|
totalJumps = tag.getInt(BloodMagic.MODID + ".tracker.jump");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setInteger(BloodMagic.MODID + ".tracker.jump", totalJumps);
|
tag.putInt(BloodMagic.MODID + ".tracker.jump", totalJumps);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class StatTrackerMeleeDamage extends StatTracker {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(CompoundNBT tag) {
|
public void writeToNBT(CompoundNBT tag) {
|
||||||
tag.setDouble(BloodMagic.MODID + ".tracker.meleeDamage", totalDamageDealt);
|
tag.putDouble(BloodMagic.MODID + ".tracker.meleeDamage", totalDamageDealt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue