mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 16:27:45 +00:00
Clean up description localization (Fixes #104). Fix cloud rendering.
This commit is contained in:
1 parent
1920feeb1d
commit
e8a0dc008f
6 files changed
+843
-825
No files matched your search
@@ -26,7 +26,7 @@ public class Waila implements IWailaDataProvider {
|
||||
public List<String> getWailaBody(ItemStack stack, List<String> strings, IWailaDataAccessor accessor, IWailaConfigHandler configHandler) {
|
||||
if (accessor.getBlock() instanceof BlockCarvable) {
|
||||
BlockCarvable block = (BlockCarvable) accessor.getBlock();
|
||||
strings.add(block.getVariation(accessor.getMetadata()).description);
|
||||
strings.add(block.getVariation(accessor.getMetadata()).getDescription());
|
||||
}
|
||||
return strings;
|
||||
}
|
||||
|
||||
@@ -2,15 +2,20 @@ package com.cricketcraft.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCloud extends BlockCarvable {
|
||||
|
||||
public BlockCloud() {
|
||||
@@ -39,9 +44,14 @@ public class BlockCloud extends BlockCarvable {
|
||||
return Configurations.ghostCloud ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) {
|
||||
return super.shouldSideBeRendered(iblockaccess, i, j, k, 1 - l);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if (block == this) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.shouldSideBeRendered(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,7 +74,7 @@ public class CarvableHelper {
|
||||
blockName = description;
|
||||
|
||||
CarvableVariation variation = new CarvableVariation();
|
||||
variation.description = description;
|
||||
variation.setDescriptionUnloc(description);
|
||||
variation.metadata = metadata;
|
||||
variation.blockName = blockName;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cricketcraft.chisel.carving;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.client.render.TextureSubmap;
|
||||
@@ -8,7 +9,7 @@ import com.cricketcraft.chisel.client.render.TextureSubmap;
|
||||
public class CarvableVariation {
|
||||
|
||||
public String blockName;
|
||||
public String description;
|
||||
private String description;
|
||||
public int metadata;
|
||||
public int kind;
|
||||
|
||||
@@ -28,6 +29,14 @@ public class CarvableVariation {
|
||||
public TextureSubmap submap;
|
||||
public TextureSubmap submapSmall;
|
||||
|
||||
public String getDescription() {
|
||||
return I18n.format(description);
|
||||
}
|
||||
|
||||
public void setDescriptionUnloc(String desc) {
|
||||
this.description = desc;
|
||||
}
|
||||
|
||||
static class CarvableVariationCTM {
|
||||
|
||||
TextureSubmap seams[] = new TextureSubmap[3];
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -51,6 +51,6 @@ public class ItemCarvable extends ItemBlock {
|
||||
if (var == null)
|
||||
return;
|
||||
|
||||
lines.add(var.description);
|
||||
lines.add(var.getDescription());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user