-Reworked some texures

This commit is contained in:
Glenthor 2015-12-26 20:43:24 +01:00
commit 6c3415864c
31 changed files with 140 additions and 61 deletions

View file

@ -18,7 +18,7 @@ buildscript {
apply plugin: 'forge'
apply plugin: 'maven'
version = "1.7.10-r15"
version = "1.7.10-r16"
group = "ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions"

View file

@ -17,14 +17,18 @@ import ellpeck.actuallyadditions.tile.TileEntityLaserRelay;
import ellpeck.actuallyadditions.util.AssetUtil;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.List;
public class BlockLaserRelay extends BlockContainerBase{
public BlockLaserRelay(String name){
@ -35,6 +39,12 @@ public class BlockLaserRelay extends BlockContainerBase{
this.setStepSound(soundTypeStone);
}
@Override
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axis, List list, Entity entity){
this.setBlockBoundsBasedOnState(world, x, y, z);
super.addCollisionBoxesToList(world, x, y, z, axis, list, entity);
}
@Override
public boolean renderAsNormalBlock(){
return false;

View file

@ -72,10 +72,10 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH
if(factory != null){
int state = factory.isMultiblock();
if(state == TileEntityLavaFactoryController.NOT_MULTI){
StringUtil.drawSplitStringWithShadow(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE);
StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.notPart.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
}
else if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){
StringUtil.drawSplitStringWithShadow(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE);
StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".factory.works.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
}
}
}

View file

@ -128,13 +128,13 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{
int distance = (int)Vec3.createVectorHelper(posHit.blockX, posHit.blockY, posHit.blockZ).distanceTo(Vec3.createVectorHelper(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()));
Item item = phantom.getBoundPosition().getItemBlock(minecraft.theWorld);
String name = item == null ? "Absolutely Nothing" : item.getItemStackDisplayName(new ItemStack(phantom.getBoundPosition().getBlock(minecraft.theWorld), 1, phantom.getBoundPosition().getMetadata(minecraft.theWorld)));
StringUtil.drawSplitStringWithShadow(minecraft.fontRenderer, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE);
StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
if(phantom.isBoundThingInRange()){
StringUtil.drawSplitStringWithShadow(minecraft.fontRenderer, EnumChatFormatting.DARK_GREEN+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE);
StringUtil.drawSplitString(minecraft.fontRenderer, EnumChatFormatting.DARK_GREEN+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
}
else{
StringUtil.drawSplitStringWithShadow(minecraft.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE);
StringUtil.drawSplitString(minecraft.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".phantom.connectedNoRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
}
}
else{

View file

@ -22,17 +22,20 @@ import ellpeck.actuallyadditions.util.Util;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
public class BlockSmileyCloud extends BlockContainerBase{
@ -92,6 +95,12 @@ public class BlockSmileyCloud extends BlockContainerBase{
return true;
}
@Override
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axis, List list, Entity entity){
this.setBlockBoundsBasedOnState(world, x, y, z);
super.addCollisionBoxesToList(world, x, y, z, axis, list, entity);
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){
int meta = world.getBlockMetadata(x, y, z);

View file

@ -32,6 +32,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import java.util.Random;
public abstract class BlockContainerBase extends BlockContainer{
@ -110,14 +111,25 @@ public abstract class BlockContainerBase extends BlockContainer{
}
public void updateRedstoneState(World world, int x, int y, int z){
TileEntity tile = world.getTileEntity(x, y, z);
boolean powered = world.isBlockIndirectlyGettingPowered(x, y, z);
if(tile instanceof TileEntityBase){
((TileEntityBase)tile).setRedstonePowered(powered);
tile.markDirty();
if(!world.isRemote){
TileEntity tile = world.getTileEntity(x, y, z);
boolean powered = world.isBlockIndirectlyGettingPowered(x, y, z);
if(tile instanceof TileEntityBase){
((TileEntityBase)tile).setRedstonePowered(powered);
}
if(tile instanceof IRedstoneToggle){
if(((IRedstoneToggle)tile).isPulseMode() && powered){
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
}
}
}
if(tile instanceof IRedstoneToggle){
if(((IRedstoneToggle)tile).isPulseMode() && powered){
}
@Override
public void updateTick(World world, int x, int y, int z, Random random){
if(!world.isRemote){
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof IRedstoneToggle && ((IRedstoneToggle)tile).isPulseMode()){
((IRedstoneToggle)tile).activateOnPulse();
}
}
@ -227,6 +239,7 @@ public abstract class BlockContainerBase extends BlockContainer{
if(tile instanceof IRedstoneToggle){
if(!world.isRemote){
((IRedstoneToggle)tile).toggle(!((IRedstoneToggle)tile).isPulseMode());
tile.markDirty();
if(tile instanceof TileEntityBase){
((TileEntityBase)tile).sendUpdate();

View file

@ -12,9 +12,11 @@ package ellpeck.actuallyadditions.blocks.render.model;
import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.tile.TileEntityCompost;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
public class ModelCompost extends ModelBaseAA{
@ -72,6 +74,11 @@ public class ModelCompost extends ModelBaseAA{
@Override
public void renderExtra(float f, TileEntity tile){
//Hehe
if("ShadowfactsDev".equals(Minecraft.getMinecraft().thePlayer.getCommandSenderName())){
GL11.glTranslatef(0F, 1F, 0F);
}
if(tile instanceof TileEntityCompost){
ItemStack stack = ((TileEntityCompost)tile).getStackInSlot(0);
if(stack != null){

View file

@ -102,6 +102,16 @@ public class GuiBooklet extends GuiScreen{
boolean unicodeBefore = this.fontRendererObj.getUnicodeFlag();
this.fontRendererObj.setUnicodeFlag(true);
//To Player:
//
//FastCraft's a must, definitely
//But the bigger unicode option sucks real
//It screws with my book and makes me feel ill
//So don't fuck with everything unintentionally
//
//(This fixes your fuckery)
GL11.glScalef(1.0F, 1.0F, 1.0F);
//Draws the Background
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(ClientProxy.jingleAllTheWay ? resLocChristmas : (ClientProxy.pumpkinBlurPumpkinBlur ? resLocHalloween : (ClientProxy.bulletForMyValentine ? resLocValentine : resLoc)));
@ -149,7 +159,7 @@ public class GuiBooklet extends GuiScreen{
@Override
public void keyTyped(char theChar, int key){
if(key == Keyboard.KEY_ESCAPE || (!this.searchField.isFocused() && key == Minecraft.getMinecraft().gameSettings.keyBindInventory.getKeyCode())){
if(key == Keyboard.KEY_ESCAPE){
if(this.parentScreen != null){
this.mc.displayGuiScreen(this.parentScreen);
}

View file

@ -63,13 +63,13 @@ public class InitBooklet{
//Getting Started
chapterIntro = new BookletChapter("intro", entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
new BookletChapter("bookTutorial", entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook));
new BookletChapter("crystals", entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PagePicture(3, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(4), new PageCrafting(5, BlockCrafting.recipeAtomicReconstructor).setNoText().setPageStacksWildcard(), new PageCrafting(6, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(7, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(8, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial();
new BookletChapter("crystals", entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setNoText().setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensNoneRecipeHandler.mainPageRecipes).setNoText()).setSpecial();
new BookletChapter("coalGen", entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE));
new BookletChapter("craftingIngs", entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant();
new BookletChapter("rf", entryGettingStarted, new ItemStack(Items.redstone), new PageTextOnly(1));
//Miscellaneous
new BookletChapter("reconstructorLenses", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeColorLens), new PageReconstructor(4, LensNoneRecipeHandler.recipeExplosionLens), new PageReconstructor(5, LensNoneRecipeHandler.recipeDamageLens), new PageReconstructor(6, LensNoneRecipeHandler.recipesGlowstoneRedstone).setNoText(), new PageReconstructor(7, LensNoneRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(8, LensNoneRecipeHandler.recipeLeather).setNoText()).setImportant();
new BookletChapter("reconstructorLenses", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeColorLens), new PageReconstructor(4, LensNoneRecipeHandler.recipeExplosionLens), new PageReconstructor(5, LensNoneRecipeHandler.recipeDamageLens), new PageReconstructor(6, LensNoneRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(7, LensNoneRecipeHandler.recipeLeather).setNoText()).setImportant();
new BookletChapter("miscDecorStuffsAndThings", entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensNoneRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensNoneRecipeHandler.recipeGreenWall).setNoText());
new BookletChapter("bookStand", entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand).setPageStacksWildcard());
new BookletChapter("quartz", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", OreGen.QUARTZ_MIN).addTextReplacement("<highest>", OreGen.QUARTZ_MAX), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
@ -130,7 +130,7 @@ public class InitBooklet{
}
new BookletChapter("aiots", entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant();
new BookletChapter("jams", entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PageTextOnly(2));
new BookletChapter("jams", entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "pageJamHouse", 150), new PageTextOnly(3));
ArrayList<BookletPage> potionRingPages = new ArrayList<BookletPage>();
potionRingPages.add(new PageTextOnly(potionRingPages.size()+1));

View file

@ -74,7 +74,14 @@ public class BookletPage{
return null;
}
String base = StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.chapter.getUnlocalizedName()+".text."+this.localizationKey).replaceAll("<imp>", EnumChatFormatting.DARK_GREEN+"").replaceAll("<item>", EnumChatFormatting.BLUE+"").replaceAll("<r>", EnumChatFormatting.BLACK+"").replaceAll("<n>", "\n").replaceAll("<i>", EnumChatFormatting.ITALIC+"").replaceAll("<rs>", EnumChatFormatting.RESET+"");
String base = StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.chapter.getUnlocalizedName()+".text."+this.localizationKey);
base = base.replaceAll("<imp>", EnumChatFormatting.DARK_GREEN+"");
base = base.replaceAll("<item>", EnumChatFormatting.BLUE+"");
base = base.replaceAll("<r>", EnumChatFormatting.BLACK+"");
base = base.replaceAll("<n>", "\n");
base = base.replaceAll("<i>", EnumChatFormatting.ITALIC+"");
base = base.replaceAll("<tifisgrin>", EnumChatFormatting.DARK_RED+""+EnumChatFormatting.UNDERLINE); //This is fucking important so go read it now
for(Object o : this.textReplacements.entrySet()){
Map.Entry e = (Map.Entry)o;
base = base.replaceAll((String)e.getKey(), (String)e.getValue());

View file

@ -18,6 +18,7 @@ import ellpeck.actuallyadditions.items.ItemCoffee;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.util.AssetUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.item.ItemStack;
@ -46,7 +47,7 @@ public class PageCoffeeRecipe extends BookletPage{
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+100, 115, 0, false);
}
if(this.ingredient.maxAmplifier > 0){

View file

@ -85,7 +85,7 @@ public class PageCrafting extends BookletPage{
IRecipe recipe = this.recipes[this.recipePos];
if(recipe == null){
gui.mc.fontRenderer.drawSplitString(EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0, false);
}
else{
String strg = StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+"."+(recipe instanceof ShapedRecipes ? "shapedRecipe" : (recipe instanceof ShapelessRecipes ? "shapelessRecipe" : (recipe instanceof ShapelessOreRecipe ? "shapelessOreRecipe" : "shapedOreRecipe"))));
@ -94,7 +94,7 @@ public class PageCrafting extends BookletPage{
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+90, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+90, 115, 0, false);
}
if(recipe != null){

View file

@ -56,7 +56,7 @@ public class PageCrusherRecipe extends BookletPage{
@SideOnly(Side.CLIENT)
public void render(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(recipe == null){
gui.mc.fontRenderer.drawSplitString(EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0, false);
}
else{
String strg = "Crusher Recipe";
@ -65,7 +65,7 @@ public class PageCrusherRecipe extends BookletPage{
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+100, 115, 0, false);
}
if(recipe != null){

View file

@ -60,7 +60,7 @@ public class PageFurnace extends BookletPage{
public void render(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
ItemStack input = this.input != null ? this.input : this.getInputForOutput(this.result);
if(input == null){
gui.mc.fontRenderer.drawSplitString(EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0, false);
}
else{
String strg = "Furnace Recipe";
@ -69,7 +69,7 @@ public class PageFurnace extends BookletPage{
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+100, 115, 0, false);
}
if(input != null){

View file

@ -14,6 +14,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.util.AssetUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.util.ResourceLocation;
public class PagePicture extends PageTextOnly{
@ -35,7 +36,7 @@ public class PagePicture extends PageTextOnly{
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+textStartY, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+textStartY, 115, 0, false);
}
}
}

View file

@ -70,7 +70,7 @@ public class PageReconstructor extends BookletPage{
public void render(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
LensNoneRecipeHandler.Recipe recipe = this.recipes[this.recipePos];
if(recipe == null){
gui.mc.fontRenderer.drawSplitString(EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, EnumChatFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0, false);
}
else{
String strg = "Atomic Reconstructor";
@ -79,7 +79,7 @@ public class PageReconstructor extends BookletPage{
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+100, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+100, 115, 0, false);
}
if(recipe != null){

View file

@ -13,6 +13,7 @@ package ellpeck.actuallyadditions.booklet.page;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.item.ItemStack;
public class PageTextOnly extends BookletPage{
@ -39,7 +40,7 @@ public class PageTextOnly extends BookletPage{
public void renderPre(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
String text = gui.currentEntrySet.page.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+9, 115, 0);
StringUtil.drawSplitString(gui.mc.fontRenderer, text, gui.guiLeft+14, gui.guiTop+9, 115, 0, false);
}
}
}

View file

@ -623,7 +623,7 @@ public class BlockCrafting{
"CCC", "CRP", "CCC",
'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal())));
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal())));
recipePlacer = Util.GetRecipes.lastIRecipe();
}
@ -633,7 +633,7 @@ public class BlockCrafting{
"CCC", "CRP", "CCC",
'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal())));
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal())));
recipeBreaker = Util.GetRecipes.lastIRecipe();
}

View file

@ -79,6 +79,9 @@ public class CrusherCrafting{
CrusherRecipeRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.sugar, 2));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe(new ItemStack(Blocks.glowstone), new ItemStack(Items.glowstone_dust, 4));
miscRecipes.add(Util.GetRecipes.lastCrusherRecipe());
CrusherRecipeRegistry.addRecipe("oreNickel", "dustNickel", 2, "dustPlatinum", 1, 15);
CrusherRecipeRegistry.addRecipe("oreIron", "dustIron", 2, "dustGold", 1, 20);

View file

@ -38,7 +38,6 @@ public class LensNoneRecipeHandler{
public static Recipe recipeExplosionLens;
public static Recipe recipeDamageLens;
public static Recipe recipeLeather;
public static Recipe[] recipesGlowstoneRedstone = new Recipe[2];
public static void init(){
//Crystal Blocks
@ -94,11 +93,6 @@ public class LensNoneRecipeHandler{
recipeWhiteWall = Util.GetRecipes.lastReconstructorRecipe();
addRecipe(new ItemStack(Blocks.quartz_block, 1, 1), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10);
recipeGreenWall = Util.GetRecipes.lastReconstructorRecipe();
addRecipe(new ItemStack(Items.redstone), new ItemStack(Items.glowstone_dust), 4000);
recipesGlowstoneRedstone[0] = Util.GetRecipes.lastReconstructorRecipe();
addRecipe(new ItemStack(Items.glowstone_dust), new ItemStack(Items.redstone), 4000);
recipesGlowstoneRedstone[1] = Util.GetRecipes.lastReconstructorRecipe();
}
}

View file

@ -124,6 +124,7 @@ public abstract class TileEntityBase extends TileEntity{
public void setRedstonePowered(boolean powered){
this.isRedstonePowered = powered;
this.markDirty();
}
protected boolean sendUpdateWithInterval(){

View file

@ -43,13 +43,13 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
@SideOnly(Side.CLIENT)
public void renderParticles(){
if(Util.RANDOM.nextInt(2) == 0){
if(Util.RANDOM.nextInt(15) == 0){
Position thisPos = new Position(this.xCoord, this.yCoord, this.zCoord);
LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(thisPos);
if(network != null){
for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){
if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){
PacketParticle.renderParticlesFromAToB(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ(), aPair.secondRelay.getX(), aPair.secondRelay.getY(), aPair.secondRelay.getZ(), ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 6, 0.6F, COLOR, 0.6F);
PacketParticle.renderParticlesFromAToB(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ(), aPair.secondRelay.getX(), aPair.secondRelay.getY(), aPair.secondRelay.getZ(), ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 4, 0.8F, COLOR, 1F);
}
}
}

View file

@ -14,6 +14,7 @@ import com.mojang.authlib.GameProfile;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.FakePlayerFactory;
import java.util.UUID;
@ -30,7 +31,7 @@ public class FakePlayerUtil{
public static FakePlayer getFakePlayer(World world){
if(world instanceof WorldServer){
if(theFakePlayer == null){
theFakePlayer = new FakePlayer((WorldServer)world, FAKE_PROFILE);
theFakePlayer = FakePlayerFactory.get((WorldServer)world, FAKE_PROFILE);
}
return theFakePlayer;
}

View file

@ -13,7 +13,6 @@ package ellpeck.actuallyadditions.util;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.util.StatCollector;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
@ -52,11 +51,11 @@ public class StringUtil{
}
}
public static void drawSplitStringWithShadow(FontRenderer renderer, String strg, int x, int y, int width, int color){
public static void drawSplitString(FontRenderer renderer, String strg, int x, int y, int width, int color, boolean shadow){
List list = renderer.listFormattedStringToWidth(strg, width);
for(Iterator iterator = list.iterator(); iterator.hasNext(); y += renderer.FONT_HEIGHT){
String s1 = (String)iterator.next();
renderer.drawString(s1, x, y, color, true);
for(int i = 0; i < list.size(); i++){
String s1 = (String)list.get(i);
renderer.drawString(s1, x, y+(i*renderer.FONT_HEIGHT), color, shadow);
}
}
}

View file

@ -20,6 +20,7 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
@ -137,23 +138,29 @@ public class WorldUtil{
}
}
//Redstone
else if(stack.getItem() == Items.redstone){
world.setBlock(x+side.offsetX, y+side.offsetY, z+side.offsetZ, Blocks.redstone_wire);
stack.stackSize--;
}
//Plants
if(stack.getItem() instanceof IPlantable){
else if(stack.getItem() instanceof IPlantable){
if(((IPlantable)stack.getItem()).getPlant(world, x, y, z).canPlaceBlockAt(world, x+side.offsetX, y+side.offsetY, z+side.offsetZ)){
if(world.setBlock(x+side.offsetX, y+side.offsetY, z+side.offsetZ, ((IPlantable)stack.getItem()).getPlant(world, x, y, z))){
stack.stackSize--;
return stack;
}
}
}
try{
//Blocks
stack.tryPlaceItemIntoWorld(FakePlayerUtil.getFakePlayer(world), world, x, y, z, side == ForgeDirection.UNKNOWN ? 0 : side.ordinal(), 0, 0, 0);
return stack;
}
catch(Exception e){
ModUtil.LOGGER.error("Something that places Blocks at "+x+", "+y+", "+z+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!");
else{
try{
//Blocks
stack.tryPlaceItemIntoWorld(FakePlayerUtil.getFakePlayer(world), world, x, y, z, side == ForgeDirection.UNKNOWN ? 0 : side.ordinal(), 0, 0, 0);
return stack;
}
catch(Exception e){
ModUtil.LOGGER.error("Something that places Blocks at "+x+", "+y+", "+z+" in World "+world.provider.dimensionId+" threw an Exception! Don't let that happen again!");
}
}
}
return stack;

View file

@ -487,7 +487,7 @@ booklet.actuallyadditions.amountOfChars=%s characters in total
booklet.actuallyadditions.chapter.intro.name=An Introduction to ActAdd
booklet.actuallyadditions.chapter.intro.text.1=<i>For too long have the people of Minecraftia toiled under a relentless whip. A whip more hurtful and more injurious than that of any slave-master: inconvenience. Aye, the thousand million inconveniences that make up the grind, that force players to waste hours- nay, days!- chopping wood and farming wheat and other such mundane tasks, just to momentarily escape the remorseless tedium and experience the true joys of Minecraftia, building, caving and adventuring into the beautiful uncharted abundance
booklet.actuallyadditions.chapter.intro.text.2=<i>of the world. Yet no sooner has one immersed oneself in this creative enterprise than the inconveniences return, like millions of furious bees pestering, stinging, swarming all over you until the game ceases to be enjoyable, and you are driven away from it forever. To that end, a certain Ellpeck has created this Actual Addition to the world of Minecraft, that will allow the player to better engage with the core experiences of the game- building and adventuring- by automating and streamlining the monotony that
booklet.actuallyadditions.chapter.intro.text.3=<i>is grinding in Minecraft. Therefore, Ellpeck humbly presents to you this Actually Additions Manual, that shall teach you the ways of this modification and, ultimately, allow you to transcend inconvenience and attain enlightenment. <rs><n><n> ~by <imp>Tulkas<r>
booklet.actuallyadditions.chapter.intro.text.3=<i>is grinding in Minecraft. Therefore, Ellpeck humbly presents to you this Actually Additions Manual, that shall teach you the ways of this modification and, ultimately, allow you to transcend inconvenience and attain enlightenment. <r><n><n> ~by <imp>Tulkas<r>
booklet.actuallyadditions.chapter.craftingIngs.name=Crafting Ingredients
booklet.actuallyadditions.chapter.craftingIngs.text.1=<imp>Actually Additions<r> has lots of items that use certain <imp>basic crafting items<r> to be crafted. This chapter has all of these basic items <imp>grouped up<r> so that you can see all of them at once.
@ -556,7 +556,7 @@ booklet.actuallyadditions.chapter.coffeeMachine.text.1=The <item>Coffee Machine<
booklet.actuallyadditions.chapter.coffeeMachine.text.2=To actually give your coffee some buffs, <imp>put some of the items shown on the later pages into the slots on the right<r>. <n>The more slots are filled up with one item, the higher the <imp>Amplifier<r> of the effect will be. The <imp>Maximum Amplifier<r> is the max amount of items to be put into one coffee. <n>Order matters: When using, for example, <item>Milk<r> (to see what it does exactly, go to a later page), you are going to have to plan the items out inside the <imp>numbered slots<r> in such a way that it brews the coffee you want.
booklet.actuallyadditions.chapter.coffeeMachine.text.3=This is an example of a recipe making a coffee containing <imp>Fire Resistance 1 for 0:20<r> and <imp>Speed 1 for 2:30<r>.
booklet.actuallyadditions.chapter.coffeeMachine.text.6=<item>Milk<r> is an important item when brewing coffee: It <imp>adds 2 minutes<r> to all effects of items in slots with lower numbers while <imp>removing 1 amplifier<r>. When the amplifier of an effect is 1, however, it will remove the effect.
booklet.actuallyadditions.chapter.coffeeMachine.text.7=<i>The fact that you're reading this means that you either have <imp>HarvestCraft<r><i> installed, or that you're looking at the lang file. <rs><n>This does the same thing as <item>Milk<r>, but for veggie guys.
booklet.actuallyadditions.chapter.coffeeMachine.text.7=<i>The fact that you're reading this means that you either have <imp>HarvestCraft<r><i> installed, or that you're looking at the lang file. <r><n>This does the same thing as <item>Milk<r>, but for veggie guys.
booklet.actuallyadditions.chapter.crusher.name=Crusher and Double Crusher
booklet.actuallyadditions.chapter.crusher.text.1=The <item>Crusher<r> turns every ore, ingot and gem into its corresponding <imp>dust<r> using <rf1> RF/t. <n>When you put in <imp>Ores<r> however, they will yield <imp>2 pieces of dust<r>. <n>The <item>Double Crusher<r> basically does the same, however it can crush two ores at a time and uses <rf2> RF/t. <n>On the following pages, you can see some additional useful recipes for inside the crusher. <n><n><i>He's my crush
@ -599,7 +599,8 @@ booklet.actuallyadditions.chapter.aiots.text.1=An <item>All-In-One-Tool<r> is a
booklet.actuallyadditions.chapter.jams.name=Jams
booklet.actuallyadditions.chapter.jams.text.1=Once, there was a <imp>Kitty<r> who really wanted some Jam. <n>So I made some <item>Jam<r>. <n>Seriously, this is Jam. You can find it in Village Houses or buy it from the <imp>Jam Villager<r>. <n>Every Jam gives you two different <imp>potion effects<r>!
booklet.actuallyadditions.chapter.jams.text.2=So. <n>You're probably wondering what the names of the jams mean. <n>Now, let me tell you: <n><n><i>-Honeydew Melon and Kiwi <n>-Honeydew Melon and Coconut <n>-Pineapple and Coconut <n>-Cherry, Apple and Cinnamon <n>-Plum, Apple and Lemon <n>-Grape, Kiwi and Banana <n>-Currant, Banana and Raspberry <n><n><rs>Now, which one is which, you may ask? Figure it out yourself.
booklet.actuallyadditions.chapter.jams.text.2=A <imp>Jam House<r> and <n>its inhabitant
booklet.actuallyadditions.chapter.jams.text.3=So. <n>You're probably wondering what the names of the jams mean. <n>Now, let me tell you: <n><n><i>-Honeydew Melon and Kiwi <n>-Honeydew Melon and Coconut <n>-Pineapple and Coconut <n>-Cherry, Apple and Cinnamon <n>-Plum, Apple and Lemon <n>-Grape, Kiwi and Banana <n>-Currant, Banana and Raspberry <n><n><r>Now, which one is which, you may ask? Figure it out yourself.
booklet.actuallyadditions.chapter.potionRings.name=Potion Rings
booklet.actuallyadditions.chapter.potionRings.text.1=The <item>Potion Rings<r> have two versions: A <imp>normal version<r> and an <imp>advanced version<r>. <n>The normal version, when you have it in your hand, will give you a <imp>Potion Effect<r> of Level 1. The advanced version can be anywhere in your inventory and gives you an effect of Level 2!
@ -649,9 +650,10 @@ booklet.actuallyadditions.chapter.blackLotus.text.1=Think of this: <n>You need t
booklet.actuallyadditions.chapter.blackLotus.text.2=<i>No, not that one, Vaz
booklet.actuallyadditions.chapter.crystals.name=Crystals and Reconstructor
booklet.actuallyadditions.chapter.crystals.text.1=The <item>Atomic Reconstructor<r> is used to craft <item>Crystals<r>, which are the main crafting ingredient in most items from <imp>Actually Additions<r>. <n>Upon being supplied with power, it shoots out a Laser. When the Laser hits a block, it will convert all surrounding items and blocks, provided they can be converted. <n>When shooting a laser, it uses <imp><rf> RF<r>, but additional rates vary depending on the conversion.
booklet.actuallyadditions.chapter.crystals.text.1=The <item>Atomic Reconstructor<r> is used to craft <item>Crystals<r>, which are the main crafting ingredient in most items from <imp>Actually Additions<r>. <n>Upon being supplied with power, it shoots out a Laser. <tifisgrin>When the Laser hits a block<r>, it will convert all surrounding items and blocks, provided they can be converted. <n>When shooting a laser, it uses <imp><rf> RF<r>, but additional rates vary depending on the conversion.
booklet.actuallyadditions.chapter.crystals.text.2=There are various <item>Lenses<r> that can be attached to the Reconstructor that don't all follow the default behavior of the Reconstructor and are able to do some neat things. <n>See the <imp>"Reconstructor Lenses & Misc"<r> chapter in the booklet's Miscellaneous section <imp>for more information<r>. <n><n>When right-clicking the Reconstructor with a <item>Redstone Torch<r> in hand, it will change between a mode where it <imp>gets deactivated by Redstone<r> and a mode where it <imp>responds to pulses<r>.
booklet.actuallyadditions.chapter.crystals.text.4=When you have crafted a couple of items, you might want to find a way to <imp>automate this<r>. <n>There is a very simple way to do accomplish this: <n>Place the <item>Atomic Reconstructor<r> down facing into a <item>Precision Dropper<r> (to find it, look it up in the <imp>All Items and Search<r> Entry!). <n>Next, place a <item>Ranged Collector<r> in the area that has the converted items set as a whitelist. <n>Now you can just chuck your raw materials into the Dropper to convert them!
booklet.actuallyadditions.chapter.crystals.text.3=It should be noted that any recipes listed without information about Lenses <imp>don't use one<r>. <n><i>I thought that was obvious.
booklet.actuallyadditions.chapter.crystals.text.5=When you have crafted a couple of items, you might want to find a way to <imp>automate this<r>. <n>There is a very simple way to do accomplish this: <n>Place the <item>Atomic Reconstructor<r> down facing into a <item>Precision Dropper<r> (to find it, look it up in the <imp>All Items and Search<r> Entry!). <n>Next, place a <item>Ranged Collector<r> in the area that has the converted items set as a whitelist. <n>Now you can just chuck your raw materials into the Dropper to convert them!
booklet.actuallyadditions.chapter.bookTutorial.name=Intro to the Manual
booklet.actuallyadditions.chapter.bookTutorial.text.1=The <item>Actually Additions Manual<r> is very versatile. Here is a quick overview: <n><imp>Entries & Chapters<r><n>An Entry is a general topic while a Chapter is almost always pointed to a specific item. When closing a chapter, the index opens, when closing that, the front page will. <n><imp>Bookmarks<r><n>Bookmarks, as seen on the bottom of the booklet, store the current page when clicked and can restore said page when clicked again. This can be very useful for easy navigation.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -1,3 +1,16 @@
# 1.7.10-r16
##### THE GREAT BTM HOTFIX UPDATE ~ ~ ~
- Fixed FastCraft fucking up the booklet if the "bigger unicode font" option is enabled
- #BlameShadowfacts (Seriously, he is to blame.)
- Fixed blocks activating too often in redstone pulse mode
- Fixed Fake Player
- Placers can now place redstone
- Fixed Smiley Cloud's and Laser Relay's Bounding Box sometimes messing up
- Made Laser Relay's particles render less heavily - but also look a bit less good :(
- Made Slabs become right double slabs >_>
- Made Lava Factory update RF properly
- Made the compost update when putting in things with automation (damn.)
# 1.7.10-r15
- Added a fancy hud display instead of chat messages to Reconstructor, Phantomfaces, Manual Stand, Composts and more
- Sneak-Right-Clicking the booklet on an ActAdd block will now open its chapter

View file

@ -1 +1 @@
1.7.10-r15
1.7.10-r16