Merge branch 'dev' into ctmlib

This commit is contained in:
tterrag1098 committed 2015-06-22 15:42:01 -04:00
commit 78ffa78b48
18 files changed
+142 -36

No files matched your search

@@ -52,7 +52,7 @@ import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.Type;
@Mod(modid = Chisel.MOD_ID, name = Chisel.MOD_NAME, version = Chisel.VERSION, guiFactory = "com.cricketcraft.chisel.client.gui.GuiFactory", dependencies = "after:ForgeMultipart;after:Thaumcraft;after:appliedenergistics2;after:Railcraft;after:AWWayofTime;after:TwilightForest")
@Mod(modid = Chisel.MOD_ID, name = Chisel.MOD_NAME, version = Chisel.VERSION, guiFactory = "com.cricketcraft.chisel.client.gui.GuiFactory", dependencies = "after:EE3;after:ForgeMultipart;after:Thaumcraft;after:appliedenergistics2;after:Railcraft;after:AWWayofTime;after:TwilightForest")
public class Chisel {
public static final String MOD_ID = "chisel";
@@ -786,16 +786,14 @@ public enum Features {
FUTURA {
// TODO Overlay is WIP
@Override
void addBlocks() {
BlockCarvable futura = (BlockCarvable) new BlockCarvable(Material.rock/*
* , "futura/screenOverlay-ctm"
*/).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
BlockCarvable futura = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
futura.carverHelper.addVariation("tile.futura.0.desc", 0, "futura/WIP/screenMetallicWIP");
futura.carverHelper.addVariation("tile.futura.1.desc", 1, "futura/WIP/screenCyanWIP");
futura.carverHelper.addVariation("tile.futura.2.desc", 2, "futura/WIP/controllerWIP", new SubmapManagerFakeController());
futura.carverHelper.addVariation("tile.futura.2.desc", 2, "futura/WIP/controllerWIP-Overlay", new SubmapManagerFakeController(2));
futura.carverHelper.addVariation("tile.futura.3.desc", 3, "futura/WIP/wavyWIP");
futura.carverHelper.addVariation("tile.futura.4.desc", 4, "futura/WIP/controllerWIP-Overlay", new SubmapManagerFakeController(4));
futura.carverHelper.registerAll(futura, "futura");
BlockCarvable circuits = (BlockCarvable) new BlockCarvableGlow("animations/strobe").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
@@ -1,5 +1,6 @@
package com.cricketcraft.chisel.block;
import com.cricketcraft.chisel.client.render.SubmapManagerBase;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
@@ -14,6 +15,7 @@ public class BlockCarvableGlow extends BlockCarvableColor {
@SideOnly(Side.CLIENT)
private IIcon glowTexture;
private SubmapManagerBase submapManagerBase;
private String glowTexturePath;
public BlockCarvableGlow(String glowTexture) {
@@ -27,12 +29,26 @@ public class BlockCarvableGlow extends BlockCarvableColor {
this.glowTexturePath = glowTexture;
}
public BlockCarvableGlow(Material material, String glowTexture, SubmapManagerBase submapManagerBase){
super(material);
this.glowTexturePath = glowTexture;
this.submapManagerBase = submapManagerBase;
}
@Override
public void registerBlockIcons(IIconRegister register) {
super.registerBlockIcons(register);
glowTexture = register.registerIcon(Chisel.MOD_ID + ":" + glowTexturePath);
}
public boolean hasSubmapManager(){
return submapManagerBase == null;
}
public SubmapManagerBase getSubmapManager(){
return hasSubmapManager() ? submapManagerBase : null;
}
public IIcon getGlowTexture() {
return glowTexture;
}
@@ -106,6 +106,7 @@ public class PlayerSpecials {
renderMap.putAll(UUID.fromString("5399b615-3440-4c66-939d-ab1375952ac3"), Lists.newArrayList(backChisel, translucent)); // Drullkus
renderMap.put(UUID.fromString("671516b1-4fb3-4c03-aa7c-9c88cfab3ae8"), new RenderHolstered(new ItemStack(ChiselItems.diamondChisel))); // tterrag
renderMap.put(UUID.fromString("ad18f501-08fa-4e7e-b324-86750009106e"), new RenderHolstered(new ItemStack(ChiselItems.chisel)));//minecreatr
MinecraftForge.EVENT_BUS.register(this);
}
@@ -147,7 +148,9 @@ public class PlayerSpecials {
}
private boolean nameIsGood(Entity entity){
if(EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("Cricket") || EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("TheCricket26"))
if(EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("Cricket")
|| EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("Drullkus")
|| EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("minecreatr"))
return true;
return false;
}
@@ -1,5 +1,7 @@
package com.cricketcraft.chisel.client.render;
import com.cricketcraft.chisel.api.carving.IVariationInfo;
import com.cricketcraft.chisel.api.rendering.RenderBlocksCTM;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -37,11 +39,33 @@ public class RendererLayeredGlow implements ISimpleBlockRenderingHandler {
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
Tessellator.instance.setColorOpaque_I(Configurations.configColors[world.getBlockMetadata(x, y, z)]);
Tessellator.instance.setBrightness(0xF000F0);
Drawing.renderAllFaces(renderer, block, x, y, z, ((BlockCarvableGlow) block).getGlowTexture());
Tessellator.instance.setBrightness(0xF000F0);
BlockCarvableGlow glow = (BlockCarvableGlow) block;
if(glow.hasSubmapManager()){
renderer.overrideBlockTexture = glow.getGlowTexture();
getContext(renderer, glow, world).renderBlockAllFaces(glow, x, y, z);
} else {
Drawing.renderAllFaces(renderer, block, x, y, z, ((BlockCarvableGlow) block).getGlowTexture());
}
renderer.renderStandardBlock(block, x, y, z);
return true;
}
private RenderBlocks getContext(RenderBlocks rendererOld, BlockCarvableGlow block, IBlockAccess world) {
if (!rendererOld.hasOverrideBlockTexture() && block != null) {
RenderBlocks rb = block.getSubmapManager().createRenderContext(rendererOld, block, world);
if (rb != null && rb != rendererOld) {
rb.blockAccess = world;
if (rb instanceof RenderBlocksCTM) {
RenderBlocksCTM rbctm = (RenderBlocksCTM) rb;
rbctm.manager = rbctm.manager == null ? block.getSubmapManager() : rbctm.manager;
rbctm.rendererOld = rbctm.rendererOld == null ? rendererOld : rbctm.rendererOld;
}
return rb;
}
}
return rendererOld;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
@@ -18,9 +18,11 @@ public class SubmapManagerFakeController extends SubmapManagerBase {
private TextureSubmap map;
private CTM ctm = CTM.getInstance();
private int meta;
public SubmapManagerFakeController() {
public SubmapManagerFakeController(int meta) {
ctm.disableObscuredFaceCheck = true;
this.meta = meta;
}
@Override
@@ -30,7 +32,7 @@ public class SubmapManagerFakeController extends SubmapManagerBase {
@Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
ctm.buildConnectionMap(world, x, y, z, side, ChiselBlocks.futura, 2);
ctm.buildConnectionMap(world, x, y, z, side, ChiselBlocks.futura, meta);
if (ctm.connectedAnd(TOP, BOTTOM, LEFT, RIGHT)) {
return map.getSubIcon(1, 1);
} else if (ctm.connectedAnd(TOP, BOTTOM)) {
@@ -45,6 +47,10 @@ public class SubmapManagerFakeController extends SubmapManagerBase {
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(String modName, Block block, IIconRegister register) {
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controllerWIP-ctm"), 2, 2);
if(meta == 2){
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controller"), 2, 2);
} else {
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controllerPurple"), 2, 2);
}
}
}
@@ -85,6 +85,7 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
}
@Override
@SideOnly(Side.CLIENT)
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
if (rb == null) {
rb = new RenderBlocksVoidstone();
@@ -105,7 +105,7 @@ public class Compatibility {
}
private static void loadEE3Values(){
FMLLog.log(Chisel.MOD_ID, Level.INFO, "Oooh is that Equivalent Exchange I see?");
FMLLog.log(Chisel.MOD_ID, Level.INFO, "[Chisel 2] Oooh is that Equivalent Exchange I see?");
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselItems.ballomoss, 1), 16);
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sand_snakestone, 1, 1), 8);
@@ -128,8 +128,10 @@ public class InventoryChiselSelection implements IInventory {
activeVariations = 0;
while (activeVariations < normalSlots && activeVariations < list.size()) {
inventory[activeVariations] = list.get(activeVariations);
activeVariations++;
if(Block.blockRegistry.getNameForObject(Block.getBlockFromItem(list.get(activeVariations).getItem())) != null) {
inventory[activeVariations] = list.get(activeVariations);
activeVariations++;
}
}
container.onChiselSlotChanged();
@@ -14,6 +14,8 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -50,13 +52,32 @@ public class ItemChisel extends Item implements IChiselItem {
}
@Override
public int getMaxDamage(ItemStack stack) {
if (Configurations.allowChiselDamage) {
public int getMaxDamage(ItemStack stack){
if(Configurations.allowChiselDamage)
return type.maxDamage;
}
return 0;
}
@Override
public boolean isDamageable(){
return Configurations.allowChiselDamage;
}
@Override
public boolean getIsRepairable(ItemStack damagedItem, ItemStack repairMaterial)
{
switch (type) {
case DIAMOND:
return repairMaterial.getItem().equals(Items.diamond);
case IRON:
return repairMaterial.getItem().equals(Items.iron_ingot);
case OBSIDIAN:
return repairMaterial.getItem().equals(Item.getItemFromBlock(Blocks.obsidian));
}
return false;
}
@Override
public String getUnlocalizedName(ItemStack stack) {
return "item." + Chisel.MOD_ID + ".chisel_" + type.name().toLowerCase();
@@ -239,6 +239,7 @@ tile.futura.0.desc=Glowing Screen with Metallic Borders
tile.futura.1.desc=Glowing Screen with Cyan Borders
tile.futura.2.desc=Applied Labyrinthic Neon Lines
tile.futura.3.desc=Poptart Rainbow
tile.futura.4.desc=Purple Applied Labyrinthic Neon Lines
tile.futuraCircuit.black.desc=Black
tile.futuraCircuit.blue.desc=Blue
tile.futuraCircuit.brown.desc=Brown
@@ -1,10 +1,13 @@
# 핵심 한글화 (Key localizations)
# 상태 한글화 (Stat localizations)
stat.blockChiseled=가공된 블록
# 엔티티 한글화 (Entity localizations)
entity.chisel.snowman.name=눈 골렘
# 아이템 한글화 (Item localizations)
item.chisel.name=끌
item.chisel.chisel_iron.name=끌
item.chisel.chisel.desc.gui=우클릭으로 GUI 열기
item.chisel.chisel.desc.lc1=왼클릭으로 블록을 순차적으로 모양을 변경
@@ -23,10 +26,12 @@ item.smashingRock.desc=우클릭으로 던지기. 조약돌을 자갈로 자갈
item.upgrade_speed.name=속도 업그레이드
item.upgrade_automation.name=자동화 업그레이드
item.upgrade_stack.name=중첩 업그레이드
item.upgrade_reversion.name=복원 업그레이드
item.upgrade_speed.desc=작업 속도를 증가시킵니다.
item.upgrade_automation.desc=블록들을 자동으로 넣고 뺄 수 있게 합니다.
item.upgrade_stack.desc=한 번에 작업하는 블록 양을 늘립니다.
item.upgrade_reversion.desc=슬롯에 있는 블록을 기본이 되는 블록으로 변환합니다.
# 블록 한글화 (Block localizations)
# Have fun! ~zombiepig333
@@ -109,6 +114,10 @@ tile.granite.6.desc=작은 화강암 타일
tile.chisel.autoChisel.name=자동화 끌
autochisel.slot.chisel.tooltip=끌 넣는 곳
autochisel.slot.target.tooltip=견본 넣는 곳
autochisel.slot.speed.tooltip=속도 업그레이드
autochisel.slot.automation.tooltip=자동화 업그레이드
autochisel.slot.stack.tooltip=중첩 업그레이드
autochisel.slot.reversion.tooltip=복원 업그레이드
# 나뭇잎 (Leaves)
tile.chisel.leaves.name=나뭇잎
@@ -131,21 +140,21 @@ tile.voidstone.5.desc=금속 테두리의 공허석
tile.voidstone.6.desc=눈 문양의 공허석
tile.voidstone.7.desc=모서리를 다듬은 공허석
tile.chisel.voidstoneRunic.name=룬이 새겨진 공허석
tile.voidstoneRunic.0.desc=공허석 - 주황색 룬
tile.voidstoneRunic.1.desc=공허석 - 자홍색 룬
tile.voidstoneRunic.2.desc=공허석 - 하늘색 룬
tile.voidstoneRunic.3.desc=공허석 - 노란색 룬
tile.voidstoneRunic.4.desc=공허석 - 연두색 룬
tile.voidstoneRunic.5.desc=공허석 - 분홍색 룬
tile.voidstoneRunic.6.desc=공허석 - 회색 룬
tile.voidstoneRunic.7.desc=공허석 - 밝은 회색 룬
tile.voidstoneRunic.8.desc=공허석 - 청록색 룬
tile.voidstoneRunic.9.desc=공허석 - 보라색 룬
tile.voidstoneRunic.10.desc=공허석 - 파란색 룬
tile.voidstoneRunic.11.desc=공허석 - 갈색 룬
tile.voidstoneRunic.12.desc=공허석 - 초록색 룬
tile.voidstoneRunic.13.desc=공허석 - 빨간색 룬
tile.voidstoneRunic.14.desc=공허석 - 검은색 룬
tile.voidstoneRunic.orange.desc=공허석 - 주황색 룬
tile.voidstoneRunic.magenta.desc=공허석 - 자홍색 룬
tile.voidstoneRunic.lightblue.desc=공허석 - 하늘색 룬
tile.voidstoneRunic.yellow.desc=공허석 - 노란색 룬
tile.voidstoneRunic.lime.desc=공허석 - 연두색 룬
tile.voidstoneRunic.pink.desc=공허석 - 분홍색 룬
tile.voidstoneRunic.gray.desc=공허석 - 회색 룬
tile.voidstoneRunic.lightgray.desc=공허석 - 밝은 회색 룬
tile.voidstoneRunic.cyan.desc=공허석 - 청록색 룬
tile.voidstoneRunic.purple.desc=공허석 - 보라색 룬
tile.voidstoneRunic.blue.desc=공허석 - 파란색 룬
tile.voidstoneRunic.brown.desc=공허석 - 갈색 룬
tile.voidstoneRunic.green.desc=공허석 - 초록색 룬
tile.voidstoneRunic.red.desc=공허석 - 빨간색 룬
tile.voidstoneRunic.black.desc=공허석 - 검은색 룬
# 공허석 기둥 (Void Stone Pillars)
tile.chisel.voidstonePillar.name=공허석 기둥
@@ -230,6 +239,7 @@ tile.futura.0.desc=빛나는 화면과 금속 테두리
tile.futura.1.desc=빛나는 화면과 청록색 테두리
tile.futura.2.desc=응용 에너지학 네온 회선
tile.futura.3.desc=팝타르 무지개
#tile.futura.4.desc=Purple Applie Labyrinthic Neon Lines
tile.futuraCircuit.black.desc=검은색
tile.futuraCircuit.blue.desc=파란색
tile.futuraCircuit.brown.desc=갈색
@@ -651,6 +661,11 @@ tile.glass2.0.desc=비대칭의 납이 섞인 유리
# 사암 (Sandstone)
tile.chisel.sandstone.name=사암
tile.sandstone.0.desc=문양있는 사암
tile.sandstone.1.desc=사암 조약돌
tile.sandstone.2.desc=크리퍼 문양 사암
tile.sandstone.3.desc=마모된 사암
tile.sandstone.4.desc=사암 기둥
tile.sandstone.5.desc=사암 기둥 갓돌
Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 5.2 KiB

@@ -2,6 +2,7 @@
"animation": {
"frametime": 3,
"frames": [
0,
1,
2,
3,
@@ -12,8 +13,7 @@
8,
9,
10,
11,
0
11
]
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

@@ -0,0 +1,19 @@
{
"animation": {
"frametime": 2,
"frames": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
]
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB